You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by lyall <Ly...@The-Pearces.com> on 2009/03/11 06:23:05 UTC

Oracle BPEL <-> ActiveMQ - Howto?

I am trying to setup a JMS adapter in JDeveloper 10.1.3.1.0 to talk to
ActiveMQ.

Has anyone done this, what do I need to do to get it to work?

In particular
* Factory Properties - I tried 
** java.naming.provider.url = tcp://activeMQServerIP:61616
** java.naming.security.principal = system (from the credentials.properties)
** java.naming.security.credentials = manager  (from the
credentials.properties)
* JMS Connection Factory - I tried
** org.apache.activemq.ActiveMQConnectionFactory
* JMS Connection JNDI Name - I tried
** eis/Jms/JmsAdapter

And, do I have to include any JAR's into the BPEL Project? If so, which
ones? How? As Libraries or something else? I tried including
Activemq-ra-5.2.0.jar and spring-core-2.5.5.jar, to no avail.

When I try it, BPEL whinges

file:/E:/SOASuite10131/bpel/domains/default/tmp/.bpel_Message_to_ActiveMQ_1.0_375eb1288a4cf9e62466ce5132d9f94b.tmp/ActiveMQ_Test.wsdl
[ Produce_Message_ptt::Produce_Message(opaque) ] - WSIF JCA Execute of
operation 'Produce_Message' failed due to: Adapter Framework unable to
create outbound JCA connection.
file:/E:/SOASuite10131/bpel/domains/default/tmp/.bpel_Message_to_ActiveMQ_1.0_375eb1288a4cf9e62466ce5132d9f94b.tmp/ActiveMQ_Test.wsdl
[ Produce_Message_ptt::Produce_Message(opaque) ] - : The Adapter Framework
was unable to establish an outbound JCA connection due to the following
issue: ORABPEL-12141
ERRJMS_CONN_FAC_NOT_FOUND.
Unable to instantiate connection factory. JMS adapter was unable to look up
the connection factor org.apache.activemq.ActiveMQConnectionFactory neither
through JNDI nor instantiate it as a Java class
Please examine the log file to determine the problem.
 [Caused by: org.apache.activemq.ActiveMQConnectionFactory not found]
; nested exception is: 
	ORABPEL-12511
Adapter Framework unable to create outbound JCA connection.
file:/E:/SOASuite10131/bpel/domains/default/tmp/.bpel_Message_to_ActiveMQ_1.0_375eb1288a4cf9e62466ce5132d9f94b.tmp/ActiveMQ_Test.wsdl
[ Produce_Message_ptt::Produce_Message(opaque) ] - : The Adapter Framework
was unable to establish an outbound JCA connection due to the following
issue: ORABPEL-12141
ERRJMS_CONN_FAC_NOT_FOUND.
Unable to instantiate connection factory. JMS adapter was unable to look up
the connection factor org.apache.activemq.ActiveMQConnectionFactory neither
through JNDI nor instantiate it as a Java class
Please examine the log file to determine the problem.
 [Caused by: org.apache.activemq.ActiveMQConnectionFactory not found]
Please examine the log file for any reasons. Enable DEBUG logging in the
BPEL Console.


I hope someone can help.

...Lyall

-- 
View this message in context: http://www.nabble.com/Oracle-BPEL-%3C-%3E-ActiveMQ---Howto--tp22449017p22449017.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Oracle BPEL <-> ActiveMQ - Howto?

Posted by Andreas Gies <ag...@progress.com>.
Hi,

not knowing Oracle, but that looks like you did not make ActiveMQ  
available as a JCA resource and therefore
Oracle can't find the classes.

Google being our friend I have found this link:
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-use-activemq-JCA-RA/doc/how-to-use-activemq-JCA-RA.html

It looks like a how-to for setting up Active MQ as a JCA resource in  
Oracle environments.

Hope that helps
Andreas

On Mar 11, 2009, at 6:23 AM, lyall wrote:

