dain 2005/02/14 22:24:02
Modified: modules/core/src/java/org/openejb/client
EntityEJBObjectHandler.java
StatefulEJBObjectHandler.java
Log:
o Finished GERONIMO-181 Transaction propogation accross calls to stateful
session beans
o Added code resume and suspend the BMT transaction to
StatefulInstanceInterceptor. This code must be here because the instance
context holds the suspended transaction, and this context is not available in
the transaction interceptor. Also the code that "finds" the correct instance
relies on the transaction context already being established
o Enabled stateful tests for session synchronization callbacks
o Session synchronization callbacks now go through the system interceptor
chain
o Container policies now setRollbackOnly and throw a
TransactionRolledbac[Local]Exception when a system exception is thrown in an
inherited transaction
o Fixed GERONIMO-579 UserTransaction broken after BMT calls BMT
o Added support for ejb-ql back into the openejb-jar.xml file so 1.1 beans
can use ejb-ql for a query specification
o Fixed client side handle serialization code
o Fixed stateful session ejb object isIdentical code; was not comparing
primary key
o Fixed handling of remove methods
Revision Changes Path
1.3 +2 -1
openejb/modules/core/src/java/org/openejb/client/EntityEJBObjectHandler.java
Index: EntityEJBObjectHandler.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/client/EntityEJBObjectHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EntityEJBObjectHandler.java 30 Jul 2004 19:03:44 -0000 1.2
+++ EntityEJBObjectHandler.java 15 Feb 2005 03:24:01 -0000 1.3
@@ -135,6 +135,7 @@
throw (Throwable)res.getResult();
case EJB_OK:
invalidateAllHandlers(getRegistryId());
+ invalidateReference();
return null;
default:
throw new RemoteException("Received invalid response code from
server: "+res.getResponseCode());
1.3 +13 -7
openejb/modules/core/src/java/org/openejb/client/StatefulEJBObjectHandler.java
Index: StatefulEJBObjectHandler.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/client/StatefulEJBObjectHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StatefulEJBObjectHandler.java 30 Jul 2004 19:03:44 -0000 1.2
+++ StatefulEJBObjectHandler.java 15 Feb 2005 03:24:01 -0000 1.3
@@ -135,7 +135,6 @@
}
protected Object remove(Method method, Object[] args, Object proxy)
throws Throwable{
-
EJBRequest req = new EJBRequest( EJB_OBJECT_REMOVE );
req.setClientIdentity( ContextManager.getThreadPrincipal() );
req.setContainerCode( ejb.deploymentCode );
@@ -146,13 +145,20 @@
EJBResponse res = request( req );
- if ( res.getResponseCode() == res.EJB_ERROR ) {
+ switch (res.getResponseCode()) {
+ case EJB_ERROR:
throw (Throwable)res.getResult();
+ case EJB_SYS_EXCEPTION:
+ throw (Throwable)res.getResult();
+ case EJB_APP_EXCEPTION:
+ throw (Throwable)res.getResult();
+ case EJB_OK:
+ invalidateAllHandlers(getRegistryId());
+ invalidateReference();
+ return null;
+ default:
+ throw new RemoteException("Received invalid response code from
server: "+res.getResponseCode());
}
-
- invalidateAllHandlers( this.getRegistryId() );
- this.invalidateReference();
- return null;
}
}