[OJB-developers] Re: JBOSS/OJB code
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-03-20 05:58:09
|
Hi Jesper, Jesper Ladegaard wrote: > Hi again Thomas > <snip> > > This is where JCA comes into the picture. The EJB server will > attach/detach tx-context to connection/broker resource on demand. It's > important there's no fixed 1-1 relationship between transaction and > broker. For example, it must be possible for any broker in the pool to > commit any active transaction. The transaction manager of the EJB > server only guarantees that only one transaction is active on a single > connection at any time. > I see! Now the overall picture becomes much clearer to me. > >> Armin uses a JNDI lookup to obtain a TransactionManager instance. >> But we are not sure if there is an "official" way to do this. >> > > It's possible to obtain the TransactionManager and register a > javax.transaction.Synchronization with the current > transaction. However, this is mostly used for non-XA-aware programs > (i.e. client/user code) that are interrested in a callback when the > transaction completes. > > The official way is to enlist a XAResource with the transaction. > However, supporting the JCA connection contract and the connection > manager of the application server will take care of enlisting the > XAResouce for us, which is the official way of doing this in J2EE 1.3. > That was the answer I was looking for! Do you know if this mechanism is implemented in JBOSS (2.4.4 or 3.0) ? > >> If there is no standardized way for this it will be difficult to >> integrate OJB into different EJB Containers. >> >> > > Exactly! And this is the very reason we must support JCA, which was > created to solve this exact problem, plus some others also. > OK ! > [snip...] > > >> I think we can learn a lot from the stuff the CASTOR and Tyrex >> developers did in this area. >> > > What did they do? > > I've looked at CASTOR's code once, however it was a long time ago. > Their code was not nice then, but I don't know how their transaction > stuff works today? > I don't like most of their code too. But they provide JTA and XA implementations. They also provide full integration with the Tyrex TransactionManager. AFAIK that's why CASTOR integrates smoothly with JBOSS. <snip> > IMO, the biggest task is for us to create a robust design for > integrating standard-based transaction support into OJB. > > For example, some people uses the "OBJ mode" and don't care about > ODMG. Others (like me) want's to use ODMG. The tx stuff should > intergrate and work the same for both methods. I agree ! I would even prefer to have JTA/XA/JCA stuff only on the ODMG or JDO level and not for the PersistenceBroker kernel. But there are a lot of people that use the PersistenceBroker API only. Thus they also want to have JTA/XA/JCA. > I mean, there seems to be a lot of confusion here. For example both > JBOSS integrations you've send me only works in OJB mode. > I think it's OK to start with the PB to get some hands on experience. cu, Thomas > Regards Jesper > > > > > |