Apache Camel: можно ли настроить WMQ без использования Spring?

В настоящее время я работаю с Apache Camel и WMQ. Для конфигурации верблюда и маршрутизации я использую Java DSL. Но я не смог найти ни одного примера о том, как настроить WMQ с помощью Java DSL.

Вот что я получаю, когда пытаюсь настроить WMQ:

config.xml

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p" default-init-method="init" xmlns:util="http://www.springframework.org/schema/util" xmlns:osgi="http://www.springframework.org/schema/osgi" xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xs http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://www.springframework.org/schema/osgi  http://www.springframework.org/schema/osgi/spring-osgi.xsd">

    <import resource="classpath:/META-INF/spring/components.xml"/>

    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">

        <route>
            <from uri="jms:LQ.SERVICEPROVIDER.CAMEL.SERVICEBUS"/>

            <setHeader headerName="ID">
                <xpath resultType="java.lang.Integer">//id</xpath>
            </setHeader>
            <setHeader headerName="FIRSTNAME">
                <xpath resultType="java.lang.String">//vorname</xpath>
            </setHeader>
            <setHeader headerName="LASTNAME">
                <xpath resultType="java.lang.String">//nachname</xpath>
            </setHeader>

            <to uri="sql:insert into USERS (ID, FIRSTNAME, LASTNAME, BEARBEITET) values (:#ID, :#FIRSTNAME, :#LASTNAME, TRUE)"/>
        </route>

    </camelContext>
</beans>

component.xml

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p" default-init-method="init" xmlns:util="http://www.springframework.org/schema/util" xmlns:osgi="http://www.springframework.org/schema/osgi" xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xs http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://www.springframework.org/schema/osgi  http://www.springframework.org/schema/osgi/spring-osgi.xsd"> 

    <!-- ************************************************************************** -->
    <!-- ***************  JMS - Configuration                       *************** -->
    <!-- ************************************************************************** -->

    <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
        <property name="connectionFactory" ref="jmsCachedConnectionFactory" />
        <property name="exceptionListener" ref="jmsCachedConnectionFactory" />
        <property name="transacted" value="true"/>
        <property name="transactionManager" ref="txManager" />
    </bean>

    <bean id="jmsCachedConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
        <property name="targetConnectionFactory" ref="jmsConnectionFactory" />
        <property name="sessionCacheSize" value="15" />
    </bean>

    <bean id="jmsConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
        <property name="channel" value="${mq.prod.channel}" />
        <property name="hostName" value="${mq.prod.host}" />
        <property name="port" value="${mq.prod.port}" />
        <property name="queueManager" value="${mq.prod.manager}" />
        <property name="transportType" value="1" />
    </bean>

    <bean id="txManager" class="org.springframework.jms.connection.JmsTransactionManager">
        <property name="connectionFactory" ref="jmsCachedConnectionFactory" />
    </bean>

Но, как я уже говорил, я не хочу использовать Spring для его настройки. Я предпочитаю использовать Java DSL. Является ли это возможным? Если да, не могли бы вы привести пример или ссылки?

Ваша помощь очень ценится. Благодарю.

Ответы на вопрос(1)

Ваш ответ на вопрос