User: sparre
Date: 01/06/11 14:52:24
Modified: src/main/org/jboss/ejb/plugins/jrmp/interfaces
HomeProxy.java
Log:
Fixed EJB1.1 sect. 5.3.2 violation:
Invoking the javax.ejb.Home.remove(Object primaryKey) method
on a session home must result in a javax.ejb.RemoveException.
Revision Changes Path
1.23 +6 -1
jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/HomeProxy.java
Index: HomeProxy.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/HomeProxy.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- HomeProxy.java 2001/05/02 03:04:14 1.22
+++ HomeProxy.java 2001/06/11 21:52:23 1.23
@@ -20,6 +20,7 @@
import javax.ejb.Handle;
import javax.ejb.HomeHandle;
import javax.ejb.EJBMetaData;
+import javax.ejb.RemoveException;
import org.jboss.ejb.CacheKey;
import org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker;
@@ -30,7 +31,7 @@
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author Jason Dillon <a
href="mailto:[EMAIL PROTECTED]"><[EMAIL PROTECTED]></a>
- * @version $Revision: 1.22 $
+ * @version $Revision: 1.23 $
*/
public class HomeProxy
extends GenericProxy
@@ -166,6 +167,10 @@
return Void.TYPE;
}
else if (m.equals(REMOVE_BY_PRIMARY_KEY)) {
+ // Session beans must throw RemoveException (EJB 1.1, 5.3.2)
+ if (ejbMetaData.isSession())
+ throw new RemoveException("Session beans cannot be removed by
primary key.");
+
// The trick is simple we trick the container in believe it
// is a remove() on the instance
Object id = new CacheKey(args[0]);
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development