2 Replies Latest reply: Jan 10, 2013 11:17 PM by 790945 RSS

    Unable to startup aqconnectionpool with a small initial capacity

    790945
      Hi Experts,

      We are using weblogic 12c which runs only one mt-1 as adminserver for a java based application test.

      We create several queues and corresponding queue table at db side, then configure aq-jms following best practice:
      http://docs.oracle.com/cd/E17904_01/web.1111/e13738/best_practice.htm#CACJCGHG

      create JMS server, JMS module(using aqDataSource), Foreign Server at middle-tier side. Then using JNDI mapping for local queues and remote queues.

      Weblogic works very well if I set the aqDataSource's initial capacity above certain threshold, But for any number below this threshold , errors will turn up just a few seconds after weblogic becomes "running" state(no load running). Errors are something like that:

      <Warning> <EJB> <BEA-010096> <The Message-Driven EJB LargeOrderMDB is unable to connect to the JMS destination or bind to JCA resource adapter LargeOrderQueue. The onnection failed after 2 attempts. The MDB will attempt to reconnect/rebind every 10 seconds. This log message will repeat every 600 seconds until the condition clears.>
      ....
      The Error was:
      oracle.jms.AQjmsException: Internal error: Cannot obtain XAConnection weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool aqConnectionPool to allocate to applications, please increase the size of the pool and retry..
      at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:591)
      at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:343)
      at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:330)
      at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:487)
      at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:380)
      at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:132)
      at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:82)
      at weblogic.jdbc.jta.DataSource.getXAConnectionFromPool(DataSource.java:1754)
      at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1552)
      at weblogic.jdbc.jta.DataSource.getConnectionInternal(DataSource.java:481)
      at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:465)
      at weblogic.jdbc.common.internal.RmiDataSource.getConnectionInternal(RmiDataSource.java:532)
      at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:518)
      at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:511)
      at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:566)
      at oracle.jms.AQjmsXAConnection.createXASession(AQjmsXAConnection.java:155)
      at weblogic.ejb.container.internal.JMSConnectionPoller.setUpQueueSessionAt(JMSConnectionPoller.java:1753)
      at weblogic.ejb.container.internal.JMSConnectionPoller.setUpQueueSessions(JMSConnectionPoller.java:1618)
      at weblogic.ejb.container.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:2298)
      at weblogic.ejb.container.internal.JMSConnectionPoller.connect(JMSConnectionPoller.java:808)
      at weblogic.ejb.container.internal.MDConnectionManager.startConnectionPolling(MDConnectionManager.java:265)
      at weblogic.ejb.container.manager.MessageDrivenManager.start(MessageDrivenManager.java:595)
      at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl$DestinationResovler.activateNoneDDMDManager(MessageDrivenBeanInfoImpl.java:2242)
      at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl$QueueConnectionHandler.handleNoneDD(MessageDrivenBeanInfoImpl.java:2682)
      at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl$DestinationResovler.resolveDestnationWorkMode(MessageDrivenBeanInfoImpl.java:2175)
      at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl$DestinationEventHandler.onDestinationsAvailable(MessageDrivenBeanInfoImpl.java:1997)
      at weblogic.jms.extensions.JMSDestinationAvailabilityHelper$DestinationAvailabilityListenerWrapper$2.run(JMSDestinationAvailabilityHelper.java:387)
      at weblogic.jms.extensions.JMSDestinationAvailabilityHelper$DestinationAvailabilityListenerWrapper.callOutListener(JMSDestinationAvailabilityHelper.java:402)
      at weblogic.jms.extensions.JMSDestinationAvailabilityHelper$DestinationAvailabilityListenerWrapper.onDDMembershipChange(JMSDestinationAvailabilityHelper.java:383)
      at weblogic.jms.common.CDS$DD2Listener.run(CDS.java:1263)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)


      I know this may be due to JMS sessions hold JDBC connections at startup. If this is the case, how can I decrease the JMS session number? Cause I do not want to startup so many sessions. It would be great help if you experts can give some hints about that. Thanks very much.

      Here is my aqDataSource setting:
      <?xml version='1.0' encoding='UTF-8'?>
      <jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.2/jdbc-data-source.xsd">
      <name>aqConnectionPool</name>
      <jdbc-driver-params>
      <url>jdbc:oracle:thin:@*****:1521/spj001.us.oracle.com</url>
      <driver-name>oracle.jdbc.xa.client.OracleXADataSource</driver-name>
      <properties>
      <property>
      <name>user</name>
      <value>spec</value>
      </property>
      </properties>
      <password-encrypted>{AES}+wAZuY++bQpgcjxgfUKXhejGKV2bb/cQq7BVmeOC9cs=</password-encrypted>
      </jdbc-driver-params>
      <jdbc-connection-pool-params>
      <initial-capacity>40</initial-capacity>
      <max-capacity>40</max-capacity>
      <min-capacity>40</min-capacity>
      <test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>
      <profile-type>127</profile-type>
      </jdbc-connection-pool-params>
      <jdbc-data-source-params>
      <jndi-name>AQDataSource</jndi-name>
      <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
      </jdbc-data-source-params>
      </jdbc-data-source>

      Edited by: Candy.Liu on Jan 9, 2013 10:09 PM