Quantcast

ServiceMix 4.2, Camel, OracleAQ

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ServiceMix 4.2, Camel, OracleAQ

kkashi
Hello,

I'm trying to setup a Camel routes to work within SMX 4.2 using Camel 2.2 and having difficulty. I'm able to make it work as stand-alone, but once deployed into SMX, I get issues. As simple test, just routing messages from folder into OracleAQ.  

PLEASE HELP.

All input is appreciated.

Regards,
Hossein

-----------Error message:
The bundle could not be resolved. Reason: Missing Constraint: Import-Package: oracle.jms; version="0.0.0"

-----------Camel Context:
    <bean id="oracleQueueCredentials"
          class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
        <property name="targetConnectionFactory">
            <ref bean="aqConnectionFactoryQueue"/>
        </property>
        <property name="username">
            <value>theUserNamevalue>
        </property>
        <property name="password">
            <value>thePassword</value>
        </property>
       
    </bean>
            <bean id="aqConnectionFactoryQueue" class="oracle.jms.AQjmsFactory" factory-method="getQueueConnectionFactory">
        <constructor-arg index="0">       
            <value>theUrlInfo</value>           
        </constructor-arg>
       
        <constructor-arg index="1" type="java.util.Properties">
            <value/>
        </constructor-arg>
    </bean>

    <bean id="oracleQueue" class="org.apache.camel.component.jms.JmsComponent">
        <property name="connectionFactory" ref="oracleQueueCredentials"/>
    </bean>

-------- Generated MANIFEST.MF
Manifest-Version: 1.0

Export-Package: swim;uses:="org.apache.camel.builder,org.apache.camel.

 spring"

Built-By: hamerkashiswim

Build-Jdk: 1.6.0_18

Bundle-Version: 1.0.0.SNAPSHOT

Tool: Bnd-0.0.357

Bundle-Name: Camel Route OSGI

Bnd-LastModified: 1273860128949

Created-By: Apache Maven Bundle Plugin

Bundle-ManifestVersion: 2

Bundle-SymbolicName: camel-router-osgi

Import-Package: oracle.jms,org.apache.activemq,org.apache.activemq.cam

 el.component,org.apache.camel;version="2.2",org.apache.camel.builder;

 version="2.2",org.apache.camel.component.jms;version="2.2",org.apache

 .camel.spring;version="2.2",org.springframework.jms.connection;versio

 n="2.5",swim
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ServiceMix 4.2, Camel, OracleAQ

Johan Edstrom
It might help if you share your issues?

On May 14, 2010, at 12:09 PM, kkashi wrote:

>
> Hello,
>
> I'm trying to setup a Camel routes to work within SMX 4.2 using Camel 2.2
> and having difficulty. I'm able to make it work as stand-alone, but once
> deployed into SMX, I get issues. As simple test, just routing messages from
> folder into OracleAQ.  
>
> PLEASE HELP.
>
> All input is appreciated.
>
> Regards,
> Hossein
>
> -----------Error message:
> The bundle could not be resolved. Reason: Missing Constraint:
> Import-Package: oracle.jms; version="0.0.0"
>
> -----------Camel Context:
>    <bean id="oracleQueueCredentials"
>
> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
>        <property name="targetConnectionFactory">
>            <ref bean="aqConnectionFactoryQueue"/>
>        </property>
>        <property name="username">
>            <value>theUserNamevalue>
>        </property>
>        <property name="password">
>            <value>thePassword</value>
>        </property>
>
>    </bean>
>            <bean id="aqConnectionFactoryQueue"
> class="oracle.jms.AQjmsFactory" factory-method="getQueueConnectionFactory">
>        <constructor-arg index="0">        
>            <value>theUrlInfo</value>            
>        </constructor-arg>
>
>        <constructor-arg index="1" type="java.util.Properties">
>            <value/>
>        </constructor-arg>
>    </bean>
>
>    <bean id="oracleQueue"
> class="org.apache.camel.component.jms.JmsComponent">
>        <property name="connectionFactory" ref="oracleQueueCredentials"/>
>    </bean>
> --
> View this message in context: http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28562653.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

