Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

New user's guide to BTM and JTA

JTA has the reputation of being hard to use and understand. This isn't true. There are a few new things you need to know but in general this information adds on top of your current JDBC or JMS experience.

Let's see what JTA hello, world! using BTM looks like. Here is a complete application's code that inserts a row in a Derby database using a JTA transaction and reads it back in another transaction:

This code expects a Derby database named db1 to be already created in the current folder with this table:

And this is what the output of this application will look like:

Neat, huh ? Who said using JTA is complex ?

Required libraries

JAR name

Version

btm-1.0.jar

BTM 1.0

geronimo-spec-jta-1.0.1B-rc4.jar

Geronimo 2.0 RC4

slf4j-jdk14.jar

SLF4J 1.0.2

derby-10.2.2.0.jar

Derby 10.2.2.0

derbytools-10.2.2.0.jar

Derby 10.2.2.0

  • No labels