[jboss-cvs] JBossAS SVN: r67796 - branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Dec 3 14:04:11 EST 2007


Author: bdecoste
Date: 2007-12-03 14:04:11 -0500 (Mon, 03 Dec 2007)
New Revision: 67796

Modified:
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/SessionContainer.java
Log:
[JBPAPP-478] merged fix for [EJBTHREE-1025]

Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/SessionContainer.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/SessionContainer.java	2007-12-03 19:01:42 UTC (rev 67795)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/SessionContainer.java	2007-12-03 19:04:11 UTC (rev 67796)
@@ -26,10 +26,17 @@
 import java.util.Hashtable;
 import java.util.Map;
 
+import javax.ejb.EJBException;
 import javax.ejb.EJBObject;
 import javax.ejb.Handle;
+import javax.ejb.Local;
 import javax.ejb.LocalHome;
+import javax.ejb.Remote;
 import javax.ejb.RemoteHome;
+
+import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.aop.Advisor;
 import org.jboss.aop.AspectManager;
 import org.jboss.aop.Dispatcher;
 import org.jboss.aop.MethodInfo;
@@ -109,10 +116,23 @@
    @Override
    public void instantiated()
    {
+      checkForDuplicateLocalAndRemoteInterfaces();
+      
       super.instantiated();
- //     proxyDeployer.initializeRemoteBindingMetadata();
- //     proxyDeployer.initializeLocalBindingMetadata();
    }
+   
+   protected void checkForDuplicateLocalAndRemoteInterfaces()
+   {
+      Local local = (Local) resolveAnnotation(Local.class);
+      if (local == null || (local.value() != null && local.value().length > 0))
+         return;
+      
+      Remote remote = (Remote) resolveAnnotation(Remote.class);
+      if (remote == null || (remote.value() != null && remote.value().length > 0))
+         return;
+      
+      throw new EJBException("Local and Remote Interfaces cannot have duplicate interface for bean " + getEjbName());
+   }
 
    @Override
    public void processMetadata(DependencyPolicy dependencyPolicy)




More information about the jboss-cvs-commits mailing list