Johan Edstrom

[hidden email]

They that can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety.

Benjamin Franklin, Historical Review of Pennsylvania, 1759





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ServiceMix 4.2, Camel, OracleAQ

Dave Stanley-3
In reply to this post by kkashi
Have you added the oracle.jms bundle to your container? Looks like it cannot
be resolved.

Regards
/Dave

On Fri, May 14, 2010 at 2:09 PM, kkashi <[hidden email]> wrote:

>
> Hello,
>
> I'm trying to setup a Camel routes to work within SMX 4.2 using Camel 2.2
> and having difficulty. I'm able to make it work as stand-alone, but once
> deployed into SMX, I get issues. As simple test, just routing messages from
> folder into OracleAQ.
>
> PLEASE HELP.
>
> All input is appreciated.
>
> Regards,
> Hossein
>
> -----------Error message:
> The bundle could not be resolved. Reason: Missing Constraint:
> Import-Package: oracle.jms; version="0.0.0"
>
> -----------Camel Context:
>    <bean id="oracleQueueCredentials"
>
>
> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
>        <property name="targetConnectionFactory">
>            <ref bean="aqConnectionFactoryQueue"/>
>        </property>
>        <property name="username">
>            <value>theUserNamevalue>
>        </property>
>        <property name="password">
>            <value>thePassword</value>
>        </property>
>
>    </bean>
>            <bean id="aqConnectionFactoryQueue"
> class="oracle.jms.AQjmsFactory" factory-method="getQueueConnectionFactory">
>        <constructor-arg index="0">
>            <value>theUrlInfo</value>
>        </constructor-arg>
>
>        <constructor-arg index="1" type="java.util.Properties">
>            <value/>
>        </constructor-arg>
>    </bean>
>
>    <bean id="oracleQueue"
> class="org.apache.camel.component.jms.JmsComponent">
>        <property name="connectionFactory" ref="oracleQueueCredentials"/>
>    </bean>
> --
> View this message in context:
> http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28562653.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ServiceMix 4.2, Camel, OracleAQ

kkashi
Thanks for quick reply.

Okay. I'm new to OSGi.
Is that simply installing the aqapi.jar from container (install -s file:/path/to/file/aqaqpi.jar)? If so, I have already done that and still same issue.

I also tried updating the pom.xml to include the aqapi.jar in the bundle, that didn't work either.

Regards,
Hossein


Dave Stanley-3 wrote
Have you added the oracle.jms bundle to your container? Looks like it cannot
be resolved.

Regards
/Dave

On Fri, May 14, 2010 at 2:09 PM, kkashi <kkashi01@gmail.com> wrote:

>
> Hello,
>
> I'm trying to setup a Camel routes to work within SMX 4.2 using Camel 2.2
> and having difficulty. I'm able to make it work as stand-alone, but once
> deployed into SMX, I get issues. As simple test, just routing messages from
> folder into OracleAQ.
>
> PLEASE HELP.
>
> All input is appreciated.
>
> Regards,
> Hossein
>
> -----------Error message:
> The bundle could not be resolved. Reason: Missing Constraint:
> Import-Package: oracle.jms; version="0.0.0"
>
> -----------Camel Context:
>    <bean id="oracleQueueCredentials"
>
>
> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
>        <property name="targetConnectionFactory">
>            <ref bean="aqConnectionFactoryQueue"/>
>        </property>
>        <property name="username">
>            <value>theUserNamevalue>
>        </property>
>        <property name="password">
>            <value>thePassword</value>
>        </property>
>
>    </bean>
>            <bean id="aqConnectionFactoryQueue"
> class="oracle.jms.AQjmsFactory" factory-method="getQueueConnectionFactory">
>        <constructor-arg index="0">
>            <value>theUrlInfo</value>
>        </constructor-arg>
>
>        <constructor-arg index="1" type="java.util.Properties">
>            <value/>
>        </constructor-arg>
>    </bean>
>
>    <bean id="oracleQueue"
> class="org.apache.camel.component.jms.JmsComponent">
>        <property name="connectionFactory" ref="oracleQueueCredentials"/>
>    </bean>
> --
> View this message in context:
> http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28562653.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ServiceMix 4.2, Camel, OracleAQ

