How to use Configuration files to customize OSB deployments
When deploying Oracle Service Bus projects to a new environment some values such as Web Services endpoints, DB JNDI Names, AQ JNDI Names, LDAP JNDI Names etc. In order to achieve automated changes to your resources, Oracle suggests using Configuration Files which apply customization rules to them.
In OSB 11g, Configuration Files where called "Customization Files", apart from renaming the file in OSB 12c for homogenization purposes with SOA Configuration Plans, there are no other changes and everything in terms of functionality remains the same.
In order to create a Configuration File first you should deploy your project with the initial implentation, which typically contains some proxy, pipelines and business services. Then, you log in to Service Bus console and:
- navigate to the Admin tab
- select the Create Configuration File option (take note that there is an option Execute Configuration File that we will use later)
and finally you download a file which a single customization block for each proxy and business service.
For example, the following block customizes the Proxy Service that resides in the path tag highlighted below, to be exposed with the URI show in value tag.
<cus:customization xsi:type="cus:EnvValueActionsCustomizationType"> <cus:description/> <cus:owners> <xt:owner> <xt:type>ProxyService</xt:type> <xt:path>SBProject/Proxy/V1/ProxyService</xt:path> </xt:owner> </cus:owners> <cus:actions> <xt:replace> <xt:envValueType>Service URI</xt:envValueType> <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">/SBProject/Proxy/V1/ProxyService</xt:value> </xt:replace> <xt:replace> <xt:envValueType>Service Operational Settings</xt:envValueType> <xt:value> <oper:operations enabled="true" xmlns:ser="http://www.bea.com/wli/sb/services" xmlns:con="http://www.bea.com/wli/sb/services/security/config" xmlns:oper="http://xmlns.oracle.com/servicebus/proxy/operations" xmlns:env="http://www.bea.com/wli/config/env" xmlns:tran="http://www.bea.com/wli/sb/transports"/> </xt:value> </xt:replace> <xt:replace> <xt:envValueType>UDDI Auto Publish</xt:envValueType> <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">false</xt:value> </xt:replace> </cus:actions> </cus:customization>
Also, a similar logic applies to the customization of the Business Service endpoint.
<customization type="cus:EnvValueActionsCustomizationType"> <description/> <owners> <owner> <type>BusinessService</type> <path>SBProject/Business/V1/BusinessService</path> </owner> </owners> <actions> <replace> <envValueType>Service URI Weight</envValueType> <location>0</location> <value type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">0</value> </replace> <replace> <envValueType>Service URI</envValueType> <location>0</location> <value type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">http:localhost:7101/SomeExternalService/HelloWorld</value> </replace> </actions> </customization>
You may edit those blocks with the desired values and execute the new configuration file from the service bus console by selecting the Execute Configuration File option mentioned above.
It is a good practice to keep a single Configuration File per OSB project and one common property file for all projects. This property file will contain value for placeholders such as hostname, ports and jndi's for each service invoked by your middleware installation. Those placeholders will be placed within your Configuration Files and you can use Apache Maven/Ant to execute replacements and deploy your projects.
For additional documentation you can have a look here.
I really enjoy the blog article.Much thanks again.
ReplyDeleteazure online training
java online training
salesforce online training
hadoop online training
mulesoft online training
linux online training
etl testing online training
ReplyDeleteTechforce services is a Salesforce Consulting Services in Australia Specialising in delivering end to end Salesforce solutions ,Consulting, Implementation DevOps partners in australia We deliver applications and services more rapidly and reliably, but it’s more than a methodology – it cuts to the very core.Salesforce Data Analytics let us help you become a data driven organisation and ensure your data is working hard for your business This includes implementi
Salesforce consulting companies
Salesforce Services
Staff augmentation companies
Salesforce integration companies
Salesforce Implementation services
Salesforce DevOps partners
Salesforce DevOps
Managed project services