You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2007/06/07 19:34:50 UTC
svn commit: r545246 -
/geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/StandardServant.java
Author: rickmcguire
Date: Thu Jun 7 10:34:49 2007
New Revision: 545246
URL: http://svn.apache.org/viewvc?view=rev&rev=545246
Log:
GERONIMO-3226 NPE when attempting to export an EJB without a home or remote interface via CORBA.
Modified:
geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/StandardServant.java
Modified: geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/StandardServant.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/StandardServant.java?view=diff&rev=545246&r1=545245&r2=545246
==============================================================================
--- geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/StandardServant.java (original)
+++ geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/StandardServant.java Thu Jun 7 10:34:49 2007
@@ -100,8 +100,14 @@
Class type;
if (InterfaceType.EJB_HOME == ejbInterfaceType) {
type = ejbDeployment.getHomeInterface();
+ if (type == null) {
+ throw new IllegalArgumentException("EJB " + ejbDeployment.getEjbName() + " does not have a home interface");
+ }
} else if (InterfaceType.EJB_OBJECT == ejbInterfaceType) {
type = ejbDeployment.getRemoteInterface();
+ if (type == null) {
+ throw new IllegalArgumentException("EJB " + ejbDeployment.getEjbName() + " does not have a remote interface");
+ }
} else {
throw new IllegalArgumentException("Only home and remote interfaces are supported in this servant: " + ejbInterfaceType);
}