Wednesday 26 October 2016

Coherence Adapter in SOA 12c - Part 3

Testing the Composite CoherenceAdapter

Database has the below values



Giving the input value



When data not available in the Cache it is performing (queryDataFromDatabase and putDataToCoherence) as shown below



Giving the same Input Value



Now it is taking the data from Cache (getDataFromCoherence) as shown below



Thank You!!!!


Happy Learning!!!!

Coherence Adapter in SOA 12c - Part 2

Usage of Coherence Adapter in SOA 12c

Scenario: Taking an input and checking whether the record available in Cache by doing Get operation on Coherence Adapter, if available we are using that record and proceeding further, If not available getting the data from database by Select operation on DB Adapter and putting the same record in Cache by using Put operation on Coherence Adapter.

1) Creating a composite with name CoherenceAdapter with BPEL template as One Way.







2) Configuring Coherence Adapter with Get Operation.



Selecting JNDI as eis/Coherence/Local



Selecting Get Operation



Selecting Cache Name as adapter-local because Cache Configuration File is configured with this name as shown below.  





Click Next and Click OK



Click Next



Click Finish



3) Configuring DB Adapter with Select Operation.



Select Database and JNDI



Tick Select Operation



Select the table created





Select the Primary Key of the table







Add the parameter and create the SQL Query based on the parameter











4) Configuring Coherence Adapter using Put Operation.



Select the JNDI



Select Put Operation









Create a variable (CoherenceKey)



Assign the Input to this variable (CoherenceKey)



Add an Invoke to invoke the getDataFromCoherence PartnerLink



Double click on the Invoke --> Properties --> select jca.coherence.key as name and browse for the created variable CoherenceKey



Checking the condition if data coming from Get Coherence. If coming Do Nothing.



If Data Not Coming Get the data from database and Put the same in Coherence as shown below.

Getting the data from database by passing the Input



Putting the record in the Coherence Cache



Final BPEL looks like below



Thank You!!!!


Happy Learning!!!!

Coherence Adapter in SOA 12c - Part 1

Making Coherence Adapter Active in Weblogic Console:

Initially Coherence Adapter will be in Installed State in Weblogic Console as below



We can make it Active in two ways.

1. Go inside Coherence Adapter --> targets --> Tick Default Server.



2. Delete Coherence Adapter and click on Install as below and follow the remaining steps.



Select CoherenceAdapter.rar



Click Next



Click Next



Click Next



Click Finish



Now we can see the Adapter in Active State.

Thank You!!!!


Happy Learning!!!!