I'm unclear on whether or not this applies to all JCA's that use local transactions, or just ones using jdbc type 1 drivers...
Just switched from 2.4.3 to 3RC1... Not a very smooth transition ;-)
I'm getting these associateConnection not supported exceptions when a bean is loaded for the first time. Subsequent loadings seem to work ok. The exception occurs when the ejbStore method is called by the container.
BTW I'm using BMP not CMP and yes *I*always*release*the*connection* after the query is executed. If the release connection statement is left out the exceptions occur all the time. Tried with mysql driver 2.0.12 on local computer and with postgreSQL driver 7.2 on remote computer.
The new local wrapper wraps only jdbc 1 drivers. If you have an xadatasource, wrap it with the xa wrapper, and if you have a jca adapter, you don't need any wrapper.
If you are getting associate connection not supported errors, please switch to the new wrapper. At the moment you need to check jboss HEAD out of cvs and build at least the connector module. I should have this in jboss 3 rc2 if you want to wait a few days.
I just did a CVS today (april 28). Running on postgresql, I still get this exception:
java.lang.reflect.UndeclaredThrowableException: javax.resource.ResourceException: associateConnection not supported
I read from your previous post that this is fixed in the latest CVS. Any pointers?
I haven't switched the configs over except for hsqldb. Change the appropriate line to this:
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
Just built the latest source from cvs. So far so good - no more associateConnection errors. Yippee!
I have updated the postgres-service.xml as advised.
No more errors. However, I am getting a warning:
Something about "... you are not getting the right semantics!"
I am not at my development PC at the moment, but I will post the exact message soon.
This usually means the tx manager is committing a transaction that it thinks has 2 or more participants, so it is using xa prepare and commit. The local wrapper, and Postgres as far as I know, don't support xa. If something goes wrong during commit your databases will be left in an inconsistent state and automatic recovery is not possible.
The most likely reason for this is that you are using transacted jms through the jmsra with a local-wrapped db.
The only open source free db I know of that supports xa is firebird through the jca-jdbc driver (NOT interclient).
I believe I know what happening.
I need a second datasource which is non-transactional, but I have declared it as transactional in the postgres-service.
How to I define a non-transactional datasource?
use the NoTxConnectionManager instead of LocalTxConnectionManager (just change the code attribute in the first mbean, and remove the txmanager attribute). Its like the others except it doesn't have a txmanager attribute. With the new local wrapper you should be able to get autocommit behavior automatically without changing anything. Please let me know if there are any problems with this.
vad pointed out a problem with the NoTxConnectionManager in another thread nearby, you will want to try one of the suggested patches. I will try to get to fixing this in cvs soon.
The XA Wrapper still has the associateConnection() error.
I know :-((
I hope I have time to replace it before 3.0 final.