0 Replies Latest reply on Sep 15, 2011 10:36 PM by vmiharia

    "Cannot perform operation, connection is closed" with Open MQ 4.4

      I am using Sun MQ 4.4 with Glassfish 2.1.1 on Red Hat 5.7.

      I am able to install glassfish cluster and all the instances are running fine. But, when I try to send a message to a topic, I get following exception

      javax.jms.IllegalStateException: [C4062]: Cannot perform operation, connection is closed.
      at com.sun.messaging.jmq.jmsclient.ConnectionImpl.checkConnectionState(ConnectionImpl.java:2468)
      at com.sun.messaging.jmq.jmsclient.XAConnectionImpl.createSession(XAConnectionImpl.java:105)
      at com.sun.messaging.jms.ra.ConnectionAdapter.createSession(ConnectionAdapter.java:383)


      Following is part of the stateless EJB where I am creating the session.
      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();

      public void send(){
      Session session = null;
      session = connection.createSession(true, Session.SESSION_TRANSACTED);

      I am trying to install these on a couple of new machines. Same application works on other machines so I am guessing this is a configuartion issue somewhere on these servers.

      My question is what would be a good way to find the cause of this failure.

      I have turned on log level to finest for ejb-container, jms, RA through glassfish Admin console, but no useful information.

      Also, I don't have the name of the servers in DNS yet. I am using IP address for specifying instances.

      Any suggestions ?