I am working on a project that involves a JMS Topic whose JNDI name changed between environments.
For illustration purposes, I am moving code from DEV to QA and have the following JNDI's:
DEV
JMS Topic JNDI: jms/JMSTopicDEV
JMS Adapter Outbound Pool: eis/jms/JMSDEV
QA
JMS Topic JNDI: jms/JMSTopicDEV
JMS Adapter Outbound Pool: eis/jms/JMSQA
So I initially used the following search replace tags in wsdlAndSchema section during migration:
<wsdlAndSchema>
<searchReplace>
<search>jms/JMSTopicDEV</search>
<replace>jms/JMSTopicQA</replace>
</searchReplace>
<searchReplace>
<search>eis/jms/JMSDEV</search>
<replace>eis/jms/JMSQA</replace>
</searchReplace>
</wsdlAndSchema>
When the above configuration plan was applied during code deployment, the adapter outbound reference got properly replaced in the QA environment where as Topic reference did not get replaced to the QA one.
After research the following did work for both:
<wsdlAndSchema>
<jca:property name="DestinationName">
<searchReplace>
<search>jms/JMSTopicDEV</search>
<replace>jms/JMSTopicQA</replace>
</searchReplace>
</jca:property>
<searchReplace>
<search>eis/jms/JMSDEV</search>
<replace>eis/jms/JMSQA</replace>
</searchReplace>
</wsdlAndSchema>
A sample JMS JCA File is listed below. The properties inside interaction-spec have to be addressed inside using jca:property in configuration plans. Where as connection-factory location can be addressed with searchReplace root tag directly in wsdlAndSchema section.
<adapter-config name="publishToSampleInboundJMSTopic" adapter="JMS Adapter" wsdlLocation="publishToSampleInboundJMSTopic.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory location="eis/jms/JMSDEV" UIJmsProvider="WLSJMS" UIConnectionName="DEV11G"/>
<endpoint-interaction portType="Produce_Message_ptt" operation="Produce_Message">
<interaction-spec className="oracle.tip.adapter.jms.outbound.JmsProduceInteractionSpec">
<property name="TimeToLive" value="0"/>
<property name="PayloadType" value="TextMessage"/>
<property name="DeliveryMode" value="Persistent"/>
<property name="DestinationName" value="jms/JMSTopicDEV"/>
</interaction-spec>
</endpoint-interaction>
</adapter-config>
The following instructions have been verified in Oracle SOA Suite 11g PS4 environment (11.1.1.5)
For illustration purposes, I am moving code from DEV to QA and have the following JNDI's:
DEV
JMS Topic JNDI: jms/JMSTopicDEV
JMS Adapter Outbound Pool: eis/jms/JMSDEV
QA
JMS Topic JNDI: jms/JMSTopicDEV
JMS Adapter Outbound Pool: eis/jms/JMSQA
So I initially used the following search replace tags in wsdlAndSchema section during migration:
<wsdlAndSchema>
<searchReplace>
<search>jms/JMSTopicDEV</search>
<replace>jms/JMSTopicQA</replace>
</searchReplace>
<searchReplace>
<search>eis/jms/JMSDEV</search>
<replace>eis/jms/JMSQA</replace>
</searchReplace>
</wsdlAndSchema>
When the above configuration plan was applied during code deployment, the adapter outbound reference got properly replaced in the QA environment where as Topic reference did not get replaced to the QA one.
After research the following did work for both:
<wsdlAndSchema>
<jca:property name="DestinationName">
<searchReplace>
<search>jms/JMSTopicDEV</search>
<replace>jms/JMSTopicQA</replace>
</searchReplace>
</jca:property>
<searchReplace>
<search>eis/jms/JMSDEV</search>
<replace>eis/jms/JMSQA</replace>
</searchReplace>
</wsdlAndSchema>
A sample JMS JCA File is listed below. The properties inside interaction-spec have to be addressed inside using jca:property in configuration plans. Where as connection-factory location can be addressed with searchReplace root tag directly in wsdlAndSchema section.
<adapter-config name="publishToSampleInboundJMSTopic" adapter="JMS Adapter" wsdlLocation="publishToSampleInboundJMSTopic.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory location="eis/jms/JMSDEV" UIJmsProvider="WLSJMS" UIConnectionName="DEV11G"/>
<endpoint-interaction portType="Produce_Message_ptt" operation="Produce_Message">
<interaction-spec className="oracle.tip.adapter.jms.outbound.JmsProduceInteractionSpec">
<property name="TimeToLive" value="0"/>
<property name="PayloadType" value="TextMessage"/>
<property name="DeliveryMode" value="Persistent"/>
<property name="DestinationName" value="jms/JMSTopicDEV"/>
</interaction-spec>
</endpoint-interaction>
</adapter-config>
The following instructions have been verified in Oracle SOA Suite 11g PS4 environment (11.1.1.5)
Hi Manoj,
ReplyDeleteThanks for sharing this.
However, I've a different doubt that whether the UIConnectionName="DEV11G" is considered anywhere when you deploy your JMS process in different environments as this also can vary on other environments.
Please let me know.
Thanks,
Saurabh
"DEV11G" is used only when you are using the project in JDeveloper context. For example, if you are trying to introspect the WebLogic JMS Queues/Topics in JDeveloper, you would want to have "DEV11G" Application Server Connection configured on your local JDev Environment. Please let me know if you have questions.
ReplyDeleteManoj,
ReplyDeleteHow are the addresses replaced in the JMS adapter e.g. UIConnection may refer to localhost:7001 , but we may want to another connection string for QA qa:7001 e.g.
How do we make that change?
This blog gives very important info ,
ReplyDeleteOracle SOA Online Course Bangalore