谢谢你们的投入,是的,我解决了&最大豆式-free-pool中,maxSession属性工作管理器的组合这个问题。这是我后面需要它的完整代码。
的weblogic.xml
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.6/weblogic-web-app.xsd">
<session-descriptor></session-descriptor>
<jsp-descriptor></jsp-descriptor>
<container-descriptor></container-descriptor>
<work-manager>
<name>WorkManager-MDB</name>
<max-threads-constraint>
<name>MaxThreadsConstraint-MDB</name>
<count>1</count>
</max-threads-constraint>
</work-manager>
</weblogic-web-app>
的weblogic-ejb-jar.xml中
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-ejb-jar xmlns="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://www.oracle.com/technology/weblogic/weblogic-ejb-jar/1.1/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>JayMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>1</max-beans-in-free-pool>
</pool>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
消息驱动Bean
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "connectionFactoryJndiName", propertyValue = "jms/myConnectionFactory"),
@ActivationConfigProperty(propertyName = "destinationJndiName", propertyValue = "jms/myQueue"),
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1")})
public class JayMDB implements MessageListener {
来源
2017-01-03 15:57:26
Jay
这似乎是一个瓶子颈部。当请求涌入时,为什么你不希望在这些高峰时段有一个更大的池? – duffymo
你试过这个吗?也许是可行的WLS 12C http://stackoverflow.com/questions/8939292/how-to-set-max-pool-size-in-mdb-on-weblogic-10-3 – Filip
@Filip感谢队友我会尝试那。其实我没有使用过weblogic-application.xml,只使用了xml和所有的anotation。希望我能够混合XML和注释。 – Jay