7 Replies Latest reply on Sep 28, 2012 2:35 AM by nickarls

    some warning message when use the HornetQ

    xin.zhang.song

      Hi All

       

      There are some warning message in the log file when I apply the application, I donot need these warning message on the console,

      Is there something configuration can make this log disappear, or auto to close the ClientSession?  I have no idea for this.

       

      11:03:22,089 WARN  [org.hornetq.core.client.impl.DelegatingSession] (Finalizer) I'm closing a core ClientSession you left open. Please make sure you close all ClientSessions explicitly before letting them go out of scope! 19802564

      11:03:22,105 WARN  [org.hornetq.core.client.impl.DelegatingSession] (Finalizer) The ClientSession you didn't close was created here:: java.lang.Exception

                at org.hornetq.core.client.impl.DelegatingSession.<init>(DelegatingSession.java:95)

                at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:847)

                at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:279)

                at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:601)

                at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:684)

                at org.hornetq.jms.client.HornetQConnectionFactory.createTopicConnection(HornetQConnectionFactory.java:143)

                at org.hornetq.jms.client.HornetQConnectionFactory.createTopicConnection(HornetQConnectionFactory.java:138)

                at com.broadvision.data.message.MsgSessionMgr.openJMSConnection(MsgSessionMgr.java:69)

       

      Regards

       

      Xin

        • 1. Re: some warning message when use the HornetQ
          xin.zhang.song

          Is there somebody have any idea for this?

          • 2. Re: some warning message when use the HornetQ
            nickarls

            I would start by looking at application code cleanup (how you aquire/close sessions, do you have finally block etc?)

            • 3. Re: some warning message when use the HornetQ
              xin.zhang.song

              yes, I wrote the code about close JMS connection in the finally block.

              • 4. Re: some warning message when use the HornetQ
                jaikiran

                Please post the code which is opening/closing that session. The log suggests it is this:

                 

                at com.broadvision.data.message.MsgSessionMgr.openJMSConnection

                • 5. Re: some warning message when use the HornetQ
                  xin.zhang.song

                  This is part of this file :

                    

                  public void openJMSConnection(String topicFactJndi)

                        throws DataException

                      {

                                final String func = "openJMSConnection";

                   

                   

                            //

                            // set value of topic jndi to be used on exception

                            //

                            mTopicJndi = topicFactJndi;

                          String msg = null;

                          try {

                                      ServiceAgent agent = ServiceAgent.getInstance();

                                agent.flushCachedResources();

                                      TopicConnectionFactory tFac= (TopicConnectionFactory)

                                                agent.getBVAppServerResource(topicFactJndi,

                                                          ResourceType.RESTYPE_JMS_TOPIC_CONNECTION_FACTORY,

                                                  TopicConnectionFactory.class);

                   

                   

                                if (mTopicConn == null)

                           // the line that post the error message

                                    mTopicConn = tFac.createTopicConnection();

                                //DataLog.debug(this.getClass(), "TopicConnection is created");

                   

                   

                                // must set exception listener for Jboss

                                if (mPlatform.equalsIgnoreCase(AbstractPlatform.JBOSS_PLATFORM_SIGNATURE))

                                    mTopicConn.setExceptionListener(new ExceptionListenerImpl());

                   

                   

                   

                   

                                String jmsId = mTopicConn.getClientID();

                                DataLog.info(this.getClass(), func, Data_ErrorsDefine.AS_IS_MESSAGE,

                                      "topic connection opened id = " + jmsId + " topic="+ topicFactJndi);

                   

                   

                  and I wrote a method to close the jms connection:

                   

                  public void closeJMSConnection()

                        throws DataException

                      {

                          // close subscriber

                          cleanDurableSubscriber();

                   

                   

                          mSsnMgr.closeJMSConnection(true);

                          // clean up the cached objects

                          mSubscribers.clear();

                          mMsgContexts.clear();

                  }

                  • 6. Re: some warning message when use the HornetQ
                    xin.zhang.song

                    Have any idea for this?

                    • 7. Re: some warning message when use the HornetQ
                      nickarls

                      If you place some debug output right before the line that *really* does the closing, do you see it? (In case you exit before that)