[jboss-cvs] JBossAS SVN: r68228 - in trunk/ejb3/src/main/org/jboss/ejb3: stateless and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Dec 13 03:02:05 EST 2007
Author: ALRubinger
Date: 2007-12-13 03:02:05 -0500 (Thu, 13 Dec 2007)
New Revision: 68228
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
Log:
[EJBTHREE-1130] Throw descriptive exceptions on deployment when no interfaces are defined for local/remote Proxy Factories
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java 2007-12-13 07:53:28 UTC (rev 68227)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulLocalProxyFactory.java 2007-12-13 08:02:05 UTC (rev 68228)
@@ -24,18 +24,17 @@
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.rmi.dgc.VMID;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
-import java.rmi.dgc.VMID;
-
import javax.ejb.LocalHome;
import javax.naming.NamingException;
import org.jboss.aop.Advisor;
+import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.Ejb3Registry;
-import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.JBossProxy;
import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.annotation.LocalBinding;
@@ -80,14 +79,25 @@
// Ensure that if EJB 2.1 Components are defined, they're complete
this.ensureEjb21ViewComplete(localHome == null ? null : localHome.value(), ProxyFactoryHelper
.getLocalInterfaces(getContainer()));
+
+ // Ensure local interfaces defined
+ if (localInterfaces.size() > 0)
+ {
+ // Add JBossProxy
+ localInterfaces.add(JBossProxy.class);
- // Add JBossProxy
- localInterfaces.add(JBossProxy.class);
-
- // If binding along w/ home, add home
- if (bindTogether)
+ // If binding along w/ home, add home
+ if (bindTogether)
+ {
+ localInterfaces.add(localHome.value());
+ }
+ }
+ else
{
- localInterfaces.add(localHome.value());
+ // No local interfaces defined, throw deployment error
+ throw new RuntimeException("No local interfaces have been defined for " + statefulContainer.toString()
+ + "; specified " + LocalBinding.class.getSimpleName() + " JNDI Binding \"" + this.jndiName
+ + "\" is invalid. [EJBTHREE-1130]");
}
// Return
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java 2007-12-13 07:53:28 UTC (rev 68227)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoteProxyFactory.java 2007-12-13 08:02:05 UTC (rev 68228)
@@ -89,14 +89,25 @@
this.ensureEjb21ViewComplete(remoteHome == null ? null : remoteHome.value(), ProxyFactoryHelper
.getRemoteInterfaces(getContainer()));
- // Add JBossProxy
- remoteInterfaces.add(JBossProxy.class);
-
- // If binding along w/ home, add home
- if (bindTogether)
+ // Ensure remote interfaces defined
+ if (remoteInterfaces.size() > 0)
{
- remoteInterfaces.add(remoteHome.value());
+ // Add JBossProxy
+ remoteInterfaces.add(JBossProxy.class);
+
+ // If binding along w/ home, add home
+ if (bindTogether)
+ {
+ remoteInterfaces.add(remoteHome.value());
+ }
}
+ else
+ {
+ // No remote interfaces defined, throw deployment error
+ throw new RuntimeException("No remote interfaces have been defined for " + statefulContainer.toString()
+ + "; specified " + RemoteBinding.class.getSimpleName() + " JNDI Binding \"" + this.jndiName
+ + "\" is invalid. [EJBTHREE-1130]");
+ }
// Return
return remoteInterfaces.toArray(new Class<?>[]
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-12-13 07:53:28 UTC (rev 68227)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-12-13 08:02:05 UTC (rev 68228)
@@ -84,8 +84,10 @@
}
else
{
- // No remote interfaces defined, log warning
- log.warn("[EJBTHREE-933] NPE when deploying web service beans");
+ // No local interfaces defined, throw deployment error
+ throw new RuntimeException("No local interfaces have been defined for " + statelessContainer.toString()
+ + "; specified " + LocalBinding.class.getSimpleName() + " JNDI Binding \"" + this.jndiName
+ + "\" is invalid. [EJBTHREE-1130]");
}
// Return
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-12-13 07:53:28 UTC (rev 68227)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-12-13 08:02:05 UTC (rev 68228)
@@ -94,8 +94,10 @@
}
else
{
- // No remote interfaces defined, log warning
- log.warn("[EJBTHREE-933] NPE when deploying web service beans");
+ // No remote interfaces defined, throw deployment error
+ throw new RuntimeException("No remote interfaces have been defined for " + statelessContainer.toString()
+ + "; specified " + RemoteBinding.class.getSimpleName() + " JNDI Binding \"" + this.jndiName
+ + "\" is invalid. [EJBTHREE-1130]");
}
// Return
More information about the jboss-cvs-commits
mailing list