}
private HelloWorldConnection getConnection() throws Exception {
InitialContext context = new InitialContext();
HelloWorldConnectionFactory factory = (HelloWorldConnectionFactory)context.lookup(JNDI_NAME);
HelloWorldConnection conn = factory.getConnection();
if (conn == null) {
throw new RuntimeException("No connection");
}
return conn;
}