/** * Retrieve a Reference for this instance to store in JNDI * * @return the built Reference * @throws NamingException * if error on building Reference */ @Override public Reference getReference() throws NamingException { return JNDIReferenceFactory.createReference(this.getClass().getName(), this); }
if (object instanceof Reference) { Reference reference = (Reference) object; Class<?> theClass = loadClass(this, reference.getClassName()); if (JNDIStorable.class.isAssignableFrom(theClass)) { JNDIStorable store = (JNDIStorable) theClass.newInstance(); store.setProperties(getProperties(reference)); result = store;
@Test(timeout = 1000) public void testDestination() throws Exception { // Create sample destination ActiveMQDestination dest = (ActiveMQDestination) ActiveMQJMSClient.createQueue(RandomUtil.randomString()); // Create reference Reference ref = JNDIReferenceFactory.createReference(dest.getClass().getName(), dest); // Get object created based on reference ActiveMQDestination temp; JNDIReferenceFactory refFactory = new JNDIReferenceFactory(); temp = (ActiveMQDestination)refFactory.getObjectInstance(ref, null, null, null); // Check settings assertEquals(dest.getAddress(), temp.getAddress()); } }
Reference ref = JNDIReferenceFactory.createReference(factory.getClass().getName(), factory); JNDIReferenceFactory refFactory = new JNDIReferenceFactory(); temp = (ActiveMQConnectionFactory)refFactory.getObjectInstance(ref, null, null, null);
if (object instanceof Reference) { Reference reference = (Reference) object; Class<?> theClass = loadClass(this, reference.getClassName()); if (JNDIStorable.class.isAssignableFrom(theClass)) { JNDIStorable store = (JNDIStorable) theClass.newInstance(); store.setProperties(getProperties(reference)); result = store;
/** * Retrieve a Reference for this instance to store in JNDI * * @return the built Reference * @throws NamingException * if error on building Reference */ @Override public Reference getReference() throws NamingException { return JNDIReferenceFactory.createReference(this.getClass().getName(), this); }
if (object instanceof Reference) { Reference reference = (Reference) object; Class<?> theClass = loadClass(this, reference.getClassName()); if (JNDIStorable.class.isAssignableFrom(theClass)) { JNDIStorable store = (JNDIStorable) theClass.newInstance(); store.setProperties(getProperties(reference)); result = store;
/** * Retrieve a Reference for this instance to store in JNDI * * @return the built Reference * @throws NamingException * if error on building Reference */ @Override public Reference getReference() throws NamingException { return JNDIReferenceFactory.createReference(this.getClass().getName(), this); }
if (object instanceof Reference) { Reference reference = (Reference) object; Class<?> theClass = loadClass(this, reference.getClassName()); if (JNDIStorable.class.isAssignableFrom(theClass)) { JNDIStorable store = (JNDIStorable) theClass.newInstance(); store.setProperties(getProperties(reference)); result = store;
/** * Retrieve a Reference for this instance to store in JNDI * * @return the built Reference * @throws NamingException * if error on building Reference */ @Override public Reference getReference() throws NamingException { return JNDIReferenceFactory.createReference(this.getClass().getName(), this); }
if (object instanceof Reference) { Reference reference = (Reference) object; Class<?> theClass = loadClass(this, reference.getClassName()); if (JNDIStorable.class.isAssignableFrom(theClass)) { JNDIStorable store = (JNDIStorable) theClass.newInstance(); store.setProperties(getProperties(reference)); result = store;
/** * Retrieve a Reference for this instance to store in JNDI * * @return the built Reference * @throws NamingException * if error on building Reference */ @Override public Reference getReference() throws NamingException { return JNDIReferenceFactory.createReference(this.getClass().getName(), this); }