Hi Michael,

I have a similar approach in my applications. In fact I would like Castor 
to have such a feature. I have a wrapper class 'JdoProvider' that contains 
some parameters for logging, initialization check and another one 
'PersistentJdo' which is kind of improperly named, but anyway this class 
keeps a static HashMap of JDO objects with different database,database.xml 
pairs and they get initialized when you first use them in the application. 
It works very well for me.

cristi

At 02:46 PM 9/29/2002 -0400, you wrote:
>Is there anything wrong with instantiating only one JDO object to use 
>throughout an entire application?  If I were doing a web application with 
>multiple servlets, coding the instantiation only once would be the best 
>way to save some time and effort.
>
>                 JDO jdo = new JDO();
>                 jdo.setDatabaseName("jaguar");
> 
>jdo.setConfiguration(getClass().getResource("/database.xml").toString());
>                 jdo.setClassLoader(getClass().getClassLoader());
>
>If I did do this only once, where would I store the JDO object?  Does 
>anyone that has done web development with castor have any suggestions?
>
>___________________________________________________
>Michael Blake Day
>Nextel Communications, Inc.
>email: [EMAIL PROTECTED]
>desk: 678.966.4792
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to