3 Replies Latest reply on Feb 23, 2012 9:26 AM by Justin Bertram

    Set MDB pool size on jboss7.1.0

    varsha g Newbie

      Hi

             I have deployed the  MDB on jboss7.1.0. here is my code

       

            Code to add the mesage to queue:-

       

             String destinationName = "queue/test";

             

              Context ic = null;

              QueueConnectionFactory cf = null;

              Connection connection =  null;

           

              Properties props = new Properties();

              props.setProperty("java.naming.factory.initial", "org.jboss.as.naming.InitialContextFactory");

              props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");

              props.setProperty("java.naming.provider.url", "localhost");

              ic = new InitialContext(props);

              cf = (QueueConnectionFactory)ic.lookup("java:/JmsXA");

              Queue queue = (Queue)ic.lookup(destinationName);

              

              connection = cf.createConnection();

              Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

              MessageProducer publisher = session.createProducer(queue);

             

              connection.start();

        

       

      Here is my MDB code :-

       

          

      public void onMessage(Message message) {

              Logger log=LoggerFactory.getLogger(MessageDrivenBean.class);

              Serializable seObj = null;

              FeedbackMessageBean tmsg = null;

              try {

                  seObj = ((ObjectMessage) message).getObject();

              } catch (JMSException e1) {

                  // TODO Auto-generated catch block

                  e1.printStackTrace();

              }

              tmsg = (FeedbackMessageBean) seObj;

      }

       

      I have tested this mdb using the jmeter.

       

      when i load the small amount of messages (say 10-20) its work fine. MDB will listen the message and call the  public void onMessage(Message message) method.

      but when i load the maximum number of threads  (100-200). MDB will not listen it. it doesn't call the public void onMessage(Message message) method.

       

      Am using the jboss default queue named "queue/test"

       

      is there any limit of messages on queue? if this is the case how to increase it?

      what is the configuration for this on   jboss7.1.0?

       

      please reply.