4 Replies Latest reply on Apr 5, 2007 9:21 PM by Tony Mai

    killing messaging server shutsdown my app?

    Chris Fellows Newbie

      I must be doing something wrong and thought one of you might shed some light.

      I have an application logging (via JMS) to another server. My application is on tomcat and the messaging is setup with jboss messaging 1.2.0.GA.

      If I either execute a ./shutdown.sh --server=msgserver:1099 or a kill -9, it will correctly shutdown the msging server, BUT my associated application on tomcat also shuts down.

      Not sure what's going on and I'm not getting any log output to troubleshoot.

      Have you seen this before?



        • 1. Re: killing messaging server shutsdown my app?
          Clebert Suconic Master

          I can't tell for sure what's happening based in your description.

          I don't even know where is your tomcat / your messaging server.

          • 2. Re: killing messaging server shutsdown my app?
            Chris Fellows Newbie

            Ok, more details then:

            Java1.5 application running on Tomcat 5.0, using log4j1.2.14 JMSAppender with JBoss 1.2.0.GA messaging jars. We'll say its running on serverA:8080.

            MDB running on JBossAS 4.0.5 with JBoss Messaging 1.2.0.GA. We'll say running on serverB:2020 and jndi on serverB:1099.

            Both servers are linux.

            if I start both the messaging and java app, the MDB picks up logs successfully and as expected. The problem I'm experiencing is that if I run the following script on serverB .../jboss/bin/shutdown.sh --server=serverB:1099, it not only kills my messaging application but also the associated tomcat java app.

            On shutdown, will the JMS' topics send messages to their clients' that its shutting down? I was under the assumption that communication was one-way only, from client to jms topic.

            Here's the log4j.xml from my tomcat java app:

            <?xml version="1.0" encoding="UTF-8" ?>
            <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
            <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
             <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
             <layout class="org.apache.log4j.PatternLayout" >
             <param name="ConversionPattern" value="%d{ISO8601} %-5p %c %m%n" />
             <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
             <param name="File" value="mylog.log" />
             <param name="DatePattern" value="'.'yyyy-MM-dd" />
             <param name="Append" value="false" />
             <layout class="org.apache.log4j.PatternLayout" >
             <param name="ConversionPattern" value="%d{ISO8601} %-5p %c %m%n" />
             <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
             <errorHandler class="org.apache.log4j.varia.FallbackErrorHandler">
             <appender-ref ref="FILE" />
             <param name="InitialContextFactoryName"
             value="org.jnp.interfaces.NamingContextFactory" />
             <param name="ProviderURL" value="jnp://serverB:1099" />
             <param name="URLPkgPrefixes"
             value="org.jboss.naming:org.jnp.interfaces" />
             <param name="TopicConnectionFactoryBindingName"
             value="ConnectionFactory" />
             <param name="TopicBindingName" value="/topic/myLoggingTopic" />
             <param name="LocationInfo" value="true" />
             <logger name="com.myapp">
             <level value="DEBUG" />
             <logger name="net.sf.hibernate">
             <level value="INFO" />
             <logger name="net.sf.ehcache">
             <level value="INFO" />
             <logger name="org.apache">
             <level value="INFO" />
             <logger name="org.apache.struts">
             <level value="WARN" />
             <logger name="org.jboss">
             <level value="WARN" />
             <logger name="org.logicalcobwebs">
             <level value="INFO" />
             <logger name="org.springframework">
             <level value="INFO" />
             <level value="DEBUG" />
             <appender-ref ref="JMS" />
             <appender-ref ref="CONSOLE" />

            Also, here's my messaging-service.xml from the messaging/deploy folder:

            <?xml version="1.0" encoding="UTF-8"?>
             <mbean code="org.jboss.jms.server.destination.TopicService" name="jboss.messaging.destination:service=Topic,name=myLoggingTopic" xmbean-dd="xmdesc/Topic-xmbean.xml">
             <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
             <attribute name="SecurityConfig">
             <role name="guest" read="true" write="true"/>
             <role name="publisher" read="true" write="true" create="false"/>
             <role name="durpublisher" read="true" write="true" create="true"/>



            • 3. Re: killing messaging server shutsdown my app?
              Clebert Suconic Master

              What I was not sure was how many server you had involved in your config.

              it not only kills my messaging application but also the associated tomcat java app.

              What did you mean by this? That the WAR application is shut?

              Well.. we don't do anything on tomcat or Log4j. You need to identify what is causing that. Like... messages are not arriving... you got an exception or something like that.

              • 4. Re: killing messaging server shutsdown my app?
                Tony Mai Apprentice

                I have stand-alone application that connects to JBoss Messaging server. My app does not quit after the JMS server went down.

                May have something to do with Tomcat.