Closed glassfishrobot closed 15 years ago
@glassfishrobot Commented mvatkina said: Does it work for any other application? If yes, how is the timer different?
@glassfishrobot Commented skgaju said: Does it work for any other application? If yes, how is the timer different?, could you please explain more what exactly you are asking.
@glassfishrobot Commented mvatkina said: If you have an application with a method that accesses a database with 'select for update', and this application is being disabled while this method is being executed, does the transaction complete correctly?
@glassfishrobot Commented mk111283 said: I looked into the code. It looks like the EJB contianer checks if the container is in started state only in the preInvoke. In other words, once a request starts it is allowed to proceed.
However, no new request will be able to proceed.
Also, it is to be noted that the container never interrupt any thread to stop its current activity. I think this is how the web container also behaves.
If just we want the transaction to rollback the current Tx (that may be in progress) after the app has been disabled, I guess it shouldn't be difficult.
@glassfishrobot Commented mk111283 said: Created an attachment (id=2102) Patch to rollback Tx
@glassfishrobot Commented mvatkina said: I think it's a bigger issue, but I've tested so far only an EJB that sends an update to a database row and the application is disable after that. The row is left locked in the database.
This doesn't happen with the attached patch.
@glassfishrobot Commented mvatkina said: Transaction completion is not a problem in a servlet because the servlet continues its execution after the app is disabled and the code hits (eventually) utx.commit() call that commits the transaction.
I'll attach the test case that covers both options.
@glassfishrobot Commented mvatkina said: Created an attachment (id=2104) the test case with the readme file
@glassfishrobot Commented harpreet said: Approved for v2.1
@glassfishrobot Commented mk111283 said: Fixed.
/cvs/glassfish/appserv-core/src/java/com/sun/ejb/containers/BaseContainer.java,v <-- BaseContainer.java new revision: 1.48.14.2; previous revision: 1.48.14.1
@glassfishrobot Commented File: ejb-tx.zip Attached By: mk111283
@glassfishrobot Commented File: test6760.zip Attached By: mvatkina
@glassfishrobot Commented Was assigned to mk111283
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-6760
@glassfishrobot Commented Reported by @prsad
@glassfishrobot Commented Marked as fixed on Thursday, December 4th 2008, 3:43:34 pm
Please see the following issue for the details : https://sailfin.dev.java.net/issues/show_bug.cgi?id=1364
This has also come through an escalation channel
Environment
Operating System: All Platform: Linux
Affected Versions
[9.1.1]