Fix (APAR): PK66109 Status: Fix Release: 5.0.2.18 Operating System: AIX,HP-UX,Linux,Solaris,Windows Supersedes Fixes: CMVC Defect: PK66109 Byte size of APAR: 25969 Date: 2008-06-10 Abstract: Enterprise JavaBeans container is not properly handling a transaction which is left active by the user. Description/symptom of problem: PK66109 resolves the following problem: ERROR DESCRIPTION: Scenerio: An enterprise bean defined as bean-managed transaction is called. The method called begins a user transaction and then calls a second bean which in turn participates in the transaction begun by the first bean. The second bean's method throws a RuntimeException (which causes the transaction to be marked for rollback). The first bean catches this exception, but because the exception is thrown the application code to complete the user transaction is skipped (i.e. the bean which created the user transaction does not handle the user transaction it created). Even though the user (bean code) really should clean up the user transaction it started, the Enterprise JavaBeans container must detect this situation and handle it. For this scenario, it was found that the Enterprise JavaBeans container does detect that the user transaction is still active, but it does not actually roll back the user transaction in this specific code path. It was also found that the same scenario executed on an IBM® WebSphere Application Server V 5.1.1 does properly handle the user transaction correctly. The transaction processing internal logic has changed some in WebSphere Application Server V 5.1.1 (and beyond) such that this scenario is properly handled. LOCAL FIX: The user can correct this case by adding a 'finally' block in their enterprise bean code to always properly handle the user transaction it creates. PROBLEM SUMMARY USERS AFFECTED: All users of IBM WebSphere Application Server V5.0.2. PROBLEM DESCRIPTION: Enterprise JavaBeans container is not properly handling a transaction which is left active by the user. RECOMMENDATION: None When a transaction is begun by an enterprise bean defined as bean-managed Transation, it is the user's responsibility to either roll back or commit the transaction prior to leaving the bean. However, if a user leaves this transaction active, the Enterprise JavaBeans container should detect this and handle the active transaction. In the case where a runtime or non-application exception was caused previously in the transaction lifecycle, the Enterprise JavaBeans container should detect this and roll back the transaction upon exiting the bean in which the transaction was created. This is not happening in WebSphere Application Server V5.0.2 (and V5.0.2 only). Since the transaction is not properly handled by the user or the Enterprise JavaBeans container, the transaction will eventually timeout and an entry will be made in the system logs indicating the timeout. It should be noted that it is only when the transaction was marked for rollback previously via an exception case that the Enterprise JavaBeans container does not handle the exception. PROBLEM CONCLUSION: With this fix, the Enterprise JavaBeans container will properly handled a user created transaction that has been marked for rollback and which is not handled by the creator. The fix for this APAR is only available as an Interim Fix, and specifically for WebSphere Application Server V5.0.2 because the issue has already been fixed in subsequent WebSphere Application Server versions. Directions to apply fix: NOTE: Choose the: 1) Release the fix applies to 2) The Editions that apply 3) Delete the Editions & Methods that do not apply and this Note Fix applies to Editions: Release: 5.0 _X__ Application Server (Express or BASE) _X__ Network Deployment (ND) Install Fix to: Method: _X_ Application Server Nodes _X_ Deployment Manager Nodes NOTE: The user must: * Have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * Be logged in with the same authority level when unpacking a fix, fix pack or refresh pack. The Update Installer can be downloaded from the following link: http://www.ibm.com/support/docview.wss?rs=180&uid=swg21205991 The Update Installer for V5.0 does not have a maintenance directory. It uses fixpacks and fixes as the location of the unpacked files. 1) Copy PK66109.jar file directly to the maintenance directory 2) Shutdown WebSphere Manually execute setupCmdLine.bat in Windows or . ./setupCmdLine.sh in Unix from the WebSphere instance that maintenance is being applied to. 3) Launch Update Installer 4) Enter the installation location of the WebSphere product you want to update. 5) Select the "Install maintenance package" operation. 6) Enter the file name of the maintenance package to install (PK66109.jar file which was copied in the maintenance directory). The V5.0 fix packs and fixes are unpacked as .jar files and should be unpacked into fixpacks or fixes directory. 7) Install the maintenance package. 8) Restart WebSphere Directions to remove fix: NOTE: * The user must have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * FIXES MUST BE REMOVED IN THE ORDER THEY WERE APPLIED * DO NOT REMOVE A FIX UNLESS ALL FIXES APPLIED AFTER IT HAVE FIRST BEEN REMOVED * YOU MAY REAPPLY ANY REMOVED FIX Example: If your system has fix1, fix2, and fix3 applied in that order and fix2 is to be removed, fix3 must be removed first, fix2 removed, and fix3 re-applied. 1) Shutdown WebSphere Manually execute setupCmdLine.bat in Windows or . ./setupCmdLine.sh in Unix from the WebSphere instance that uninstall is being run against. 2) Start Update Installer 3) Enter the installation location of the WebSphere product you want to remove the fix. 4) Select "Uninstall maintenance package" operation. 5) Enter the file name of the maintenance package to uninstall (PK66109.jar). 6) UnInstall maintenance package. 7) Restart WebSphere Directions to re-apply fix: 1) Shutdown WebSphere. 2) Follow the Fix instructions to apply the fix. 3) Restart WebSphere. Additional Information: