1 51 52 package org.objectweb.jass.as; 53 54 import java.util.Hashtable ; 55 56 import javax.activity.ActivityManager ; 57 import javax.naming.Context ; 58 import javax.naming.Name ; 59 import javax.naming.Reference ; 60 import javax.naming.spi.ObjectFactory ; 61 62 import org.apache.log4j.Logger; 63 64 70 public class ActivityManagerObjectFactory implements ObjectFactory { 71 72 private static Logger log = 73 Logger.getLogger(ActivityManagerObjectFactory.class); 74 75 77 80 public Object getObjectInstance( 81 Object obj, 82 Name name, 83 Context nameCtx, 84 Hashtable environment) 85 throws Exception { 86 87 log.debug("getObjectInstance"); 88 89 Reference ref = (Reference ) obj; 90 if (!ref.getClassName().equals(ActivityService.class.getName())) 91 return null; 92 93 return (ActivityManager ) new ActivityService(); 94 } 95 } 96 | Popular Tags |