>
> I am trying to setup a JMS adapter in JDeveloper 10.1.3.1.0 to talk to
> ActiveMQ.
>
> Has anyone done this, what do I need to do to get it to work?
>
> In particular
> * Factory Properties - I tried
> ** java.naming.provider.url = tcp://activeMQServerIP:61616
> ** java.naming.security.principal = system (from the  
> credentials.properties)
> ** java.naming.security.credentials = manager  (from the
> credentials.properties)
> * JMS Connection Factory - I tried
> ** org.apache.activemq.ActiveMQConnectionFactory
> * JMS Connection JNDI Name - I tried
> ** eis/Jms/JmsAdapter
>
> And, do I have to include any JAR's into the BPEL Project? If so,  
> which
> ones? How? As Libraries or something else? I tried including
> Activemq-ra-5.2.0.jar and spring-core-2.5.5.jar, to no avail.
>
> When I try it, BPEL whinges
>
> file:/E:/SOASuite10131/bpel/domains/default/ 
> tmp 
> /.bpel_Message_to_ActiveMQ_1.0_375eb1288a4cf9e62466ce5132d9f94b.tmp/ 
> ActiveMQ_Test.wsdl
> [ Produce_Message_ptt::Produce_Message(opaque) ] - WSIF JCA Execute of
> operation 'Produce_Message' failed due to: Adapter Framework unable to
> create outbound JCA connection.
> file:/E:/SOASuite10131/bpel/domains/default/ 
> tmp 
> /.bpel_Message_to_ActiveMQ_1.0_375eb1288a4cf9e62466ce5132d9f94b.tmp/ 
> ActiveMQ_Test.wsdl
> [ Produce_Message_ptt::Produce_Message(opaque) ] - : The Adapter  
> Framework
> was unable to establish an outbound JCA connection due to the  
> following
> issue: ORABPEL-12141
> ERRJMS_CONN_FAC_NOT_FOUND.
> Unable to instantiate connection factory. JMS adapter was unable to  
> look up
> the connection factor org.apache.activemq.ActiveMQConnectionFactory  
> neither
> through JNDI nor instantiate it as a Java class
> Please examine the log file to determine the problem.
> [Caused by: org.apache.activemq.ActiveMQConnectionFactory not found]
> ; nested exception is:
> 	ORABPEL-12511
> Adapter Framework unable to create outbound JCA connection.
> file:/E:/SOASuite10131/bpel/domains/default/ 
> tmp 
> /.bpel_Message_to_ActiveMQ_1.0_375eb1288a4cf9e62466ce5132d9f94b.tmp/ 
> ActiveMQ_Test.wsdl
> [ Produce_Message_ptt::Produce_Message(opaque) ] - : The Adapter  
> Framework
> was unable to establish an outbound JCA connection due to the  
> following
> issue: ORABPEL-12141
> ERRJMS_CONN_FAC_NOT_FOUND.
> Unable to instantiate connection factory. JMS adapter was unable to  
> look up
> the connection factor org.apache.activemq.ActiveMQConnectionFactory  
> neither
> through JNDI nor instantiate it as a Java class
> Please examine the log file to determine the problem.
> [Caused by: org.apache.activemq.ActiveMQConnectionFactory not found]
> Please examine the log file for any reasons. Enable DEBUG logging in  
> the
> BPEL Console.
>
>
> I hope someone can help.
>
> ...Lyall
>
> -- 
> View this message in context: http://www.nabble.com/Oracle-BPEL-%3C-%3E-ActiveMQ---Howto--tp22449017p22449017.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

---
Mit freundlichen Grüssen - Kind Regards
Andreas Gies
Principal Consultant
Open Source Center of Competence

Progress Software GmbH
Agrippinawerft 26
50678 Köln

E-Mail      	agies@progress.com
Direct Line 	+49 (0)9953 980349
Mobile      	+49 (0)170 5759611
Skype        	+44 (0)20 3239 2922
Skype       	+353 (0)1 443 4971
Skype       	+1 (0)781 262 0168

http://www.progress.com
http://fusesource.com
http://open-source-adventures.blogspot.com



-------------------------------------------------------
Progress Software GmbH
Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
Amtsgericht Koeln, HRB 15620; 
Geschaeftsfuehrung: David Ireland
-------------------------------------------------------

Re: Oracle BPEL <-> ActiveMQ - Howto?

Posted by lyall <Ly...@The-Pearces.com>.
Just for completeness, here is a complete copy of my instructions in my
MediaWiki page, which works.

== Introduction ==
In order to have Apache ActiveMQ as a valid JMS target, in BPEL, the
following steps need to be done.

These steps also apply to any J2EE container that wishes to use ActiveMQ.

=== Active MQ JMS Resource Archive ===
Take the Resource Adapter archive from an ActiveMQ installation
<tt>lib\optional\activemq-rar-5.2.0.rar</tt>

This is the activeMQ resource adapter archive - for client as well as
embedded server.
Personally, I don't think we need to include all this if we just want a
client, only if we want an embedded server.
Still, instructions are instructions...

Create a directory on the Applications disk (as opposed to data) called
<tt>activemq-rar-5.2.0\</tt> which contains the extracted content of the
<tt>activemq-rar-5.2.0.rar</tt> archive (and contrary to file suffix, it is
a jar archive, you don't need winrar to unpack it).

=== SOA Changes ===
==== Server.xml ====
For the purposes of this page, mileage may vary for you.

<tt>SOA_HOME=D:\oracle\product\10.1.3.1\OracleAS_2</tt>

Placed the following XML segment ('''Make sure you have the ''correct''
pathname! e:\ may not be valid for you!''')

{{File|${SOA_HOME}\j2ee\'''instanceName'''\config\server.xml|<pre>
 <shared-library name="apache.jmsprovider.mq" version="5.2.0">
    <code-source path="e:\activemq-rar-5.2.0\activation-1.1.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\activeio-core-3.1.0.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\activemq-core-5.2.0.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\activemq-ra-5.2.0.jar"/>
    <code-source
path="e:\activemq-rar-5.2.0\backport-util-concurrent-2.1.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\camel-core-1.5.0.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\derby-10.1.3.1.jar"/>
    <code-source
path="e:\activemq-rar-5.2.0\geronimo-j2ee-management_1.0_spec-1.0.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\jaxb-api-2.0.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\jaxb-impl-2.0.3.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\jsr173_api-1.0.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\log4j-1.2.14.jar"/>
    <code-source path="e:\activemq-rar-5.2.0\xbean-spring-3.4.jar"/>
    <import-shared-library name="apache.commons.logging"/>
 </shared-library>
</pre>}}

into <tt>${SOA_HOME}\j2ee\'''instanceName'''\config\server.xml</tt> where
'''instanceName''' is the instance name in which BPEL is running, by
default, '''oc4j_soa'''.

==== application.xml ====
I then edited
<tt>${SOA_HOME}\j2ee\'''oc4j_soa'''\config\application.xml</tt>

changing 

{{File|'''Before'''
${SOA_HOME}\j2ee\'''oc4j_soa'''\config\application.xml|<pre>
 <orion-application>
    ...[snip]...
   <imported-shared-libraries>
      <import-shared-library name="adf.oracle.domain"/>
   </imported-shared-libraries>
</pre>}}
to

{{File|'''After'''
${SOA_HOME}\j2ee\'''oc4j_soa'''\config\application.xml|<pre>
 <orion-application>
    ...[snip]...
   <imported-shared-libraries>
      <import-shared-library name="adf.oracle.domain"/>
      <import-shared-library name="apache.jmsprovider.mq"/>
   </imported-shared-libraries>
</pre>}}

==== oc4j-ra.xml ====

This file can be manually edited, but probably the best way is to use the
OC4J Administration console (http://soabox/em) to configure the JMS
connection Factories in the 'default' OC4J instance. This file is rewritten
by OC4J so editing it whilst the instance is running is probably a waste of
time.

Refer to [http://activemq.apache.org/configuring-version-5-transports.html
ActiveMQ Transports] for configuration options for the Factory settings,
such as <tt>keepAlive=true</tt>.


If it already exists, simply add the connector-factory element to the
already existing list.

The file
<tt>${SOA_HOME}\j2ee\oc4j_soa\application-deployments\default\JmsAdapter/oc4j-ra.xml</tt>.

I obtained the username/passwords from an activeMQ instance
<tt>c:\apache-activemq-5.2.0conf\credentials.properties</tt> file, on the
[[VM ActiveMQ]]

It should be noted, that according to
[http://activemq.apache.org/resource-adapter-properties.html the ActiveMQ
Resource Adapter Documenation], the BrokerURL property is optional, but I
have coded it to point to our running ActiveMQ broker, for the sake of a
quiet life (which I never seem to have).

===== Primary oc4j-ra.xml =====

NOTE: The BrokerURL address must be changed to reflect the appropriate
broker for the SOA Instance. 
{{File|'''Primary'''
${SOA_HOME}\j2ee\oc4j_soa\application-deployments\default\JmsAdapter/oc4j-ra.xml|<pre>
 <?xml version="1.0"?>
 <oc4j-connector-factories
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="http://www.oracle.com/technology/oracleas/schema/oc4j-connector-factories-10_0.xsd" 
 schema-major-version="10" schema-minor-version="0" >
         <imported-shared-libraries>
                 <import-shared-library name="oracle.bpel.common"/>
                 <import-shared-library name="oracle.xml"/>
                 <import-shared-library name="apache.jmsprovider.mq"/>
         </imported-shared-libraries>
         <connector-factory location="eis/activemq/Queue/Primary"
                            connector-name="Jms Adapter">
                 <config-property name="connectionFactoryLocation" 
                                 
value="org.apache.activemq.ActiveMQConnectionFactory"/>
                 <config-property name="factoryProperties" 
                                 
value="BrokerURL=tcp://???.???.???.???:61616?keepAlive=true"/>
                 <config-property name="acknowledgeMode"
value="AUTO_ACKNOWLEDGE"/>
                 <config-property name="isTopic" value="false"/>
                 <config-property name="isTransacted" value="true"/>
                 <config-property name="username" value="system"/>
                 <config-property name="password" value="manager"/>
                 <connection-pooling use="none">
                 </connection-pooling>
                 <security-config use="none">
                 </security-config>
         </connector-factory>
         <connector-factory location="eis/activemq/Topic/Primary/ATopic"
                            connector-name="Jms Adapter">
                 <config-property name="connectionFactoryLocation" 
                                 
value="org.apache.activemq.ActiveMQConnectionFactory"/>
                 <config-property name="factoryProperties" 
                                 
value="BrokerURL=tcp://???.???.???.???:61616?keepAlive=true"/>
                 <config-property name="acknowledgeMode"
value="AUTO_ACKNOWLEDGE"/>
                 <config-property name="isTopic" value="true"/>
                 <config-property name="isTransacted" value="true"/>
                 <config-property name="username" value="system"/>
                 <config-property name="password" value="manager"/>
                 <connection-pooling use="none">
                 </connection-pooling>
                 <security-config use="none">
                 </security-config>
         </connector-factory>
 </oc4j-connector-factories>
</pre>}}

===== Secondary oc4j-ra.xml =====

'''Note the IP address is ???.???.???.??? as it varies depending on which
instance'''
{{File|'''Secondary'''
${SOA_HOME}\j2ee\oc4j_soa\application-deployments\default\JmsAdapter/oc4j-ra.xml|<pre>
 <?xml version="1.0"?>
 <oc4j-connector-factories
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="http://www.oracle.com/technology/oracleas/schema/oc4j-connector-factories-10_0.xsd" 
 schema-major-version="10" schema-minor-version="0" >
         <imported-shared-libraries>
                 <import-shared-library name="oracle.bpel.common"/>
                 <import-shared-library name="oracle.xml"/>
                 <import-shared-library name="apache.jmsprovider.mq"/>
         </imported-shared-libraries>
         <connector-factory location="eis/activemq/Queue/Secondary" 
                            connector-name="Jms Adapter">
                 <config-property name="connectionFactoryLocation" 
                                 
value="org.apache.activemq.ActiveMQConnectionFactory"/>
                 <config-property name="factoryProperties" 
                                 
value="BrokerURL=tcp://???.???.???.???:61616?keepAlive=true"/>
                 <config-property name="acknowledgeMode"
value="AUTO_ACKNOWLEDGE"/>
                 <config-property name="isTopic" value="false"/>
                 <config-property name="isTransacted" value="true"/>
                 <config-property name="username" value="system"/>
                 <config-property name="password" value="manager"/>
                 <connection-pooling use="none">
                 </connection-pooling>
                 <security-config use="none">
                 </security-config>
         </connector-factory>
         <connector-factory location="eis/activemq/Topic/Secondary/ATopic" 
                            connector-name="Jms Adapter">
                 <config-property name="connectionFactoryLocation" 
                                 
value="org.apache.activemq.ActiveMQConnectionFactory"/>
                 <config-property name="factoryProperties" 
                                 
value="BrokerURL=tcp://???.???.???.???:61616?keepAlive=true"/>
                 <config-property name="acknowledgeMode"
value="AUTO_ACKNOWLEDGE"/>
                 <config-property name="isTopic" value="false"/>
                 <config-property name="isTransacted" value="true"/>
                 <config-property name="username" value="system"/>
                 <config-property name="password" value="manager"/>
                 <connection-pooling use="none">
                 </connection-pooling>
                 <security-config use="none">
                 </security-config>
         </connector-factory>
 </oc4j-connector-factories>
</pre>}}

-- 
View this message in context: http://www.nabble.com/Oracle-BPEL-%3C-%3E-ActiveMQ---Howto--tp22449017p23662539.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Oracle BPEL <-> ActiveMQ - Howto?

Posted by lyall <Ly...@The-Pearces.com>.
>From my procedure above, remove broker-config.xml from the list of files to
include.

...Lyall


Andreas Gies-3 wrote:
> 
> Hi,
> 
> thanks for sharing this.
> 
> Andreas
> 
> On Mar 18, 2009, at 4:37 AM, lyall wrote:
> 
>>
>> Got it working.
>>
>> Procedure, as follows :-
>>
>> In order to have Apache ActiveMQ as a valid JMS target, the  
>> following steps
>> need to be done.
>>
>>
>> I have taken the Resource Adapter archive from an ActiveMQ  
>> installation
>> lib\optional\activemq-rar-5.2.0.rar
>>
>> This is the activeMQ resource adapter archive - for client as well as
>> embedded server. Personally, I don't think we need to include all  
>> this if we
>> just want a client, only if we want an embedded server. Still, it  
>> worked,
>> time to fine tune later.
>>
>> I Created a directory on the Oracle_SOA VM called e:\activemq- 
>> rar-5.2.0\
>> which contains the extracted content of the activemq-rar-5.2.0.rar  
>> archive
>> (and contrary to file suffix, it is a jar archive, you don't need  
>> winrar to
>> unpack it).
>>
>> Placed the following XML segment
>>
>> <shared-library name="apache.jmsprovider.mq" version="5.2.0">
>>   <code-source path="e:\activemq-rar-5.2.0\activation-1.1.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\activeio-core-3.1.0.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\activemq-core-5.2.0.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\activemq-ra-5.2.0.jar"/>
>>   <code-source
>> path="e:\activemq-rar-5.2.0\backport-util-concurrent-2.1.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\broker-config.xml"/>
>>   <code-source path="e:\activemq-rar-5.2.0\camel-core-1.5.0.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\derby-10.1.3.1.jar"/>
>>   <code-source
>> path="e:\activemq-rar-5.2.0\geronimo-j2ee- 
>> management_1.0_spec-1.0.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\jaxb-api-2.0.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\jaxb-impl-2.0.3.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\jsr173_api-1.0.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\log4j-1.2.14.jar"/>
>>   <code-source path="e:\activemq-rar-5.2.0\xbean-spring-3.4.jar"/>
>>   <import-shared-library name="apache.commons.logging"/>
>> </shared-library>
>>
>> into e:\SOASuite10131\j2ee\home\config\server.xml
>>
>> (there where about 7 server.xml files on the machine, this appeared  
>> to be
>> the appropriate one)
>>
>> I then edited E:\SOASuite10131\j2ee\home\config\application.xml
>>
>> changing
>>
>> <orion-application>
>>   ...
>>  <imported-shared-libraries>
>>     <import-shared-library name="adf.oracle.domain"/>
>>  </imported-shared-libraries>
>>
>> to
>>
>> <orion-application>
>>   ...
>>  <imported-shared-libraries>
>>     <import-shared-library name="adf.oracle.domain"/>
>>     <import-shared-library name="apache.jmsprovider.mq"/>
>>  </imported-shared-libraries>
>>
>> I then added
>>
>> <connector-factory location="eis/activemq/Queue" connector-name="Jms
>> Adapter">
>> <config-property name="connectionFactoryLocation"
>> value="org.apache.activemq.ActiveMQConnectionFactory"/>
>> <config-property name="factoryProperties"
>> value="BrokerURL=tcp://<xxx.xxx.xxx.xxx>:61616"/>
>> <config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
>> <config-property name="isTopic" value="false"/>
>> <config-property name="isTransacted" value="true"/>
>> <config-property name="username" value="system"/>
>> <config-property name="password" value="manager"/>
>> <connection-pooling use="none">
>> </connection-pooling>
>> <security-config use="none">
>> </security-config>
>> </connector-factory>
>>
>>
>> as the last entry in
>> E:\SOASuite10131\j2ee\home\application-deployments\default\JmsAdapter 
>> \oc4j-ra.xml.
>> I obtained the username/passwords from an activeMQ instance
>> c:\apache-activemq-5.2.0conf\credentials.properties file. Once  
>> again, not
>> sure if needed.
>>
>> It should be noted, that according to the ActiveMQ Resource Adapter
>> Documenation, the BrokerURL property is optional, but I have coded  
>> it to
>> point to our running ActiveMQ broker, for the sake of a quiet life  
>> (which I
>> never seem to have).
>>
>> Once the above steps had been done, it is possible to create a JMS  
>> Partner
>> link in JDeveloper, entirely using the GUI tools
>>
>> Procedure as follows :-
>>
>> Create a Synchronous BPEL application using the JDeveloper
>> Create a partner link for ActiveMQ of type JMS Adapter
>>
>> Wizard settings as follows :-
>> Page 1
>> * Third Party
>> Page 2
>> * Factory Properties - Set the following properties - ALL of these are
>> optional, really, so long as you set ONE of them or you won't be  
>> able to
>> proceed to the next page. Maybe username/password you will be ok (the
>> defaults are set in the Application Server, as per the instructions  
>> above -
>> still, I figure it's best to specify everything, thus, making the  
>> defaults
>> superfluous)
>> NOTE: A bug in the Adapter configuration wizard will not parse the
>> factoryProperties=BrokerURL=tcp://ip.add.res.ss:port part correctly,  
>> on
>> subsequent passes through the wizard. You will need to re-enter that
>> property.
>> *  
>> connectionFactoryLocation 
>> =org.apache.activemq.ActiveMQConnectionFactory
>> * factoryProperties=BrokerURL=tcp://<xxx.xxx.xxx.xxx>:61616
>> * isTopic=false
>> * isTransacted=true
>> * username=system   	(found in credentials.properties of ActiveMQ
>> installation - optional)
>> * password=manager	(found in credentials.properties of ActiveMQ  
>> installation
>> - optional)
>> * acknowledgeMode=AUTO_ACKNOWLEDGE
>> * JMS Connection Factory = ConnectionFactory
>> * Transacted = true
>> * Desintation Type = Queue
>> * User Name = blank
>> * Password = blank
>> * JMS Connection JNDI Name = eis/activemq/Queue (corresponds to  
>> install
>> instructions, above)
>>
>> Page 3
>> * Operation Type = Produce Message
>> * Operation Name = Produce_Message
>>
>> Page 4
>> * Destination Name = target ActiveMQ Queue - say Testing.Queue
>> * Message Body Type = TextMessage
>> * Delivery Mode = Persistent
>> * Priority = Default
>> * TimeToLive = 0
>>
>> Page 5
>> * Choose a WSDL that reflects the message type expected - in my test  
>> case, I
>> simply chose the incoming message WSDL
>>
>> Setup the Invoke step
>> * Populate the Input and Output variables appropriately, using an  
>> assign
>>
>> Deploy
>>
>> Test
>>
>> Check the queue in http://<xxx.xxx.xxx.xxx>:8161/admin/queues.jsp to  
>> see if
>> your message has arrived.
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Oracle-BPEL-%3C-%3E-ActiveMQ---Howto--tp22449017p22572359.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> ---
> Mit freundlichen Grüssen - Kind Regards
> Andreas Gies
> Principal Consultant
> Open Source Center of Competence
> 
> Progress Software GmbH
> Agrippinawerft 26
> 50678 Köln
> 
> E-Mail      	agies@progress.com
> Direct Line 	+49 (0)9953 980349
> Mobile      	+49 (0)170 5759611
> Skype        	+44 (0)20 3239 2922
> Skype       	+353 (0)1 443 4971
> Skype       	+1 (0)781 262 0168
> 
> http://www.progress.com
> http://fusesource.com
> http://open-source-adventures.blogspot.com
> 
> 
> 
> -------------------------------------------------------
> Progress Software GmbH
> Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
> Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
> Amtsgericht Koeln, HRB 15620;
> Geschaeftsfuehrung: David Ireland
> -------------------------------------------------------
> 
> 

-- 
View this message in context: http://www.nabble.com/Oracle-BPEL-%3C-%3E-ActiveMQ---Howto--tp22449017p22633085.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Oracle BPEL <-> ActiveMQ - Howto?

Posted by Andreas Gies <ag...@progress.com>.
Hi,

thanks for sharing this.

Andreas

On Mar 18, 2009, at 4:37 AM, lyall wrote:

>
> Got it working.
>
> Procedure, as follows :-
>
> In order to have Apache ActiveMQ as a valid JMS target, the  
> following steps
> need to be done.
>
>
> I have taken the Resource Adapter archive from an ActiveMQ  
> installation
> lib\optional\activemq-rar-5.2.0.rar
>
> This is the activeMQ resource adapter archive - for client as well as
> embedded server. Personally, I don't think we need to include all  
> this if we
> just want a client, only if we want an embedded server. Still, it  
> worked,
> time to fine tune later.
>
> I Created a directory on the Oracle_SOA VM called e:\activemq- 
> rar-5.2.0\
> which contains the extracted content of the activemq-rar-5.2.0.rar  
> archive
> (and contrary to file suffix, it is a jar archive, you don't need  
> winrar to
> unpack it).
>
> Placed the following XML segment
>
> <shared-library name="apache.jmsprovider.mq" version="5.2.0">
>   <code-source path="e:\activemq-rar-5.2.0\activation-1.1.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\activeio-core-3.1.0.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\activemq-core-5.2.0.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\activemq-ra-5.2.0.jar"/>
>   <code-source
> path="e:\activemq-rar-5.2.0\backport-util-concurrent-2.1.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\broker-config.xml"/>
>   <code-source path="e:\activemq-rar-5.2.0\camel-core-1.5.0.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\derby-10.1.3.1.jar"/>
>   <code-source
> path="e:\activemq-rar-5.2.0\geronimo-j2ee- 
> management_1.0_spec-1.0.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\jaxb-api-2.0.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\jaxb-impl-2.0.3.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\jsr173_api-1.0.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\log4j-1.2.14.jar"/>
>   <code-source path="e:\activemq-rar-5.2.0\xbean-spring-3.4.jar"/>
>   <import-shared-library name="apache.commons.logging"/>
> </shared-library>
>
> into e:\SOASuite10131\j2ee\home\config\server.xml
>
> (there where about 7 server.xml files on the machine, this appeared  
> to be
> the appropriate one)
>
> I then edited E:\SOASuite10131\j2ee\home\config\application.xml
>
> changing
>
> <orion-application>
>   ...
>  <imported-shared-libraries>
>     <import-shared-library name="adf.oracle.domain"/>
>  </imported-shared-libraries>
>
> to
>
> <orion-application>
>   ...
>  <imported-shared-libraries>
>     <import-shared-library name="adf.oracle.domain"/>
>     <import-shared-library name="apache.jmsprovider.mq"/>
>  </imported-shared-libraries>
>
> I then added
>
> <connector-factory location="eis/activemq/Queue" connector-name="Jms
> Adapter">
> <config-property name="connectionFactoryLocation"
> value="org.apache.activemq.ActiveMQConnectionFactory"/>
> <config-property name="factoryProperties"
> value="BrokerURL=tcp://<xxx.xxx.xxx.xxx>:61616"/>
> <config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
> <config-property name="isTopic" value="false"/>
> <config-property name="isTransacted" value="true"/>
> <config-property name="username" value="system"/>
> <config-property name="password" value="manager"/>
> <connection-pooling use="none">
> </connection-pooling>
> <security-config use="none">
> </security-config>
> </connector-factory>
>
>
> as the last entry in
> E:\SOASuite10131\j2ee\home\application-deployments\default\JmsAdapter 
> \oc4j-ra.xml.
> I obtained the username/passwords from an activeMQ instance
> c:\apache-activemq-5.2.0conf\credentials.properties file. Once  
> again, not
> sure if needed.
>
> It should be noted, that according to the ActiveMQ Resource Adapter
> Documenation, the BrokerURL property is optional, but I have coded  
> it to
> point to our running ActiveMQ broker, for the sake of a quiet life  
> (which I
> never seem to have).
>
> Once the above steps had been done, it is possible to create a JMS  
> Partner
> link in JDeveloper, entirely using the GUI tools
>
> Procedure as follows :-
>
> Create a Synchronous BPEL application using the JDeveloper
> Create a partner link for ActiveMQ of type JMS Adapter
>
> Wizard settings as follows :-
> Page 1
> * Third Party
> Page 2
> * Factory Properties - Set the following properties - ALL of these are
> optional, really, so long as you set ONE of them or you won't be  
> able to
> proceed to the next page. Maybe username/password you will be ok (the
> defaults are set in the Application Server, as per the instructions  
> above -
> still, I figure it's best to specify everything, thus, making the  
> defaults
> superfluous)
> NOTE: A bug in the Adapter configuration wizard will not parse the
> factoryProperties=BrokerURL=tcp://ip.add.res.ss:port part correctly,  
> on
> subsequent passes through the wizard. You will need to re-enter that
> property.
> *  
> connectionFactoryLocation 
> =org.apache.activemq.ActiveMQConnectionFactory
> * factoryProperties=BrokerURL=tcp://<xxx.xxx.xxx.xxx>:61616
> * isTopic=false
> * isTransacted=true
> * username=system   	(found in credentials.properties of ActiveMQ
> installation - optional)
> * password=manager	(found in credentials.properties of ActiveMQ  
> installation
> - optional)
> * acknowledgeMode=AUTO_ACKNOWLEDGE
> * JMS Connection Factory = ConnectionFactory
> * Transacted = true
> * Desintation Type = Queue
> * User Name = blank
> * Password = blank
> * JMS Connection JNDI Name = eis/activemq/Queue (corresponds to  
> install
> instructions, above)
>
> Page 3
> * Operation Type = Produce Message
> * Operation Name = Produce_Message
>
> Page 4
> * Destination Name = target ActiveMQ Queue - say Testing.Queue
> * Message Body Type = TextMessage
> * Delivery Mode = Persistent
> * Priority = Default
> * TimeToLive = 0
>
> Page 5
> * Choose a WSDL that reflects the message type expected - in my test  
> case, I
> simply chose the incoming message WSDL
>
> Setup the Invoke step
> * Populate the Input and Output variables appropriately, using an  
> assign
>
> Deploy
>
> Test
>
> Check the queue in http://<xxx.xxx.xxx.xxx>:8161/admin/queues.jsp to  
> see if
> your message has arrived.
>
>
> -- 
> View this message in context: http://www.nabble.com/Oracle-BPEL-%3C-%3E-ActiveMQ---Howto--tp22449017p22572359.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

---
Mit freundlichen Grüssen - Kind Regards
Andreas Gies
Principal Consultant
Open Source Center of Competence

Progress Software GmbH
Agrippinawerft 26
50678 Köln

E-Mail      	agies@progress.com
Direct Line 	+49 (0)9953 980349
Mobile      	+49 (0)170 5759611
Skype        	+44 (0)20 3239 2922
Skype       	+353 (0)1 443 4971
Skype       	+1 (0)781 262 0168

http://www.progress.com
http://fusesource.com
http://open-source-adventures.blogspot.com



-------------------------------------------------------
Progress Software GmbH
Sitz der Gesellschaft: Agrippinawerft 26, 50678 Koeln;
Niederlassung: Fuerstenrieder Str. 279, 81377 Muenchen
Amtsgericht Koeln, HRB 15620; 
Geschaeftsfuehrung: David Ireland
-------------------------------------------------------

Re: Oracle BPEL <-> ActiveMQ - Howto?

Posted by lyall <Ly...@The-Pearces.com>.
Got it working.

Procedure, as follows :-

In order to have Apache ActiveMQ as a valid JMS target, the following steps
need to be done. 


I have taken the Resource Adapter archive from an ActiveMQ installation
lib\optional\activemq-rar-5.2.0.rar 

This is the activeMQ resource adapter archive - for client as well as
embedded server. Personally, I don't think we need to include all this if we
just want a client, only if we want an embedded server. Still, it worked,
time to fine tune later.

I Created a directory on the Oracle_SOA VM called e:\activemq-rar-5.2.0\
which contains the extracted content of the activemq-rar-5.2.0.rar archive
(and contrary to file suffix, it is a jar archive, you don't need winrar to
unpack it). 

Placed the following XML segment 

<shared-library name="apache.jmsprovider.mq" version="5.2.0">
   <code-source path="e:\activemq-rar-5.2.0\activation-1.1.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\activeio-core-3.1.0.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\activemq-core-5.2.0.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\activemq-ra-5.2.0.jar"/>
   <code-source
path="e:\activemq-rar-5.2.0\backport-util-concurrent-2.1.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\broker-config.xml"/>
   <code-source path="e:\activemq-rar-5.2.0\camel-core-1.5.0.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\derby-10.1.3.1.jar"/>
   <code-source
path="e:\activemq-rar-5.2.0\geronimo-j2ee-management_1.0_spec-1.0.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\jaxb-api-2.0.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\jaxb-impl-2.0.3.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\jsr173_api-1.0.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\log4j-1.2.14.jar"/>
   <code-source path="e:\activemq-rar-5.2.0\xbean-spring-3.4.jar"/>
   <import-shared-library name="apache.commons.logging"/>
</shared-library>

into e:\SOASuite10131\j2ee\home\config\server.xml 

(there where about 7 server.xml files on the machine, this appeared to be
the appropriate one) 

I then edited E:\SOASuite10131\j2ee\home\config\application.xml 

changing 

<orion-application>
   ...
  <imported-shared-libraries>
     <import-shared-library name="adf.oracle.domain"/>
  </imported-shared-libraries>

to 

<orion-application>
   ...
  <imported-shared-libraries>
     <import-shared-library name="adf.oracle.domain"/>
     <import-shared-library name="apache.jmsprovider.mq"/>
  </imported-shared-libraries>

I then added 

<connector-factory location="eis/activemq/Queue" connector-name="Jms
Adapter">
 <config-property name="connectionFactoryLocation"  
value="org.apache.activemq.ActiveMQConnectionFactory"/>
 <config-property name="factoryProperties"
value="BrokerURL=tcp://<xxx.xxx.xxx.xxx>:61616"/>
 <config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
 <config-property name="isTopic" value="false"/>
 <config-property name="isTransacted" value="true"/>
 <config-property name="username" value="system"/>
 <config-property name="password" value="manager"/>
 <connection-pooling use="none">
 </connection-pooling>
 <security-config use="none">
 </security-config>
</connector-factory>


as the last entry in
E:\SOASuite10131\j2ee\home\application-deployments\default\JmsAdapter\oc4j-ra.xml.
I obtained the username/passwords from an activeMQ instance
c:\apache-activemq-5.2.0conf\credentials.properties file. Once again, not
sure if needed.

It should be noted, that according to the ActiveMQ Resource Adapter
Documenation, the BrokerURL property is optional, but I have coded it to
point to our running ActiveMQ broker, for the sake of a quiet life (which I
never seem to have). 

Once the above steps had been done, it is possible to create a JMS Partner
link in JDeveloper, entirely using the GUI tools

Procedure as follows :-

Create a Synchronous BPEL application using the JDeveloper
Create a partner link for ActiveMQ of type JMS Adapter

Wizard settings as follows :-
Page 1
* Third Party
Page 2
* Factory Properties - Set the following properties - ALL of these are
optional, really, so long as you set ONE of them or you won't be able to
proceed to the next page. Maybe username/password you will be ok (the
defaults are set in the Application Server, as per the instructions above -
still, I figure it's best to specify everything, thus, making the defaults
superfluous)
NOTE: A bug in the Adapter configuration wizard will not parse the
factoryProperties=BrokerURL=tcp://ip.add.res.ss:port part correctly, on
subsequent passes through the wizard. You will need to re-enter that
property.
* connectionFactoryLocation=org.apache.activemq.ActiveMQConnectionFactory
* factoryProperties=BrokerURL=tcp://<xxx.xxx.xxx.xxx>:61616
* isTopic=false
* isTransacted=true
* username=system   	(found in credentials.properties of ActiveMQ
installation - optional)
* password=manager	(found in credentials.properties of ActiveMQ installation
- optional)
* acknowledgeMode=AUTO_ACKNOWLEDGE
* JMS Connection Factory = ConnectionFactory
* Transacted = true
* Desintation Type = Queue
* User Name = blank
* Password = blank
* JMS Connection JNDI Name = eis/activemq/Queue (corresponds to install
instructions, above)

Page 3
* Operation Type = Produce Message
* Operation Name = Produce_Message

Page 4
* Destination Name = target ActiveMQ Queue - say Testing.Queue
* Message Body Type = TextMessage
* Delivery Mode = Persistent
* Priority = Default
* TimeToLive = 0

Page 5
* Choose a WSDL that reflects the message type expected - in my test case, I
simply chose the incoming message WSDL

Setup the Invoke step
* Populate the Input and Output variables appropriately, using an assign

Deploy

Test

Check the queue in http://<xxx.xxx.xxx.xxx>:8161/admin/queues.jsp to see if
your message has arrived.


-- 
View this message in context: http://www.nabble.com/Oracle-BPEL-%3C-%3E-ActiveMQ---Howto--tp22449017p22572359.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.