[OJB-developers] Re: JBOSS/OJB code
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-03-18 20:36:56
|
Hi Jesper, Jesper Ladegaard wrote: <snip> > > OK. Please tell, if you run into some TX issues you think are important or > something to be aware of. There is one issue I found: The J2EE spec tells how a client can obtain a user Transaction (by EJBContext.getUserTransaction()). But I did not find any specification how a "JTA provider" like OJB can obtain a TransactionManager instance to obtain external transactions. IMO we will need this in the PBF to associate new PB instances with external transactions. Armin uses a JNDI lookup to obtain a TransactionManager instance. But we are not sure if there is an "official" way to do this. If there is no standardized way for this it will be difficult to integrate OJB into different EJB Containers. > > There are properly a couple of devils hiding in the details. I've never > created a JCA adapter before, but > have been working with JTS/JTA a bit. However, most of my knowledge comes > from have been working with CORBA transaction server (CosTransaction) a lot. > > When we get some JCA/JTA up running, it will properly be a good idea to > create some tests for it (i.e. by using JUnit test from a session bean). > Also if we're going to use different kind of transaction implementation, the > tests would be very nice. Depending on how intelligent the container, > transaction, and connection manager are, there may be issues such as > transaction interleaving from multiple thread contexts, resource sharing, > thread-safety on XAResource, and so on. However, if the OBJ OTM is > structured ok, then this should be no problem (hopefully). > I think we can learn a lot from the stuff the CASTOR and Tyrex developers did in this area. Providing JUnit test cases is definitely a must. But it will also very difficult to support the large variety of scenarios you mention. You will need a comple test lab to do this job properly ! I found that it is even difficult to provide support for the most popular RDBMS. I'm running Junit tests against HSQLDB, MS-Access, Oracle and DB2. But I don't have an Informix DB and I don't have any MySQL Know-How. You'll definitely need a team of test engineers, a server farm and several licences for RDBMS products to do this job professionally. I think we'll need a lot of creativity to setup testscenarios that give us feedback on the quality of the JTA/JCA Integration! cu, Thomas > Regards > Jesper > > > > > |