Hi Ole,

I have tried the getEJBMetaData().getHomeInterfaceClass() method in JBoss, but all i am getting here is the "$Proxy2" class name again,
so i suspect that the mentioned method returns the class that implements the Home interface.
There is also the getEJBMetaData().getEJBHome(), but when i call this method, an exception like this is thrown:

javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:646)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at org.jboss.ejb.plugins.jrmp.interfaces.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:49)
    at org.jboss.ejb.plugins.jrmp.interfaces.EJBMetaDataImpl.getEJBHome(EJBMetaDataImpl.java:58)
    at com.surfkitchen.context.GlobalContext.registerEJBs(GlobalContext.java:130)
    at com.surfkitchen.context.GlobalContext.main(GlobalContext.java:178)
java.rmi.RemoteException: Could not get EJBHome
    at org.jboss.ejb.plugins.jrmp.interfaces.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:55)
    at org.jboss.ejb.plugins.jrmp.interfaces.EJBMetaDataImpl.getEJBHome(EJBMetaDataImpl.java:58)
    at com.surfkitchen.context.GlobalContext.registerEJBs(GlobalContext.java:130)
    at com.surfkitchen.context.GlobalContext.main(GlobalContext.java:178)

As far as i can say from this exception, i have to specify the potential home interface class names, before they can resolved...

Cheers

Lorenzo


Ole Husgaard wrote:
[EMAIL PROTECTED]">
Hi,

Lorenzo Resta wrote:
Shouldn't the getEJBMetaData().getHomeInterfaceClass() return the home interface, or does it
return the class that implements the home interface?

I think it should return the home interface class, and
_not_ the class implementing the home interface.

The EJB1.1 specification is surprisingly silent on this,
but the Javadocs for BeanMetaData.getHomeInterfaceClass()
says: "Obtain the Class object for the enterprise Bean's
home interface.".

Doesn't it work that way in JBoss?


Best Regards,

Ole Husgaard.

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user




Reply via email to