1 26 package org.objectweb.jonas.jaxr; 27 28 import java.io.Serializable ; 29 import java.util.Properties ; 30 31 import javax.naming.BinaryRefAddr ; 32 import javax.naming.NamingException ; 33 import javax.naming.Reference ; 34 import javax.naming.Referenceable ; 35 36 import org.objectweb.jonas.common.JNDIUtils; 37 import org.objectweb.jonas.jaxr.factory.JAXRFactory; 38 39 40 44 public class JAXRConnection implements Referenceable , Serializable { 45 46 49 private Properties p; 50 51 55 public JAXRConnection(Properties p) { 56 this.p = p; 57 } 58 59 62 public Reference getReference() throws NamingException { 63 64 Reference ref = new Reference (JAXRFactory.FACTORY_TYPE, JAXRFactory.class.getName(), null); 67 68 ref.add(new BinaryRefAddr (JAXRFactory.PROPS_NAME, JNDIUtils.getBytesFromObject(p))); 70 71 return ref; 73 } 74 75 } 76 | Popular Tags |