Claus Ibsen-2
On Fri, May 14, 2010 at 8:58 PM, kkashi <[hidden email]> wrote:

>
> Thanks for quick reply.
>
> Okay. I'm new to OSGi.
> Is that simply installing the aqapi.jar from container (install -s
> file:/path/to/file/aqaqpi.jar)? If so, I have already done that and still
> same issue.
>
> I also tried updating the pom.xml to include the aqapi.jar in the bundle,
> that didn't work either.
>

You can read about OSGi deployment with the FUSE ESB 4.2
documentation, which is here
http://fusesource.com/products/enterprise-servicemix4/#documentation

And the OSGi deploy guideline
http://fusesource.com/docs/esb/4.2/deploy_osgi/index.html



> Regards,
> Hossein
>
>
>
> Dave Stanley-3 wrote:
>>
>> Have you added the oracle.jms bundle to your container? Looks like it
>> cannot
>> be resolved.
>>
>> Regards
>> /Dave
>>
>> On Fri, May 14, 2010 at 2:09 PM, kkashi <[hidden email]> wrote:
>>
>>>
>>> Hello,
>>>
>>> I'm trying to setup a Camel routes to work within SMX 4.2 using Camel 2.2
>>> and having difficulty. I'm able to make it work as stand-alone, but once
>>> deployed into SMX, I get issues. As simple test, just routing messages
>>> from
>>> folder into OracleAQ.
>>>
>>> PLEASE HELP.
>>>
>>> All input is appreciated.
>>>
>>> Regards,
>>> Hossein
>>>
>>> -----------Error message:
>>> The bundle could not be resolved. Reason: Missing Constraint:
>>> Import-Package: oracle.jms; version="0.0.0"
>>>
>>> -----------Camel Context:
>>>    <bean id="oracleQueueCredentials"
>>>
>>>
>>> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
>>>        <property name="targetConnectionFactory">
>>>            <ref bean="aqConnectionFactoryQueue"/>
>>>        </property>
>>>        <property name="username">
>>>            <value>theUserNamevalue>
>>>        </property>
>>>        <property name="password">
>>>            <value>thePassword</value>
>>>        </property>
>>>
>>>    </bean>
>>>            <bean id="aqConnectionFactoryQueue"
>>> class="oracle.jms.AQjmsFactory"
>>> factory-method="getQueueConnectionFactory">
>>>        <constructor-arg index="0">
>>>            <value>theUrlInfo</value>
>>>        </constructor-arg>
>>>
>>>        <constructor-arg index="1" type="java.util.Properties">
>>>            <value/>
>>>        </constructor-arg>
>>>    </bean>
>>>
>>>    <bean id="oracleQueue"
>>> class="org.apache.camel.component.jms.JmsComponent">
>>>        <property name="connectionFactory" ref="oracleQueueCredentials"/>
>>>    </bean>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28562653.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28563145.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ServiceMix 4.2, Camel, OracleAQ

Freeman-2
In reply to this post by kkashi
Hi,

Is aqaqpi.jar a OSGi bundle jar? If not,  you need make it as bundle  
jar first with bnd tool.
Or install it with wrap schema, some like
osigi:install -s wrap:file:/path/to/file/aqaqpi.jar

Freeman
On 2010-5-15, at 上午2:58, kkashi wrote:

