@Override public void start() throws Exception { parentContext = (application != null ? application.getContext() : nameSpaces.getGlobalContext()); context = Util.createSubcontext(parentContext, name); // JavaEE 6 5.15 context.bind("ModuleName", name); log.debug("Installed context " + context + " for JavaEE module " + name + ", application = " + application + ", parentContext = " + parentContext); }
private Context getContext() { if (this.javaeeModule == null) { throw new IllegalStateException("JavaEEModule is not set. Cannot return JNDI context"); } if (this.javaAppBinder) { return this.javaeeModule.getApplication().getContext(); } return this.javaeeModule.getContext(); } }
ctx = this.javaEEComponent.getModule().getApplication().getContext();
ctx = this.javaEEComponent.getModule().getApplication().getContext();
protected void unbindApp(View view) throws NamingException { bean.getModule().getApplication().getContext().unbind(getAppJNDIName(view.getBusinessInterface())); // unbind from the additional JNDI name, if the bean exposed just 1 view if (this.hasSingleView()) { bean.getModule().getApplication().getContext().unbind(getAppJNDIName(null)); } }
protected void bindApp(View view, Object proxy) throws NamingException { String name = getAppJNDIName(view.getBusinessInterface()); bind(bean.getModule().getApplication().getContext(), name, proxy); // bind to an additional JNDI name (as specified by 4.4.1 section of EJB3.10 // when the bean exposes just 1 view if (this.hasSingleView()) { bind(bean.getModule().getApplication().getContext(), this.getAppJNDIName(null), proxy); } }