Migrating from Jboss4.2.3 to Jboss EAP6

Latest response

Hi,

I am migrating application from Jboss4.2.3 to Jboss EAP6. This application uses the MDB and JMS queue.

What are the basic steps which I need to take care so I can migrate application.

the Jboss-web.xml is like this

<resource-ref>
    <res-ref-name>jms/ConnectionFactory
    </res-ref-name>
    <!-- non HA -->
    <!-- <jndi-name>java:/ConnectionFactory</jndi-name> -->

    <!--
        Use the JMS Resource Adapter, let it deal with knowing where the JMS
        server is
    -->
    <jndi-name>java:/JmsXA</jndi-name>
</resource-ref>


<resource-ref>
    <res-ref-name>jms/QueueEcolApplication</res-ref-name>

    <!-- non HA -->
    <!-- <jndi-name>java:/queue/ecolApplication</jndi-name> -->

    <!-- Use HA-JNDI so we can find the queue on any node -->
    <jndi-name>jnp://localhost:1100/queue/ukhe.pmi.ecol.apply
    </jndi-name>
</resource-ref>


<resource-ref>
    <res-ref-name>jms/QueueDLQ</res-ref-name>

    <!-- non HA -->
    <!-- <jndi-name>java:/queue/DLQ</jndi-name> -->

    <!-- Use HA-JNDI so we can find the queue on any node -->
    <jndi-name>jnp://localhost:1100/queue/ukhe.pmi.ecol.fail
    </jndi-name>
</resource-ref>   

and the EJB is like this

/**
* Message Driven Bean to add reliability layer to quote application
* submit service.
*/
@MessageDriven(name = "ECOLSubmitApp", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/ukhe.pmi.ecol.apply"),
@ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "guest"),
@ActivationConfigProperty(propertyName = "dLQJNDIName", propertyValue = "queue/ukhe.pmi.ecol.fail"),
@ActivationConfigProperty(propertyName = "dLQMaxResent", propertyValue = "0"),
@ActivationConfigProperty(propertyName = "dLQUser", propertyValue = "guest"),
@ActivationConfigProperty(propertyName = "dLQPassword", propertyValue = "guest")

})
public class SubmitAppMdb implements MessageListener {
private static final Logger LOG = LoggerFactory.getLogger(SubmitAppMdb.class);
private static final String QUOTE_REF = "quoteReference";

@EJB
private ECOLQuoteAppService service;

Responses

Hello, JBoss 4.2.3 was using JBossMQ I believe, JBoss EAP 6 now uses HornetQ as its messaging implementation. So you would need to setup your JMS destinations in your JBoss profile config (standalone*.xml or domain.xml) . Then you would make your resource-refs point to the jndi name you configure in the JBoss profile xml.

There are several documentation links here for JBoss EAP 6 that show configuring jms destinations and a migration guide which may be of use also. If you have other issues, you can open a support case and get help from the Red Hat support team.

https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/