Announcement Announcement Module
No announcement yet.
Foreign Queue Destination for Weblogic 8.1.5 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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.

    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(
            at weblogic.jms.client.JMSSession.createConsumer(
            at weblogic.jms.client.JMSSession.createReceiver(
            at org.springframework.jms.listener.DefaultMessageListenerContainer102.createConsumer(
            at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.createListenerConsumer(
            at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(
            at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(
            at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(
            at org.springframework.jms.listener.DefaultMessageListenerContainer$
    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 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 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"/>

    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 [email protected]; Jun 3rd, 2007, 11:46 PM. 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


    • #3
      Still exists with Weblogic 9.2. Look here for a solution: