eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
386 stars 145 forks source link

Null CurrentInvocation.getInstance in ejbCreate causes rollback operation is not working properly for local transaction #8682

Closed glassfishrobot closed 15 years ago

glassfishrobot commented 15 years ago

Used to work on sdk build (see sdk.log) Failing on V3 Glassfish build b53 (glassfish-v3-preview-b53.zip) (see glassfish.log)

Test Case Details:

test case description: test send and commit operation involving session bean and jms

test location:appserver-sqe/pe/transaction/bmt/txlocal/jmssession

test failed during sendRollback function where count value is 5 instead of 0

test case was not changed (ran diff on files)

Environment

Operating System: All Platform: Sun

Affected Versions

[V3]

glassfishrobot commented 6 years ago
glassfishrobot commented 15 years ago

@glassfishrobot Commented 1xpert said: Created an attachment (id=2957) sdk build 9.1 (build b58g-fcs)

glassfishrobot commented 15 years ago

@glassfishrobot Commented 1xpert said: Created an attachment (id=2958) glassfish v3 (build 53)

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: Can it be a test packaging problem? I see ClassNotFoundException: com.sun.s1peqe.transaction.jms.ejb.SimpleJmsBean.SimpleJmsBean in the glassfish.log.

glassfishrobot commented 15 years ago

@glassfishrobot Commented 1xpert said: This bug refers application called txbmt-txlocal-jmssessionApp.ear. When this application was ran (after successfully deployed), it gives different results compared to the results that was passing in sdk build.

The missing package com.sun.s1peqe.transaction.jms.ejb.SimpleJmsBean.SimpleJmsBean in the glassfish.log was for application called transaction-jmsApp (this is a different test case)

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: Please attach only the relevant portion of the server.log.

glassfishrobot commented 15 years ago

@glassfishrobot Commented 1xpert said: adding log

glassfishrobot commented 15 years ago

@glassfishrobot Commented 1xpert said: Created an attachment (id=3007) test case's server.log

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: Looks like a duplicate of 8598. Please reopen when the other one is fixed, but this test stil fails

glassfishrobot commented 15 years ago

@glassfishrobot Commented 1xpert said: Created an attachment (id=3051) log using 8/3/09 appserver build

glassfishrobot commented 15 years ago

@glassfishrobot Commented 1xpert said: Reopen- duplicate bug was fixed but issue still fails..Please see latest log on 8/3/09

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: Please provide the exact setup steps to run this test.

glassfishrobot commented 15 years ago

@glassfishrobot Commented 1xpert said: More details: 1) checkout test from cvs

set variables: export CVSROOT=:pserver:@redcvs.red.iplanet.com:/m/jws export ANT_HOME=<specify path to ant 1.6.5> export S1AS_HOME= export JAVA_HOME=<specify jdk 1.6.0_14> export PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATH

checkout test: cvs co appserver-sqe/bootstrap.xml ant -buildfile bootstrap.xml co-transaction

run test: cd appserver-sqe/pe/transaction/bmt/txlocal/jmssession execute ant all

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: Do the exact ANT and JDK versions matter?

With ant 1.7 and jdk 1.5.0_16, it fails with:

appserver-sqe/pe/transaction/bmt/txlocal/jmssession 61 % ant all Buildfile: build.xml Warning: 'file:./../../../../../build-config/sqe-properties.xml' in /export/v2.1/glassfish/appserver-sqe/pe/transaction/bmt/txlocal/jmssession/build.xml should be expressed simply as './../../../../../build-config/sqe-properties.xml' for compliance with other XML tools Warning: 'file:./../../../../../build-config/sqe-common.xml' in /export/v2.1/glassfish/appserver-sqe/pe/transaction/bmt/txlocal/jmssession/build.xml should be expressed simply as './../../../../../build-config/sqe-common.xml' for compliance with other XML tools Warning: 'file:./build.properties' in /export/v2.1/glassfish/appserver-sqe/pe/transaction/bmt/txlocal/jmssession/build.xml should be expressed simply as './build.properties' for compliance with other XML tools

BUILD FAILED /export/v2.1/glassfish/appserver-sqe/build-config/sqe-properties.xml:350: taskdef class org.programmerplanet.ant.taskdefs.jmeter.JMeterTask cannot be found

Total time: 1 second

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: The above run was on v2.1.1

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: Requesting jms team to investigate why resource is not enlisted in the transaction

glassfishrobot commented 15 years ago

@glassfishrobot Commented sats said: I ran the tests and investigated to see if anything was going wrong on the MQ/JMS side but this does not appear to be case. I also don't see any exceptions/errors in either MQ log or GF log. The tests appear to be JTS failures.

Reassigning back to the JTS folks to investigate...

If you still believe that this is related to JMS/MQ, pls give more details indicating why you believe so and we will investigate further.

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: Jagadish, can you check why the resource is registered with the transaction manager only on the 1st home.create, but not after utx.begin?

glassfishrobot commented 15 years ago

@glassfishrobot Commented @h2002044 said:

Jagadish, can you check why the resource is registered with the transaction manager only on the 1st home.create, but not after utx.begin?

there is no transaction at the time when the resource is acquired by the component (ejbCreate()). The resource will be registered with the component and whenever a transaction starts, transaction manager will enlist the resources registered with the component. [This behavior is same as v2]

In v3, I see that JavaEETransactionManagerSimplified.registerComponentResource() trying to register the resource (during resource acquition in ejbCreate()). But, ComponentInvocation inv = invMgr.getCurrentInvocation(); (Line 530 in JavaEETransactionManagerSimplified) returns invocation as null and hence the resource is not registered with the invocation/component. In v2, I see that the invocation is not null and hence the resource is registered with the component which is later available for enlistment during tx.begin().

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: CurrentInvocation is not part of jts

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: It's not the ComponentInvocation that is null in v3, but the inv.getInstance()

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: adjusted the summary

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: It's a left-over from changes to the Invocation(s) between v2. and v3.

glassfishrobot commented 15 years ago

@glassfishrobot Commented mvatkina said: moved generic code to populate invocation fields when the new invocation is created to BaseContainer. Sending ejb-container/src/main/java/com/sun/ejb/EjbInvocationFactory.java Sending ejb-container/src/main/java/com/sun/ejb/containers/AbstractSingletonContainer.java Sending ejb-container/src/main/java/com/sun/ejb/containers/BaseContainer.java Sending ejb-container/src/main/java/com/sun/ejb/containers/EntityContainer.java Sending ejb-container/src/main/java/com/sun/ejb/containers/MessageBeanContainer.java Sending ejb-container/src/main/java/com/sun/ejb/containers/StatefulSessionContainer.java Sending ejb-container/src/main/java/com/sun/ejb/containers/StatelessSessionContainer.java Transmitting file data ....... Committed revision 33411.

glassfishrobot commented 15 years ago

@glassfishrobot Commented File: glassfish.log Attached By: 1xpert

glassfishrobot commented 15 years ago

@glassfishrobot Commented File: jmssession.log Attached By: 1xpert

glassfishrobot commented 15 years ago

@glassfishrobot Commented File: sdk.log Attached By: 1xpert

glassfishrobot commented 15 years ago

@glassfishrobot Commented File: server.log Attached By: 1xpert

glassfishrobot commented 15 years ago

@glassfishrobot Commented Was assigned to mvatkina

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-8682

glassfishrobot commented 15 years ago

@glassfishrobot Commented Reported by 1xpert