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