[OJB-developers] WG: [Fwd: Re: Re: JBOSS/OJB code]
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-03-19 09:29:34
|
> -----Urspr=FCngliche Nachricht----- > Von: Thomas Mahler [mailto:tho...@ho...] > Gesendet: Dienstag, 19. M=E4rz 2002 07:07 > An: tom > Betreff: [Fwd: Re: Re: JBOSS/OJB code] >=20 >=20 >=20 >=20 > -------- Original Message -------- > Subject: Re: Re: JBOSS/OJB code > Date: Mon, Mar 18 2002 23:37:00 GMT+0100 > From: jl...@pi... (Jesper Ladegaard) > To: Thomas Mahler <tho...@ho...> >=20 > Hi again Thomas >=20 > [snip] > > 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. >=20 > This is where JCA comes into the picture. The EJB server will=20 > attach/detach tx-context to connection/broker resource on=20 > demand. It's=20 > important there's no fixed 1-1 relationship between transaction and=20 > broker. For example, it must be possible for any broker in=20 > the pool to=20 > commit any active transaction. The transaction manager of the=20 > EJB server=20 > only guarantees that only one transaction is active on a single=20 > connection at any time. >=20 > > > > Armin uses a JNDI lookup to obtain a TransactionManager > > instance. But we are not sure if there is an "official" > > way to do this. >=20 > It's possible to obtain the TransactionManager and > register a javax.transaction.Synchronization with the current=20 > transaction. However, this is mostly used for non-XA-aware programs=20 > (i.e. client/user code) that are interrested in a callback when the=20 > transaction completes. >=20 > The official way is to enlist a XAResource with the transaction.=20 > However, supporting the JCA connection contract and the connection=20 > manager of the application server will take care of enlisting the=20 > XAResouce for us, which is the official way of doing this in J2EE = 1.3. >=20 > > If there is no standardized way for this it will be > > difficult to integrate OJB into different EJB > > Containers. > > >=20 > Exactly! And this is the very reason we must support JCA, which was=20 > created to solve this exact problem, plus some others also. >=20 > [snip...] >=20 > > I think we can learn a lot from the stuff the > > CASTOR and Tyrex developers did in this area. >=20 > What did they do? >=20 > I've looked at CASTOR's code once, however it was a long time=20 > ago. Their=20 > code was not nice then, but I don't know how their transaction stuff=20 > works today? >=20 > > Providing JUnit test cases is definitely a must. > > But it will also very difficult to support the > > large variety of scenarios you mention. >=20 > yes, and I don't think we'll get everything right the first time.=20 > However, from looking at JBoss code and their JDBC and JMS adapter, I = > can see they don't support many of the senarios either. >=20 > > > > You will need a comple test lab to do this job properly ! >=20 > I hope not :-) >=20 > > 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. >=20 > I can imagine that. >=20 >=20 > > I think we'll need a lot of creativity to setup > > testscenarios that give us feedback on the quality > > of the JTA/JCA Integration! >=20 > Really! > I don't think this is such a big problem. >=20 > IMO, the biggest task is for us to create a robust design for=20 > integrating standard-based transaction support into OJB. >=20 > For example, some people uses the "OBJ mode" and don't care=20 > about ODMG.=20 > Others (like me) want's to use ODMG. The tx stuff should=20 > intergrate and=20 > work the same for both methods. I mean, there seems to be a lot of=20 > confusion here. For example both JBOSS integrations you've=20 > send me only=20 > works in OJB mode. >=20 > Regards > Jesper >=20 >=20 >=20 >=20 >=20 |