users@glassfish.java.net

Re: debug "Cannot perform operation, connection is closed" with

From: <forums_at_java.net>
Date: Thu, 15 Sep 2011 17:32:36 -0500 (CDT)

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