开发者

Unable to proxy a JBossMQ queue in Spring

开发者 https://www.devze.com 2023-04-12 00:34 出处:网络
Spring JMS going against a JBoss 4.x JBossMQ queue (I know, old JBoss, JBossMQ superseded by JBoss Messaging, but I can\'t change the stack).Everything works when the Spring JMS configuration is loade

Spring JMS going against a JBoss 4.x JBossMQ queue (I know, old JBoss, JBossMQ superseded by JBoss Messaging, but I can't change the stack). Everything works when the Spring JMS configuration is loaded at开发者_高级运维 startup, but when I make the JNDI lookups lazy, so that they are first loaded when I want to send a JMS message, I get the following exception:

org.springframework.jms.InvalidDestinationException: Destination is not an instance of SpyDestination QUEUE.myQueueName; nested exception is javax.jms.InvalidDestinationException: Destination is not an instance of SpyDestination QUEUE.myQueueName
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:285)

My config:

    <jee:jndi-lookup id="beanNameForMyQueue" 
    jndi-name="queue/myQueueName" 
    resource-ref="true" environment-ref="jndiEnvironment" 
    lookup-on-startup="false" cache="true" proxy-interface="javax.jms.Queue" />

I found a JBoss JIRA on this, and this similar HornetQ post, but so far no dice.

Am I just out of luck with the lazy init, or is there a workaround?

0

精彩评论

暂无评论...
验证码 换一张
取 消