>
> Thanks for quick reply.
>
> Okay. I'm new to OSGi.
> Is that simply installing the aqapi.jar from container (install -s
> file:/path/to/file/aqaqpi.jar)? If so, I have already done that and  
> still
> same issue.
>
> I also tried updating the pom.xml to include the aqapi.jar in the  
> bundle,
> that didn't work either.
>
> Regards,
> Hossein
>
>
>
> Dave Stanley-3 wrote:
>>
>> Have you added the oracle.jms bundle to your container? Looks like it
>> cannot
>> be resolved.
>>
>> Regards
>> /Dave
>>
>> On Fri, May 14, 2010 at 2:09 PM, kkashi <[hidden email]> wrote:
>>
>>>
>>> Hello,
>>>
>>> I'm trying to setup a Camel routes to work within SMX 4.2 using  
>>> Camel 2.2
>>> and having difficulty. I'm able to make it work as stand-alone,  
>>> but once
>>> deployed into SMX, I get issues. As simple test, just routing  
>>> messages
>>> from
>>> folder into OracleAQ.
>>>
>>> PLEASE HELP.
>>>
>>> All input is appreciated.
>>>
>>> Regards,
>>> Hossein
>>>
>>> -----------Error message:
>>> The bundle could not be resolved. Reason: Missing Constraint:
>>> Import-Package: oracle.jms; version="0.0.0"
>>>
>>> -----------Camel Context:
>>>   <bean id="oracleQueueCredentials"
>>>
>>>
>>> class
>>> =
>>> "org
>>> .springframework
>>> .jms.connection.UserCredentialsConnectionFactoryAdapter">
>>>       <property name="targetConnectionFactory">
>>>           <ref bean="aqConnectionFactoryQueue"/>
>>>       </property>
>>>       <property name="username">
>>>           <value>theUserNamevalue>
>>>       </property>
>>>       <property name="password">
>>>           <value>thePassword</value>
>>>       </property>
>>>
>>>   </bean>
>>>           <bean id="aqConnectionFactoryQueue"
>>> class="oracle.jms.AQjmsFactory"
>>> factory-method="getQueueConnectionFactory">
>>>       <constructor-arg index="0">
>>>           <value>theUrlInfo</value>
>>>       </constructor-arg>
>>>
>>>       <constructor-arg index="1" type="java.util.Properties">
>>>           <value/>
>>>       </constructor-arg>
>>>   </bean>
>>>
>>>   <bean id="oracleQueue"
>>> class="org.apache.camel.component.jms.JmsComponent">
>>>       <property name="connectionFactory"  
>>> ref="oracleQueueCredentials"/>
>>>   </bean>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28562653.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28563145.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ServiceMix 4.2, Camel, OracleAQ

kkashi
Ah! I have not tried the wrap. I just used the regular install and pointed to aqapi.jar file. After that, I did list and showed it as Activated. I'll try the wrap first thing on Monday morning.

Thanks


Freeman Fang wrote
Hi,

Is aqaqpi.jar a OSGi bundle jar? If not,  you need make it as bundle  
jar first with bnd tool.
Or install it with wrap schema, some like
osigi:install -s wrap:file:/path/to/file/aqaqpi.jar

Freeman
On 2010-5-15, at 上午2:58, kkashi wrote:

