Gabriel

in the first post you said that the database is selected at login, so you
basically have a multi-client-system where each client has a separate
database. The solution is to use a request-scoped DifferentDatabaseScope
with the database connection string stored in the user's session.
So, why would you want to create an interceptor and to change the database
in between sessions? Like Josh wrote, that is insane. Let your client
explain you why he has this requirement and look whether you can talk him to
a more maintainable solution.

-Markus

2008/12/9 Gabriel Mancini de Campos <[EMAIL PROTECTED]>

>
> I know,
>
> but the original system (in asp 3) and i try to migration to .net with
> monorail, ar ...
> and this particular (and bizzar) behavor is a customer requires. :(
>
> so any idea?
>
>
>
> josh robb wrote:
> > On Thu, Dec 4, 2008 at 6:06 AM, Gabriel Mancini de Campos
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > hi i have thinking...
> > >
> > > is not a better choice create a  public class MultiBaseInterceptior :
> > > IInterceptor ???
> > > and in moment of persistence, change the DB?
> > > someone here, know's which method from IInterceptor will be the better
> > > to implement the change???
> >
> > This sounds like a pretty insane idea to me.
> >
> > Basically - you've done all your logic/validation using one DB and
> > then you want to write the actual changes to another.
> >
> > I guess if you want all your reads to happen from one DB and all your
> > writes to happen to another - then it's possible this isn't bad idea.
> >
> > Generally - you're going to get FK constraint errors, duplicate keys
> > and all sorts of problems if you go this path (and it's not exactly
> > what you want).
> >
> > j.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to