/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
@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);