I am creating this inside a stateless EJB
@PostConstruct()
private void init() {
...
if (connectionFactory == null) {
if (log.isTraceEnabled())
log.trace("Connection factory not set. Retrieving from server context.");
InitialContext ic = new InitialContext();
connectionFactory = (ConnectionFactory)
ic.lookup("jms/testConnectionFactory");
}
if (log.isTraceEnabled()) log.trace("Creating JMS
connection.");
connection = connectionFactory.createConnection();
}
@WebMethod()
public void send(){
Session session = null;
session = connection.createSession(true, Session.SESSION_TRANSACTED);
}
--
[Message sent by forum member 'vmiharia']
View Post: http://forums.java.net/node/842829