JTA/JTS for non-EJB & non-J2EE server used

I have a standalone java program which calls methods on 2 java classes (c1, c2) These are Non-EJB/non-RMI/non-CORBA plain java classes.

the method in c1 updates table t1 in database db1

the method in c2 updates table t2 in database db2

I would like to use JTA for conducting a 2PC based transaction. I know this can be done in an application/server or a J2EE container environment because they have built-in Transaction Managers (TM). and one just has to use JNDI to look up the UserTransaction object and then define the transaction boundaries. However, how do I all the above if I don't have access to a J2EE server and an EJB server?

It seems like I would have to use a standalone Transaction Manager (not bundled with the app-server).

[806 byte] By [aldus99] at [2007-9-26 6:57:26]
# 1

Hi,

My company has just released a (beta!) version of a generic java transaction manager. Although it offers some lightweight beans as standard development model, this does not have to be the case: the core idea is an extensible and very advanced transaction kernel. JTA comptable.

This software is server-oriented: the transactional kernel (which also does recovery) startup and shutdown events trigger the start (initialization) and shutdown of your 'extension' classes. This is necessary because otherwise your resources will not be recoverable: if the transaction manager starts up, then it will first do recovery, and therefore your resources need to be available.

You can ask for a beta version through our website:

http://www.atomikos.com

Note, however: we did not yet implement the XA DataSources. Rather, we have a kind of 'external' stored procedures that allow distributed transactions over regular JDBC connections. You would have to implement your solution along this line, or wait for the XA datasources.

If there proves to be a lot of demand,

we can of course speed up development on XA. It is not a very big effort.

Best regards,

Guy

Guy Pardon ( guy@atomikos.com )

Atomikos Software Technology: Transactioning the Net

http://www.atomikos.com/

GuyPardon at 2007-7-1 16:30:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...