4 Replies Latest reply on May 26, 2003 3:25 AM by Ricardo Coutinho

    Can I use one registered Jboss datasource to connect differe

    Ricardo Coutinho Newbie

      Hi all,

      I have created a datasource to connect to my AS400 system with no userId and password in the XML file. I use the .getConnection(user,password) to logon as the actual use when doing queries. This works fine as long I have only one user logged in.

      With more that one user, the queries still work but I always get the following exception. I am also lseft with a bunch of open connections on the AS400

      org.jboss.resource.JBossResourceException: Could not cleanup: ; - nested throwable: (java.sql.SQLException: The connection does not exist.)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.cleanup(BaseWrapperManagedConnection.java:194)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:222)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:381)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:142)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:335)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:467)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.getManagedConnection(LocalTxConnectionManager.java:221)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:532)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:828)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:122)
      at com.odc.mirage.ejb.base.MirageDAO.getConnection(MirageDAO.java:189)
      at com.odc.mirage.ejb.dao.CorrespondentDAOSQL.findByParticipants(CorrespondentDAOSQL.java:175)
      at com.odc.mirage.ejb.session.correspondent.CorrespondentBean.getCorrespondents(CorrespondentBean.java:305)
      at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:824)
      at org.jboss.ejb.plugins.StatefulHASessionSynchronisationInterceptor.invoke(StatefulHASessionSynchronisationInterceptor.java:108)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:268)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.CleanShutdownInterceptor.invoke(CleanShutdownInterceptor.java:172)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:117)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      .....
      .....
      Caused by: java.sql.SQLException: The connection does not exist.
      at com.ibm.as400.access.JDError.throwSQLException(JDError.java:381)
      at com.ibm.as400.access.JDError.throwSQLException(JDError.java:358)
      at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:382)
      at com.ibm.as400.access.AS400JDBCConnection.getTransactionIsolation(AS400JDBCConnection.java:1110)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.cleanup(BaseWrapperManagedConnection.java:187)
      ... 67 more


      I am using version 3.0.7 and the IBM JTOpen Toolbox for Java

      Ricardo