try {
Context ctx = new InitialContext();
Object obj = ctx.lookup(ejbName);
ReadOnlyEJBHome home = (ReadOnlyEJBHome)
PortableRemoteObject.narrow(obj, ReadOnlyEJBHome.class);
return new ReadOnlyBeanNotifierImpl(home);
} catch (Exception ex) {
if(_logger.isLoggable(Level.SEVERE)) {
_logger.log(Level.SEVERE, "ejb.remote_exception", ex);
}
}