RE: [OJB-developers] JBOSS Connector Problem
Brought to you by:
thma
From: Matthew B. <ma...@so...> - 2002-06-04 16:40:30
|
Known issue. I started the JCA and finished it before jboss finished "fixing" how they did connections in the db, which then broke the jca. In the meanwhile, I refactored OJB to not be PB==connection, so it would work in a managed environment. I never got around to fixing the JCA. I did, however, check in an MBEAN for integrating into JBoss that is working nicely. Look for tested, correct JCA in a week or so. -----Original Message----- From: Fin Steenbjerg [mailto:fs...@pi...] Sent: Tuesday, June 04, 2002 8:15 AM To: obj...@li... Subject: [OJB-developers] JBOSS Connector Problem Hi We are trying to get the new J2EE connector (the latest source from the trunk) to work with JBOSS 3.0 RC1. I have successfully deployed the connector and created a test session bean with container managed transactions. The bean does the following tasks: 1. gets the Implementation from JNDI 2. calls newDatabase at the implementation object 3. calls makePersistent at the database 4. closes the database. It seems like there are some problems with the transaction handling. The transactions are committed twice. The first time the commit is called the call sequence is as follows: ojb.odmg.TransactionImpl.commit(TransactionImpl.java:375) ojb.odmg.J2EETransactionImpl.commit(J2EETransactionImpl.java:107) ojb.odmg.J2EETransactionImpl.beforeCompletion(J2EETransactionImpl.java:88) org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1331) JBoss is calling the beforeCompletion because J2EETransaction implements the Synchronization interface. Why is this done ? The JBoss should always retrieve the transaction via the DatabaseManagedConnection.getLocalTransaction() method. The second time the transaction is committed an exception is thrown: 2002-06-04 13:58:34,506 INFO [STDOUT] [DEFAULT] ERROR: 2002-06-04 13:58:34,506 INFO [STDOUT] commit: null 2002-06-04 13:58:34,506 ERROR [STDERR] org.odmg.TransactionNotInProgressException 2002-06-04 13:58:34,506 ERROR [STDERR] at ojb.odmg.TransactionImpl.commit(TransactionImpl.java:371) 2002-06-04 13:58:34,506 ERROR [STDERR] at ojb.odmg.J2EETransactionImpl.commit(J2EETransactionImpl.java:107) 2002-06-04 13:58:34,506 ERROR [STDERR] at ojb.connector.DatabaseManagedConnection.commit(DatabaseManagedConnection.jav a:140) 2002-06-04 13:58:34,506 ERROR [STDERR] at org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectio nEventListener.commit(LocalTxConnectionManager.java:536) 2002-06-04 13:58:34,506 ERROR [STDERR] at org.jboss.tm.TxCapsule.commitResources(TxCapsule.java:1656) 2002-06-04 13:58:34,506 ERROR [STDERR] at org.jboss.tm.TxCapsule.commit(TxCapsule.java:357) 2002-06-04 13:58:34,506 ERROR [STDERR] at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76) 2002-06-04 13:58:34,516 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:190) 2002-06-04 13:58:34,516 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61) 2002-06-04 13:58:34,516 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:12 9) 2002-06-04 13:58:34,516 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166) 2002-06-04 13:58:34,516 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav a:313) 2002-06-04 13:58:34,516 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:706) 2002-06-04 13:58:34,516 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492) 2002-06-04 13:58:34,516 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:364) 2002-06-04 13:58:34,516 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2002-06-04 13:58:34,516 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) 2002-06-04 13:58:34,516 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) 2002-06-04 13:58:34,516 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 2002-06-04 13:58:34,516 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) 2002-06-04 13:58:34,516 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:148) 2002-06-04 13:58:34,516 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method) 2002-06-04 13:58:34,516 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:144) 2002-06-04 13:58:34,516 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) 2002-06-04 13:58:34,516 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7 01) 2002-06-04 13:58:34,516 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536) JBoss is here calling the commit method at the transaction retrieved via the DatabaseManagedConnection.getLocalTransaction() method. This is the actual commit. Any suggestions on how to get this working ?? BTW I am using the following switches in the OJB.properties files regarding J2EE (I have also tried the default settings): PersistenceBrokerClass=ojb.broker.ta.PersistenceBrokerJ2EEImpl PersistenceBrokerFactoryClass=ojb.broker.ta.PersistenceBrokerFactoryJ2EEImpl Regards, Fin. ------------------------------------------------- Fin Steenbjerg Pine Tree Systems Damhaven 5D 7100 Vejle Denmark Phone: +45 76416500 Phone Direct: +45 76416542 mailto:fs...@pi... <mailto:fs...@pi...> Web: http:\\www.pine.dk <http://www.pine.dk/> home mailto:ki...@ma... <mailto:ki...@ma...> home phone: +45 75753677 -------------------------------------------------- |