Hi guys!
I have got JBoss 4.2.2, DROOLS BRMS 4.0.4 and Oracle 10g XE as RDBMS.
I defined an Oracle XA Datasource Drools Repository as follows:
*<xa-datasource>
<jndi-name>jdbc_XA/Drools_Rep</jndi-name>
<track-connection-by-tx/>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource
</xa-datasource-class>
<xa-datasource-property
name="URL">jdbc:oracle:thin:@//localhost:1521/xe</xa-datasource-property>
<xa-datasource-property
name="User">...</xa-datasource-property>
<xa-datasource-property
name="Password">...</xa-datasource-property>
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
<!-- <prepared-statement-cache-size>0</prepared-statement-cache-size>
-->
<!-- <blocking-timeout-millis>100</blocking-timeout-millis> -->
<!-- <min-pool-size>2</min-pool-size> -->
<!-- <max-pool-size>30</max-pool-size> -->*
*
<valid-connection-checker-class-name>
org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker
</valid-connection-checker-class-name>*
* <no-tx-separate-pools/>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
<use-java-context>false</use-java-context>
</xa-datasource>*
This repository is managed with JackRabbit.
So i defined the "repository.xml" telling jackrabbit that I want
to persist the rules into the Oracle XA Datasource I previously defined:
* <PersistenceManager class="
org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager">
<param name="dataSourceLocation"
value="jdbc_XA/Drools_Rep"/>
<param name="schema" value="oracle"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="externalBLOBs" value="false" />
</PersistenceManager>*
The problem comes out each time I reload the rulebase from
the BRMS....each time the RuleAgent wants to load
a rulebase (from the XA datasource ) the following exception is
thrown and the execution stops for 4-5 seconds:
*12:29:36,170 INFO [CachedConnectionManager] Closing a connection for you.
Please close them yourself:
org.jboss.resource.adapter.jdbc.WrappedConnection@d74f7d*
*java.lang.Throwable: STACKTRACE*
*at
org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection
(**CachedConnectionManager.java:290**)*
*at
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection
(**BaseConnectionManager2.java:417**)*
*at
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection
(**BaseConnectionManager2.java:842**)*
*at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(**
WrapperDataSource.java:88**)*
*at
org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager.getConnection
(**JNDIDatabasePersistenceManager.java:77**)*
*at
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.initConnection
(**DatabasePersistenceManager.java:730**)*
*at
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.reestablishConnection
(**DatabasePersistenceManager.java:806**)*
*at
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.executeStmt
(**DatabasePersistenceManager.java:852**)*
*at
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.exists(
**DatabasePersistenceManager.java:673**)*
*at
org.apache.jackrabbit.core.state.SharedItemStateManager.hasNonVirtualItemState
(**SharedItemStateManager.java:1104**)*
*at org.apache.jackrabbit.core.state.SharedItemStateManager.hasItemState(**
SharedItemStateManager.java:289**)*
*at org.apache.jackrabbit.core.state.LocalItemStateManager.hasItemState(**
LocalItemStateManager.java:180**)*
*at org.apache.jackrabbit.core.state.XAItemStateManager.hasItemState(**
XAItemStateManager.java:252**)*
*at org.apache.jackrabbit.core.state.SessionItemStateManager.hasItemState(**
SessionItemStateManager.java:199**)*
*at org.apache.jackrabbit.core.ItemManager.itemExists(**ItemManager.java:258
**)*
*at org.apache.jackrabbit.core.NodeImpl.hasProperty(**NodeImpl.java:2708**)*
*at org.drools.repository.PackageItem.getCompiledPackageBytes(**
PackageItem.java:666**)*
*at org.drools.brms.server.files.FileManagerUtils.loadBinaryPackage(**
FileManagerUtils.java:146**)*
*at sun.reflect.NativeMethodAccessorImpl.invoke0(**Native Method**)*
*at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)*
*at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)*
*at java.lang.reflect.Method.invoke(Unknown Source)*
*at org.jboss.seam.util.Reflections.invoke(**Reflections.java:21**)*
*at org.jboss.seam.intercept.RootInvocationContext.proceed(**
RootInvocationContext.java:31**)*
*at org.jboss.seam.intercept.SeamInvocationContext.proceed(**
SeamInvocationContext.java:56**)*
*at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(**
RollbackInterceptor.java:31**)*
*at org.jboss.seam.intercept.SeamInvocationContext.proceed(**
SeamInvocationContext.java:68**)*
*at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(**
BijectionInterceptor.java:46**)*
*at org.jboss.seam.intercept.SeamInvocationContext.proceed(**
SeamInvocationContext.java:68**)*
*at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(**
MethodContextInterceptor.java:42**)*
*at org.jboss.seam.intercept.SeamInvocationContext.proceed(**
SeamInvocationContext.java:68**)*
*at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(**
SecurityInterceptor.java:40**)*
*at org.jboss.seam.intercept.SeamInvocationContext.proceed(**
SeamInvocationContext.java:68**)*
*at org.jboss.seam.intercept.RootInterceptor.invoke(**RootInterceptor.java
:106**)*
*at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(**
JavaBeanInterceptor.java:155**)*
*at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(**
JavaBeanInterceptor.java:91**)*
*at
org.drools.brms.server.files.FileManagerUtils_$$_javassist_1.loadBinaryPackage
(FileManagerUtils_$$_javassist_1.java)*
*at org.drools.brms.server.files.PackageDeploymentServlet.doGet(**
PackageDeploymentServlet.java:99**)*
*at javax.servlet.http.HttpServlet.service(**HttpServlet.java:690**)*
*at javax.servlet.http.HttpServlet.service(**HttpServlet.java:803**)*
*at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(**
ApplicationFilterChain.java:290**)*
*at org.apache.catalina.core.ApplicationFilterChain.doFilter(**
ApplicationFilterChain.java:206**)*
*at org.jboss.seam.web.ContextFilter$1.process(**ContextFilter.java:42**)*
*at org.jboss.seam.servlet.ContextualHttpServletRequest.run(**
ContextualHttpServletRequest.java:46**)*
*at org.jboss.seam.web.ContextFilter.doFilter(**ContextFilter.java:37**)*
*at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(**
ApplicationFilterChain.java:235**)*
*at org.apache.catalina.core.ApplicationFilterChain.doFilter(**
ApplicationFilterChain.java:206**)*
*at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(**
ReplyHeaderFilter.java:96**)*
*at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(**
ApplicationFilterChain.java:235**)*
*at org.apache.catalina.core.ApplicationFilterChain.doFilter(**
ApplicationFilterChain.java:206**)*
*at org.apache.catalina.core.StandardWrapperValve.invoke(**
StandardWrapperValve.java:230**)*
*at org.apache.catalina.core.StandardContextValve.invoke(**
StandardContextValve.java:175**)*
*at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(**
SecurityAssociationValve.java:179**)*
*at org.jboss.web.tomcat.security.JaccContextValve.invoke(**
JaccContextValve.java:84**)*
*at org.apache.catalina.core.StandardHostValve.invoke(**
StandardHostValve.java:127**)*
*at org.apache.catalina.valves.ErrorReportValve.invoke(**
ErrorReportValve.java:102**)*
*at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(**
CachedConnectionValve.java:157**)*
*at org.apache.catalina.core.StandardEngineValve.invoke(**
StandardEngineValve.java:109**)*
*at org.apache.catalina.connector.CoyoteAdapter.service(**CoyoteAdapter.java
:262**)*
*at org.apache.coyote.http11.Http11Processor.process(**Http11Processor.java
:844**)*
*at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
**Http11Protocol.java:583**)*
*at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(**JIoEndpoint.java:446
**)*
*at java.lang.Thread.run(Unknown Source)*
*As u can see, each time jboss tries to access the drools DS, it finds*
*a previous connection opened, so Jboss HAS TO close it by itself!*
As far as U know, Is there any way to tell JackRabbit that he has to close
connections?
Hibernate has something like that so I expect that JackRabbit does the
same...
I already tried to redefine the XA datasource setting some tags related to
the
"connection\connection pools" but it did not work...that's why I am quite
sure
the problem has to be focused on jackrabbit!
Thank you anyway.
If u want you can answer me to m.magistri(a)reply.it as well.
Bye.
Massi