Announcement Announcement Module
Collapse
No announcement yet.
Foreign Queue Destination for Weblogic 8.1.5 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Foreign Queue Destination for Weblogic 8.1.5

    Just started using Spring and am trying to replace an MDB with a Spring MessageDriven POJO in Weblogic 8.1.5

    But I'm running into the following Exception on startup of the Weblogic Server.

    Code:
    2007-06-04 11:15:26,287 ERROR org.springframework.jms.listener.DefaultMessageListenerContainer102 - Setup of JMS message listener invoker failed - trying to recover
    weblogic.jms.common.InvalidDestinationException: Foreign destination, ConSolEmailJMSQueue
            at weblogic.jms.common.Destination.checkDestinationType(Destination.java:106)
            at weblogic.jms.client.JMSSession.createConsumer(JMSSession.java:1626)
            at weblogic.jms.client.JMSSession.createReceiver(JMSSession.java:1530)
            at org.springframework.jms.listener.DefaultMessageListenerContainer102.createConsumer(DefaultMessageListenerContainer102.java:101)
            at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.createListenerConsumer(AbstractPollingMessageListenerContainer.java:202)
            at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:281)
            at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:219)
            at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:872)
            at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:812)
    It appears that Weblogic checks the instance of the Destination it has been supplied with and if it is not an instanceof weblogic.jms.common.DestinationImpl that it throws an InvalidDestinationException.

    Is there some special way that I should be defining my JMS Queue in Spring?
    The Queue and ConnectionFactory are all defined un the Wbelogic ConSole and have never caused any other problems.

    Here is my Spring config:

    <bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer102">
    <property name="maxConcurrentConsumers" value="3"/>
    <property name="connectionFactory" ref="queueConnectionFactory"/>
    <property name="destination" ref="mailQueue"/>
    <property name="messageListener" ref="mailQueueProcessor"/>
    <property name="transactionManager" ref="transactionManager"/>
    </bean>

    <bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="MyApp.jms.QueueConnectionFactory"/>
    <property name="proxyInterface" value="javax.jms.QueueConnectionFactory"/>
    <property name="lookupOnStartup" value="false"/>
    </bean>

    <bean id="mailQueue" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="MyAppEmailQueue"/>
    <property name="proxyInterface" value="javax.jms.Queue"/>
    <property name="lookupOnStartup" value="false"/>
    <property name="cache" value="false"/>
    </bean>

    I get this on Spring 2.0.3 and 2.0.5

    Note that I'm not trying to send to a foreign queue.
    The queue is defined within the Weblogic instance, but Weblogic seems to think its foreign becauise not an instance of DestinationImpl because thee Spring JndiObjectFactoryBean has provided a Proxy for the Queue.

    So how is everyone else doing it?
    How do I define a JMS Queue and ConnectionFactory within Spring that points to my Queue and ConnectionFactory defined in the Weblogic JNDI tree?
    Last edited by william_ferguson_au@yahoo; Jun 4th, 2007, 12:46 AM. Reason: Added Spring version and a bit more detail

  • #2
    Dont use a proxy

    If you take out the proxy interface, and set lookupOnStartup to true, spring wont use a proxy for the Queue. If you do that weblogic will be happy and everything should work

    Comment


    • #3
      Still exists with Weblogic 9.2. Look here for a solution: http://forum.springframework.org/sho...41&postcount=2

      Comment

      Working...
      X