【发布时间】:2014-10-05 03:52:54
【问题描述】:
我的消息驱动 Bean 执行高度密集的操作,所以我想限制它的池大小,否则我的服务器会超载。我已经尝试过这个(代码)但它不起作用,它的池仍然是 32(经验测试,我不时重新启动服务器,所以没有池实例)。
@MessageDriven( mappedName = "jms/TestTopic", activationConfig = {
@ActivationConfigProperty( propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge" ),
@ActivationConfigProperty( propertyName = "destinationType", propertyValue = "javax.jms.Topic" ),
@ActivationConfigProperty( propertyName = "subscriptionDurability", propertyValue = "Durable" ),
@ActivationConfigProperty( propertyName = "clientId", propertyValue = "Reader" ),
@ActivationConfigProperty( propertyName = "subscriptionName", propertyValue = "Reader" ),
@ActivationConfigProperty( propertyName = "endpointPoolMaxSize", propertyValue = "1" ),
@ActivationConfigProperty( propertyName = "endpointPoolResizeCount", propertyValue = "1" ),
@ActivationConfigProperty( propertyName = "endpointPoolSteadySize", propertyValue = "0" )
} )
public class Reader implements MessageListener {
我在 JDK 6 上的 Glassfish v3 上使用 EJB 3。应用程序使用 EE 6 标准。
你能帮我如何限制池吗?感谢您的帮助。
【问题讨论】:
标签: glassfish jms pool message-driven-bean