updateServer(req, res, proxyInfo);
switch(proxyInfo.getInterfaceType()){
case EJB_HOME: {
res.setResponseCode(ResponseCodes.JNDI_EJBHOME);
EJBMetaDataImpl metaData = new EJBMetaDataImpl(beanContext.getHomeInterface(),
beanContext.getRemoteInterface(),
beanContext.getPrimaryKeyClass(),
beanContext.getComponentType().toString(),
deploymentID,
-1,
convert(proxyInfo.getInterfaceType()),
null,
beanContext.getAsynchronousMethodSignatures());
metaData.loadProperties(beanContext.getProperties());
log(metaData);
res.setResult(metaData);
break;
}
case EJB_LOCAL_HOME: {
res.setResponseCode(ResponseCodes.JNDI_NAMING_EXCEPTION);
NamingException namingException = new NamingException("Not remotable: '" + name + "'. EJBLocalHome interfaces are not remotable as per the EJB specification.");
res.setResult(new ThrowableArtifact(namingException));
break;
}
case BUSINESS_REMOTE: {
res.setResponseCode(ResponseCodes.JNDI_BUSINESS_OBJECT);
EJBMetaDataImpl metaData = new EJBMetaDataImpl(null,
null,
beanContext.getPrimaryKeyClass(),
beanContext.getComponentType().toString(),
deploymentID,
-1,
convert(proxyInfo.getInterfaceType()),
proxyInfo.getInterfaces(),
beanContext.getAsynchronousMethodSignatures());
metaData.setPrimaryKey(proxyInfo.getPrimaryKey());
metaData.loadProperties(beanContext.getProperties());
log(metaData);
res.setResult(metaData);
break;
}