>
> Thanks for quick reply.
>
> Okay. I'm new to OSGi.
> Is that simply installing the aqapi.jar from container (install -s
> file:/path/to/file/aqaqpi.jar)? If so, I have already done that and  
> still
> same issue.
>
> I also tried updating the pom.xml to include the aqapi.jar in the  
> bundle,
> that didn't work either.
>
> Regards,
> Hossein
>
>
>
> Dave Stanley-3 wrote:
>>
>> Have you added the oracle.jms bundle to your container? Looks like it
>> cannot
>> be resolved.
>>
>> Regards
>> /Dave
>>
>> On Fri, May 14, 2010 at 2:09 PM, kkashi <kkashi01@gmail.com> wrote:
>>
>>>
>>> Hello,
>>>
>>> I'm trying to setup a Camel routes to work within SMX 4.2 using  
>>> Camel 2.2
>>> and having difficulty. I'm able to make it work as stand-alone,  
>>> but once
>>> deployed into SMX, I get issues. As simple test, just routing  
>>> messages
>>> from
>>> folder into OracleAQ.
>>>
>>> PLEASE HELP.
>>>
>>> All input is appreciated.
>>>
>>> Regards,
>>> Hossein
>>>
>>> -----------Error message:
>>> The bundle could not be resolved. Reason: Missing Constraint:
>>> Import-Package: oracle.jms; version="0.0.0"
>>>
>>> -----------Camel Context:
>>>   <bean id="oracleQueueCredentials"
>>>
>>>
>>> class
>>> =
>>> "org
>>> .springframework
>>> .jms.connection.UserCredentialsConnectionFactoryAdapter">
>>>       <property name="targetConnectionFactory">
>>>           <ref bean="aqConnectionFactoryQueue"/>
>>>       </property>
>>>       <property name="username">
>>>           <value>theUserNamevalue>
>>>       </property>
>>>       <property name="password">
>>>           <value>thePassword</value>
>>>       </property>
>>>
>>>   </bean>
>>>           <bean id="aqConnectionFactoryQueue"
>>> class="oracle.jms.AQjmsFactory"
>>> factory-method="getQueueConnectionFactory">
>>>       <constructor-arg index="0">
>>>           <value>theUrlInfo</value>
>>>       </constructor-arg>
>>>
>>>       <constructor-arg index="1" type="java.util.Properties">
>>>           <value/>
>>>       </constructor-arg>
>>>   </bean>
>>>
>>>   <bean id="oracleQueue"
>>> class="org.apache.camel.component.jms.JmsComponent">
>>>       <property name="connectionFactory"  
>>> ref="oracleQueueCredentials"/>
>>>   </bean>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28562653.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28563145.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ServiceMix 4.2, Camel, OracleAQ

kkashi
Thanks Freeman. That solved the issue and is now working. Not sure why the regular install did not issue any errors and why the list showed it as Activate.

Thanks all for all the info.
-Hossein.


Freeman Fang wrote
Hi,

Is aqaqpi.jar a OSGi bundle jar? If not,  you need make it as bundle  
jar first with bnd tool.
Or install it with wrap schema, some like
osigi:install -s wrap:file:/path/to/file/aqaqpi.jar

Freeman
On 2010-5-15, at 上午2:58, kkashi wrote:

>
> Thanks for quick reply.
>
> Okay. I'm new to OSGi.
> Is that simply installing the aqapi.jar from container (install -s
> file:/path/to/file/aqaqpi.jar)? If so, I have already done that and  
> still
> same issue.
>
> I also tried updating the pom.xml to include the aqapi.jar in the  
> bundle,
> that didn't work either.
>
> Regards,
> Hossein
>
>
>
> Dave Stanley-3 wrote:
>>
>> Have you added the oracle.jms bundle to your container? Looks like it
>> cannot
>> be resolved.
>>
>> Regards
>> /Dave
>>
>> On Fri, May 14, 2010 at 2:09 PM, kkashi <kkashi01@gmail.com> wrote:
>>
>>>
>>> Hello,
>>>
>>> I'm trying to setup a Camel routes to work within SMX 4.2 using  
>>> Camel 2.2
>>> and having difficulty. I'm able to make it work as stand-alone,  
>>> but once
>>> deployed into SMX, I get issues. As simple test, just routing  
>>> messages
>>> from
>>> folder into OracleAQ.
>>>
>>> PLEASE HELP.
>>>
>>> All input is appreciated.
>>>
>>> Regards,
>>> Hossein
>>>
>>> -----------Error message:
>>> The bundle could not be resolved. Reason: Missing Constraint:
>>> Import-Package: oracle.jms; version="0.0.0"
>>>
>>> -----------Camel Context:
>>>   <bean id="oracleQueueCredentials"
>>>
>>>
>>> class
>>> =
>>> "org
>>> .springframework
>>> .jms.connection.UserCredentialsConnectionFactoryAdapter">
>>>       <property name="targetConnectionFactory">
>>>           <ref bean="aqConnectionFactoryQueue"/>
>>>       </property>
>>>       <property name="username">
>>>           <value>theUserNamevalue>
>>>       </property>
>>>       <property name="password">
>>>           <value>thePassword</value>
>>>       </property>
>>>
>>>   </bean>
>>>           <bean id="aqConnectionFactoryQueue"
>>> class="oracle.jms.AQjmsFactory"
>>> factory-method="getQueueConnectionFactory">
>>>       <constructor-arg index="0">
>>>           <value>theUrlInfo</value>
>>>       </constructor-arg>
>>>
>>>       <constructor-arg index="1" type="java.util.Properties">
>>>           <value/>
>>>       </constructor-arg>
>>>   </bean>
>>>
>>>   <bean id="oracleQueue"
>>> class="org.apache.camel.component.jms.JmsComponent">
>>>       <property name="connectionFactory"  
>>> ref="oracleQueueCredentials"/>
>>>   </bean>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28562653.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/ServiceMix-4.2%2C-Camel%2C-OracleAQ-tp28562653p28563145.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ServiceMix 4.2, Camel, OracleAQ

