You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Ravi <rc...@rgis.com> on 2012/12/12 22:50:04 UTC

Integrating ServiceMIx 4.4.2 with Oracle AQ

Hi,
I am new to ServiceMix and trying to integrate Oracle AQ with ServiceMix.
Can someone please advise which one of the features required to be installed
from Karaf command prompt and point me to the  necessary documentation/steps
to be used. I am trying to create a blueprint and copy to the deploy
directory of ServiceMix.

Regards,
Ravi



--
View this message in context: http://servicemix.396122.n5.nabble.com/Integrating-ServiceMIx-4-4-2-with-Oracle-AQ-tp5715247.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Integrating ServiceMIx 4.4.2 with Oracle AQ

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Thanks for sharing your solution!

Freeman
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

On 2013-1-1, at 上午3:42, Ravi wrote:

> For the benefit of the forum, I am able to get AQ integration working and a
> sample blue print file is below:
> <?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:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
> xmlns:amq="http://activemq.org/config/1.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">
>  <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
> /> 
>  <bean id="requiredBeanForOracleAq"
> class="org.apache.activemq.ActiveMQConnectionFactory" /> 
> - <bean id="connectionFactoryOracleAQQueue" class="oracle.jms.AQjmsFactory"
> factory-method="getQueueConnectionFactory">
>  <argument index="0" value="jdbc:oracle:thin:@IP:PORT:SID" /> 
>  <argument index="1" value="" /> 
>  </bean>
> - <bean id="oracleQueueCredentials"
> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
>  <property name="targetConnectionFactory"
> ref="connectionFactoryOracleAQQueue" /> 
> - <property name="username">
>  <value>abc</value> 
>  </property>
> - <property name="password">
>  <value>xyz</value> 
>  </property>
>  </bean>
> - <bean id="oracleQueue"
> class="org.apache.camel.component.jms.JmsComponent">
>  <property name="connectionFactory" ref="oracleQueueCredentials" /> 
>  </bean>
> - <broker useJmx="true" persistent="false"
> xmlns="http://activemq.apache.org/schema/core" brokerName="localhost"
> dataDirectory="C:\ServiceMix\apache-servicemix-full-4.4.2\apache-servicemix-4.4.2\data">
> - <transportConnectors>
>  <transportConnector name="openwire" uri="tcp://localhost:61001" /> 
>  </transportConnectors>
>  </broker>
> - <camelContext id="camel" xmlns="http://camel.apache.org/schema/blueprint">
> - <route>
>  <from uri="file:\\group\interfaces$\invops\tlms_in\basexml\tmp" /> 
>  <convertBodyTo type="java.lang.String" charset="UTF-8" /> 
>  <to uri="activemq:queue:queue.inboundOracleAQqueue" /> 
>  </route>
> - <route>
>  <from uri="activemq:queue:queue.inboundOracleAQqueue" /> 
>  <to uri="oracleQueue:queue:ORACLE_QUEUE" /> 
>  </route>
>  </camelContext>
>  </blueprint>
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Integrating-ServiceMIx-4-4-2-with-Oracle-AQ-tp5715247p5715357.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Integrating ServiceMIx 4.4.2 with Oracle AQ

Posted by Ravi <rc...@rgis.com>.
For the benefit of the forum, I am able to get AQ integration working and a
sample blue print file is below:
<?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:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
xmlns:amq="http://activemq.org/config/1.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">
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
/> 
  <bean id="requiredBeanForOracleAq"
class="org.apache.activemq.ActiveMQConnectionFactory" /> 
- <bean id="connectionFactoryOracleAQQueue" class="oracle.jms.AQjmsFactory"
factory-method="getQueueConnectionFactory">
  <argument index="0" value="jdbc:oracle:thin:@IP:PORT:SID" /> 
  <argument index="1" value="" /> 
  </bean>
- <bean id="oracleQueueCredentials"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
  <property name="targetConnectionFactory"
ref="connectionFactoryOracleAQQueue" /> 
- <property name="username">
  <value>abc</value> 
  </property>
- <property name="password">
  <value>xyz</value> 
  </property>
  </bean>
- <bean id="oracleQueue"
class="org.apache.camel.component.jms.JmsComponent">
  <property name="connectionFactory" ref="oracleQueueCredentials" /> 
  </bean>
- <broker useJmx="true" persistent="false"
xmlns="http://activemq.apache.org/schema/core" brokerName="localhost"
dataDirectory="C:\ServiceMix\apache-servicemix-full-4.4.2\apache-servicemix-4.4.2\data">
- <transportConnectors>
  <transportConnector name="openwire" uri="tcp://localhost:61001" /> 
  </transportConnectors>
  </broker>
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/blueprint">
- <route>
  <from uri="file:\\group\interfaces$\invops\tlms_in\basexml\tmp" /> 
  <convertBodyTo type="java.lang.String" charset="UTF-8" /> 
  <to uri="activemq:queue:queue.inboundOracleAQqueue" /> 
  </route>
- <route>
  <from uri="activemq:queue:queue.inboundOracleAQqueue" /> 
  <to uri="oracleQueue:queue:ORACLE_QUEUE" /> 
  </route>
  </camelContext>
  </blueprint>



--
View this message in context: http://servicemix.396122.n5.nabble.com/Integrating-ServiceMIx-4-4-2-with-Oracle-AQ-tp5715247p5715357.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Integrating ServiceMIx 4.4.2 with Oracle AQ

Posted by Christian Müller <ch...@gmail.com>.
Hello Ravi!

I assume you use Apache Camel as your integration framework? The link [1]
points to a sample project which use Oracle AQ. Here you can check which
dependencies you need. Note, the Oracle dependencies are not available in
Maven central. So you have to install it into your own Maven repo. Because
the Oracle artifacts are not OSGI ready  (simple jar files instead OSGI
bundles), you have to use the wrap protocol to install it into
Karaf/ServiceMix [2]. Or create your own OSGI bundle from these artifacts,
but this is more complex to explain it here...
[3] also shows how the Oracle AQ configuration looks like.

[1] https://github.com/dasniko/public/tree/master/de.nk.camel
[2] http://karaf.apache.org/manual/2.2.9/users-guide/deployer.html
[3] http://activemq.apache.org/jms-bridge-with-oracle-aq.html

Hope this will help...

Best,
Christian

On Wed, Dec 12, 2012 at 10:50 PM, Ravi <rc...@rgis.com> wrote:

> Hi,
> I am new to ServiceMix and trying to integrate Oracle AQ with ServiceMix.
> Can someone please advise which one of the features required to be
> installed
> from Karaf command prompt and point me to the  necessary
> documentation/steps
> to be used. I am trying to create a blueprint and copy to the deploy
> directory of ServiceMix.
>
> Regards,
> Ravi
>
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Integrating-ServiceMIx-4-4-2-with-Oracle-AQ-tp5715247.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



--