JBoss Community

Re: Error deploying EJB on JBoss 6 using @Resource annotation and jndi.properties

created by Denys Myxin in EJB3 - View the full discussion

Hello.

Likely you need to open file hortnetq-jms.xml in /jboss/<profile>/deploy/hortnetq dir and lines:

<connection-factory name="QueueConnectionFactory" signature="queue">

        <xa>true</xa>

        <connectors>

           <connector-ref connector-name="in-vm"/>

        </connectors>

        <entries>

            <entry name="/QueueConnectionFactory"/>          

        </entries>

    </connection-factory>

<queue name="OrderBillingQueue">

      <entry name="/jms/OrderBillingQueue"/>

   </queue>

Then open file PlaceOrderBean and chahe Resource attributes by ones:

    @Resource(name="QueueConnectionFactory", mappedName="/QueueConnectionFactory")

    private ConnectionFactory connectionFactory;

 

    @Resource(name="/jms/OrderBillingQueue", mappedName = "/jms/OrderBillingQueue")

    private Queue billingQueue;

 

Open file OrderBillingMDb and changes lines:

@MessageDriven(activationConfig = {

        @ActivationConfigProperty(propertyName = "destination", propertyValue = "/jms/OrderBillingQueue"),

        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })

public class OrderBillingMDB implements MessageListener {

....

Please take attention jndi name queue and connection factory.

Best regards, Denys.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community