James Strachan wrote:
> You can configure brokers using various URI schemes now. There is an
> example of it in use inside the Jencks project...
>
> http://cvs.jencks.codehaus.org/jencks/src/test/resources/org/jencks/spring-topic-embedded-broker.xml?rev=HEAD&view=auto
>
> i.e. use xbean: as a prefix
>
> (xbean:activemq.xml)
>
> James
>
Very good, James. I will try that out. Is the Jencks 1.2-SNAPSHOT
required for using AMQ 4.0RC3? If so, where is it obtainable? It
doesn't look to be on the jencks.org download page.
I had another question, since your embedded broker is slightly different
and uses PooledConnectionFactory. Is this the optimal, or one of the
optimal, ways of accomplishing the same thing? Keep in mind that we use XA.
<bean id="jms.jcaContainer" class="org.jencks.JCAContainer">
<property name="bootstrapContext">
<bean
class="com.xxx.jca.ResinBootstrapContextFactoryBean" />
</property>
<property name="resourceAdapter">
<ref local="jms.resourceAdapter" />
</property>
</bean>
<bean id="jms.managedConnectionFactory"
class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
<property name="resourceAdapter">
<ref local="jms.resourceAdapter" />
</property>
</bean>
<bean id="jms.resourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter">
<property name="brokerXmlConfig">
<value>activemq.xml</value>
</property>
<property name="initialRedeliveryDelay">
<value>2000</value>
</property>
<property name="maximumRedeliveries">
<value>10</value>
</property>
<property name="redeliveryBackOffMultiplier">
<value>2</value>
</property>
<property name="serverUrl">
<value>vm://localhost</value>
</property>
</bean>
<bean id="jms.connectionFactory"
class="org.springframework.jca.support.LocalConnectionFactoryBean">
<property name="connectionManager">
<bean
class="com.xxx.jca.ResinConnectionManagerFactoryBean">
<property name="localTransaction">
<value>false</value>
</property>
<property name="localTransactionOptimization">
<value>false</value>
</property>
<property name="managedConnectionFactory">
<ref
local="jms.managedConnectionFactory" />
</property>
<property name="xaTransaction">
<value>true</value>
</property>
</bean>
</property>
<property name="managedConnectionFactory">
<ref local="jms.managedConnectionFactory" />
</property>
</bean>
We then use jms.connectionFactory in all of the JmsTemplate,
org.logicblaze.lingo.jms.JmsServiceExporterMessageListener, and
org.logicblaze.lingo.jms.JmsProxyFactoryBean beans.
--
Christopher G. Stach II