Oi Pessoal,
Estamos trabalhando em um projeto que utiliza o Jboss 3 com o banco de
dados DB2, primeiro utilizamos o drive tipo 3 do DB2, mas como alguns ja
sabem, n�o funciona direito, estava dando erros, com tabelas que
tivessem campos TIME, ent�o trocamos para utilizar o tipo 2.
Mas agora os problemas mudaram, pois ele est� se enrolando com o pool de
conexoes, ser� que � algo estamos fazendo errado?
Tem alguma coisa a mais para se configurar?
Informa��o que poder ser importante, ambos est�o no Linux, e por n�o
saber fazer de outra forma, iniciamos o JBoss usando o usu�rio do CB2
criado na instalacao.
Abaixo segue o treco do erro... o restante est� atachado no arquivo se
necess�rio for..
E tamb�m o db2-service.xml
2002-07-18 10:51:10,905 INFO
[org.jboss.resource.connectionmanager.JBossManagedConnectionPool]
Exception destroying ManagedConnectio
n
javax.resource.ResourceException: SQLException
at
org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.checkException(LocalManagedConnection.java:476)
at
org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.destroy(LocalManagedConnection.java:202)
at
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:250)
at
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:140
)
<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================================= -->
<!-- New ConnectionManager setup for default DB2QL dbs -->
<!-- Build jmx-api (build/build.sh all) and view for config documentation -->
<!-- To avoid class not found headaches, copy your DB2 driver to the jboss
lib directory -->
<!-- ============================================================================= -->
<server>
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=DB2DS">
<!-- ======================================================= -->
<!-- You must include a login module configuration named DB2DbRealm
in your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule:
<application-policy name = "DB2DbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">yourprincipal</module-option>
<module-option name = "userName">yourusername</module-option>
<module-option name = "password">yourpassword</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DB2DS</module-option>
</login-module>
</authentication>
</application-policy>
NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
module-option name = "managedConnectionFactoryName"
must match the object name of the ConnectionManager you are configuring here.
-->
<!-- ===================================================================== -->
<!--comment out this line if you want component managed security or want
to use the default values in the ManagedConnectionFactoryProperties -->
<!-- <attribute name="SecurityDomainJndiName">DB2DbRealm</attribute>-->
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=DB2DS">
<!-- ========== Set the JndiName ======================= -->
<attribute name="JndiName">DB2DS</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:db2:SAMPLE</config-property>
<config-property name="DriverClass" type="java.lang.String">COM.ibm.db2.jdbc.app.DB2Driver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">xxx</config-property>
<config-property name="Password" type="java.lang.String">xxx</config-property>
</properties>
</attribute>
<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
<!--real attributes-->
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=DB2DS">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<!--<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends> -->
<attribute name="TransactionManager">java:/TransactionManager</attribute>
<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>
</mbean>
</server>
2002-07-18 10:51:10,905 INFO
[org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Exception destroying
ManagedConnectio
n
javax.resource.ResourceException: SQLException
at
org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.checkException(LocalManagedConnection.java:476)
at
org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.destroy(LocalManagedConnection.java:202)
at
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:250)
at
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:140
)
at
org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.returnConnection(JBossManagedConnectionPool.java:
324)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:460)
at
org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener.commit(LocalTxConnectionManager
.java:558)
at org.jboss.tm.TxCapsule.commitResources(TxCapsule.java:1656)
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:357)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:190)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
at
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
at org.jboss.ejb.Container.invoke(Container.java:706)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:364)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
2002-07-17 13:49:16,599 WARN [org.jboss.tm.TxCapsule] XAException: tx=XidImpl
[FormatId=257, GlobalId=rgmed//368, BranchQual=] error
Code=XA_UNKNOWN(0)
javax.transaction.xa.XAException: could not commit local
txjavax.resource.ResourceException: SQLException
at
org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener.commit(LocalTxConnectionManager
.java:563)
at org.jboss.tm.TxCapsule.commitResources(TxCapsule.java:1656)
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:357)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:190)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
at
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
at org.jboss.ejb.Container.invoke(Container.java:706)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:364)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
---------------------------------------------------------------------
Para cancelar a subscri��o, envie mensagem para:
[EMAIL PROTECTED]
Para comandos adicionais, envie mensagem para: [EMAIL PROTECTED]