[Security & JAAS/JBoss] - Classloader problem in principal propagation from WAR to EAR
by jainsau
I have a custom principal class which I want to use for SSO. I have a login service EJB (in an EAR) which creates this CustomPrincipal instance and returns the same to a client WAR when the client logs in to the web app.
On further EJB invocations (which lie in the EAR which has the Login service also) from client WAR, the CustomPrincipal instance returned from the LoginService is set the on the InitialContext's SECURITY_PRINCIPAL attribute:
contextProperties.put(Context.SECURITY_PRINCIPAL, customPrincipal);
| contextProperties.put(Context.SECURITY_CREDENTIALS, customCredential);
| // ... other properties set here
| context = new InitialContext(contextProperties);
On the server side (in the EAR), an EJB interceptor gets the Principal from the sessionContext and checks whether the Principal is an instance of CustomPrincipal:
Principal principal = sessionContext.getCallerPrincipal();
| if (principal instanceof CustomPrincipal)
| {
| //do some logging and timing checks and continue
| ....
| }
| else throw new Exception("Unsupported principal");
When I run the code, I get the Exception with the message "Unsupported Principal". The Principal I get is an instance of CustomPrincipal but its class loader is WebappClassLoader, where as the CustomPrincipal (on the right side of the instanceof operator) class reference class loader is UnifiledClassLoader3. I am unable to understand the reason and fix for this.
The CustomPrincipal class is in a JAR which is present inside both the EAR and the WAR file.
My jboss-app.xml in the EAR is this:
<?xml version="1.0"?>
|
| <jboss-app>
| <loader-repository>
| fx:loader=fx.ear
| <loader-repository-config>Java2ParentDelegation=false</loader-repository-config>
| </loader-repository>
| </jboss-app>
My jboss-web.xml in the WAR is this:
<?xml version="1.0"?>
|
| <jboss-web>
| <class-loading>
| <loader-repository>
| fx:loader=fxtestharness_i2.war
| </loader-repository>
| </class-loading>
| </jboss-web>
Another point worth mentioning is that when the CustomPrincipal instance is created by the Login service the class loader is UnifiedClassLoader3. But when its returned to the WAR, the class loader is WebappClassLoader.
Please help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079299#4079299
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079299
17Â years, 2Â months
[JCA/JBoss] - IDLE Connections and Pool ConnectionDestroyedCount near zero
by skajotde
Hello
I have seeking on forum but with no effects.
JBoss 4.0.3SP1
Posgtres 8.x
I have problem with production serwer. Per one day all connections from pool are excused and connections not come back to pool (they are IDLE - I checked with ps aux | grep posgtres)
According to jmx-console all connections are "in use" (InUseConnectionCount) and none of them are closed (ConnectionDestroyedCount, near zero, but sometime incease, but very slow)
On my testing serwer there is No problem. All connections come back to the pool and ConnectionDestroyedCount from jmx is instantly grow up.
log for debugging:
| <category name="org.jboss.resource" additivity="false" >
| <priority value="TRACE" class="org.jboss.logging.XLevel"/> <appender-ref ref="STUDENTLOGDEBUG"/>
| </category>
| <category name="org.jboss" additivity="false" >
| <priority value="DEBUG"/> <appender-ref ref="STUDENTLOGDEBUG"/>
| </category>
| <category name="org.jboss.tm" additivity="false" >
| <priority value="TRACE" class="org.jboss.logging.XLevel"/> <appender-ref ref="STUDENTLOGDEBUG"/>
| </category>
| <category name="org.hibernate.jdbc.ConnectionManager" additivity="false" >
| <priority value="TRACE" class="org.jboss.logging.XLevel"/> <appender-ref ref="STUDENTLOGDEBUG"/>
| </category>
| <category name="org.hibernate.SQL" additivity="false" >
| <priority value="ERROR"/> <appender-ref ref="STUDENTLOGDEBUG"/>
| </category>
|
There are logs for production serwer for one click (as you will see connection is closed via entitymanager):
| ========================
| Production Environment:
| ========================
|
|
| 2007-08-29 19:24:54,323 TRACE [org.jboss.tm.TransactionImpl] Created new instance for tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,323 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,323 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] GETTING NEW EntityManager
| 2007-08-29 19:24:54,323 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] logLivedSession.get() was NULL
| 2007-08-29 19:24:54,323 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] LONG LIVED NOT FOUND
| 2007-08-29 19:24:54,323 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] status=STATUS_ACTIVE
| 2007-08-29 19:24:54,324 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2007-08-29 19:24:54,324 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Pre-enlist: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=null] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,324 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Get synchronizer org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=null] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,324 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] status=STATUS_ACTIVE
| 2007-08-29 19:24:54,325 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Enlisting resource org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=false}]
| 2007-08-29 19:24:54,325 TRACE [org.jboss.tm.TransactionImpl] enlistResource(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] status=STATUS_ACTIVE xaRes=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a
| 2007-08-29 19:24:54,325 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=1, localId=8248]) entered: org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a flags=0
| 2007-08-29 19:24:54,325 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=1, localId=8248]) leaving: org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a flags=0
| 2007-08-29 19:24:54,325 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Enlisted resource org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=false}]
| 2007-08-29 19:24:54,325 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Check enlisted org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=true}] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,325 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] status=STATUS_ACTIVE
| 2007-08-29 19:24:54,326 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2007-08-29 19:24:54,326 DEBUG [org.hibernate.jdbc.ConnectionManager] closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2007-08-29 19:24:54,326 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857
| 2007-08-29 19:24:54,326 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
| 2007-08-29 19:24:54,326 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] isManagedConnectionFree=false mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857
| 2007-08-29 19:24:54,326 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2007-08-29 19:24:54,326 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Pre-enlist: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=true}] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,326 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Get synchronizer org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=true}] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,326 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Check enlisted org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=true}] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,327 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2007-08-29 19:24:54,327 DEBUG [org.hibernate.jdbc.ConnectionManager] closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2007-08-29 19:24:54,327 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857
| 2007-08-29 19:24:54,327 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
| 2007-08-29 19:24:54,327 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] isManagedConnectionFree=false mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857
| 2007-08-29 19:24:54,327 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2007-08-29 19:24:54,327 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Pre-enlist: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=true}] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,327 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Get synchronizer org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=true}] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,327 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Check enlisted org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@6ad81f66[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857 handles=0 lastUse=1188408214191 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@41086d8b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@4bef641c xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a txSync=TxSync1299245257{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248] wasTrackByTx=true enlisted=true}] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,328 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2007-08-29 19:24:54,328 DEBUG [org.hibernate.jdbc.ConnectionManager] closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2007-08-29 19:24:54,328 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857
| 2007-08-29 19:24:54,328 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
| 2007-08-29 19:24:54,328 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] isManagedConnectionFree=false mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@12f59857
| 2007-08-29 19:24:54,333 TRACE [org.jboss.tm.TransactionImpl] Committing, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248], status=STATUS_ACTIVE
| 2007-08-29 19:24:54,333 TRACE [org.jboss.tm.TransactionImpl] calling sync 0, org.jboss.ejb3.entity.ManagedEntityManagerFactory$SessionSynchronization@557c3ff4 tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,333 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** flushing.....
| 2007-08-29 19:24:54,333 TRACE [org.jboss.tm.TransactionImpl] calling sync 1, org.jboss.resource.connectionmanager.TransactionSynchronizer@694e00de tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,333 TRACE [org.jboss.tm.TransactionImpl] calling sync 2, org.hibernate.transaction.CacheSynchronization tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,333 TRACE [org.jboss.tm.TransactionImpl] Before completion done, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248], status=STATUS_ACTIVE
| 2007-08-29 19:24:54,333 TRACE [org.jboss.tm.TransactionImpl] endresources(org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a): state=1
| 2007-08-29 19:24:54,333 TRACE [org.jboss.tm.TransactionImpl] endResource(XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=1, localId=8248]) entered: org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a flag=67108864
| 2007-08-29 19:24:54,333 TRACE [org.jboss.tm.TransactionImpl] endResource(XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=1, localId=8248]) leaving: org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a flag=67108864
| 2007-08-29 19:24:54,334 TRACE [org.jboss.tm.TransactionImpl] One phase commit TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]: One resource.
| 2007-08-29 19:24:54,334 TRACE [org.jboss.tm.TransactionImpl] Committing resource org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@39e4817a state=3
| 2007-08-29 19:24:54,334 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
| 2007-08-29 19:24:54,334 TRACE [org.jboss.tm.TransactionImpl] Committed OK, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:54,334 TRACE [org.jboss.tm.TxManager] commited tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=amon/8248, BranchQual=, localId=8248]
| 2007-08-29 19:24:58,668 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 150000
| 2007-08-29 19:24:58,674 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=some, password=--hidden--}
| 2007-08-29 19:24:58,679 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=some, password=--hidden--}
| 2007-08-29 19:24:58,683 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=some, password=--hidden--}
| 2007-08-29 19:24:58,687 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=some, password=--hidden--}
|
Logs from testing server
| =============
| Testing Env
| ============
|
| 2007-08-29 19:56:44,340 TRACE [org.jboss.tm.TransactionImpl] Created new instance for tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,340 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,340 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] user tx started, key: null
| 2007-08-29 19:56:44,348 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] GETTING NEW EntityManager
| 2007-08-29 19:56:44,348 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] logLivedSession.get() was NULL
| 2007-08-29 19:56:44,348 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] LONG LIVED NOT FOUND
| 2007-08-29 19:56:44,348 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] status=STATUS_ACTIVE
| 2007-08-29 19:56:44,349 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] status=STATUS_ACTIVE
| 2007-08-29 19:56:44,349 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2007-08-29 19:56:44,349 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
| 2007-08-29 19:56:44,349 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection trackByTx=true tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,349 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] supplying ManagedConnection from pool: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=null]
| 2007-08-29 19:56:44,349 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Got connection from pool tracked by transaction org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=null] tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] [InUse/Available/Max]: [1/399/400]
| 2007-08-29 19:56:44,350 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Using connection from pool tracked by transaction org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=null] tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] [InUse/Available/Max]: [1/399/400]
| 2007-08-29 19:56:44,350 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Pre-enlist: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=null] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]2007-08-29 19:56:44,350 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Get synchronizer org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=null] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,350 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] status=STATUS_ACTIVE
| 2007-08-29 19:56:44,350 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Enlisting resource org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=TxSync23129503{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] wasTrackByTx=true enlisted=false}]
| 2007-08-29 19:56:44,350 TRACE [org.jboss.tm.TransactionImpl] enlistResource(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] status=STATUS_ACTIVE xaRes=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9
| 2007-08-29 19:56:44,350 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=1, localId=62]) entered: org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 flags=0
| 2007-08-29 19:56:44,350 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] start, xid: XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=1, localId=62], flags: 0
| 2007-08-29 19:56:44,350 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=1, localId=62]) leaving: org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 flags=0
| 2007-08-29 19:56:44,350 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Enlisted resource org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=TxSync23129503{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] wasTrackByTx=true enlisted=false}]
| 2007-08-29 19:56:44,350 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] Check enlisted org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=TxSync23129503{tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62] wasTrackByTx=true enlisted=true}] threadTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,350 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@e62a39, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@907a06, key: null
| 2007-08-29 19:56:44,359 TRACE [org.jboss.tm.TransactionImpl] Committing, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62], status=STATUS_ACTIVE
| 2007-08-29 19:56:44,359 TRACE [org.jboss.tm.TransactionImpl] calling sync 0, org.jboss.ejb3.entity.ManagedEntityManagerFactory$SessionSynchronization@2cc7b9 tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,359 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** flushing.....
| 2007-08-29 19:56:44,359 TRACE [org.jboss.tm.TransactionImpl] calling sync 1, org.hibernate.transaction.CacheSynchronization tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,359 TRACE [org.jboss.tm.TransactionImpl] calling sync 2, org.jboss.resource.connectionmanager.TransactionSynchronizer@1ec49f4 tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,359 TRACE [org.jboss.tm.TransactionImpl] Before completion done, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62], status=STATUS_ACTIVE
| 2007-08-29 19:56:44,359 TRACE [org.jboss.tm.TransactionImpl] endresources(org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9): state=1
| 2007-08-29 19:56:44,359 TRACE [org.jboss.tm.TransactionImpl] endResource(XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=1, localId=62]) entered: org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 flag=67108864
| 2007-08-29 19:56:44,359 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] end on xid: XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=1, localId=62] called with flags 67108864
| 2007-08-29 19:56:44,360 TRACE [org.jboss.tm.TransactionImpl] endResource(XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=1, localId=62]) leaving: org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 flag=67108864
| 2007-08-29 19:56:44,360 TRACE [org.jboss.tm.TransactionImpl] One phase commit TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]: One resource.
| 2007-08-29 19:56:44,360 TRACE [org.jboss.tm.TransactionImpl] Committing resource org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 state=3
| 2007-08-29 19:56:44,360 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
| 2007-08-29 19:56:44,360 DEBUG [org.hibernate.jdbc.ConnectionManager] closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2007-08-29 19:56:44,360 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22
| 2007-08-29 19:56:44,360 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@e62a39, object: org.jboss.resource.adapter.jdbc.WrappedConnection@907a06, key: null
| 2007-08-29 19:56:44,360 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
| 2007-08-29 19:56:44,360 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] isManagedConnectionFree=false mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22
| 2007-08-29 19:56:44,360 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2007-08-29 19:56:44,360 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool kill=false cl=org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410195037 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=null]
| 2007-08-29 19:56:44,360 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning connection to pool org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@e82810[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@19e3c22 handles=0 lastUse=1188410204360 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@13ce184 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f9cdda xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@17e00e9 txSync=null] [InUse/Available/Max]: [0/400/400]
| 2007-08-29 19:56:44,360 TRACE [org.jboss.tm.TransactionImpl] Committed OK, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
| 2007-08-29 19:56:44,360 TRACE [org.jboss.tm.TxManager] commited tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=serwer27/62, BranchQual=, localId=62]
|
|
|
As you see, in the first case connection NOT return to the pool but in second, yes.
Could you help me?
--
Kamil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079297#4079297
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079297
17Â years, 2Â months