Looks like same as SM-240 I reported last yr.

Peter.

Ging Ming Chan (JIRA) wrote:
JmsReceiverComponent trying to receive message before its JBI properties have 
been fully initialised
----------------------------------------------------------------------------------------------------

                 Key: SM-566
                 URL: https://issues.apache.org/activemq/browse/SM-566
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-components
    Affects Versions: 3.0-M2
         Environment: Java 1.5.0_06
SwiftMQ

            Reporter: Ging Ming Chan


When ServiceMix with the JmsReceiverComponent configured is started and there 
is already JMS messages waiting in the queue, it will throw the following 
exception:

ERROR! MessageListener throws RuntimeException, shutting down consumer!
org.apache.servicemix.jbi.RuntimeJBIException: 
org.apache.servicemix.jbi.NotInitialisedYetException: Cannot perform operations 
on this component until it has been initialised via init()
        at 
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBinding.java:74)
        at 
com.swiftmq.jms.v510.MessageConsumerImpl.invokeMessageListener(Unknown Source)
        at com.swiftmq.jms.v510.MessageConsumerImpl.invokeConsumer(Unknown 
Source)
        at 
com.swiftmq.jms.v510.SessionImpl$SessionDeliveryQueue.process(Unknown Source)
        at com.swiftmq.tools.queue.SingleProcessorQueue.dequeue(Unknown Source)
        at com.swiftmq.jms.v510.SessionImpl$SessionTask.run(Unknown Source)
        at com.swiftmq.client.thread.PoolExecutor.run(Unknown Source)
Caused by: org.apache.servicemix.jbi.NotInitialisedYetException: Cannot perform 
operations on this component until it has been initialised via init()
        at 
org.apache.servicemix.components.util.PojoSupport.getDeliveryChannel(PojoSupport.java:193)
        at 
org.apache.servicemix.components.jms.JmsInBinding.onMessage(JmsInBinding.java:59)
        ... 6 more

The cause of the error was traced to the codes in the JmsReceiverComponent 
.afterPropertiesSet() that open the connection and receive JMS messages before 
the JBI properties of the component have been set.  A possible solution is to 
override the ComponentLifeCycle.init(ComponentContext cc) method to include the 
related codes in the JmsReceiverComponent .afterPropertiesSet() method.


This is an email from Fujitsu Australia Software Technology Pty Ltd, ABN 27 003 
693 481. It is confidential to the ordinary user of the email address to which 
it was addressed and may contain copyright and/or legally privileged 
information. No one else may read, print, store, copy or forward all or any of 
it or its attachments. If you receive this email in error, please return to 
sender. Thank you.

If you do not wish to receive commercial email messages from Fujitsu Australia 
Software Technology Pty Ltd, please email [EMAIL PROTECTED]

Reply via email to