I'd really appreciate some feedback on this.
All I need to do is set up a jdbc connection pool where the I have control over when to commit, when to rollback, etc.
This was very simple in jboss2.4.x.
As far as I can tell, due to the JCA wrapping of datasources, there is no way to do it in Jboss3.0.0RC3
This should work fine if you make certain there are no managed (jta transactions) started by you or jboss due to your method tx settings (such as "Required").
Alternatively you could use the NoTxConnectionManager, then even if there are container managed transactions your db connections won't be enrolled in them.
Alternatively you could use UserTransaction instead of commit etc directly on the connection.
In any case, I recommend you upgrade to at least jboss 3.0.2. You won't get much support for issues on earlier versions.
I went the route of NoTxConnectionManager. And that works. What is counter intuitive to me is that I want to use simple transactions and yet in order to use commit() I need to use a non-transactional connectionmanager.
I have my own CCI JCA adapter to integrate with an EIS and would like it to support transactions.
Essentially it wraps a jdbc connection, so in most cases
when a client invokes
javax.resource.cci.Connection.commit(), this cause a javax.sql.Connection.commit()
same for rollback().
So in this scenario, I'd like to use NoTx for the jdbc and LocalTx for my JCA. However, whenever the client invokes commit/rollback/start, I get what amounts to state violations saying I'm using the methods incorrectly something to the effect
"Invalid attempt to begin a transaction that is already started"
So, after looking around, it seems when one uses LocalTx, the transaction is started as soon as the container grabs a managed connection which cuts my client/consumer of my jca out of the picture.
How is it possible to grant client the ability to commit/rollback/begin?
don't try to mix jta tx and jdbc 1 local tx. Whenever there is a jta tx, you won't be able to use connection.commit (jdbc) or localtx.commit (cci). Personally I recommend always using jta tx for everything. I think the declarative tx support in ejb's is one of its best and most useful features and results in cleaner code design when you refactor code with explicit tx control to use declarative tx.