Hi Werner, Werner Guttmann schrieb: > Hi Ralf, > > Ralf Joachim wrote: > >> Hi Werner, >> >> TMR.Loader holds TMF and properties to allow lazy initialization of TM. >> Another posibility to implement this would be to maintain TMF, >> properties and initialized TM in different maps in TMR. It may also be >> possible that another class (e.g. DatabaseRegistry, DatabaseContext) >> could handle the lazy initialization. >> >> The only reason why someone would need that (lazy init of TM) could be >> that he loads multiple jdo-conf ... >> > So in that case, the JDO configurations would carry a name attribute, > right, to distinguish them from each other ? > Yes. > >> with different TM but uses only one in >> his application. With the lazy initialization of the TM's he prevents >> failures from the other TM that could not be instantiated or looked up. >> > Assuming that this would be on the same classloader (e.g. the class > loader from a web application), would this really make sense ? I always > thought that our users would like to be informed about any > misconfigurations as soon as possible, i.e. at startup time, similar to > mapping problems. > I remember a request for lazy initialization of database instances. Not sure if this also requested lazy initialization of TM but I think we have introduced it in this context.
About 2 weeks ago I have had a peek in this area of code myself when looking at an open issue to refactor DatabaseRegistry. Targets of this refactoring should be to make code easier to understand and make Castor bootstrapping compliant to JPA. An first outcome of this was the refactoring of ConnectionFactories. To get JPA compliant we will also need to support persistence.xml files as an alternative to jdo-conf. If you compare this 2 configurations you will recognize that persistence.xml allows to specify a transaction manager for each database instance. My impression is that this will also make bootstrapping code much simpler and may also influence the lazy initialization of TM. Do you have any problems with TM handling or what caused you to look at this area of code again? I you don't mind to share. Regards Ralf > >> Regards >> Ralf >> >> Werner Guttmann schrieb: >> >>> Hi, >>> >>> can anybody share his memories with me and explain to me what the >>> purpose of this inner class is. I have now been staring at this class >>> for some odd 15 minutes, and somehow I don't reach a conclusion. >>> >>> Anybody ? >>> >>> Regards >>> Werner >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >>> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Syscon Ingenieurbüro für Meß- und Datentechnik GmbH Ralf Joachim Raiffeisenstraße 11 72127 Kusterdingen Germany Tel. +49 7071 3690 52 Mobil: +49 173 9630135 Fax +49 7071 3690 98 Internet: www.syscon.eu E-Mail: ralf.joac...@syscon.eu Sitz der Gesellschaft: D-72127 Kusterdingen Registereintrag: Amtsgericht Stuttgart, HRB 382295 Geschäftsleitung: Jens Joachim, Ralf Joachim