APAR status |
Closed as program error.
| Error description
Customer has an application that is using trying to handle thei
own exceptions. The application client will start a user
transaction which invokes tran1 which invokes tran2. Tran2 will
throw new exception but since the container recieves a unchecke
exception and it participating in a transaction, it marks the
transaction for rollback and gets TransactionRolledBackExceptio
The code is using subclasses of exception thrown and should mar
the transaction for rollback but this renders the whole user
transaction management useless since it takes away control.
The exception is in the methods throw clause so the exception
should be checked not unchecked.
The problem is in the WebSphere generated code in the
EJSRemoteTasso2 class:
public void doSomethingInTasso2() throws java.rmi.RemoteExce
ption, java.lang.Exception {
EJSDeployedSupport s = new EJSDeployedSupport();
try {
com.metlife.tasso.ejb.Tasso2Bean beanRef =
(com.metlife.tasso.ejb.Tasso2Bean)container.preInvoke(this,
beanRef.doSomethingInTasso2();
} catch (java.rmi.RemoteException ex) {
} catch (java.lang.Exception ex) {
s.setUncheckedException(ex);
} catch (Throwable ex) {
s.setUncheckedException(ex);
throw new RemoteException("bean method raised u
exception", ex);
} finally {
container.postInvoke(this, 0, s);
}
return ;
Exception is in the throws clause of the method, yet when
Exceptiohn is caught they call s.setUnckeckedException(ex)
instead of s.setCheckedException(ex). EJSRemoteTasso2 class:public void doSomethingInTasso2() throws java.rmi.RemoteException, java.lang.Exception {EJSDeployedSupport s = new EJSDeployedSupport();try {com.metlife.tasso.ejb.Tasso2Bean beanRef =(com.metlife.tasso.ejb.Tasso2Bean)container.preInvoke(this,beanRef.doSomethingInTasso2();} catch (java.rmi.RemoteException ex) {} catch (java.lang.Exception ex) {s.setUncheckedException(ex);} catch (Throwable ex) {s.setUncheckedException(ex);throw new RemoteException("bean method raised uexception", ex);} finally {container.postInvoke(this, 0, s);}return ;Exception is in the throws clause of the method, yet whenExceptiohn is caught they call s.setUnckeckedException(ex)instead of s.setCheckedException(ex). Local fixProblem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server 3.5 users of *
* EJB deploy. *
****************************************************************
* PROBLEM DESCRIPTION: TransactionRolledBackException is *
* being treated as an unhandled *
* exception in the generated code. *
****************************************************************
* RECOMMENDATION: *
****************************************************************
For EJB's with methods that throw java.lang.Exception explicity
that participate in a transaction, when the exception is thrown,
the container marks it for rollback leading to a
TransactionRollBackException. The problem was in the generated
deploy code (remote/home implementation classes) where the
exception is treated as an unchecked exception. Problem conclusion
Fixed the deploy tool to treat user declared
java.lang.Exception's as checked exceptions (and handling
possible java.lang.RuntimeException's as unchecked in this
case). Temporary fix
pq60683.jar Comments
APAR information | APAR number | PQ60683 | Reported component name | WAS ADVANCED AI | Reported component ID | 5648C8400 | Reported release | 350 | Status | CLOSED PER | PE | NoPE | HIPER | NoHIPER | Submitted date | 2002-04-30 | Closed date | 2002-05-08 | Last modified date | 2002-05-08 |
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:lowing:
Modules/Macros APAR is sysrouted TO one or more of the following:Modules/Macros
|
Fix information |
Fixed component name | WAS ADVANCED AI | Fixed component ID | 5648C8400 |
Applicable component levels | R350 PSY | UP |
|