You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by echuang <ec...@gmail.com> on 2017/10/17 09:46:09 UTC

ActiveMQ integration with existing J2EE project

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

Re: ActiveMQ integration with existing J2EE project

Posted by echuang <ec...@gmail.com>.
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