try
{
MBeanServer server = MBeanServerLocator.locateJBoss();
ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
if (ejb3Module == null)
throw new WSFDeploymentException("Cannot obtain EJB3 module: " + objectName);
return ejb3Module;
}
catch (MBeanProxyCreationException ex)
{
throw new WSFDeploymentException("Cannot obtain proxy to EJB3 module");
}
}