javax.naming.Reference ref= new javax.naming.Reference(
javax.enterprise.concurrent.ManagedScheduledExecutorService.class.getName(),
"org.glassfish.concurrent.runtime.deployer.ConcurrentObjectFactory",
null);
RefAddr addr = new SerializableObjectRefAddr(ManagedScheduledExecutorServiceConfig.class.getName(), config);
ref.add(addr);
RefAddr resAddr = new SerializableObjectRefAddr(ResourceInfo.class.getName(), resourceInfo);
ref.add(resAddr);
try {
// Publish the object ref
namingService.publishObject(resourceInfo, ref, true);