Jack,

  I don't see why it can't be, although I should admit that I haven't tried it myself. 
I would indeed use a factory to return back an instance of whichever repository you 
needed to use. If you plan to use any type of caching and you need multiple caches to 
be synchronized, I think the latest release of OJB provides some type of mechanism for 
this. Sorry for the fuzzy details, I just remember reading something about it on the 
OJB site.

Good luck,
Chuck

> 
> From: "Jack" <[EMAIL PROTECTED]>
> Date: 2002/11/29 Fri AM 10:05:59 EST
> To: <[EMAIL PROTECTED]>
> Subject: FW: struts with ojb, multiple repositories
> 
>  
>  I'm using an application scoped 'service' which uses ojb's odmg 
>  implementation as done in Chuck Cavaness' Struts Model Components 
>  chapter. Works well with one repository. I now need to use two 
>  repositories. I've worked out the configuration for multiple 
>  repositories (one postgresql db, and one mysql) in ojb, which 
>  'works' but am concerned about threading issues given that 
>  OJB.java holds open one database at a time. I've also reviewed 
>  Chuck's Beer4All app and it seems to take a slightly different 
>  approach, getting an instance of the 'service' from a service 
>  factory from within a base action. Is this latter approach better 
>  for using multiple ojb repositories in a Struts framework ? Can 
>  the O'Reilly book example be modified to handle multiple 
>  databases in odmg...
>  
>    - jack
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to