RE: AW: AW: Multiple Databases within the same application

"Shash Chatterjee" <[email protected]>
Newsgroups gmane.comp.java.keel.user
Message-ID <[email protected]>
Tim,

In short, yes :-)

Sometimes too much info is bad!

Shash

> Shash, 
> 
> I'm sorry, now I am more confused. 
> 
> I have 3 connections, all constructed in the manner you explained in 
> a previous email within this thread. 
> 
> I was asking if it was possible to designate one of those 
> connections as the default connection. 
> 
> I want to call: req.getDomain() and get that specific connection. 
> 
> Is this possible?
> 
> Thanks,
> Tim
> 
> -----Original Message-----
> From: user-keelframework.org-admin-rI8AND0JKYOgdSakss0wQjfEH8FBEnyy@public.gmane.org
> [mailto:user-keelframework.org-admin-rI8AND0JKYOgdSakss0wQjfEH8FBEnyy@public.gmane.org]On 
> Behalf Of Shash Chatterjee Sent: Tuesday, March 23, 2004 11:39 To:
user-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected]
> Subject: RE: AW: AW: [Keel User] Multiple Databases within the same
> application
> 
> Tim,
> 
> The login domain and the db domain were tied together, until very 
> recently. When you logged in, the domain picked from the list you 
> get on the login screen if you have multiple domains, is stored in 
> the context and available via the request.  If you don't have 
> domains, the value in there is "default".  
> 
> So, if you login to the "default" domain, and you want to use your "default"
> DB (which is the case for the vast majority of installations), then
> req.getDomain() will still work.
> 
> Otherwise, you can a) hard-code the different db domain you want, b) 
> make the DB domains be determined via configuration c) use the 
> domain lookup service just put in (extended/configured as 
> appropriate). 
> 
> Shash
> 
> > Shash,
> > 
> > Does that mean that when we have multiple connections we can no 
> > longer use: 
> > 
> > PersistentFactory pf = (PersistentFactory) request.getService
> > (PersistentFactory.ROLE,request.getDomain()); 
> > 
> > and we must use:
> > 
> > PersistentFactory pf = (PersistentFactory) request.getService
> > (PersistentFactory.ROLE,id-of-default-persistent);
> > 
> > Thanks,
> > Tim
> 
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.