Bug 1091419
Summary: | Datasource security doesn't work with kerberos security domain and JPA on oracle | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Martin Simka <msimka> | ||||
Component: | JCA | Assignee: | Jesper Pedersen <jpederse> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Simka <msimka> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.3.0 | CC: | cdewolf, istudens, jdoyle, jmartisk, kkhan, ochaloup, rsvoboda | ||||
Target Milestone: | DR4 | ||||||
Target Release: | EAP 6.4.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | Type: | Bug | |||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1147419 | ||||||
Attachments: |
|
Description
Martin Simka
2014-04-25 14:32:42 UTC
You can't obtain connections once a transaction is in rollback mode. This needs further investigation. this issue seems to be oracle exclusive, mentioned tests pass on mssql The reason for roll-back only state is as follows: 15:33:11,341 WARN [com.arjuna.ats.arjuna] (http-/127.0.0.1:8080-4) ARJUNA012140: Adding multiple last resources is disallowed. Trying to add LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@77c35b6c[connectionListener=48b75e7f connectionManager=54a935d warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000101:-63ea678b:535a63fd:e, node_name=1, branch_uid=0:ffff7f000101:-63ea678b:535a63fd:17, subordinatenodename=null, eis_name=java:jboss/datasources/TestDatasource > productName=Oracle productVersion=Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options jndiName=java:jboss/datasources/TestDatasource])), but already have LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@36b6ed73[connectionListener=44b40d42 connectionManager=54a935d warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000101:-63ea678b:535a63fd:e, node_name=1, branch_uid=0:ffff7f000101:-63ea678b:535a63fd:16, subordinatenodename=null, eis_name=java:jboss/datasources/TestDatasource > productName=Oracle productVersion=Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options jndiName=java:jboss/datasources/TestDatasource])) It doesn't correctly track connections in the pool for Oracle database. After em.persist(entity) it creates a new connection and a new LocalXAResourceImpl by PoolBySubject#getTransactionNewConnection(). But then within beforeCompletion() it creates another new connection by PoolBySubject#getTransactionNewConnection() and thus another new LocalXAResourceImpl which it tries to enlist to the non-XA tx which fails. The second time, i.e. within beforeCompletion(), when it tries to find an old connection by AbstractPool#getTransactionOldConnection(Transaction trackByTransaction, ManagedConnectionPool mcp) the mcp managed connection pool is different to the previous one and so {{ConnectionListener cl = (ConnectionListener)tsr.getResource(mcp);}} returns null instead of a connection listener which is stored in tsr at that time. I am still not sure however why the mcp differs in this case. The issue cannot be debugged anymore due to outage of the kerberos server. Anyway, I have a suspicion that Oracle database changes the Subject somehow which leads to this issue. What happens there according to the attached server.log is that a new instance of SemaphoreArrayListManagedConnectionPool appears within beforeCompletion() which seems to be caused by a different key created by Object key = getKey(subject, cri, separateNoTx); at AbstractPool#getConnection() method. In this case the pool is a subject based one, thus the subject has to be different (as per SubjectKey code) which leads to a different key which then leads to a new managed connection pool created in AbsractPool#getManagedConnectionPool(). We need the kerberos server being up back to confirm this. Jesper Pedersen <jpederse> updated the status of jira JBJCA-1179 to Closed Jesper Pedersen <jpederse> updated the status of jira JBJCA-1179 to Reopened Jesper Pedersen <jpederse> updated the status of jira JBJCA-1179 to Resolved Jesper Pedersen <jpederse> updated the status of jira JBJCA-1179 to Closed It has been fixed in IJ. It will be fixed by upgrade to 1.0.28.Final. verified on EAP 6.4.0.DR4 Kabir Khan <kabir.khan> updated the status of jira EAP6-215 to Resolved John Doyle <jdoyle> updated the status of jira EAP6-215 to Closed |