Guillaume, please forgive me for being so dense, but I can't seem to
use your advice to solve my problem. The error still occurs and still
indicates the blocking timeout is 100ms. I must not be incorporating
the config from tx.xml properly
First - I am using the snapshot from 6/16 - is this new enough?
I simply replaced my current declarations of TransactionManager and
TransactionContectmanager with the entire tx.xml config
My JCAContainer config now looks like:
<bean id="jencks" class="org.jencks.JCAContainer"
singleton="true">
<property name="bootstrapContext" ref="bootstrapContext" />
<!-- lets use the default configuration of work manager and
transaction manager-->
<!--
<property name="bootstrapContext">
<bean
class="org.jencks.factory.BootstrapContextFactoryBean">
<property name="threadPoolSize" value="25" />
</bean>
</property>
-->
<!-- the JCA Resource Adapter -->
<property name="resourceAdapter">
<bean id="activeMQResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter"
singleton="true">
<property name="serverUrl"
value="tcp://localhost:61616" />
</bean>
</property>
</bean>
On Jun 26, 2006, at 2:12 PM, Guillaume Nodet wrote:
> In the latest servicemix distribution, the jencks jca container is
> already
> configured.
> You may find easier to override the parameters (or copy/paste)
in the
> tx.xmlfile.
> See the poolingSupport bean in
> http://svn.apache.org/viewvc/incubator/servicemix/trunk/apache-
> servicemix/src/main/release/conf/tx.xml?revision=415380&view=markup
>
> Cheers
> Guillaume Nodet
>
> On 6/26/06, William Blackburn <[EMAIL PROTECTED]> wrote:
>>
>> This morning I did a rudimentary load test of our application,
just
>> fired 50 messages in rapid sequence via JMS to the first
component in
>> a 'chain' of components using JCA flow. Approx 20 messages into
the
>> test, I got the following error, for each of the remaining
messages.
>>
>>
>> 09:35:32,034 ERROR [JCAFlow:doRouting] Failed to send exchange:
>> MessageExchange[internal JMS Network
>> javax.jms.JMSException: No ManagedConnections available within
>> configured blocking timeout ( 100 [ms] )
>> at
>> org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection
>> (ActiveMQConnectionFactory.java:96)
>> at
>> org.apache.activemq.ra.ActiveMQConnectionFactory.createConnection
>> (ActiveMQConnectionFactory.java:65)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage
>> (JCAFlow.java:700)
>> ...
>>
>>
>> I've been studying the Servicemix and ActiveMQ docs, looking for
>> settings (under the JCAFlow or the ActiveMQ ConnectionFactory)
that
>> would help me increase the number of connections and/or the 100ms
>> timeout value, but I don't know exactly what I'm looking for,
so I'm
>> stumped.
>>
>> the applicable bits from my servicemix.xml file are:
>>
>> <sm:container id="jbi" rootDir="#rootDir" useMBeanServer="true"
>> createMBeanServer="false"
installationDirPath="#installDir"
>> deploymentDirPath="#deployDir" flowName="jca?
jmsURL=tcp://
>> localhost:61616"
>> autoEnlistInTransaction="true" persistent="true"
>> monitorInstallationDirectory="true" dumpStats="true"
>> statsInterval="10"
transactionManager="#transactionManager"
>> depends-on="broker">
>>
>> ...other stuff...
>>
>> <!-- the JCA container -->
>> <bean id="jencks" class="org.jencks.JCAContainer"
>> singleton="true">
>>
>> <!-- lets use the default configuration of work
manager and
>> transaction manager-->
>> <property name="bootstrapContext">
>> <bean
>>
>> class="org.jencks.factory.BootstrapContextFactoryBean">
>> <property name="threadPoolSize" value="25" />
>> </bean>
>> </property>
>>
>> <!-- the JCA Resource Adapter -->
>> <property name="resourceAdapter">
>> <bean id="activeMQResourceAdapter"
>>
>> class="org.apache.activemq.ra.ActiveMQResourceAdapter"
>> singleton="true">
>> <property name="serverUrl"
>> value="tcp://localhost:61616" />
>> </bean>
>> </property>
>> </bean>
>>
>> <bean id="broker"
>> class="org.apache.activemq.xbean.BrokerFactoryBean">
>> <property name="config" value="classpath:activemq.xml"/>
>> </bean>
>>
>> <bean id="transactionContextManager"
>> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
>> <bean id="transactionManager"
>>
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean" />
>>
>> <bean id="jmsFactory" depends-on="broker"
>> class="org.apache.activemq.pool.PooledConnectionFactory">
>> <property name="connectionFactory">
>> <bean
>>
>> class="org.apache.activemq.ActiveMQConnectionFactory">
>> <constructor-arg value="tcp://localhost:61616" />
>> </bean>
>> </property>
>> </bean>
>>
>> My activemq.xml file looks like:
>>
>> <beans xmlns="http://activemq.org/config/1.0">
>> <broker id="broker" useJmx="false">
>>
>> <persistenceAdapter>
>> <journaledJDBC journalLogFiles="5"
>> dataDirectory="#dataDir" dataSource="#postgres-ds"/>
>> </persistenceAdapter>
>>
>> <transportConnectors>
>> <transportConnector uri="tcp://localhost:61616"/>
>> </transportConnectors>
>>
>>
>> </broker>
>>
>> <!-- This xbean configuration file supports all the standard
>> spring xml configuration options -->
>>
>> <!-- Postgres DataSource Sample Setup -->
>> <bean id="postgres-ds"
>> class="org.postgresql.ds.PGPoolingDataSource">
>> <property name="serverName" value="localhost"/>
>> <property name="databaseName" value="activemq"/>
>> <property name="portNumber" value="0"/>
>> <property name="dataSourceName" value="postgres"/>
>> <property name="initialConnections" value="1"/>
>> <property name="maxConnections" value="10"/>
>> <property name="user" value="activemq"/>
>> <property name="password" value="activemq"/>
>> <!--
>> <property name="user" value="cmroot"/>
>> <property name="password" value="22cmroot"/>
>> -->
>> </bean>
>>
>>
>>
>> <!-- Directories relative to web app -->
>> <bean id="servletContext"
>>
class="org.springframework.web.context.support.ServletContextFactoryB
>> ean
>> " />
>> <bean id="dataDir"
class="org.springframework.web.util.WebUtils"
>> factory-method="getRealPath">
>> <constructor-arg ref="servletContext" />
>> <constructor-arg value="/data" />
>> </bean>
>>
>> </beans>
>>
>>
>>
>>