Lets take one simple example , we want to retrieve data from
employees table of HR schema based on employee_id.For that I created a
datasource and outbound connection factory in database adapter.I passed
on the newly created JNDI name in adapter .jca file accordingly and
deployed.It ran successfully.
But my requirement is to pass on
the JNDI name dynamically from descriptor, means if the destination
database change then user can change the JNDI name from soa preference
of deployed process, no need for redeployment. Here are some simple
steps to achieve that,Say like below you created your composite,
In composite.xml for the BPEL process I created one preference say,jndiVar like,
Here is my BPEL flow outline,
At setJNDI I’m assigning preference value to a process variable,
Then after creating the adapter go to the BPEL source and add
<bpelx:inputProperty name="jca.jndi" variable="jndiVar"/> as below,
Then deploy the process and change your preference value accordingly to point to right JNDI as below,
Farm_soa_domain > Weblogic Domain > soa_domain > right mouseclick and select ‘System MBean Browser’.
Navigate to Application Defined MBeans > oracle.soa.config > Server : soa_server1 > SCAComposite > your_project > SCAComposite.SCAComponent > your bpel_process.
Select the Attribute ‘Properties’.
Change the value of our preference,set JNDI accordingly and click apply.
Thats all your adapter will retrieve the data using new JNDI, obviously that JNDI should be defined in weblogic.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.