Building on the excellent work of Mr. Armin Waibel, I implemented the configurable 
transaction management peice that's been bugging some people.
 
Both the Transaction association and the Transaction Manager acquisition are decoupled 
and configurable via ojb.properties.
 
I've tested in standalone mode and in JBoss 3.0.2. I believe this will also work in 
2.4.3 of Jboss. I have not tested in weblogic or websphere, maybe someone can help out 
here. Also, if anybody wants to use the transactionmanager in tomcat or Oracle, feel 
free to implement the org.apache.ojb.otm.transaction.factory.TransactionManagerFactory 
interface and send it my way.
 
The J2EE stuff should be reasonably stable now until the OTM goes in.
 
Also added were:
- Metrics for connection open and close. Good for debugging if you are leaking 
connections.
- explicit close added to the ODMG object envelope code to release references.
 
OJB behaves very nicely wrt memory usage and leaking. Currently I've only identified 
one place with a small leak that Thomas and I are going to fix ASAP.
 
cheers,
Matthew
 
from OJB.properties
#----------------------------------------------------------------------------------------


# Transaction Management and assocation

#----------------------------------------------------------------------------------------


# Use the LocalTxManager if you want the transaction to be associated by a thread

OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager

# Use the JTATxManager if you want the transaction to be associated via the 
Transaction

# manager that is in your application server.

#OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager

#

# The TransactionManager is acquired in different ways dependent on the application 
server.

# The JTATransactionManagerClass property allows you to specify the class that 
implements

# the proper behaviour for finding the transaction manager. Only use when 
OJBTxManagerClass

# is set to a factory that uses the application server transaction manager 

# (org.apache.ojb.odmg.JTATxManager)

#

# JBoss Transaction Manager Factory

JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.JBossTransactionManagerFactory


# Weblogic Transaction Manager Factory

#JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.WeblogicTransactionManagerFactory


# WebSphere transaction manager factory

#JTATransactionManagerClass=org.apache.ojb.otm.transaction.factory.WebSphereTransactionManagerFactory


<<winmail.dat>>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to