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

"Hagerty, Timothy CIV NAVSAFECEN, 52D" <[email protected]>
Newsgroups gmane.comp.java.keel.user
Message-ID <A87876CC4C70F349B0ED74EF9F4CA776044018D3@NAEANRFKEX01VA.nadsusea.nads.navy.mil>
Shash, 

That worked great.

Thank you all for your help and interest. 

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 14:11
To: user-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected]
Subject: RE: AW: AW: [Keel User] Multiple Databases within the same
application


Oh!  Why the heck didn't you say so the first time! :-)
Just kidding! Having run into this yesterday myself, here's another multi-page
thesis!

If you have multiple implementations defined for the same service
("default-persistent") in this case, there is no predicting how they will all
be assembled and which config will come first.  Normally, when you say
"default", Fortress provides the first one it sees in config. 

To always force it to the one you want, put a default="true" attribute. So,
for example:

<default-persistent id="default" name="default" security="default" default="true">

HTH,
Shash

> Thanks Shash,
> 
> I was hoping that it would be possible. 
> 
> How do I do it? 
> 
> Is there a config setting that I would change for the connection 
> that I want to be the default one?
> 
> 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 13:51 To:
user-6VIttnCrOeJXNEnpj1eHPNi2O/[email protected]
> Subject: RE: AW: AW: [Keel User] Multiple Databases within the same
> application
> 
> 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
> 
> _______________________________________________
> 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



_______________________________________________
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.