JBoss Community

Re: Set "maxSession" of an MDB using XML instead of Annotations

created by Hushen Savani in EJB3 - View the full discussion

Hi,

 

Finally, I have found the solution of the above problem.

 

I have created a {****}-aop.xml file as following :

 

<?xml version="1.0" encoding="UTF-8"?>

<aop xmlns="urn:jboss:aop-beans:1.0">

    <domain name="ProcessingEntitiesQueueListenerMDB" extends="Message Driven Bean" inheritBindings="true">

      <annotation expr="!class(@org.jboss.ejb3.annotation.DefaultActivationSpecs)">

         @org.jboss.ejb3.annotation.DefaultActivationSpecs (value={@javax.ejb.ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), @javax.ejb.ActivationConfigProperty(propertyName="destination", propertyValue="queue/mocmProcessingQueue"), @javax.ejb.ActivationConfigProperty(propertyName="maxSession", propertyValue="20")})

      </annotation>

   </domain>

</aop>

 

and have placed the same file in deploy dir.

 

And the annotations in Message Driven Bean has been set as following:

 

@MessageDriven

@AspectDomain("ProcessingEntitiesQueueListenerMDB")

@ResourceAdapter("hornetq-ra.rar")

public class ProcessingEntitiesQueueListenerMDB extends MessageServiceListenerSessionBase implements MessageListener {

          ........

          .......     

}

Reply to this message by going to Community

Start a new discussion in EJB3 at Community