0

I'm observing weird behavior for WebSphere 7.0.0.21:

Architecture:

  1. Simple EJB bean with annotation @Local, @Remote Interfaces and transactional method marked as @Required

  2. Standalone command line client that looks up remote "jta/usertransaction" and transactional EJB method. Client code starts user transaction, executes method and then tries to rollback it.

Expected behavior: (I see it on Jboss) rollback of DB transaction

Observed behavior: (On WAS 7.0.0.21) commit of DB transaction

I see that client transaction is changing from STATUS_NO_TRANSACTION(6) to STATUS_ACTIVE(0) and then again to STATUS_NO_TRANSACTION(6) after rollback.

I tried to Google it but didn't find any results

Any ideas on this scenario ? I'm pretty much ready to file the issue to IBM.

thanks,

d3ni5
  • 51
  • 4
  • 1
    Which JVM are you using for your standalone client? My guess is that your client-side ORB is not configured to propagate transaction context to the server, so the EJB is invoked in its own transaction on the server, which commits when the EJB method ends. You could test this theory by changing the EJB method to MANDATORY. – Brett Kail Mar 11 '14 at 17:05
  • 1
    Client is on Sun JVM - what are specific client side settings it need? I have stubs generated by WAS on the client side - what else needed. Again same code is propagating transaction on Jboss. I will try to test Mandatory option - its interesting. – d3ni5 Mar 12 '14 at 15:15
  • 1
    I don't know if using a non-WAS Java for transaction, security, WLM, etc. is documented or supported, but WAS_HOME/java/jre/lib/orb.properties lists several interceptors including the one for propagating transaction context. I don't know how it would work on JBoss unless your client JVM is using an ORB with interceptors that are aware of JBoss transactions. – Brett Kail Mar 12 '14 at 19:49
  • are you using the IBM context factory on the client side? they should be available on the client run-time jars. – Renan Mar 25 '14 at 05:18
  • UPDATE: Finally after long wait and interactions with IBM support I got it resolved: 1. No problems with IBM JRE 2. For Sun/Oracle JRE it requires extra configuration for ORB e.g.
    
    jndiProperties.put("java.naming.corba.orb", com.ibm.CORBA.iiop.ORB.init((String[])null, orbProperties));
    
    
    and orb.properties from WAS or AppClient JRE is required to be provided as "orbProperties"
    – d3ni5 Apr 17 '14 at 16:35

1 Answers1

0

UPDATE:

Finally after long wait and interactions with IBM support I got it resolved:

  1. No problems with IBM JRE
  2. For Sun/Oracle JRE it requires extra configuration for ORB e.g.

jndiProperties.put("java.naming.corba.orb", com.ibm.CORBA.iiop.ORB.init((String[])null, orbProperties));

and orb.properties from WAS or AppClient JRE is required to be provided as "orbProperties"

d3ni5
  • 51
  • 4