[jboss-jira] [JBoss JIRA] (WFLY-4078) Calling methods in SessionBeans of another transaction context

Tom Jenkinson (JIRA) issues at jboss.org
Thu Nov 13 12:00:31 EST 2014


    [ https://issues.jboss.org/browse/WFLY-4078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019847#comment-13019847 ] 

Tom Jenkinson commented on WFLY-4078:
-------------------------------------

Hi,

This doesn't look like a bug to me. I think we should keep this on the discussion forum for now.

Tom

> Calling methods in SessionBeans of another transaction context
> --------------------------------------------------------------
>
>                 Key: WFLY-4078
>                 URL: https://issues.jboss.org/browse/WFLY-4078
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 9.0.0.Alpha1
>         Environment: Java 8.25 Win7-64bit
>            Reporter: Stefan Lindner
>            Assignee: David Lloyd
>
> We have an Application running well on JBoss 5. It's a pure EJB3.0 application, no EJB2 parts.
> We have JarA.jar with it's own transaction context and JarB.jar with it's own transaction context. Each with it's own datasource.
> In JarA we have
>         @Entity
>         class EntityA...
>         @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
>         public EntityA doSomeActionsInContextB() {
>                 EntityA object = <retrieve from database>;
>                 return objct;
>         }
> In JarB we have
>         SessionBean v = getSessionBeanFromContextA();
>         EntityA object = v.doSomeActionsInContextB();
> In JBoss we simply had to set
>         <property name="com.arjuna.ats.jta.supportSubtransactions" value="YES"/>
>         <property name="com.arjuna.ats.jta.jtaTMImplementation" value="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple"/>
> in server/standard/conf/jbossts-properties.xml to allow nested transactions that made the above possible.
> Now in 8.1 and 9.0 nightlybuild (calls itself RC3) this is not possible anymore.
> The error messge is the same as in old JBoss 5 without subtransactions configured:
>         WARN  [com.arjuna.ats.arjuna] (default task-33) ARJUNA012140: Adding multiple last resources is disallowed. Trying to add LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl at 21c99d7b[connectionListener=3b646dfc connectionManager=78a4cb30 warned=false currentXid=< formatId=131077, gtrid_length=45, bqual_length=36, tx_uid=0:ffffc0a8de8a:77959edf:5464a877:785, node_name=VisioDesk-primary, branch_uid=0:ffffc0a8de8a:77959edf:5464a877:78e, subordinatenodename=null, eis_name=java:/VISIONET_COMMON_DS > productName=INGRES productVersion=II 9.2.4 (a64.sol/100) jndiName=java:/VISIONET_COMMON_DS])), but already have LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl at 3286d1fb[connectionListener=268fa4c6 connectionManager=2664884b warned=false currentXid=< formatId=131077, gtrid_length=45, bqual_length=36, tx_uid=0:ffffc0a8de8a:77959edf:5464a877:785, node_name=VisioDesk-primary, branch_uid=0:ffffc0a8de8a:77959edf:5464a877:78a, subordinatenodename=null, eis_name=java:/VISIODESK_DS > productName=INGRES productVersion=II 9.2.4 (a64.sol/100) jndiName=java:/VISIODESK_DS]))
>         WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-33) SQL Error: 0, SQLState: null
>         ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-33) javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener at 3b646dfc[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection at 69d8390d connection handles=0 lastUse=1415882936317 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool at 130ebfdb mcp=SemaphoreArrayListManagedConnectionPool at 65ed5c71[pool=VISIONET_COMMON_DS] xaResource=LocalXAResourceImpl at 21c99d7b[connectionListener=3b646dfc connectionManager=78a4cb30 warned=false currentXid=null productName=INGRES productVersion=II 9.2.4 (a64.sol/100) jndiName=java:/VISIONET_COMMON_DS] txSync=null]
> And there is no way to set subtransactions allowed. Reading http://www.jboss.org//quickstarts/eap/jts/index.html shows outdated examples not working in Wildfly 8 and 9
> No ideas from the community: https://developer.jboss.org/message/909762



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)



More information about the jboss-jira mailing list