/** * {@inheritDoc} */ public Object lookup(String name) throws IllegalArgumentException { try { Object obj = this.getEnc().lookup(name); return obj; } catch (NamingException ne) { throw new RuntimeException(ne); } }
public Context getJNDIContext(final Endpoint ep) throws NamingException { final EJBContainer ejb3Container = (EJBContainer)getEjb3Container(); return (Context)ejb3Container.getEnc().lookup(EJB3_JNDI_PREFIX); }
public Context getJNDIContext(final Endpoint ep) throws NamingException { final EJBContainer ejb3Container = (EJBContainer)getEjb3Container(); return (Context)ejb3Container.getEnc().lookup(EJB3_JNDI_PREFIX); }
public Context getJNDIContext(final Endpoint ep) throws NamingException { final EJBContainer ejb3Container = (EJBContainer)getEjb3Container(); return (Context)ejb3Container.getEnc().lookup(EJB3_JNDI_PREFIX); }
/** * @deprecated {@link EJBContainer} is no longer responsible for setting up * ENC. Instead, SwitchBoard http://community.jboss.org/wiki/Switchboard * will be setting it up. */ @Deprecated private void bindORB() { try { Util.rebind(getEnc(), "ORB", new LinkRef("java:/JBossCorbaORB")); } catch(NamingException e) { throw new RuntimeException(e); } }
/** * Creates a {@link LinkRef} for java:comp/TimerService to * an internal jndi name for {@link TimerService} * @throws NamingException * @deprecated {@link EJBContainer} is no longer responsible for setting up * ENC. Instead, SwitchBoard http://community.jboss.org/wiki/Switchboard * will be setting it up. */ @Deprecated private void bindTimerService() throws NamingException { // link to java:internal/TimerService (which is setup by // org.jboss.ejb3.timerservice.naming.TimerServiceBinder) LinkRef timerServiceLinkRef = new LinkRef("java:internal/TimerService"); // bind to java:comp/TimerService Util.rebind(getEnc(), "TimerService", timerServiceLinkRef); }
/** * @deprecated {@link EJBContainer} is no longer responsible for setting up * ENC. Instead, SwitchBoard http://community.jboss.org/wiki/Switchboard * will be setting it up. */ @Deprecated private void bindEJBContext() { try { // Reference ref = new Reference(EJBContext.class.getName(), EJBContextFactory.class.getName(), null); // ref.add(new StringRefAddr("containerGuid", Ejb3Registry.guid(this))); // ref.add(new StringRefAddr("containerClusterUid", Ejb3Registry.clusterUid(this))); // ref.add(new StringRefAddr("isClustered", Boolean.toString(isClustered()))); // TODO: a temporary measure until jboss-injection is in place LinkRef ref = new LinkRef("java:internal/EJBContext"); Util.rebind(getEnc(), "EJBContext", ref); } catch (NamingException e) { throw new RuntimeException(e); } }
try Util.rebind(getEnc(), "UserTransaction", new UserTransactionImpl()); NamingException namingException = new NamingException("Could not bind user transaction for ejb name " + ejbName + " into JNDI under jndiName: " + getEnc().getNameInNamespace() + "/" + "UserTransaction"); namingException.setRootCause(e); throw namingException; Util.rebind(getEnc(), "TransactionSynchronizationRegistry", new LinkRef("java:TransactionSynchronizationRegistry")); log.debug("Linked java:comp/TransactionSynchronizationRegistry to JNDI name: java:TransactionSynchronizationRegistry"); NamingException namingException = new NamingException("Could not bind TransactionSynchronizationRegistry for ejb name " + ejbName + " into JNDI under jndiName: " + getEnc().getNameInNamespace() + "/" + "TransactionSynchronizationRegistry"); namingException.setRootCause(e); throw namingException;