1 7 package org.jboss.jms.client.jvm; 8 9 import java.util.Hashtable ; 10 11 import javax.naming.Context ; 12 import javax.naming.Name ; 13 import javax.naming.Reference ; 14 import javax.naming.spi.ObjectFactory ; 15 16 import org.jboss.jms.client.JBossConnectionFactory; 17 18 24 public class JVMImplementationFactory 25 implements ObjectFactory 26 { 27 29 31 33 35 37 39 public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception 40 { 41 try 42 { 43 Reference reference = (Reference ) obj; 44 String className = reference.getClassName(); 45 if (className.equals(JBossConnectionFactory.class.getName())) 46 return new JBossConnectionFactory(getImplementation(reference)); 47 } 48 catch (Exception ignored) 49 { 50 } 51 return null; 52 } 53 54 56 62 protected JVMImplementation getImplementation(Reference reference) 63 throws Exception 64 { 65 return null; 67 } 68 69 71 73 75 } 76 | Popular Tags |