11 Replies Latest reply on Jul 6, 2003 9:21 PM by 3004

    Transaction problem

    3004
      Hi,All,
      I want to the following operation:

      public void operate(){
      pm = JDOFactory.getPersistenceManager();
      try{

      pm.currentTransaction().begin();

      updateSomething();

      operate1();
      operate2();

      pm.currentTransaction().commit();
      }catch(Exception e){
      pm.rollback();
      }finally{
      pm.close();
      }


      }

      public void operate1(){
      pm = JDOFactory.getPersistenceManager();
      try{
      pm.currentTransaction().begin();

      updateSomething();

      pm.currentTransaction().commit();
      }catch(Exception e){
      pm.rollback();
      }finally{
      pm.close();
      }
      }

      public void operate2(){
      pm = JDOFactory.getPersistenceManager();
      try{
      pm.currentTransaction().begin();

      updateSomething();

      pm.currentTransaction().commit();
      }catch(Exception e){
      pm.rollback();
      }finally{
      pm.close();
      }
      }

      I want all the above operations be committed or rollbacked consistently,but
      as they use different pm,the above code can't work.I don't want to pass pm
      cross operation.Should I use XA Transaction here?Does XA Transaction can
      used in Non-Managed Enviroment?
      Any suggestion will be appreciate.

      Regards,
      geduo




        • 1. Re: Transaction problem
          3004
          The easiest thing would be to pass the PM around, or to maintain it in a
          ThreadLocal or something that can be accessed by all the methods.

          Also, each object managed by a PM has an implicit pointer to that PM; you
          can retrieve the PM for any object using
          javax.jdo.JDOHelper.getPersistenceManager(Object). So if your methods
          pass around persistent object or have ways of obtaining managed objects,
          you don't need to pass around the PM.

          The only other way to acccomplish this is to use the
          EEPersistenceManagerFactory in an application server and use managed (not
          necessarily XA) transactions.
          • 2. Re: Transaction problem
            3004
            Hi,White,

            I tried to use EEPersistenceManagerFactory in an application server and use
            managed transaction,but failed,
            here is the code excerpt:

            public class GeneralCodeLocalEJB implements SessionBean {
            ....................
            public void testTransaction()throws CreateException{

            PersistenceManager pm =null;
            Query query=null;

            try{

            long start=System.currentTimeMillis();
            pm = JDOFactory.getPersistenceManager();


            System.out.println("getPersistenceManager():"+(System.currentTimeMillis()-st
            art));
            //pm.currentTransaction().begin();
            List results = new LinkedList();
            query=pm.newQuery(RecurrenceRule.class);
            results=(List)query.execute();
            Iterator itRule=results.iterator();
            while(itRule.hasNext()){
            RecurrenceRule rule=(RecurrenceRule)itRule.next();
            String recurrenceRuleId=rule.getRecurrenceRuleId();
            String byHourList=rule.getByHourList();
            String byDayList=rule.getByDayList();

            System.out.println("recurrenceRuleId:"+recurrenceRuleId);
            System.out.println("byHourList:"+byHourList);
            System.out.println("byDayList:"+byDayList);
            rule.setCountNumber(22);
            }

            testMethod1();
            testMethod2();


            //pm.currentTransaction().rollback();

            }catch(Exception e){
            e.printStackTrace();
            }finally{
            // query.closeAll();
            pm.close();
            }



            }

            private void testMethod1(){
            PersistenceManager pm =null;
            Query query=null;

            try{

            long start=System.currentTimeMillis();
            pm = JDOFactory.getPersistenceManager();

            System.out.println("getPersistenceManager():"+(System.currentTimeMillis()-st
            art));
            //pm.currentTransaction().begin();

            List results = new LinkedList();
            query=pm.newQuery(RecurrenceRule.class);
            results=(List)query.execute();
            Iterator itRule=results.iterator();
            while(itRule.hasNext()){
            RecurrenceRule rule=(RecurrenceRule)itRule.next();
            rule.setUntilDateTime(new Date());
            }
            //pm.currentTransaction().commit();
            }catch(Exception e){
            e.printStackTrace();
            }finally{
            // query.closeAll();
            pm.close();
            }

            }

            private void testMethod2()throws CreateException{
            PersistenceManager pm =null;
            Query query=null;

            try{

            long start=System.currentTimeMillis();
            pm = JDOFactory.getPersistenceManager();

            System.out.println("getPersistenceManager():"+(System.currentTimeMillis()-st
            art));
            //pm.currentTransaction().begin();

            List results = new LinkedList();
            query=pm.newQuery(RecurrenceRule.class);
            results=(List)query.execute();
            Iterator itRule=results.iterator();
            while(itRule.hasNext()){
            RecurrenceRule rule=(RecurrenceRule)itRule.next();
            rule.setFrequency("frequency22");
            }
            throw new CreateException();
            //pm.currentTransaction().rollback();
            }catch(CreateException e){

            e.printStackTrace();
            throw e;
            }finally{
            // query.closeAll();
            pm.close();
            }

            }
            }

            the exception is:

            09:10:50,593 ERROR [STDERR] javax.ejb.CreateException
            09:10:50,593 ERROR [STDERR] at
            com.ipacs.als.session.ejb.general.GeneralCode
            LocalEJB.testMethod2(GeneralCodeLocalEJB.java:187)
            09:10:50,593 ERROR [STDERR] at
            com.ipacs.als.session.ejb.general.GeneralCode
            LocalEJB.testTransaction(GeneralCodeLocalEJB.java:123)
            09:10:50,593 ERROR [STDERR] at
            sun.reflect.NativeMethodAccessorImpl.invoke0(
            Native Method)
            09:10:50,593 ERROR [STDERR] at
            sun.reflect.NativeMethodAccessorImpl.invoke(N
            ativeMethodAccessorImpl.java:39)
            09:10:50,593 ERROR [STDERR] at
            sun.reflect.DelegatingMethodAccessorImpl.invo
            ke(DelegatingMethodAccessorImpl.java:25)
            09:10:50,609 ERROR [STDERR] at
            java.lang.reflect.Method.invoke(Method.java:3
            24)
            09:10:50,609 ERROR [STDERR] at
            org.jboss.ejb.StatelessSessionContainer$Conta
            inerInterceptor.invoke(StatelessSessionContainer.java:629)
            09:10:50,609 ERROR [STDERR] at
            org.jboss.resource.connectionmanager.CachedCo
            nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
            09:10:50,609 ERROR [STDERR] at
            org.jboss.ejb.plugins.StatelessSessionInstanc
            eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
            09:10:50,609 ERROR [STDERR] at
            org.jboss.ejb.plugins.AbstractTxInterceptor.i
            nvokeNext(AbstractTxInterceptor.java:84)
            09:10:50,609 ERROR [STDERR] at
            org.jboss.ejb.plugins.TxInterceptorCMT.runWit
            hTransactions(TxInterceptorCMT.java:243)
            09:10:50,609 ERROR [STDERR] at
            org.jboss.ejb.plugins.TxInterceptorCMT.invoke
            (TxInterceptorCMT.java:104)
            09:10:50,625 ERROR [STDERR] at
            org.jboss.ejb.plugins.SecurityInterceptor.inv
            oke(SecurityInterceptor.java:117)
            09:10:50,625 ERROR [STDERR] at
            org.jboss.ejb.plugins.LogInterceptor.invoke(L
            ogInterceptor.java:191)
            09:10:50,625 ERROR [STDERR] at
            org.jboss.ejb.plugins.ProxyFactoryFinderInter
            ceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
            09:10:50,625 ERROR [STDERR] at
            org.jboss.ejb.StatelessSessionContainer.inter
            nalInvoke(StatelessSessionContainer.java:322)
            09:10:50,625 ERROR [STDERR] at
            org.jboss.ejb.Container.invoke(Container.java
            :674)
            09:10:50,625 ERROR [STDERR] at
            sun.reflect.NativeMethodAccessorImpl.invoke0(
            Native Method)
            09:10:50,625 ERROR [STDERR] at
            sun.reflect.NativeMethodAccessorImpl.invoke(N
            ativeMethodAccessorImpl.java:39)
            09:10:50,625 ERROR [STDERR] at
            sun.reflect.DelegatingMethodAccessorImpl.invo
            ke(DelegatingMethodAccessorImpl.java:25)
            09:10:50,625 ERROR [STDERR] at
            java.lang.reflect.Method.invoke(Method.java:3
            24)
            09:10:50,640 ERROR [STDERR] at
            org.jboss.mx.capability.ReflectedMBeanDispatc
            her.invoke(ReflectedMBeanDispatcher.java:284)
            09:10:50,640 ERROR [STDERR] at
            org.jboss.mx.server.MBeanServerImpl.invoke(MB
            eanServerImpl.java:549)
            09:10:50,640 ERROR [STDERR] at
            org.jboss.invocation.jrmp.server.JRMPInvoker.
            invoke(JRMPInvoker.java:359)
            09:10:50,640 ERROR [STDERR] at
            sun.reflect.NativeMethodAccessorImpl.invoke0(
            Native Method)
            09:10:50,640 ERROR [STDERR] at
            sun.reflect.NativeMethodAccessorImpl.invoke(N
            ativeMethodAccessorImpl.java:39)
            09:10:50,656 ERROR [STDERR] at
            sun.reflect.DelegatingMethodAccessorImpl.invo
            ke(DelegatingMethodAccessorImpl.java:25)
            09:10:50,656 ERROR [STDERR] at
            java.lang.reflect.Method.invoke(Method.java:3
            24)
            09:10:50,656 ERROR [STDERR] at
            sun.rmi.server.UnicastServerRef.dispatch(Unic
            astServerRef.java:261)
            09:10:50,656 ERROR [STDERR] at
            sun.rmi.transport.Transport$1.run(Transport.j
            ava:148)
            09:10:50,656 ERROR [STDERR] at
            java.security.AccessController.doPrivileged(N
            ative Method)
            09:10:50,656 ERROR [STDERR] at
            sun.rmi.transport.Transport.serviceCall(Trans
            port.java:144)
            09:10:50,671 ERROR [STDERR] at
            sun.rmi.transport.tcp.TCPTransport.handleMess
            ages(TCPTransport.java:460)
            09:10:50,671 ERROR [STDERR] at
            sun.rmi.transport.tcp.TCPTransport$Connection
            Handler.run(TCPTransport.java:701)
            09:10:50,671 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
            09:10:50,718 WARN [Runtime] java.sql.SQLException: You cannot rollback with
            aut
            ocommit set!
            09:10:50,750 WARN [JDBC] An exception occurred. This exception is likely
            non-fa
            tal,and so is being consumed.
            java.lang.IllegalStateException: Already committed.
            at
            org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:512)

            at
            org.jboss.resource.connectionmanager.TxConnectionManager$TxConnection
            EventListener.delist(TxConnectionManager.java:516)
            at
            org.jboss.resource.connectionmanager.TxConnectionManager$TxConnection
            EventListener.connectionClosed(TxConnectionManager.java:565)
            at
            org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHan
            dle(BaseWrapperManagedConnection.java:280)
            at
            org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnec
            tion.java:127)
            at
            com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecu
            tionManagerImpl.java:890)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.end(JDBCStore
            Manager.java:232)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.commit(JDBCSt
            oreManager.java:193)
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.endTransaction(Pe
            rsistenceManagerImpl.java:829)
            at
            com.solarmetric.kodo.ee.EEPersistenceManager.afterCompletion(EEPersis
            tenceManager.java:224)
            at
            org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1
            331)
            at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:410)
            at
            org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCM
            T.java:369)
            at
            org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
            torCMT.java:253)
            at
            org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
            04)
            at
            org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
            java:117)
            at
            org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
            at
            org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
            ryFinderInterceptor.java:122)
            at
            org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
            onContainer.java:322)
            at org.jboss.ejb.Container.invoke(Container.java:674)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at
            org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at
            org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
            at
            org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
            359)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at
            sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at
            sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
            60)
            at
            sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
            ..java:701)
            at java.lang.Thread.run(Thread.java:536)
            09:10:50,812 INFO [JDBC] An exception occurred. This exception is likely
            non-fa
            tal,and so is being consumed.
            java.sql.SQLException: Connection handle has been closed and is unusable
            at
            org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(Wrapped
            Connection.java:800)
            at
            org.jboss.resource.adapter.jdbc.WrappedConnection.getWarnings(Wrapped
            Connection.java:603)
            at
            com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.logWarnings(SQ
            LExecutionManagerImpl.java:1050)
            at
            com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.fireEvent(SQLE
            xecutionManagerImpl.java:1030)
            at
            com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecu
            tionManagerImpl.java:899)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.end(JDBCStore
            Manager.java:232)
            at
            com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.commit(JDBCSt
            oreManager.java:193)
            at
            com.solarmetric.kodo.runtime.PersistenceManagerImpl.endTransaction(Pe
            rsistenceManagerImpl.java:829)
            at
            com.solarmetric.kodo.ee.EEPersistenceManager.afterCompletion(EEPersis
            tenceManager.java:224)
            at
            org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1
            331)
            at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:410)
            at
            org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCM
            T.java:369)
            at
            org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
            torCMT.java:253)
            at
            org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
            04)
            at
            org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
            java:117)
            at
            org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
            at
            org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
            ryFinderInterceptor.java:122)
            at
            org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
            onContainer.java:322)
            at org.jboss.ejb.Container.invoke(Container.java:674)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at
            org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at
            org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
            at
            org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
            359)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at
            sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at
            sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at
            sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at
            sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
            60)
            at
            sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
            ..java:701)
            at java.lang.Thread.run(Thread.java:536)


            It seems the transaction has been autocommitted,how to turn off the
            autocommit?
            Or should I change the configuration of kodo JCA?

            Regards,
            geduo

            "Abe White" <awhite@solarmetric.com> wrote in message
            news:pan.2003.06.30.16.30.32.36395.9007@solarmetric.com...
            The easiest thing would be to pass the PM around, or to maintain it in a
            ThreadLocal or something that can be accessed by all the methods.

            Also, each object managed by a PM has an implicit pointer to that PM; you
            can retrieve the PM for any object using
            javax.jdo.JDOHelper.getPersistenceManager(Object). So if your methods
            pass around persistent object or have ways of obtaining managed objects,
            you don't need to pass around the PM.

            The only other way to acccomplish this is to use the
            EEPersistenceManagerFactory in an application server and use managed (not
            necessarily XA) transactions.
            • 3. Re: Transaction problem
              3004
              First, make sure you are not using an XADataSource.

              Second, you must either run this from a CMT bean with your deployment
              descriptor setting the appropriate transaction level, or start and stop
              transactions yourself. If you are using an EEPersistenceManagerFactory,
              you can start and stop transactions through either the JDO transaction
              interface or through the UserTransaction.

              Third, what does JDOFactory.getPersistenceManager do?

              Finally, it's a bit silly to use managed transactions just because you
              don't want to pass around a PM. If you don't want to pass around a PM
              then come up with some static way of getting it. This could be through a
              ThreadLocal or whatever you want.
              • 4. Re: Transaction problem
                3004
                Hi,White,
                If I don't use XA transaction,the exception is:

                09:31:57,421 ERROR [STDERR]
                com.solarmetric.kodo.runtime.FatalDataStoreException
                : com.solarmetric.kodo.runtime.DataStoreException:
                com.solarmetric.kodo.impl.jdb
                c.sql.SQLExceptionWrapper:
                [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = 'test']
                [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = ?]
                [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                while
                in manual transaction mode. [code=0;state=08007]
                NestedThrowables:
                com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
                [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = 'test']
                [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = ?]
                [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                while
                in manual transaction mode.
                NestedThrowables:
                com.solarmetric.kodo.runtime.DataStoreException:
                com.solarmetric.kodo.impl.jdbc.
                sql.SQLExceptionWrapper:
                [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = 'test']
                [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = ?]
                [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                while
                in manual transaction mode. [code=0;state=08007]
                NestedThrowables:
                com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
                [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = 'test']
                [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = ?]
                [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                while
                in manual transaction mode.
                09:31:57,453 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                sultList.instantiateRow(LazyResultList.java:217)
                09:31:57,453 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                sultList.get(LazyResultList.java:142)
                09:31:57,453 ERROR [STDERR] at
                java.util.AbstractList$Itr.next(AbstractList.
                java:416)
                09:31:57,453 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.objectprovider.R
                esultListIterator.next(ResultListIterator.java:49)
                09:31:57,453 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.Result
                ListFactory.createResultList(ResultListFactory.java:107)
                09:31:57,468 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager.executeQuery(JDBCStoreManager.java:1088)
                09:31:57,468 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.query.JDBCQuer
                y.executeQuery(JDBCQuery.java:106)
                09:31:57,468 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl$Datastor
                eQueryExecutor.executeQuery(QueryImpl.java:1554)
                09:31:57,468 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.executeQ
                ueryWithMap(QueryImpl.java:675)
                09:31:57,468 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.executeW
                ithMap(QueryImpl.java:540)
                09:31:57,484 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.execute(
                QueryImpl.java:490)
                09:31:57,484 ERROR [STDERR] at
                com.ipacs.als.session.ejb.general.GeneralCode
                LocalEJB.testTransaction(GeneralCodeLocalEJB.java:109)
                09:31:57,484 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,484 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,484 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,484 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,500 ERROR [STDERR] at
                org.jboss.ejb.StatelessSessionContainer$Conta
                inerInterceptor.invoke(StatelessSessionContainer.java:629)
                09:31:57,500 ERROR [STDERR] at
                org.jboss.resource.connectionmanager.CachedCo
                nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                09:31:57,500 ERROR [STDERR] at
                org.jboss.ejb.plugins.StatelessSessionInstanc
                eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
                09:31:57,500 ERROR [STDERR] at
                org.jboss.ejb.plugins.AbstractTxInterceptor.i
                nvokeNext(AbstractTxInterceptor.java:84)
                09:31:57,500 ERROR [STDERR] at
                org.jboss.ejb.plugins.TxInterceptorCMT.runWit
                hTransactions(TxInterceptorCMT.java:243)
                09:31:57,500 ERROR [STDERR] at
                org.jboss.ejb.plugins.TxInterceptorCMT.invoke
                (TxInterceptorCMT.java:104)
                09:31:57,500 ERROR [STDERR] at
                org.jboss.ejb.plugins.SecurityInterceptor.inv
                oke(SecurityInterceptor.java:117)
                09:31:57,500 ERROR [STDERR] at
                org.jboss.ejb.plugins.LogInterceptor.invoke(L
                ogInterceptor.java:191)
                09:31:57,515 ERROR [STDERR] at
                org.jboss.ejb.plugins.ProxyFactoryFinderInter
                ceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                09:31:57,515 ERROR [STDERR] at
                org.jboss.ejb.StatelessSessionContainer.inter
                nalInvoke(StatelessSessionContainer.java:322)
                09:31:57,515 ERROR [STDERR] at
                org.jboss.ejb.Container.invoke(Container.java
                :674)
                09:31:57,515 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,515 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,515 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,515 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,515 ERROR [STDERR] at
                org.jboss.mx.capability.ReflectedMBeanDispatc
                her.invoke(ReflectedMBeanDispatcher.java:284)
                09:31:57,531 ERROR [STDERR] at
                org.jboss.mx.server.MBeanServerImpl.invoke(MB
                eanServerImpl.java:549)
                09:31:57,531 ERROR [STDERR] at
                org.jboss.invocation.jrmp.server.JRMPInvoker.
                invoke(JRMPInvoker.java:359)
                09:31:57,531 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,531 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,531 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,531 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,546 ERROR [STDERR] at
                sun.rmi.server.UnicastServerRef.dispatch(Unic
                astServerRef.java:261)
                09:31:57,546 ERROR [STDERR] at
                sun.rmi.transport.Transport$1.run(Transport.j
                ava:148)
                09:31:57,546 ERROR [STDERR] at
                java.security.AccessController.doPrivileged(N
                ative Method)
                09:31:57,546 ERROR [STDERR] at
                sun.rmi.transport.Transport.serviceCall(Trans
                port.java:144)
                09:31:57,546 ERROR [STDERR] at
                sun.rmi.transport.tcp.TCPTransport.handleMess
                ages(TCPTransport.java:460)
                09:31:57,562 ERROR [STDERR] at
                sun.rmi.transport.tcp.TCPTransport$Connection
                Handler.run(TCPTransport.java:701)
                09:31:57,562 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
                09:31:57,562 ERROR [STDERR] NestedThrowablesStackTrace:
                09:31:57,562 ERROR [STDERR] com.solarmetric.kodo.runtime.DataStoreException:
                com
                ..solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
                [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = 'test']
                [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = ?]
                [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                while
                in manual transaction mode. [code=0;state=08007]
                NestedThrowables:
                com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
                [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = 'test']
                [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                RECURRENC
                E_RULE.RECURRENCE_RULE_ID = ?]
                [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                while
                in manual transaction mode.
                09:31:57,578 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.SQLExc
                eptions.throwDataStore(SQLExceptions.java:64)
                09:31:57,578 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager.load(JDBCStoreManager.java:462)
                09:31:57,578 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.StateManagerImpl
                ..loadFields(StateManagerImpl.java:2282)
                09:31:57,593 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.StateManagerImpl
                ..checkDefaultFetchGroup(StateManagerImpl.java:2215)
                09:31:57,593 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.StateManagerImpl
                ..loadInitialState(StateManagerImpl.java:222)
                09:31:57,593 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.PersistenceManag
                erImpl.getObjectByIdFilter(PersistenceManagerImpl.java:1310)
                09:31:57,593 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.PersistenceManag
                erImpl.getObjectById(PersistenceManagerImpl.java:1228)
                09:31:57,593 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager.createFromResultSet(JDBCStoreManager.java:917)
                09:31:57,593 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager$3.getResultObject(JDBCStoreManager.java:1096)
                09:31:57,593 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                sultList.instantiateRow(LazyResultList.java:199)
                09:31:57,593 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                sultList.get(LazyResultList.java:142)
                09:31:57,609 ERROR [STDERR] at
                java.util.AbstractList$Itr.next(AbstractList.
                java:416)
                09:31:57,625 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.objectprovider.R
                esultListIterator.next(ResultListIterator.java:49)
                09:31:57,625 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.Result
                ListFactory.createResultList(ResultListFactory.java:107)
                09:31:57,625 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager.executeQuery(JDBCStoreManager.java:1088)
                09:31:57,625 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.query.JDBCQuer
                y.executeQuery(JDBCQuery.java:106)
                09:31:57,625 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl$Datastor
                eQueryExecutor.executeQuery(QueryImpl.java:1554)
                09:31:57,625 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.executeQ
                ueryWithMap(QueryImpl.java:675)
                09:31:57,625 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.executeW
                ithMap(QueryImpl.java:540)
                09:31:57,625 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.execute(
                QueryImpl.java:490)
                09:31:57,640 ERROR [STDERR] at
                com.ipacs.als.session.ejb.general.GeneralCode
                LocalEJB.testTransaction(GeneralCodeLocalEJB.java:109)
                09:31:57,640 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,640 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,640 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,640 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,640 ERROR [STDERR] at
                org.jboss.ejb.StatelessSessionContainer$Conta
                inerInterceptor.invoke(StatelessSessionContainer.java:629)
                09:31:57,640 ERROR [STDERR] at
                org.jboss.resource.connectionmanager.CachedCo
                nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                09:31:57,640 ERROR [STDERR] at
                org.jboss.ejb.plugins.StatelessSessionInstanc
                eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
                09:31:57,640 ERROR [STDERR] at
                org.jboss.ejb.plugins.AbstractTxInterceptor.i
                nvokeNext(AbstractTxInterceptor.java:84)
                09:31:57,656 ERROR [STDERR] at
                org.jboss.ejb.plugins.TxInterceptorCMT.runWit
                hTransactions(TxInterceptorCMT.java:243)
                09:31:57,656 ERROR [STDERR] at
                org.jboss.ejb.plugins.TxInterceptorCMT.invoke
                (TxInterceptorCMT.java:104)
                09:31:57,656 ERROR [STDERR] at
                org.jboss.ejb.plugins.SecurityInterceptor.inv
                oke(SecurityInterceptor.java:117)
                09:31:57,656 ERROR [STDERR] at
                org.jboss.ejb.plugins.LogInterceptor.invoke(L
                ogInterceptor.java:191)
                09:31:57,656 ERROR [STDERR] at
                org.jboss.ejb.plugins.ProxyFactoryFinderInter
                ceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                09:31:57,671 ERROR [STDERR] at
                org.jboss.ejb.StatelessSessionContainer.inter
                nalInvoke(StatelessSessionContainer.java:322)
                09:31:57,671 ERROR [STDERR] at
                org.jboss.ejb.Container.invoke(Container.java
                :674)
                09:31:57,671 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,671 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,671 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,671 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,687 ERROR [STDERR] at
                org.jboss.mx.capability.ReflectedMBeanDispatc
                her.invoke(ReflectedMBeanDispatcher.java:284)
                09:31:57,687 ERROR [STDERR] at
                org.jboss.mx.server.MBeanServerImpl.invoke(MB
                eanServerImpl.java:549)
                09:31:57,687 ERROR [STDERR] at
                org.jboss.invocation.jrmp.server.JRMPInvoker.
                invoke(JRMPInvoker.java:359)
                09:31:57,687 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,687 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,703 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,703 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,703 ERROR [STDERR] at
                sun.rmi.server.UnicastServerRef.dispatch(Unic
                astServerRef.java:261)
                09:31:57,703 ERROR [STDERR] at
                sun.rmi.transport.Transport$1.run(Transport.j
                ava:148)
                09:31:57,703 ERROR [STDERR] at
                java.security.AccessController.doPrivileged(N
                ative Method)
                09:31:57,703 ERROR [STDERR] at
                sun.rmi.transport.Transport.serviceCall(Trans
                port.java:144)
                09:31:57,718 ERROR [STDERR] at
                sun.rmi.transport.tcp.TCPTransport.handleMess
                ages(TCPTransport.java:460)
                09:31:57,718 ERROR [STDERR] at
                sun.rmi.transport.tcp.TCPTransport$Connection
                Handler.run(TCPTransport.java:701)
                09:31:57,718 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
                09:31:57,718 ERROR [STDERR] NestedThrowablesStackTrace:
                09:31:57,718 ERROR [STDERR] java.sql.SQLException: [Microsoft][SQLServer
                2000 Dr
                iver for JDBC]Can't start a cloned connection while in manual transaction
                mode.
                09:31:57,718 ERROR [STDERR] at
                com.microsoft.jdbc.base.BaseExceptions.create
                Exception(Unknown Source)
                09:31:57,718 ERROR [STDERR] at
                com.microsoft.jdbc.base.BaseExceptions.getExc
                eption(Unknown Source)
                09:31:57,734 ERROR [STDERR] at
                com.microsoft.jdbc.base.BaseConnection.getImp
                lConnection(Unknown Source)
                09:31:57,734 ERROR [STDERR] at
                com.microsoft.jdbc.base.BaseStatement.setupIm
                plConnection(Unknown Source)
                09:31:57,734 ERROR [STDERR] at
                com.microsoft.jdbc.base.BaseStatement.<init>(
                Unknown Source)
                09:31:57,734 ERROR [STDERR] at
                com.microsoft.jdbc.base.BasePreparedStatement
                ..<init>(Unknown Source)
                09:31:57,734 ERROR [STDERR] at
                com.microsoft.jdbc.base.BaseConnection.prepar
                eStatement(Unknown Source)
                09:31:57,734 ERROR [STDERR] at
                org.jboss.resource.adapter.jdbc.WrappedConnec
                tion.prepareStatement(WrappedConnection.java:243)
                09:31:57,734 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.schema.dict.Ab
                stractDictionary.prepareStatement(AbstractDictionary.java:2016)
                09:31:57,734 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                nagerImpl.prepareStatementInternal(SQLExecutionManagerImpl.java:803)
                09:31:57,750 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                nagerImpl.executePreparedQueryInternal(SQLExecutionManagerImpl.java:767)
                09:31:57,750 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                nagerImpl.executeQueryInternal(SQLExecutionManagerImpl.java:674)
                09:31:57,750 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                nagerImpl.executeQuery(SQLExecutionManagerImpl.java:363)
                09:31:57,750 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                nagerImpl.executeQuery(SQLExecutionManagerImpl.java:347)
                09:31:57,750 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.ormapping.LobM
                apping.getLoadResultSet(LobMapping.java:93)
                09:31:57,750 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.ormapping.LobM
                apping.load(LobMapping.java:63)
                09:31:57,750 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager.load(JDBCStoreManager.java:455)
                09:31:57,765 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.StateManagerImpl
                ..loadFields(StateManagerImpl.java:2282)
                09:31:57,765 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.StateManagerImpl
                ..checkDefaultFetchGroup(StateManagerImpl.java:2215)
                09:31:57,765 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.StateManagerImpl
                ..loadInitialState(StateManagerImpl.java:222)
                09:31:57,765 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.PersistenceManag
                erImpl.getObjectByIdFilter(PersistenceManagerImpl.java:1310)
                09:31:57,765 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.PersistenceManag
                erImpl.getObjectById(PersistenceManagerImpl.java:1228)
                09:31:57,765 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager.createFromResultSet(JDBCStoreManager.java:917)
                09:31:57,781 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager$3.getResultObject(JDBCStoreManager.java:1096)
                09:31:57,781 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                sultList.instantiateRow(LazyResultList.java:199)
                09:31:57,781 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                sultList.get(LazyResultList.java:142)
                09:31:57,781 ERROR [STDERR] at
                java.util.AbstractList$Itr.next(AbstractList.
                java:416)
                09:31:57,781 ERROR [STDERR] at
                com.solarmetric.kodo.runtime.objectprovider.R
                esultListIterator.next(ResultListIterator.java:49)
                09:31:57,781 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.Result
                ListFactory.createResultList(ResultListFactory.java:107)
                09:31:57,796 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                oreManager.executeQuery(JDBCStoreManager.java:1088)
                09:31:57,796 ERROR [STDERR] at
                com.solarmetric.kodo.impl.jdbc.query.JDBCQuer
                y.executeQuery(JDBCQuery.java:106)
                09:31:57,796 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl$Datastor
                eQueryExecutor.executeQuery(QueryImpl.java:1554)
                09:31:57,796 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.executeQ
                ueryWithMap(QueryImpl.java:675)
                09:31:57,796 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.executeW
                ithMap(QueryImpl.java:540)
                09:31:57,812 ERROR [STDERR] at
                com.solarmetric.kodo.query.QueryImpl.execute(
                QueryImpl.java:490)
                09:31:57,812 ERROR [STDERR] at
                com.ipacs.als.session.ejb.general.GeneralCode
                LocalEJB.testTransaction(GeneralCodeLocalEJB.java:109)
                09:31:57,812 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,812 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,812 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,812 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,828 ERROR [STDERR] at
                org.jboss.ejb.StatelessSessionContainer$Conta
                inerInterceptor.invoke(StatelessSessionContainer.java:629)
                09:31:57,828 ERROR [STDERR] at
                org.jboss.resource.connectionmanager.CachedCo
                nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                09:31:57,828 ERROR [STDERR] at
                org.jboss.ejb.plugins.StatelessSessionInstanc
                eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
                09:31:57,828 ERROR [STDERR] at
                org.jboss.ejb.plugins.AbstractTxInterceptor.i
                nvokeNext(AbstractTxInterceptor.java:84)
                09:31:57,828 ERROR [STDERR] at
                org.jboss.ejb.plugins.TxInterceptorCMT.runWit
                hTransactions(TxInterceptorCMT.java:243)
                09:31:57,843 ERROR [STDERR] at
                org.jboss.ejb.plugins.TxInterceptorCMT.invoke
                (TxInterceptorCMT.java:104)
                09:31:57,843 ERROR [STDERR] at
                org.jboss.ejb.plugins.SecurityInterceptor.inv
                oke(SecurityInterceptor.java:117)
                09:31:57,843 ERROR [STDERR] at
                org.jboss.ejb.plugins.LogInterceptor.invoke(L
                ogInterceptor.java:191)
                09:31:57,843 ERROR [STDERR] at
                org.jboss.ejb.plugins.ProxyFactoryFinderInter
                ceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                09:31:57,843 ERROR [STDERR] at
                org.jboss.ejb.StatelessSessionContainer.inter
                nalInvoke(StatelessSessionContainer.java:322)
                09:31:57,859 ERROR [STDERR] at
                org.jboss.ejb.Container.invoke(Container.java
                :674)
                09:31:57,859 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,859 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,859 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,859 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,859 ERROR [STDERR] at
                org.jboss.mx.capability.ReflectedMBeanDispatc
                her.invoke(ReflectedMBeanDispatcher.java:284)
                09:31:57,859 ERROR [STDERR] at
                org.jboss.mx.server.MBeanServerImpl.invoke(MB
                eanServerImpl.java:549)
                09:31:57,875 ERROR [STDERR] at
                org.jboss.invocation.jrmp.server.JRMPInvoker.
                invoke(JRMPInvoker.java:359)
                09:31:57,875 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke0(
                Native Method)
                09:31:57,875 ERROR [STDERR] at
                sun.reflect.NativeMethodAccessorImpl.invoke(N
                ativeMethodAccessorImpl.java:39)
                09:31:57,875 ERROR [STDERR] at
                sun.reflect.DelegatingMethodAccessorImpl.invo
                ke(DelegatingMethodAccessorImpl.java:25)
                09:31:57,875 ERROR [STDERR] at
                java.lang.reflect.Method.invoke(Method.java:3
                24)
                09:31:57,890 ERROR [STDERR] at
                sun.rmi.server.UnicastServerRef.dispatch(Unic
                astServerRef.java:261)
                09:31:57,890 ERROR [STDERR] at
                sun.rmi.transport.Transport$1.run(Transport.j
                ava:148)
                09:31:57,890 ERROR [STDERR] at
                java.security.AccessController.doPrivileged(N
                ative Method)
                09:31:57,890 ERROR [STDERR] at
                sun.rmi.transport.Transport.serviceCall(Trans
                port.java:144)
                09:31:57,890 ERROR [STDERR] at
                sun.rmi.transport.tcp.TCPTransport.handleMess
                ages(TCPTransport.java:460)
                09:31:57,890 ERROR [STDERR] at
                sun.rmi.transport.tcp.TCPTransport$Connection
                Handler.run(TCPTransport.java:701)
                09:31:57,890 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
                09:31:57,906 WARN [WrappedConnection] Closing a statement you left open,
                please
                do your own housekeeping
                09:31:57,906 INFO [CachedConnectionManager] Successfully closed a
                connection fo
                r you. Please close them yourself:
                org.jboss.resource.adapter.jdbc.WrappedConne
                ction@1543bc5
                java.lang.Exception: Stack Trace
                at
                org.jboss.resource.connectionmanager.CachedConnectionManager.closeAll
                (CachedConnectionManager.java:376)
                at
                org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaA
                wareObject(CachedConnectionManager.java:199)
                at
                org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
                ke(CachedConnectionInterceptor.java:190)
                at
                org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
                elessSessionInstanceInterceptor.java:72)
                at
                org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
                rceptor.java:84)
                at
                org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
                torCMT.java:243)
                at
                org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
                04)
                at
                org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
                java:117)
                at
                org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                at
                org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
                ryFinderInterceptor.java:122)
                at
                org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
                onContainer.java:322)
                at org.jboss.ejb.Container.invoke(Container.java:674)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at
                sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                java:39)
                at
                sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                sorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at
                org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                nDispatcher.java:284)
                at
                org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                at
                org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
                359)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at
                sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                java:39)
                at
                sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                sorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:324)
                at
                sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                at sun.rmi.transport.Transport$1.run(Transport.java:148)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                at
                sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
                60)
                at
                sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
                ..java:701)
                at java.lang.Thread.run(Thread.java:536)
                09:32:22,968 INFO [JDBC] An exception occurred. This exception is likely
                non-fa
                tal,and so is being consumed.
                java.sql.SQLException: Connection handle has been closed and is unusable
                at
                org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(Wrapped
                Connection.java:800)
                at
                org.jboss.resource.adapter.jdbc.WrappedConnection.getWarnings(Wrapped
                Connection.java:603)
                at
                com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.logWarnings(SQ
                LExecutionManagerImpl.java:1050)
                at
                com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.fireEvent(SQLE
                xecutionManagerImpl.java:1030)
                at
                com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecu
                tionManagerImpl.java:885)
                at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.release(JDBCS
                toreManager.java:797)
                at
                com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager$3.free(JDBCSt
                oreManager.java:1103)
                at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.free(LazyResult
                List.java:411)
                at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.close(LazyResul
                tList.java:391)
                at
                com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.finalize(LazyRe
                sultList.java:399)
                at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
                at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
                at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
                at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)


                "Abe White" <awhite@solarmetric.com> wrote in message
                news:pan.2003.06.30.16.30.32.36395.9007@solarmetric.com...
                The easiest thing would be to pass the PM around, or to maintain it in a
                ThreadLocal or something that can be accessed by all the methods.

                Also, each object managed by a PM has an implicit pointer to that PM; you
                can retrieve the PM for any object using
                javax.jdo.JDOHelper.getPersistenceManager(Object). So if your methods
                pass around persistent object or have ways of obtaining managed objects,
                you don't need to pass around the PM.

                The only other way to acccomplish this is to use the
                EEPersistenceManagerFactory in an application server and use managed (not
                necessarily XA) transactions.
                • 5. Re: Transaction problem
                  3004
                  Hi,White,

                  pls ignore the previous post.the reason "Can't start a cloned connection
                  while in manual transaction mode" is I didn't set "SelectMethod=cursor".now
                  the exception is the same with use XA transaction:

                  java.sql.SQLException: You cannot rollback with autocommit set!


                  "geduo" <sljia@ipacssh.com.cn> wrote in message
                  news:bdqonb$i8b$1@solarmetric.netmar.com...
                  Hi,White,
                  If I don't use XA transaction,the exception is:

                  09:31:57,421 ERROR [STDERR]
                  com.solarmetric.kodo.runtime.FatalDataStoreException
                  : com.solarmetric.kodo.runtime.DataStoreException:
                  com.solarmetric.kodo.impl.jdb
                  c.sql.SQLExceptionWrapper:
                  [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = 'test']
                  [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = ?]
                  [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                  while
                  in manual transaction mode. [code=0;state=08007]
                  NestedThrowables:
                  com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
                  [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = 'test']
                  [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = ?]
                  [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                  while
                  in manual transaction mode.
                  NestedThrowables:
                  com.solarmetric.kodo.runtime.DataStoreException:
                  com.solarmetric.kodo.impl.jdbc.
                  sql.SQLExceptionWrapper:
                  [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = 'test']
                  [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = ?]
                  [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                  while
                  in manual transaction mode. [code=0;state=08007]
                  NestedThrowables:
                  com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
                  [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = 'test']
                  [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = ?]
                  [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                  while
                  in manual transaction mode.
                  09:31:57,453 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                  sultList.instantiateRow(LazyResultList.java:217)
                  09:31:57,453 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                  sultList.get(LazyResultList.java:142)
                  09:31:57,453 ERROR [STDERR] at
                  java.util.AbstractList$Itr.next(AbstractList.
                  java:416)
                  09:31:57,453 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.objectprovider.R
                  esultListIterator.next(ResultListIterator.java:49)
                  09:31:57,453 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.Result
                  ListFactory.createResultList(ResultListFactory.java:107)
                  09:31:57,468 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager.executeQuery(JDBCStoreManager.java:1088)
                  09:31:57,468 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.query.JDBCQuer
                  y.executeQuery(JDBCQuery.java:106)
                  09:31:57,468 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl$Datastor
                  eQueryExecutor.executeQuery(QueryImpl.java:1554)
                  09:31:57,468 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.executeQ
                  ueryWithMap(QueryImpl.java:675)
                  09:31:57,468 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.executeW
                  ithMap(QueryImpl.java:540)
                  09:31:57,484 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.execute(
                  QueryImpl.java:490)
                  09:31:57,484 ERROR [STDERR] at
                  com.ipacs.als.session.ejb.general.GeneralCode
                  LocalEJB.testTransaction(GeneralCodeLocalEJB.java:109)
                  09:31:57,484 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,484 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,484 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,484 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,500 ERROR [STDERR] at
                  org.jboss.ejb.StatelessSessionContainer$Conta
                  inerInterceptor.invoke(StatelessSessionContainer.java:629)
                  09:31:57,500 ERROR [STDERR] at
                  org.jboss.resource.connectionmanager.CachedCo
                  nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                  09:31:57,500 ERROR [STDERR] at
                  org.jboss.ejb.plugins.StatelessSessionInstanc
                  eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
                  09:31:57,500 ERROR [STDERR] at
                  org.jboss.ejb.plugins.AbstractTxInterceptor.i
                  nvokeNext(AbstractTxInterceptor.java:84)
                  09:31:57,500 ERROR [STDERR] at
                  org.jboss.ejb.plugins.TxInterceptorCMT.runWit
                  hTransactions(TxInterceptorCMT.java:243)
                  09:31:57,500 ERROR [STDERR] at
                  org.jboss.ejb.plugins.TxInterceptorCMT.invoke
                  (TxInterceptorCMT.java:104)
                  09:31:57,500 ERROR [STDERR] at
                  org.jboss.ejb.plugins.SecurityInterceptor.inv
                  oke(SecurityInterceptor.java:117)
                  09:31:57,500 ERROR [STDERR] at
                  org.jboss.ejb.plugins.LogInterceptor.invoke(L
                  ogInterceptor.java:191)
                  09:31:57,515 ERROR [STDERR] at
                  org.jboss.ejb.plugins.ProxyFactoryFinderInter
                  ceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                  09:31:57,515 ERROR [STDERR] at
                  org.jboss.ejb.StatelessSessionContainer.inter
                  nalInvoke(StatelessSessionContainer.java:322)
                  09:31:57,515 ERROR [STDERR] at
                  org.jboss.ejb.Container.invoke(Container.java
                  :674)
                  09:31:57,515 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,515 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,515 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,515 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,515 ERROR [STDERR] at
                  org.jboss.mx.capability.ReflectedMBeanDispatc
                  her.invoke(ReflectedMBeanDispatcher.java:284)
                  09:31:57,531 ERROR [STDERR] at
                  org.jboss.mx.server.MBeanServerImpl.invoke(MB
                  eanServerImpl.java:549)
                  09:31:57,531 ERROR [STDERR] at
                  org.jboss.invocation.jrmp.server.JRMPInvoker.
                  invoke(JRMPInvoker.java:359)
                  09:31:57,531 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,531 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,531 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,531 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,546 ERROR [STDERR] at
                  sun.rmi.server.UnicastServerRef.dispatch(Unic
                  astServerRef.java:261)
                  09:31:57,546 ERROR [STDERR] at
                  sun.rmi.transport.Transport$1.run(Transport.j
                  ava:148)
                  09:31:57,546 ERROR [STDERR] at
                  java.security.AccessController.doPrivileged(N
                  ative Method)
                  09:31:57,546 ERROR [STDERR] at
                  sun.rmi.transport.Transport.serviceCall(Trans
                  port.java:144)
                  09:31:57,546 ERROR [STDERR] at
                  sun.rmi.transport.tcp.TCPTransport.handleMess
                  ages(TCPTransport.java:460)
                  09:31:57,562 ERROR [STDERR] at
                  sun.rmi.transport.tcp.TCPTransport$Connection
                  Handler.run(TCPTransport.java:701)
                  09:31:57,562 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
                  09:31:57,562 ERROR [STDERR] NestedThrowablesStackTrace:
                  09:31:57,562 ERROR [STDERR]
                  com.solarmetric.kodo.runtime.DataStoreException:
                  com
                  .solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
                  [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = 'test']
                  [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = ?]
                  [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                  while
                  in manual transaction mode. [code=0;state=08007]
                  NestedThrowables:
                  com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
                  [SQL=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = 'test']
                  [PRE=SELECT RECURRENCE_RULE.BY_WEEK_NO_LIST FROM RECURRENCE_RULE WHERE
                  RECURRENC
                  E_RULE.RECURRENCE_RULE_ID = ?]
                  [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection
                  while
                  in manual transaction mode.
                  09:31:57,578 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.SQLExc
                  eptions.throwDataStore(SQLExceptions.java:64)
                  09:31:57,578 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager.load(JDBCStoreManager.java:462)
                  09:31:57,578 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.StateManagerImpl
                  .loadFields(StateManagerImpl.java:2282)
                  09:31:57,593 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.StateManagerImpl
                  .checkDefaultFetchGroup(StateManagerImpl.java:2215)
                  09:31:57,593 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.StateManagerImpl
                  .loadInitialState(StateManagerImpl.java:222)
                  09:31:57,593 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.PersistenceManag
                  erImpl.getObjectByIdFilter(PersistenceManagerImpl.java:1310)
                  09:31:57,593 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.PersistenceManag
                  erImpl.getObjectById(PersistenceManagerImpl.java:1228)
                  09:31:57,593 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager.createFromResultSet(JDBCStoreManager.java:917)
                  09:31:57,593 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager$3.getResultObject(JDBCStoreManager.java:1096)
                  09:31:57,593 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                  sultList.instantiateRow(LazyResultList.java:199)
                  09:31:57,593 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                  sultList.get(LazyResultList.java:142)
                  09:31:57,609 ERROR [STDERR] at
                  java.util.AbstractList$Itr.next(AbstractList.
                  java:416)
                  09:31:57,625 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.objectprovider.R
                  esultListIterator.next(ResultListIterator.java:49)
                  09:31:57,625 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.Result
                  ListFactory.createResultList(ResultListFactory.java:107)
                  09:31:57,625 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager.executeQuery(JDBCStoreManager.java:1088)
                  09:31:57,625 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.query.JDBCQuer
                  y.executeQuery(JDBCQuery.java:106)
                  09:31:57,625 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl$Datastor
                  eQueryExecutor.executeQuery(QueryImpl.java:1554)
                  09:31:57,625 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.executeQ
                  ueryWithMap(QueryImpl.java:675)
                  09:31:57,625 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.executeW
                  ithMap(QueryImpl.java:540)
                  09:31:57,625 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.execute(
                  QueryImpl.java:490)
                  09:31:57,640 ERROR [STDERR] at
                  com.ipacs.als.session.ejb.general.GeneralCode
                  LocalEJB.testTransaction(GeneralCodeLocalEJB.java:109)
                  09:31:57,640 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,640 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,640 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,640 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,640 ERROR [STDERR] at
                  org.jboss.ejb.StatelessSessionContainer$Conta
                  inerInterceptor.invoke(StatelessSessionContainer.java:629)
                  09:31:57,640 ERROR [STDERR] at
                  org.jboss.resource.connectionmanager.CachedCo
                  nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                  09:31:57,640 ERROR [STDERR] at
                  org.jboss.ejb.plugins.StatelessSessionInstanc
                  eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
                  09:31:57,640 ERROR [STDERR] at
                  org.jboss.ejb.plugins.AbstractTxInterceptor.i
                  nvokeNext(AbstractTxInterceptor.java:84)
                  09:31:57,656 ERROR [STDERR] at
                  org.jboss.ejb.plugins.TxInterceptorCMT.runWit
                  hTransactions(TxInterceptorCMT.java:243)
                  09:31:57,656 ERROR [STDERR] at
                  org.jboss.ejb.plugins.TxInterceptorCMT.invoke
                  (TxInterceptorCMT.java:104)
                  09:31:57,656 ERROR [STDERR] at
                  org.jboss.ejb.plugins.SecurityInterceptor.inv
                  oke(SecurityInterceptor.java:117)
                  09:31:57,656 ERROR [STDERR] at
                  org.jboss.ejb.plugins.LogInterceptor.invoke(L
                  ogInterceptor.java:191)
                  09:31:57,656 ERROR [STDERR] at
                  org.jboss.ejb.plugins.ProxyFactoryFinderInter
                  ceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                  09:31:57,671 ERROR [STDERR] at
                  org.jboss.ejb.StatelessSessionContainer.inter
                  nalInvoke(StatelessSessionContainer.java:322)
                  09:31:57,671 ERROR [STDERR] at
                  org.jboss.ejb.Container.invoke(Container.java
                  :674)
                  09:31:57,671 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,671 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,671 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,671 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,687 ERROR [STDERR] at
                  org.jboss.mx.capability.ReflectedMBeanDispatc
                  her.invoke(ReflectedMBeanDispatcher.java:284)
                  09:31:57,687 ERROR [STDERR] at
                  org.jboss.mx.server.MBeanServerImpl.invoke(MB
                  eanServerImpl.java:549)
                  09:31:57,687 ERROR [STDERR] at
                  org.jboss.invocation.jrmp.server.JRMPInvoker.
                  invoke(JRMPInvoker.java:359)
                  09:31:57,687 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,687 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,703 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,703 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,703 ERROR [STDERR] at
                  sun.rmi.server.UnicastServerRef.dispatch(Unic
                  astServerRef.java:261)
                  09:31:57,703 ERROR [STDERR] at
                  sun.rmi.transport.Transport$1.run(Transport.j
                  ava:148)
                  09:31:57,703 ERROR [STDERR] at
                  java.security.AccessController.doPrivileged(N
                  ative Method)
                  09:31:57,703 ERROR [STDERR] at
                  sun.rmi.transport.Transport.serviceCall(Trans
                  port.java:144)
                  09:31:57,718 ERROR [STDERR] at
                  sun.rmi.transport.tcp.TCPTransport.handleMess
                  ages(TCPTransport.java:460)
                  09:31:57,718 ERROR [STDERR] at
                  sun.rmi.transport.tcp.TCPTransport$Connection
                  Handler.run(TCPTransport.java:701)
                  09:31:57,718 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
                  09:31:57,718 ERROR [STDERR] NestedThrowablesStackTrace:
                  09:31:57,718 ERROR [STDERR] java.sql.SQLException: [Microsoft][SQLServer
                  2000 Dr
                  iver for JDBC]Can't start a cloned connection while in manual transaction
                  mode.
                  09:31:57,718 ERROR [STDERR] at
                  com.microsoft.jdbc.base.BaseExceptions.create
                  Exception(Unknown Source)
                  09:31:57,718 ERROR [STDERR] at
                  com.microsoft.jdbc.base.BaseExceptions.getExc
                  eption(Unknown Source)
                  09:31:57,734 ERROR [STDERR] at
                  com.microsoft.jdbc.base.BaseConnection.getImp
                  lConnection(Unknown Source)
                  09:31:57,734 ERROR [STDERR] at
                  com.microsoft.jdbc.base.BaseStatement.setupIm
                  plConnection(Unknown Source)
                  09:31:57,734 ERROR [STDERR] at
                  com.microsoft.jdbc.base.BaseStatement.<init>(
                  Unknown Source)
                  09:31:57,734 ERROR [STDERR] at
                  com.microsoft.jdbc.base.BasePreparedStatement
                  .<init>(Unknown Source)
                  09:31:57,734 ERROR [STDERR] at
                  com.microsoft.jdbc.base.BaseConnection.prepar
                  eStatement(Unknown Source)
                  09:31:57,734 ERROR [STDERR] at
                  org.jboss.resource.adapter.jdbc.WrappedConnec
                  tion.prepareStatement(WrappedConnection.java:243)
                  09:31:57,734 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.schema.dict.Ab
                  stractDictionary.prepareStatement(AbstractDictionary.java:2016)
                  09:31:57,734 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                  nagerImpl.prepareStatementInternal(SQLExecutionManagerImpl.java:803)
                  09:31:57,750 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                  nagerImpl.executePreparedQueryInternal(SQLExecutionManagerImpl.java:767)
                  09:31:57,750 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                  nagerImpl.executeQueryInternal(SQLExecutionManagerImpl.java:674)
                  09:31:57,750 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                  nagerImpl.executeQuery(SQLExecutionManagerImpl.java:363)
                  09:31:57,750 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.SQLExecutionMa
                  nagerImpl.executeQuery(SQLExecutionManagerImpl.java:347)
                  09:31:57,750 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.ormapping.LobM
                  apping.getLoadResultSet(LobMapping.java:93)
                  09:31:57,750 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.ormapping.LobM
                  apping.load(LobMapping.java:63)
                  09:31:57,750 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager.load(JDBCStoreManager.java:455)
                  09:31:57,765 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.StateManagerImpl
                  .loadFields(StateManagerImpl.java:2282)
                  09:31:57,765 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.StateManagerImpl
                  .checkDefaultFetchGroup(StateManagerImpl.java:2215)
                  09:31:57,765 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.StateManagerImpl
                  .loadInitialState(StateManagerImpl.java:222)
                  09:31:57,765 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.PersistenceManag
                  erImpl.getObjectByIdFilter(PersistenceManagerImpl.java:1310)
                  09:31:57,765 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.PersistenceManag
                  erImpl.getObjectById(PersistenceManagerImpl.java:1228)
                  09:31:57,765 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager.createFromResultSet(JDBCStoreManager.java:917)
                  09:31:57,781 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager$3.getResultObject(JDBCStoreManager.java:1096)
                  09:31:57,781 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                  sultList.instantiateRow(LazyResultList.java:199)
                  09:31:57,781 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyRe
                  sultList.get(LazyResultList.java:142)
                  09:31:57,781 ERROR [STDERR] at
                  java.util.AbstractList$Itr.next(AbstractList.
                  java:416)
                  09:31:57,781 ERROR [STDERR] at
                  com.solarmetric.kodo.runtime.objectprovider.R
                  esultListIterator.next(ResultListIterator.java:49)
                  09:31:57,781 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.Result
                  ListFactory.createResultList(ResultListFactory.java:107)
                  09:31:57,796 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCSt
                  oreManager.executeQuery(JDBCStoreManager.java:1088)
                  09:31:57,796 ERROR [STDERR] at
                  com.solarmetric.kodo.impl.jdbc.query.JDBCQuer
                  y.executeQuery(JDBCQuery.java:106)
                  09:31:57,796 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl$Datastor
                  eQueryExecutor.executeQuery(QueryImpl.java:1554)
                  09:31:57,796 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.executeQ
                  ueryWithMap(QueryImpl.java:675)
                  09:31:57,796 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.executeW
                  ithMap(QueryImpl.java:540)
                  09:31:57,812 ERROR [STDERR] at
                  com.solarmetric.kodo.query.QueryImpl.execute(
                  QueryImpl.java:490)
                  09:31:57,812 ERROR [STDERR] at
                  com.ipacs.als.session.ejb.general.GeneralCode
                  LocalEJB.testTransaction(GeneralCodeLocalEJB.java:109)
                  09:31:57,812 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,812 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,812 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,812 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,828 ERROR [STDERR] at
                  org.jboss.ejb.StatelessSessionContainer$Conta
                  inerInterceptor.invoke(StatelessSessionContainer.java:629)
                  09:31:57,828 ERROR [STDERR] at
                  org.jboss.resource.connectionmanager.CachedCo
                  nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                  09:31:57,828 ERROR [STDERR] at
                  org.jboss.ejb.plugins.StatelessSessionInstanc
                  eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
                  09:31:57,828 ERROR [STDERR] at
                  org.jboss.ejb.plugins.AbstractTxInterceptor.i
                  nvokeNext(AbstractTxInterceptor.java:84)
                  09:31:57,828 ERROR [STDERR] at
                  org.jboss.ejb.plugins.TxInterceptorCMT.runWit
                  hTransactions(TxInterceptorCMT.java:243)
                  09:31:57,843 ERROR [STDERR] at
                  org.jboss.ejb.plugins.TxInterceptorCMT.invoke
                  (TxInterceptorCMT.java:104)
                  09:31:57,843 ERROR [STDERR] at
                  org.jboss.ejb.plugins.SecurityInterceptor.inv
                  oke(SecurityInterceptor.java:117)
                  09:31:57,843 ERROR [STDERR] at
                  org.jboss.ejb.plugins.LogInterceptor.invoke(L
                  ogInterceptor.java:191)
                  09:31:57,843 ERROR [STDERR] at
                  org.jboss.ejb.plugins.ProxyFactoryFinderInter
                  ceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                  09:31:57,843 ERROR [STDERR] at
                  org.jboss.ejb.StatelessSessionContainer.inter
                  nalInvoke(StatelessSessionContainer.java:322)
                  09:31:57,859 ERROR [STDERR] at
                  org.jboss.ejb.Container.invoke(Container.java
                  :674)
                  09:31:57,859 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,859 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,859 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,859 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,859 ERROR [STDERR] at
                  org.jboss.mx.capability.ReflectedMBeanDispatc
                  her.invoke(ReflectedMBeanDispatcher.java:284)
                  09:31:57,859 ERROR [STDERR] at
                  org.jboss.mx.server.MBeanServerImpl.invoke(MB
                  eanServerImpl.java:549)
                  09:31:57,875 ERROR [STDERR] at
                  org.jboss.invocation.jrmp.server.JRMPInvoker.
                  invoke(JRMPInvoker.java:359)
                  09:31:57,875 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke0(
                  Native Method)
                  09:31:57,875 ERROR [STDERR] at
                  sun.reflect.NativeMethodAccessorImpl.invoke(N
                  ativeMethodAccessorImpl.java:39)
                  09:31:57,875 ERROR [STDERR] at
                  sun.reflect.DelegatingMethodAccessorImpl.invo
                  ke(DelegatingMethodAccessorImpl.java:25)
                  09:31:57,875 ERROR [STDERR] at
                  java.lang.reflect.Method.invoke(Method.java:3
                  24)
                  09:31:57,890 ERROR [STDERR] at
                  sun.rmi.server.UnicastServerRef.dispatch(Unic
                  astServerRef.java:261)
                  09:31:57,890 ERROR [STDERR] at
                  sun.rmi.transport.Transport$1.run(Transport.j
                  ava:148)
                  09:31:57,890 ERROR [STDERR] at
                  java.security.AccessController.doPrivileged(N
                  ative Method)
                  09:31:57,890 ERROR [STDERR] at
                  sun.rmi.transport.Transport.serviceCall(Trans
                  port.java:144)
                  09:31:57,890 ERROR [STDERR] at
                  sun.rmi.transport.tcp.TCPTransport.handleMess
                  ages(TCPTransport.java:460)
                  09:31:57,890 ERROR [STDERR] at
                  sun.rmi.transport.tcp.TCPTransport$Connection
                  Handler.run(TCPTransport.java:701)
                  09:31:57,890 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
                  09:31:57,906 WARN [WrappedConnection] Closing a statement you left open,
                  please
                  do your own housekeeping
                  09:31:57,906 INFO [CachedConnectionManager] Successfully closed a
                  connection fo
                  r you. Please close them yourself:
                  org.jboss.resource.adapter.jdbc.WrappedConne
                  ction@1543bc5
                  java.lang.Exception: Stack Trace
                  at
                  org.jboss.resource.connectionmanager.CachedConnectionManager.closeAll
                  (CachedConnectionManager.java:376)
                  at
                  org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaA
                  wareObject(CachedConnectionManager.java:199)
                  at
                  org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
                  ke(CachedConnectionInterceptor.java:190)
                  at
                  org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
                  elessSessionInstanceInterceptor.java:72)
                  at
                  org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
                  rceptor.java:84)
                  at
                  org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
                  torCMT.java:243)
                  at
                  org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
                  04)
                  at
                  org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
                  java:117)
                  at
                  org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                  at
                  org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
                  ryFinderInterceptor.java:122)
                  at
                  org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
                  onContainer.java:322)
                  at org.jboss.ejb.Container.invoke(Container.java:674)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at
                  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at
                  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at
                  org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at
                  org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                  at
                  org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
                  359)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at
                  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at
                  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at
                  sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                  at sun.rmi.transport.Transport$1.run(Transport.java:148)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                  at
                  sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
                  60)
                  at
                  sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
                  .java:701)
                  at java.lang.Thread.run(Thread.java:536)
                  09:32:22,968 INFO [JDBC] An exception occurred. This exception is likely
                  non-fa
                  tal,and so is being consumed.
                  java.sql.SQLException: Connection handle has been closed and is unusable
                  at
                  org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(Wrapped
                  Connection.java:800)
                  at
                  org.jboss.resource.adapter.jdbc.WrappedConnection.getWarnings(Wrapped
                  Connection.java:603)
                  at
                  com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.logWarnings(SQ
                  LExecutionManagerImpl.java:1050)
                  at
                  com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.fireEvent(SQLE
                  xecutionManagerImpl.java:1030)
                  at
                  com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecu
                  tionManagerImpl.java:885)
                  at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.release(JDBCS
                  toreManager.java:797)
                  at
                  com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager$3.free(JDBCSt
                  oreManager.java:1103)
                  at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.free(LazyResult
                  List.java:411)
                  at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.close(LazyResul
                  tList.java:391)
                  at
                  com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.finalize(LazyRe
                  sultList.java:399)
                  at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
                  at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
                  at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
                  at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)


                  "Abe White" <awhite@solarmetric.com> wrote in message
                  news:pan.2003.06.30.16.30.32.36395.9007@solarmetric.com...
                  The easiest thing would be to pass the PM around, or to maintain it in a
                  ThreadLocal or something that can be accessed by all the methods.

                  Also, each object managed by a PM has an implicit pointer to that PM;
                  you
                  can retrieve the PM for any object using
                  javax.jdo.JDOHelper.getPersistenceManager(Object). So if your methods
                  pass around persistent object or have ways of obtaining managed objects,
                  you don't need to pass around the PM.

                  The only other way to acccomplish this is to use the
                  EEPersistenceManagerFactory in an application server and use managed
                  (not
                  necessarily XA) transactions.
                  • 6. Re: Transaction problem
                    3004
                    Hi,White,

                    It seems in KODO,"autocommit" defalut to true.So can't rollback,how to
                    config KODO JCA
                    to allow kodo jdo use CMT or BMT I explicit specified?

                    Regards,
                    geduo

                    "geduo" <sljia@ipacssh.com.cn> wrote in message
                    news:bdqnqe$hmq$1@solarmetric.netmar.com...
                    Hi,White,

                    I tried to use EEPersistenceManagerFactory in an application server and
                    use
                    managed transaction,but failed,
                    here is the code excerpt:

                    public class GeneralCodeLocalEJB implements SessionBean {
                    ...................
                    public void testTransaction()throws CreateException{

                    PersistenceManager pm =null;
                    Query query=null;

                    try{

                    long start=System.currentTimeMillis();
                    pm = JDOFactory.getPersistenceManager();


                    System.out.println("getPersistenceManager():"+(System.currentTimeMillis()-st
                    art));
                    //pm.currentTransaction().begin();
                    List results = new LinkedList();
                    query=pm.newQuery(RecurrenceRule.class);
                    results=(List)query.execute();
                    Iterator itRule=results.iterator();
                    while(itRule.hasNext()){
                    RecurrenceRule rule=(RecurrenceRule)itRule.next();
                    String recurrenceRuleId=rule.getRecurrenceRuleId();
                    String byHourList=rule.getByHourList();
                    String byDayList=rule.getByDayList();

                    System.out.println("recurrenceRuleId:"+recurrenceRuleId);
                    System.out.println("byHourList:"+byHourList);
                    System.out.println("byDayList:"+byDayList);
                    rule.setCountNumber(22);
                    }

                    testMethod1();
                    testMethod2();


                    //pm.currentTransaction().rollback();

                    }catch(Exception e){
                    e.printStackTrace();
                    }finally{
                    // query.closeAll();
                    pm.close();
                    }



                    }

                    private void testMethod1(){
                    PersistenceManager pm =null;
                    Query query=null;

                    try{

                    long start=System.currentTimeMillis();
                    pm = JDOFactory.getPersistenceManager();

                    System.out.println("getPersistenceManager():"+(System.currentTimeMillis()-st
                    art));
                    //pm.currentTransaction().begin();

                    List results = new LinkedList();
                    query=pm.newQuery(RecurrenceRule.class);
                    results=(List)query.execute();
                    Iterator itRule=results.iterator();
                    while(itRule.hasNext()){
                    RecurrenceRule rule=(RecurrenceRule)itRule.next();
                    rule.setUntilDateTime(new Date());
                    }
                    //pm.currentTransaction().commit();
                    }catch(Exception e){
                    e.printStackTrace();
                    }finally{
                    // query.closeAll();
                    pm.close();
                    }

                    }

                    private void testMethod2()throws CreateException{
                    PersistenceManager pm =null;
                    Query query=null;

                    try{

                    long start=System.currentTimeMillis();
                    pm = JDOFactory.getPersistenceManager();

                    System.out.println("getPersistenceManager():"+(System.currentTimeMillis()-st
                    art));
                    //pm.currentTransaction().begin();

                    List results = new LinkedList();
                    query=pm.newQuery(RecurrenceRule.class);
                    results=(List)query.execute();
                    Iterator itRule=results.iterator();
                    while(itRule.hasNext()){
                    RecurrenceRule rule=(RecurrenceRule)itRule.next();
                    rule.setFrequency("frequency22");
                    }
                    throw new CreateException();
                    //pm.currentTransaction().rollback();
                    }catch(CreateException e){

                    e.printStackTrace();
                    throw e;
                    }finally{
                    // query.closeAll();
                    pm.close();
                    }

                    }
                    }

                    the exception is:

                    09:10:50,593 ERROR [STDERR] javax.ejb.CreateException
                    09:10:50,593 ERROR [STDERR] at
                    com.ipacs.als.session.ejb.general.GeneralCode
                    LocalEJB.testMethod2(GeneralCodeLocalEJB.java:187)
                    09:10:50,593 ERROR [STDERR] at
                    com.ipacs.als.session.ejb.general.GeneralCode
                    LocalEJB.testTransaction(GeneralCodeLocalEJB.java:123)
                    09:10:50,593 ERROR [STDERR] at
                    sun.reflect.NativeMethodAccessorImpl.invoke0(
                    Native Method)
                    09:10:50,593 ERROR [STDERR] at
                    sun.reflect.NativeMethodAccessorImpl.invoke(N
                    ativeMethodAccessorImpl.java:39)
                    09:10:50,593 ERROR [STDERR] at
                    sun.reflect.DelegatingMethodAccessorImpl.invo
                    ke(DelegatingMethodAccessorImpl.java:25)
                    09:10:50,609 ERROR [STDERR] at
                    java.lang.reflect.Method.invoke(Method.java:3
                    24)
                    09:10:50,609 ERROR [STDERR] at
                    org.jboss.ejb.StatelessSessionContainer$Conta
                    inerInterceptor.invoke(StatelessSessionContainer.java:629)
                    09:10:50,609 ERROR [STDERR] at
                    org.jboss.resource.connectionmanager.CachedCo
                    nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
                    09:10:50,609 ERROR [STDERR] at
                    org.jboss.ejb.plugins.StatelessSessionInstanc
                    eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
                    09:10:50,609 ERROR [STDERR] at
                    org.jboss.ejb.plugins.AbstractTxInterceptor.i
                    nvokeNext(AbstractTxInterceptor.java:84)
                    09:10:50,609 ERROR [STDERR] at
                    org.jboss.ejb.plugins.TxInterceptorCMT.runWit
                    hTransactions(TxInterceptorCMT.java:243)
                    09:10:50,609 ERROR [STDERR] at
                    org.jboss.ejb.plugins.TxInterceptorCMT.invoke
                    (TxInterceptorCMT.java:104)
                    09:10:50,625 ERROR [STDERR] at
                    org.jboss.ejb.plugins.SecurityInterceptor.inv
                    oke(SecurityInterceptor.java:117)
                    09:10:50,625 ERROR [STDERR] at
                    org.jboss.ejb.plugins.LogInterceptor.invoke(L
                    ogInterceptor.java:191)
                    09:10:50,625 ERROR [STDERR] at
                    org.jboss.ejb.plugins.ProxyFactoryFinderInter
                    ceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                    09:10:50,625 ERROR [STDERR] at
                    org.jboss.ejb.StatelessSessionContainer.inter
                    nalInvoke(StatelessSessionContainer.java:322)
                    09:10:50,625 ERROR [STDERR] at
                    org.jboss.ejb.Container.invoke(Container.java
                    :674)
                    09:10:50,625 ERROR [STDERR] at
                    sun.reflect.NativeMethodAccessorImpl.invoke0(
                    Native Method)
                    09:10:50,625 ERROR [STDERR] at
                    sun.reflect.NativeMethodAccessorImpl.invoke(N
                    ativeMethodAccessorImpl.java:39)
                    09:10:50,625 ERROR [STDERR] at
                    sun.reflect.DelegatingMethodAccessorImpl.invo
                    ke(DelegatingMethodAccessorImpl.java:25)
                    09:10:50,625 ERROR [STDERR] at
                    java.lang.reflect.Method.invoke(Method.java:3
                    24)
                    09:10:50,640 ERROR [STDERR] at
                    org.jboss.mx.capability.ReflectedMBeanDispatc
                    her.invoke(ReflectedMBeanDispatcher.java:284)
                    09:10:50,640 ERROR [STDERR] at
                    org.jboss.mx.server.MBeanServerImpl.invoke(MB
                    eanServerImpl.java:549)
                    09:10:50,640 ERROR [STDERR] at
                    org.jboss.invocation.jrmp.server.JRMPInvoker.
                    invoke(JRMPInvoker.java:359)
                    09:10:50,640 ERROR [STDERR] at
                    sun.reflect.NativeMethodAccessorImpl.invoke0(
                    Native Method)
                    09:10:50,640 ERROR [STDERR] at
                    sun.reflect.NativeMethodAccessorImpl.invoke(N
                    ativeMethodAccessorImpl.java:39)
                    09:10:50,656 ERROR [STDERR] at
                    sun.reflect.DelegatingMethodAccessorImpl.invo
                    ke(DelegatingMethodAccessorImpl.java:25)
                    09:10:50,656 ERROR [STDERR] at
                    java.lang.reflect.Method.invoke(Method.java:3
                    24)
                    09:10:50,656 ERROR [STDERR] at
                    sun.rmi.server.UnicastServerRef.dispatch(Unic
                    astServerRef.java:261)
                    09:10:50,656 ERROR [STDERR] at
                    sun.rmi.transport.Transport$1.run(Transport.j
                    ava:148)
                    09:10:50,656 ERROR [STDERR] at
                    java.security.AccessController.doPrivileged(N
                    ative Method)
                    09:10:50,656 ERROR [STDERR] at
                    sun.rmi.transport.Transport.serviceCall(Trans
                    port.java:144)
                    09:10:50,671 ERROR [STDERR] at
                    sun.rmi.transport.tcp.TCPTransport.handleMess
                    ages(TCPTransport.java:460)
                    09:10:50,671 ERROR [STDERR] at
                    sun.rmi.transport.tcp.TCPTransport$Connection
                    Handler.run(TCPTransport.java:701)
                    09:10:50,671 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
                    09:10:50,718 WARN [Runtime] java.sql.SQLException: You cannot rollback
                    with
                    aut
                    ocommit set!
                    09:10:50,750 WARN [JDBC] An exception occurred. This exception is likely
                    non-fa
                    tal,and so is being consumed.
                    java.lang.IllegalStateException: Already committed.
                    at
                    org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:512)

                    at
                    org.jboss.resource.connectionmanager.TxConnectionManager$TxConnection
                    EventListener.delist(TxConnectionManager.java:516)
                    at
                    org.jboss.resource.connectionmanager.TxConnectionManager$TxConnection
                    EventListener.connectionClosed(TxConnectionManager.java:565)
                    at
                    org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHan
                    dle(BaseWrapperManagedConnection.java:280)
                    at
                    org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnec
                    tion.java:127)
                    at
                    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecu
                    tionManagerImpl.java:890)
                    at
                    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.end(JDBCStore
                    Manager.java:232)
                    at
                    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.commit(JDBCSt
                    oreManager.java:193)
                    at
                    com.solarmetric.kodo.runtime.PersistenceManagerImpl.endTransaction(Pe
                    rsistenceManagerImpl.java:829)
                    at
                    com.solarmetric.kodo.ee.EEPersistenceManager.afterCompletion(EEPersis
                    tenceManager.java:224)
                    at
                    org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1
                    331)
                    at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:410)
                    at
                    org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCM
                    T.java:369)
                    at
                    org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
                    torCMT.java:253)
                    at
                    org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
                    04)
                    at
                    org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
                    java:117)
                    at
                    org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                    at
                    org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
                    ryFinderInterceptor.java:122)
                    at
                    org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
                    onContainer.java:322)
                    at org.jboss.ejb.Container.invoke(Container.java:674)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at
                    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                    java:39)
                    at
                    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                    sorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at
                    org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                    nDispatcher.java:284)
                    at
                    org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                    at
                    org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
                    359)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at
                    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                    java:39)
                    at
                    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                    sorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at
                    sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                    at sun.rmi.transport.Transport$1.run(Transport.java:148)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                    at
                    sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
                    60)
                    at
                    sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
                    .java:701)
                    at java.lang.Thread.run(Thread.java:536)
                    09:10:50,812 INFO [JDBC] An exception occurred. This exception is likely
                    non-fa
                    tal,and so is being consumed.
                    java.sql.SQLException: Connection handle has been closed and is unusable
                    at
                    org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(Wrapped
                    Connection.java:800)
                    at
                    org.jboss.resource.adapter.jdbc.WrappedConnection.getWarnings(Wrapped
                    Connection.java:603)
                    at
                    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.logWarnings(SQ
                    LExecutionManagerImpl.java:1050)
                    at
                    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.fireEvent(SQLE
                    xecutionManagerImpl.java:1030)
                    at
                    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecu
                    tionManagerImpl.java:899)
                    at
                    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.end(JDBCStore
                    Manager.java:232)
                    at
                    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.commit(JDBCSt
                    oreManager.java:193)
                    at
                    com.solarmetric.kodo.runtime.PersistenceManagerImpl.endTransaction(Pe
                    rsistenceManagerImpl.java:829)
                    at
                    com.solarmetric.kodo.ee.EEPersistenceManager.afterCompletion(EEPersis
                    tenceManager.java:224)
                    at
                    org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1
                    331)
                    at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:410)
                    at
                    org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCM
                    T.java:369)
                    at
                    org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
                    torCMT.java:253)
                    at
                    org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
                    04)
                    at
                    org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
                    java:117)
                    at
                    org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                    at
                    org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
                    ryFinderInterceptor.java:122)
                    at
                    org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
                    onContainer.java:322)
                    at org.jboss.ejb.Container.invoke(Container.java:674)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at
                    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                    java:39)
                    at
                    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                    sorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at
                    org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                    nDispatcher.java:284)
                    at
                    org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                    at
                    org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
                    359)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at
                    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                    java:39)
                    at
                    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                    sorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at
                    sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                    at sun.rmi.transport.Transport$1.run(Transport.java:148)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                    at
                    sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
                    60)
                    at
                    sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
                    .java:701)
                    at java.lang.Thread.run(Thread.java:536)


                    It seems the transaction has been autocommitted,how to turn off the
                    autocommit?
                    Or should I change the configuration of kodo JCA?

                    Regards,
                    geduo

                    "Abe White" <awhite@solarmetric.com> wrote in message
                    news:pan.2003.06.30.16.30.32.36395.9007@solarmetric.com...
                    The easiest thing would be to pass the PM around, or to maintain it in a
                    ThreadLocal or something that can be accessed by all the methods.

                    Also, each object managed by a PM has an implicit pointer to that PM;
                    you
                    can retrieve the PM for any object using
                    javax.jdo.JDOHelper.getPersistenceManager(Object). So if your methods
                    pass around persistent object or have ways of obtaining managed objects,
                    you don't need to pass around the PM.

                    The only other way to acccomplish this is to use the
                    EEPersistenceManagerFactory in an application server and use managed
                    (not
                    necessarily XA) transactions.
                    • 7. Re: Transaction problem
                      3004
                      Hi,White,
                      Thanks for your reply.Maybe I didn't explained myself clearly.
                      1.Why I can't use XADatasource?

                      2.My kodo configuration and CMT deployment descriptor is the following:

                      kodo-ds.xml
                      ---------------------------------------------------------------------------------------------------------
                      <connection-factories>
                      <tx-connection-factory>
                      <jndi-name>kodo</jndi-name>
                      <adapter-display-name>KodoJDO</adapter-display-name>
                      <config-property name_"LicenseKey" type_"java.lang.String">evaluation license key</config-property>
                      <config-property name_"ConnectionFactoryName" type_"java.lang.String">java:/ALSDS</config-property>
                      <config-property name_"Optimistic" type_"boolean">true</config-property>
                      _
                      <config-property name_"TransactionIsolation" type_"java.lang.String">SERIALIZABLE</config-property>
                      </tx-connection-factory>
                      </connection-factories>
                      -------------------------------------------------------------------------------------------------------------

                      mssql-ds.xml
                      -------------------------------------------------------------------------------------------------------------
                      <datasources>
                      <local-tx-datasource>
                      <jndi-name>ALSDS</jndi-name>
                      <connection-url>jdbc:microsoft:sqlserver://sljia:1433;DatabaseName_test;SelectMethod_cursor</connection-url>
                      <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
                      <user-name>sa</user-name>
                      <password>sa</password>
                      <auto-commit>false</auto-commit>
                      </local-tx-datasource>

                      </datasources>
                      --------------------------------------------------------------------------------------------------------------

                      ejb-jar.xml
                      ---------------------------------------------------------------------------------------------------------------
                      ...........................
                      <session>
                      <display-name>GeneralCodeEJB</display-name>
                      <ejb-name>GeneralCodeEJB</ejb-name>
                      <home>com.ipacs.als.session.interfaces.general.GeneralCodeHome</home>
                      <remote>com.ipacs.als.session.interfaces.general.GeneralCode</remote>
                      <local-home>com.ipacs.als.session.interfaces.general.GeneralCodeLocalHome</local-home>
                      <local>com.ipacs.als.session.interfaces.general.GeneralCodeLocal</local>
                      <ejb-class>com.ipacs.als.session.ejb.general.GeneralCodeLocalEJB</ejb-class>
                      <session-type>Stateless</session-type>
                      <transaction-type>Container</transaction-type>
                      <resource-ref>
                      <res-ref-name>jdbc/ALSDS</res-ref-name>
                      <res-type>javax.sql.DataSource</res-type>
                      <res-auth>Container</res-auth>
                      </resource-ref> _
                      </session>
                      ....................................
                      <container-transaction>
                      <method>
                      <ejb-name>GeneralCodeEJB</ejb-name>
                      <method-intf>Local</method-intf>
                      <method-name>*</method-name>
                      </method>
                      <trans-attribute>Required</trans-attribute>
                      </container-transaction>
                      ................................

                      -----------------------------------------------------------------------------------------------------

                      JDOFactory.java
                      ------------------------------------------------------------------------------------------------------------
                      public class JDOFactory
                      {
                      private static PersistenceManagerFactory factory _ null;
                      private static Context context; // InitialContext cache

                      public static PersistenceManager getPersistenceManager ()throws JDOException
                      {
                      return getPersistenceManagerFactory().getPersistenceManager ();
                      }

                      public static PersistenceManagerFactory getPersistenceManagerFactory () throws JDOException
                      {
                      if(factory__null){
                      //String jndi _ props.getProperty ("pmf.jndi", "kodo");
                      String jndi _ "java:/kodo";
                      try
                      {
                      if(context__null) context_new InitialContext();
                      factory_(PersistenceManagerFactory)PortableRemoteObject.narrow(context.lookup(jndi),PersistenceManagerFactory.class);
                      return factory;
                      }
                      catch (NamingException ne)
                      {
                      throw new JDOUserException ("No PMF in JNDI", ne);
                      }
                      }else{
                      return factory;
                      }
                      }
                      }

                      -----------------------------------------------------------------------------------------------------------


                      3.Does you mean get PersistenceManager through static way like Singleton/ThreadLocal and keep only 1 PM?
                      but this means getPersistenceManager will be a bottleneck,isn't it?

                      4.In fact,I want to use KODO like CMP through CMT.User just need to set appropriate transaction level in_
                      deployment descriptor.
                      A typical scenario is like this:

                      public class SomeSessionEJB implements SessionBean{
                      ..........
                      public void method1(){
                      method2();
                      method3();
                      method4();
                      }
                      private void method2(){
                      //query somthing Use JDBC/DAO_
                      callByJDBCQuery();
                      //update somthing Use JDBC/DAO_
                      callByJDBCUpdate();
                      } _
                      private void method3(){
                      //update somthing Use JDO
                      callByJDOUpdate1();
                      }
                      _
                      private void method4(){_
                      //update somthing Use JDO
                      callByJDOUpdate2();
                      }
                      ........
                      _
                      }

                      Here method1 use CMT.I want method2,method3,method4 commit/rollback together.

                      How to solve this problem?
                      Does you mean method3 and method4 should use the same PM
                      (not Just call JDOFactory.getPersistenceManager which will retun diff PM in my implement-I don't use static way as you said )?:(
                      How to keep transaction consistently from JDBC call(method2) to JDO call(method3,method4)?
                      If method3 and method4 call CMP,then Transaction is not problem.
                      But if I use JDO,I can't commit/rollback them together.
                      You may notice here I use KODO in a managed enviorment(see kodo-ds.xml and JDOFactory.java) and my app server is JBoss3.2.1.
                      Any suggestion?


                      Regards,
                      geduo

                      "Abe White" <awhite@solarmetric.com> wrote in message news:pan.2003.07.01.03.35.27.75945.937@solarmetric.com...
                      First, make sure you are not using an XADataSource.
                      _
                      Second, you must either run this from a CMT bean with your deployment
                      descriptor setting the appropriate transaction level, or start and stop
                      transactions yourself. If you are using an EEPersistenceManagerFactory,
                      you can start and stop transactions through either the JDO transaction
                      interface or through the UserTransaction.
                      _
                      Third, what does JDOFactory.getPersistenceManager do?
                      _
                      Finally, it's a bit silly to use managed transactions just because you
                      don't want to pass around a PM. If you don't want to pass around a PM
                      then come up with some static way of getting it. This could be through a
                      ThreadLocal or whatever you want.
                      • 8. Re: Transaction problem
                        3004
                        Hi,White,
                        I have solve this problem now,pls ignore my previous post.thanks for your help!

                        Regards,
                        geduo
                        "geduo" <sljia@ipacssh.com.cn> wrote in message news:bdr8el$pfb$1@solarmetric.netmar.com...
                        Hi,White,
                        Thanks for your reply.Maybe I didn't explained myself clearly.
                        1.Why I can't use XADatasource?

                        2.My kodo configuration and CMT deployment descriptor is the following:

                        kodo-ds.xml
                        ---------------------------------------------------------------------------------------------------------
                        <connection-factories>
                        <tx-connection-factory>
                        <jndi-name>kodo</jndi-name>
                        <adapter-display-name>KodoJDO</adapter-display-name>
                        <config-property name_"LicenseKey" type_"java.lang.String">evaluation license key</config-property>
                        <config-property name_"ConnectionFactoryName" type_"java.lang.String">java:/ALSDS</config-property>
                        <config-property name_"Optimistic" type_"boolean">true</config-property>
                        _
                        <config-property name_"TransactionIsolation" type_"java.lang.String">SERIALIZABLE</config-property>
                        </tx-connection-factory>
                        </connection-factories>
                        -------------------------------------------------------------------------------------------------------------

                        mssql-ds.xml
                        -------------------------------------------------------------------------------------------------------------
                        <datasources>
                        <local-tx-datasource>
                        <jndi-name>ALSDS</jndi-name>
                        <connection-url>jdbc:microsoft:sqlserver://sljia:1433;DatabaseName_test;SelectMethod_cursor</connection-url>
                        <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
                        <user-name>sa</user-name>
                        <password>sa</password>
                        <auto-commit>false</auto-commit>
                        </local-tx-datasource>

                        </datasources>
                        --------------------------------------------------------------------------------------------------------------

                        ejb-jar.xml
                        ---------------------------------------------------------------------------------------------------------------
                        ..........................
                        <session>
                        <display-name>GeneralCodeEJB</display-name>
                        <ejb-name>GeneralCodeEJB</ejb-name>
                        <home>com.ipacs.als.session.interfaces.general.GeneralCodeHome</home>
                        <remote>com.ipacs.als.session.interfaces.general.GeneralCode</remote>
                        <local-home>com.ipacs.als.session.interfaces.general.GeneralCodeLocalHome</local-home>
                        <local>com.ipacs.als.session.interfaces.general.GeneralCodeLocal</local>
                        <ejb-class>com.ipacs.als.session.ejb.general.GeneralCodeLocalEJB</ejb-class>
                        <session-type>Stateless</session-type>
                        <transaction-type>Container</transaction-type>
                        <resource-ref>
                        <res-ref-name>jdbc/ALSDS</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        </resource-ref> _
                        </session>
                        ...................................
                        <container-transaction>
                        <method>
                        <ejb-name>GeneralCodeEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>*</method-name>
                        </method>
                        <trans-attribute>Required</trans-attribute>
                        </container-transaction>
                        ...............................

                        -----------------------------------------------------------------------------------------------------

                        JDOFactory.java
                        ------------------------------------------------------------------------------------------------------------
                        public class JDOFactory
                        {
                        private static PersistenceManagerFactory factory _ null;
                        private static Context context; // InitialContext cache

                        public static PersistenceManager getPersistenceManager ()throws JDOException
                        {
                        return getPersistenceManagerFactory().getPersistenceManager ();
                        }

                        public static PersistenceManagerFactory getPersistenceManagerFactory () throws JDOException
                        {
                        if(factory__null){
                        //String jndi _ props.getProperty ("pmf.jndi", "kodo");
                        String jndi _ "java:/kodo";
                        try
                        {
                        if(context__null) context_new InitialContext();
                        factory_(PersistenceManagerFactory)PortableRemoteObject.narrow(context.lookup(jndi),PersistenceManagerFactory.class);
                        return factory;
                        }
                        catch (NamingException ne)
                        {
                        throw new JDOUserException ("No PMF in JNDI", ne);
                        }
                        }else{
                        return factory;
                        }
                        }
                        }

                        -----------------------------------------------------------------------------------------------------------


                        3.Does you mean get PersistenceManager through static way like Singleton/ThreadLocal and keep only 1 PM?
                        but this means getPersistenceManager will be a bottleneck,isn't it?

                        4.In fact,I want to use KODO like CMP through CMT.User just need to set appropriate transaction level in_
                        deployment descriptor.
                        A typical scenario is like this:

                        public class SomeSessionEJB implements SessionBean{
                        .........
                        public void method1(){
                        method2();
                        method3();
                        method4();
                        }
                        private void method2(){
                        //query somthing Use JDBC/DAO_
                        callByJDBCQuery();
                        //update somthing Use JDBC/DAO_
                        callByJDBCUpdate();
                        } _
                        private void method3(){_
                        //update somthing Use JDO
                        callByJDOUpdate1();
                        }
                        _
                        private void method4(){_
                        //update somthing Use JDO
                        callByJDOUpdate2();
                        }
                        .......
                        _
                        }

                        Here method1 use CMT.I want method2,method3,method4 commit/rollback together.

                        How to solve this problem?
                        Does you mean method3 and method4 should use the same PM
                        (not Just call JDOFactory.getPersistenceManager which will retun diff PM in my implement-I don't use static way as you said )?:(
                        How to keep transaction consistently from JDBC call(method2) to JDO call(method3,method4)?
                        If method3 and method4 call CMP,then Transaction is not problem.
                        But if I use JDO,I can't commit/rollback them together.
                        You may notice here I use KODO in a managed enviorment(see kodo-ds.xml and JDOFactory.java) and my app server is JBoss3.2.1.
                        Any suggestion?


                        Regards,
                        geduo

                        "Abe White" <awhite@solarmetric.com> wrote in message news:pan.2003.07.01.03.35.27.75945.937@solarmetric.com...
                        > First, make sure you are not using an XADataSource.
                        >_
                        > Second, you must either run this from a CMT bean with your deployment
                        > descriptor setting the appropriate transaction level, or start and stop
                        > transactions yourself. If you are using an EEPersistenceManagerFactory,
                        > you can start and stop transactions through either the JDO transaction
                        > interface or through the UserTransaction.
                        >_
                        > Third, what does JDOFactory.getPersistenceManager do?
                        >_
                        > Finally, it's a bit silly to use managed transactions just because you
                        > don't want to pass around a PM. If you don't want to pass around a PM
                        > then come up with some static way of getting it. This could be through a
                        > ThreadLocal or whatever you want._

                        • 9. Re: Transaction problem
                          3004
                          That's excellent news. If you have any suggestions on how we could
                          improve our error messages or configuration validation to help others
                          solve this same problem, please let us know.

                          And by the way, you can use XA transactions if you really want to, I just
                          wouldn't recommend it unless you really need them (most appservers have
                          very slow XA transactions). If you decide to use an XADataSource, make
                          sure to set Kodo's TransactionMode to "xa".
                          • 10. Re: Transaction problem
                            3004
                            Hi,White,
                            I encouter the following exception when use managed exception.Sometimes it is reported as KODO_
                            warning,but sometimes it is reported the following exception:

                            -----------------------------------------------------------------------------------------------------------------------------------------
                            17:48:41,578 INFO [STDOUT] 611453 [RMI TCP Connection(23)-192.168.46.67] DEBUG
                            com.solarmetric.kodo.Runtime - An exception occurred while ending a transaction
                            .. This exception will be thrown. It is being logged here for informational purpo
                            ses only.
                            com.solarmetric.kodo.runtime.FatalDataStoreException: java.sql.SQLException: You
                            cannot commit with autocommit set! [code_0;state_null]
                            NestedThrowables:
                            java.sql.SQLException: You cannot commit with autocommit set!
                            at com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLEx
                            ceptions.java:58)
                            at com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.commit(JDBCSt
                            oreManager.java:189)
                            at com.solarmetric.kodo.runtime.PersistenceManagerImpl.endTransaction(Pe
                            rsistenceManagerImpl.java:829)
                            at com.solarmetric.kodo.ee.EEPersistenceManager.afterCompletion(EEPersis
                            tenceManager.java:224)
                            at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1
                            331)
                            at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:410)
                            at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCM
                            T.java:369)
                            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
                            torCMT.java:253)
                            at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
                            04)
                            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
                            java:117)
                            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                            at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
                            ryFinderInterceptor.java:122)
                            at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
                            onContainer.java:322)
                            at org.jboss.ejb.Container.invoke(Container.java:674)
                            at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown Source)
                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                            sorImpl.java:25)
                            at java.lang.reflect.Method.invoke(Method.java:324)
                            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                            nDispatcher.java:284)
                            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                            at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
                            359)
                            at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                            sorImpl.java:25)
                            ---------------------------------------------------------------------------------------------------------------------------------------
                            Is this a bug?why "java.sql.SQLException: You cannot commit with autocommit set!" throw?

                            Regards,
                            geduo

                            "Abe White" <awhite@solarmetric.com> wrote in message news:pan.2003.07.01.15.50.36.174446.937@solarmetric.com...
                            That's excellent news. If you have any suggestions on how we could
                            improve our error messages or configuration validation to help others
                            solve this same problem, please let us know.
                            _
                            And by the way, you can use XA transactions if you really want to, I just
                            wouldn't recommend it unless you really need them (most appservers have
                            very slow XA transactions). If you decide to use an XADataSource, make
                            sure to set Kodo's TransactionMode to "xa".
                            • 11. Re: Transaction problem
                              3004
                              Hi,White,
                              Sometimes there is only the following info displayed after commit,but the transaction really commit.
                              If there is exceprtion throw and transaction rollback,this exception will not displayed.

                              13:15:50,796 WARN [Runtime] java.sql.SQLException: You cannot rollback with aut
                              ocommit set!

                              I think KODO should not throw this exception and should just log this information.
                              Any suggestion?

                              Regards,
                              geduo
                              "geduo" <sljia@ipacssh.com.cn> wrote in message news:be3kco$n2s$1@solarmetric.netmar.com...
                              Hi,White,
                              I encouter the following exception when use managed exception.Sometimes it is reported as KODO_
                              warning,but sometimes it is reported the following exception:

                              -----------------------------------------------------------------------------------------------------------------------------------------
                              17:48:41,578 INFO [STDOUT] 611453 [RMI TCP Connection(23)-192.168.46.67] DEBUG
                              com.solarmetric.kodo.Runtime - An exception occurred while ending a transaction
                              . This exception will be thrown. It is being logged here for informational purpo
                              ses only.
                              com.solarmetric.kodo.runtime.FatalDataStoreException: java.sql.SQLException: You
                              cannot commit with autocommit set! [code_0;state_null]
                              NestedThrowables:
                              java.sql.SQLException: You cannot commit with autocommit set!
                              at com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLEx
                              ceptions.java:58)
                              at com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.commit(JDBCSt
                              oreManager.java:189)
                              at com.solarmetric.kodo.runtime.PersistenceManagerImpl.endTransaction(Pe
                              rsistenceManagerImpl.java:829)
                              at com.solarmetric.kodo.ee.EEPersistenceManager.afterCompletion(EEPersis
                              tenceManager.java:224)
                              at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1
                              331)
                              at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:410)
                              at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCM
                              T.java:369)
                              at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
                              torCMT.java:253)
                              at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
                              04)
                              at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
                              java:117)
                              at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
                              at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
                              ryFinderInterceptor.java:122)
                              at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessi
                              onContainer.java:322)
                              at org.jboss.ejb.Container.invoke(Container.java:674)
                              at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown Source)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                              sorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:324)
                              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                              nDispatcher.java:284)
                              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                              at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
                              359)
                              at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                              sorImpl.java:25)
                              ---------------------------------------------------------------------------------------------------------------------------------------
                              Is this a bug?why "java.sql.SQLException: You cannot commit with autocommit set!" throw?

                              Regards,
                              geduo

                              "Abe White" <awhite@solarmetric.com> wrote in message news:pan.2003.07.01.15.50.36.174446.937@solarmetric.com...
                              > That's excellent news. If you have any suggestions on how we could
                              > improve our error messages or configuration validation to help others
                              > solve this same problem, please let us know.
                              >_
                              > And by the way, you can use XA transactions if you really want to, I just
                              > wouldn't recommend it unless you really need them (most appservers have
                              > very slow XA transactions). If you decide to use an XADataSource, make
                              > sure to set Kodo's TransactionMode to "xa"._