[jboss-user] [EJB 3.0] New message: "Re: Setting MDB Max Pool Size"
Leonardo Porto
do-not-reply at jboss.com
Tue Jan 26 11:49:48 EST 2010
User development,
A new message was posted in the thread "Setting MDB Max Pool Size":
http://community.jboss.org/message/522361#522361
Author : Leonardo Porto
Profile : http://community.jboss.org/people/leoporto
Message:
--------------------------------------------------------------
Thanks for replying. While i was waiting for someone to reply to this post i also tried that annotation:
@Pool(value=PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX, maxSize=50, timeout=10000)
The one that is mentioned in that page you linked and still didnt work. Take a look at the attached SS that i took from the queue in the Admin Console. As you can see the consumer count is 1... Its very simple, and its working too, i just want to configure more consumers... thx in advance
http://community.jboss.org/servlet/JiveServlet/showImage/1879/imagem.JPG
Below is my code:
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
import org.jboss.ejb3.annotation.Pool;
import org.jboss.ejb3.annotation.defaults.PoolDefaults;
/**
* Message-Driven Bean implementation class for: MDB
*
*/
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "Destination", propertyValue = "/queue/test"),
}
)
@Pool(value=PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX, maxSize=50, timeout=10000)
public class MDB implements MessageListener {
/**
* Default constructor.
*/
public MDB() {
}
/**
* @see MessageListener#onMessage(Message)
*/
public void onMessage(Message message) {
try {
System.out.println("****** RECEIVED MSG *****************************************************************");
System.out.println("*************************************************************************************");
System.out.println(((TextMessage) message).getText());
System.out.println("*************************************************************************************");
System.out.println("");
} catch (JMSException e) {
e.printStackTrace();
}
}
}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522361#522361
More information about the jboss-user
mailing list