env.put("java.naming.factory.url.pkgs", namingUrlPackages);
jndiContext = new InitialContext(env);
} catch (NamingException e) {
log.debug("Could not create JNDI API " + "context: ", e);
throw new RpException(e);
}
/*
* Get queue connection factory and queue objects from JNDI context.
*/
try {
queueConnectionFactory = jndiContext
.lookup("UIL2ConnectionFactory");
queue = jndiContext.lookup(queueName);
} catch (NamingException e) {
log.debug("JNDI API lookup failed: ", e);
throw new RpException(e);
}
/*
* Create connection, session, sender objects. Send the message. Cleanup
* JMS connection.