Skip to content
Advertisement

Trying to send a message to a queue on weblogic

I have a spring boot application that is deployed on a WebLogic server, on that server there is a JmsModule defined that I need to use to send messages.

I have the following as my sending class:

JavaScript

The queue has a JNDI name and is retrieved via spring properties, it’s defined as:

JavaScript

When starting the application I see no errors’ in the log but when I try to access this piece of code the following error is shown:

JavaScript

I have verified that the correct property is retrieved and that it matches the JNDI name of the JmsModule in WebLogic. The web.xml and weblogic.xml are standard and do not contain anything related to JMS. Is there something that I’m doing wrong/is missing?

Advertisement

Answer

I have found the solution. This is a case where WebLogic does not return a ConnectionFactory that can be used to create a JmsTemplate in order to interact with JmsQueue’s.

The solution is to not create a JmsTemplate from a supplied ConnectionFactory but to directly refer to a JmsTemplate.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement