ActiveMQ integration with existing J2EE project

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ integration with existing J2EE project

echuang
Greetings,

Currently I'm converting the old J2EE components into SpringBoot compliance
components.
Now i had 1 component already converted into SpringBoot which uses ActiveMQ
as JMS provider.

The problem that facing is a component uses JMS provider; Previously created
manually in Glassfish with ConnectionFactory and Queue, and the JMS codes
written with J2EE codes, which uses QueueConnectionFactory and Queue both
from javax.jms package.

Is there any solution, without changes make on the J2EE compliance
component, it will be fine uses ActiveMQ within the SpringBoot application ?

Below attached with sample code for the jms implementation:

InitialContext jndi = new InitialContext();
javax.jms.QueueConnectionFactory queueConnectionFactory =
(QueueConnectionFactory) jndi.lookup( CONNECTION_FACTORY_NAME );
javax.jms.Queue queue = (Queue) jndi.lookup( QUEUE_NAME );

Thank You



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ integration with existing J2EE project

echuang
Adding some information, i not familiar with ActiveMQ on SpringBoot, but in
J2EE, there is a annotation to specified the connection factory JNDI name.

e.g
@MessageDriven( mappedName = "jms/notifierQueue", activationConfig = {
    @ActivationConfigProperty( propertyName = "connectionFactoryJndiName",
propertyValue = "jms/notifierConnectionFactory" )
....

Can I also give a connectionFactoryJndiName for the
ActiveMQConnectionFactory created on SpringBoot config ?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html