weblogic中的Activemq资源适配器



我已经在weblogic中部署了activemq资源适配器。我需要限制activemq的连接数。我创建了一个weblogic-ra.xml文件,并将其保存在资源适配器的meta-inf文件夹中。它仍然接受n个连接。我做错了什么?还有其他方法可以限制连接数吗?请帮助

Weblogic-ra.xml内容

javax.jms.ConnectionFactoryeis/activemq-ra_javax_jms_ConnectionFactory001假900

           </connection-properties> 
        </connection-instance> 
  </connection-definition-group> 
 <connection-definition-group>
     <connection-factory-interface>javax.jms.QueueConnectionFactory</connection-factory-interface> 
     <connection-instance>
        <jndi-name>eis/activemq-ra_javax_jms_QueueConnectionFactory</jndi-name>
        <connection-properties> 
              <pool-params>
                    <initial-capacity>0</initial-capacity>
                    <max-capacity>0</max-capacity>
                    <capacity-increment>1</capacity-increment>
                    <shrinking-enabled>false</shrinking-enabled>
                    <shrink-frequency-seconds>900</shrink-frequency-seconds>
              </pool-params>

           </connection-properties>
     </connection-instance>
 </connection-definition-group>
 <connection-definition-group>
     <connection-factory-interface>javax.jms.TopicConnectionFactory</connection-factory-interface> 
     <connection-instance>
        <jndi-name>eis/activemq-ra_javax_jms_TopicConnectionFactory</jndi-name>
        <connection-properties> 
              <pool-params>
                    <initial-capacity>0</initial-capacity>
                    <max-capacity>0</max-capacity>
                    <capacity-increment>1</capacity-increment>
                    <shrinking-enabled>false</shrinking-enabled>
                    <shrink-frequency-seconds>900</shrink-frequency-seconds>
              </pool-params>

           </connection-properties>
     </connection-instance>
 </connection-definition-group>

问题解决!!!!

我在我的代码中添加了activemq jndi name

Context = new InitialContext();ConnectionFactory = (ConnectionFactory) context.lookup("eis/activemq-ra_javax_jms_ConnectionFactory");Connection Connection = connectionFactory.createConnection();

connection.start ();

现在我的应用程序与资源适配器通信,并根据上面给出的weblogic-ra.xml文件限制连接的数量

相关内容

  • 没有找到相关文章

最新更新