Results 1 to 4 of 4

Thread: Tomcat system service vs. cmd prompt

  1. #1
    Join Date
    Aug 2004
    Location
    Stockholm
    Posts
    466

    Default 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.
    Sincerely,
    /The Cantor

    "Murphy was an optimist"
    (The O'Toole commentary on Murphy's Law)

  2. #2
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

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

  3. #3

    Default

    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..
    --
    Thiago Andrade

    MSc Candidate in Computer Science, Federal University of Pernambuco (UFPE) – Brazil
    BSc in Computer Engineering, University of Pernambuco (UPE) – Brazil
    Software Architect

  4. #4
    Join Date
    Aug 2004
    Location
    Stockholm
    Posts
    466

    Default

    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.
    Sincerely,
    /The Cantor

    "Murphy was an optimist"
    (The O'Toole commentary on Murphy's Law)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •