protected Class getServiceClass(MessageContext msgContext,
String beanJndiName) throws Exception {
Handler serviceHandler = msgContext.getService();
Class interfaceClass = null;
// First try to get the interface class from the configuation
String homeName =
(String) serviceHandler.getOption(homeInterfaceNameOption);
if(homeName != null){
interfaceClass = msgContext.getClassLoader().loadClass(homeName);
} else {
// we look into the metadata
EJBHome home=(EJBHome) getNewServiceObject(msgContext,beanJndiName);
interfaceClass=home.getEJBMetaData().getHomeInterfaceClass();
}
// got it, return it
return interfaceClass;
}
Get the class description for the EJB Remote Interface, which is what
we are interested in exposing to the world (i.e. in WSDL). |