0 Replies Latest reply on Jul 22, 2011 6:31 AM by Cristi Cioriia

    maxSessions for MDBs with Quartz adapter?

    Cristi Cioriia Newbie

      Hi guys,

       

      I have an MDB which implements the quartz Job interface (uses the quartz-ra adapter) and I would like to specify the number of consumers for the MDBs. I really need to set this up to a small level this because my mdb consumers query a server which times out if too many requests are coming at the same time. I have tried by setting up the activation property spec maxSessions but it didn't work because the QuartzActivationSpec does not support the maxSessions property. Is there a way how I can accomplish this?

      The code looks like this:

       

      @javax.ejb.MessageDriven(activationConfig = {

      /*        @ActivationConfigProperty(

                      propertyName = "cronTrigger", propertyValue = "0 0/1 * * * ?")})*/

              //from Saturday at 4:07 am to Monday  at 23:07 every hour

              @ActivationConfigProperty(

                      propertyName = "cronTrigger", propertyValue = "0 7 4/1 ? * SAT,SUN,MON"

              ),

              @ActivationConfigProperty(propertyName = "maxSessions", propertyValue = "5")},

      messageListenerInterface = Job.class)

      @ResourceAdapter("quartz-ra.rar")

       

      Thanks.

       

      Regrds,

      Cristi