Ravi
This post was updated on .
I am having issues with making the integration work. Can you please post the detailed steps and if possible a sample blueprint xml file for making the Oracle AQ and Service Mix integration work through JMS bridge.
That would be of great help. The following is the blueprint that I am using.

Regards,
Ravi

<?xml version="1.0" encoding="UTF-8" ?>
<blueprint
    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<beans>
   
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

    <broker useJmx="true" persistent="false" xmlns="http://activemq.org/config/1.0"
            brokerName="localhost" dataDirectory="${activemq.base}/data" >
    </broker>

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

       
        <route>
            <from uri="oracleQueue:queue:ORACLE_QUEUE"/>
            <to   uri="activemq:queue:queue.inboundOracleAQqueue"/>
        </route>
        <route>
           
            <from uri="oracleTopic:topic:ORACLE_TOPIC"/>
            <to   uri="activemq:queue:queue.inboundOracleAQtopic" />
        </route>

       
        <route>
            <from uri="activemq:queue:queue.inboundOracleAQqueue" />
           
        <to uri="file:\tmp1\oracleaq.txt"/>

        </route>
        <route>
            <from uri="activemq:queue:queue.inboundOracleAQtopic" />
            <to uri="log:oracleAQ.inbound.got_a_topic_message?level=ERROR"/>
        </route>
    </camelContext>

   
    <bean id="requiredBeanForOracleAq" class="org.apache.activemq.ActiveMQConnectionFactory" />

    <bean id="connectionFactoryOracleAQQueue" class="oracle.jms.AQjmsFactory" factory-method="getQueueConnectionFactory">
        <constructor-arg index="0">
            <value>jdbc:oracle:thin:@host:port:sid</value>
        </constructor-arg>
        <constructor-arg index="1" type="java.util.Properties">
            <value></value>
        </constructor-arg>
    </bean>

    <bean id="connectionFactoryOracleAQTopic" class="oracle.jms.AQjmsFactory"
                factory-method="getQueueConnectionFactory">
        <constructor-arg index="0">
            <value>jdbc:oracle:thin:@host:port:sid</value>
        </constructor-arg>
        <constructor-arg index="1" type="java.util.Properties">
            <value></value>
        </constructor-arg>
    </bean>

    <bean id="oracleQueueCredentials" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
        <property name="targetConnectionFactory">
            <ref bean="connectionFactoryOracleAQQueue"/>
        </property>
        <property name="username">
            <value>xxx</value>
        </property>
        <property name="password">
            <value>yyy</value>
        </property>
    </bean>

    <bean id="oracleTopicCredentials" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
        <property name="targetConnectionFactory">
            <ref bean="connectionFactoryOracleAQTopic"/>
        </property>
         <property name="username">
            <value>xxx</value>
        </property>
        <property name="password">
            <value>yyy</value>
        </property>
    </bean>

   <bean id="oracleQueue" class="org.apache.camel.component.jms.JmsComponent">
        <property name="connectionFactory">
                <ref bean="oracleQueueCredentials"/>
                </property>
   </bean>

   <bean id="oracleTopic" class="org.apache.camel.component.jms.JmsComponent">
        <property name="connectionFactory">
  <ref bean="oracleTopicCredentials"/>
                </property>
   </bean>
</beans>
</blueprint>

Loading...