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; }