Announcement Announcement Module
Collapse
No announcement yet.
Tomcat system service vs. cmd prompt Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tomcat system service vs. cmd prompt

    Hi,

    we have a most odd problem.
    An application based on Spring integration reading from a JMS queue works as a charm when Tomcat is started from a command prompt, but won't produce any output when the same Tomcat is started as a system service.
    Does anyone recognize this behaviour?

    Code:
    <bean id="JmsSender" class="se.ki.biobank.doris.util.JmsSenderImpl">
    		<property name="jmsTemplate">
    			<ref bean="jmsTemplate" />
    		</property>
    	</bean>
    
    	<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    		<property name="connectionFactory" ref="connectionFactory" />
    		<property name="defaultDestination" ref="inboundReferralMQ" />
    	</bean>
    
        <jms:inbound-channel-adapter
        	id="inboundChannel"
        	channel="referralInChannel"
        	jms-template="jmsTemplate">
    		<integration:poller>
        		<integration:interval-trigger interval="5" time-unit="SECONDS" />
    		</integration:poller>
    	</jms:inbound-channel-adapter>
    
        <integration:channel id="referralInChannel">
    	    <integration:interceptors>
    	    	<ref bean="loggingChannelInterceptor"/>
    	    </integration:interceptors>
        </integration:channel>
    
        <integration:channel id="referralOutChannel" >
         <integration:interceptors>
    	    	<ref bean="loggingChannelInterceptor"/>
    	    </integration:interceptors>
        </integration:channel>
    
        <integration:service-activator
        	input-channel="referralInChannel"
    		ref="createCommandFileService"
    		method="createCommandFile"
    		output-channel="referralOutChannel" />
    
    	<bean id="createCommandFileService" class="se.ki.biobank.doris.print.CreateCommandFileService" />
    
    	<file:outbound-channel-adapter id="filesOut" channel="referralOutChannel" directory="${doris-print.cmd-output-path}"/>
    
    	<!-- Interceptors -->
    	<bean id="loggingChannelInterceptor" class="se.ki.biobank.doris.print.LoggingChannelInterceptor" />
    Grateful for any help on this.

  • #2
    I think it has to do with tomcat logging. Maybe you should ask one of our tomcat experts.

    Comment


    • #3
      maybe the command that starts the Tomcat as service is not the same as the other that starts at command prompt.

      copy it for us..

      Comment


      • #4
        Hello.

        Yes, the theory that it has something to do with the logging isn't far fetched. When we run the system service in 'conole application'-mode, everything works fine. Seems like the fact that there is a target for the logging output makes it work. Strange indeed....

        Thank you.

        Comment

        Working...
        X