00001
00026 package org.objectweb.jonas.jaxr;
00027
00028 import java.io.Serializable;
00029 import java.util.Properties;
00030
00031 import javax.naming.BinaryRefAddr;
00032 import javax.naming.NamingException;
00033 import javax.naming.Reference;
00034 import javax.naming.Referenceable;
00035
00036 import org.objectweb.jonas.common.JNDIUtils;
00037 import org.objectweb.jonas.jaxr.factory.JAXRFactory;
00038
00039
00044 public class JAXRConnection implements Referenceable, Serializable {
00045
00049 private Properties p;
00050
00055 public JAXRConnection(Properties p) {
00056 this.p = p;
00057 }
00058
00062 public Reference getReference() throws NamingException {
00063
00064
00065
00066 Reference ref = new Reference(JAXRFactory.FACTORY_TYPE, JAXRFactory.class.getName(), null);
00067
00068
00069 ref.add(new BinaryRefAddr(JAXRFactory.PROPS_NAME, JNDIUtils.getBytesFromObject(p)));
00070
00071
00072 return ref;
00073 }
00074
00075 }