void publish(GlassfishNamingManager nm) throws NamingException { // If it's a portable name, use rebind since the name is guaranteed // to be unique. Otherwise, use bind() so we detect any clashes. // NOTE : Will need to revisit this if we allow a developer-specified // portable JNDI name. boolean rebind = portable; if( cosNaming ) { nm.publishCosNamingObject(name, object, rebind); } else { nm.publishObject(name, object, rebind); } publishedSuccessfully = true; }
void publish(GlassfishNamingManager nm) throws NamingException { // If it's a portable name, use rebind since the name is guaranteed // to be unique. Otherwise, use bind() so we detect any clashes. // NOTE : Will need to revisit this if we allow a developer-specified // portable JNDI name. boolean rebind = portable; if( cosNaming ) { nm.publishCosNamingObject(name, object, rebind); } else { nm.publishObject(name, object, rebind); } publishedSuccessfully = true; }
public void postConstruct() { // When in the server, register in JNDI to allow container code without // compile-time dependency on GlassFish to use injection services. // We know GlassFishNaming manager is available because it's an injected field. if( processEnv.getProcessType().isServer() ) { try { glassfishNamingManager.publishObject("com.sun.enterprise.container.common.spi.util.InjectionManager", this, true); } catch(NamingException ne) { throw new RuntimeException(ne); } } }
public void postConstruct() { GlassfishNamingManager gfNamingManager = gfNamingManagerProvider.get(); MEJBNamingObjectProxy mejbProxy = new MEJBNamingObjectProxy(habitat); for(String next : MEJBNamingObjectProxy.getJndiNames()) { try { gfNamingManager.publishObject(next, mejbProxy, true); } catch (Exception e) { _logger.log(Level.WARNING, "Problem in publishing temp proxy for MEJB: " + e.getMessage(), e); } } } }
if (nm != null) { try { nm.publishObject(USER_TX_NO_JAVA_COMP, new NamingObjectProxy.InitializationNamingObjectProxy() { @Override public Object create(Context ic) throws NamingException {
public void postConstruct() { // When in the server, register in JNDI to allow container code without // compile-time dependency on GlassFish to use injection services. // We know GlassFishNaming manager is available because it's an injected field. if( processEnv.getProcessType().isServer() ) { try { glassfishNamingManager.publishObject("com.sun.enterprise.container.common.spi.util.InjectionManager", this, true); } catch(NamingException ne) { throw new RuntimeException(ne); } } }
if (nm != null) { try { nm.publishObject(USER_TX_NO_JAVA_COMP, new NamingObjectProxy.InitializationNamingObjectProxy() { @Override public Object create(Context ic) throws NamingException {
private void bindAppScopedNameForAppclient(Object object, String jndiName, String applicationName) throws NamingException { String internalGlobalJavaAppName = cnu.composeInternalGlobalJavaAppName(applicationName, getAppScopedName(jndiName)); if(_logger.isLoggable(Level.FINEST)){ debug("binding app-scoped-resource for appclient : " + internalGlobalJavaAppName); } namingManager.publishObject(internalGlobalJavaAppName, object, true); }
private void bindAppScopedNameForAppclient(Object object, String jndiName, String applicationName) throws NamingException { String internalGlobalJavaAppName = cnu.composeInternalGlobalJavaAppName(applicationName, getAppScopedName(jndiName)); if(_logger.isLoggable(Level.FINEST)){ debug("binding app-scoped-resource for appclient : " + internalGlobalJavaAppName); } namingManager.publishObject(internalGlobalJavaAppName, object, true); }
private void bindConnectorDescriptorProxies(String rarName) { //these proxies are needed as appclient container may lookup descriptors String jndiName = ConnectorsUtil.getReservePrefixedJNDINameForDescriptor(rarName); ConnectorDescriptorProxy proxy = habitat.getComponent(ConnectorDescriptorProxy.class); proxy.setJndiName(jndiName); proxy.setRarName(rarName); try { namingMgr.publishObject(jndiName, proxy, true); } catch (NamingException e) { Object[] params = new Object[]{rarName, e}; logger.log(Level.WARNING, "resources.resource-manager.connector-descriptor.bind.failure", params); } }
+ " publishing descriptor " + descriptorJNDIName); _runtime.getNamingManager().publishObject(descriptorJNDIName, connectorDescriptor, true);
bindAppScopedNameForAppclient(object, jndiName, applicationName); }else{ namingManager.publishObject(jndiName, object, true);
bindAppScopedNameForAppclient(object, jndiName, applicationName); }else{ namingManager.publishObject(jndiName, object, true);
namingManager.publishObject(next.getName(), next.getValue(), true); componentNamingUtil.composeInternalGlobalJavaAppName(app.getAppName(), next.getName()); namingManager.publishObject(internalGlobalJavaAppName, next.getValue(), true);
namingManager.publishObject(jndiName, namingProxy, true); } else {
namingManager.publishObject(jndiName, namingProxy, true); } else {
namingManager.publishObject(next.getName(), next.getValue(), true); componentNamingUtil.composeInternalGlobalJavaAppName(app.getAppName(), next.getName()); namingManager.publishObject(internalGlobalJavaAppName, next.getValue(), true);