Thanks very much for the reply! I can and will do the three items suggested (i.e. they all make sense based on other discussions I've seen in the list). I still have a question about the usage of PersistenceBroker in a managed environment. (These may be stupid questions, but here goes...)
When I get a PersistenceBroker instance from the PersistenceBrokerFactory, how do I know that instance (and hence database connection associated with that instance) is associated with the "current" container managed transaction? It was obvious how this was happening with the J2EE PersistenceBroker/Factory classes. Suppose I have three Session beans which call each other. Each method gets a PersistenceBroker from the factory, performs persistent operations and does a close() on the broker. Am I assured that when the brokers get their database connection from the container (via a JNDI lookup on some DataSource), that it will be the same connection associated with the "current" JTA transaction? Thanks again for the help. Dave -- btw: I've been really impressed with the OJB project, both in its technology and in the very active and helpful community. Castor was the first Java open source O/R that I had heard of, but I turned to OJB when I saw how nice the design was and how much more active the community was. Congrats and thanks to all! > -----Original Message----- > From: Armin Waibel [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 16, 2002 12:40 PM > To: OJB Users List > Subject: Re: PB API transaction manager support in latest OJB??? > > > Hi David, > > yes we have removed the > > PersistenceBrokerFactoryJ2EEImpl.java > PersistenceBrokerJ2EEImpl.java > > stuff. But it's possible to use the PB api in a managed > environment when > take account of the following things: > - only use datasources from the managed environment > - use > ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl > in OJB.properties > - use ConnectionFactoryClass= > org.apache.ojb.broker.accesslayer.ConnectionFactoryPassThroughImpl > > In the CVS head there are some client test cases using PB-api > within SessionBeans, all seems to work fine (jboss 3.0.3). > The callback via Synchronization interface was not necessary > in that case (there is nothing to do in the beforeCommit/afterCommit > methods). > > Hope you would agree, that this was a acceptable interim solution > till the OTM/JCA stuff will work. > > If you run into trouble, please let me know. > > regards, > Armin > > > > ----- Original Message ----- > From: "David White" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, October 16, 2002 5:22 PM > Subject: PB API transaction manager support in latest OJB??? > > > I'm not sure if this question has been answered already (couldn't find > the answer in the archives...), > so here goes... > > I've been looking to upgrade to latest OJB version (I'm currently > running with OJB-0.9.4) and > I'm wonding when/if transaction manager support will be added back to > the PB API. What I'm > referring to is the > > PersistenceBrokerFactoryJ2EEImpl.java > PersistenceBrokerJ2EEImpl.java > > classes (and supporting classes...). I have a persistence layer that > uses the PB-API exclusively (no ODMG) and this was > functionality that I > believe is necessary for proper behavior in a "managed" environment. > > It seems that J2EE transaction management support was added > to the ODMG > layer and I think I > saw a discussion that suggested that similar support was to > be put back > into the PB-API. > > Is this functionality going to be put back into OJB PB-API? > > Is it already there and I'm completely missing something? > > Thanks, > > Dave > -- > > > -- > 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
