Thursday, February 21, 2013

Coherence Caching

Oracle Service Bus 11g provides built-in cache functionality that utilizes Oracle Coherence, offering first-class support for many caching strategies. This article describes how to use this functionality and explore a fail-over scenario with an example of how caching strategies can speed up your Web services and even prevent production outages.

Thursday, February 7, 2013

Oracle Service Bus 11gR1:Global Transaction

Traditionally there are two choices for transaction management: global or local transactions. Global transactions are managed by the application server, using the Java Transaction API (JTA). Local transactions are resource-specific: the most common example would be a transaction associated with a JDBC connection. This choice has profound implications. For instance, global transactions provide the ability to work with multiple transactional resources (typically relational databases and message queues). With local transactions, the application server is not involved in transaction management and cannot help ensure correctness across multiple resources. (It is worth noting that most applications use a single transaction resource.)
This blog I’m going to show you how the global transaction can be controlled with Oracle Service Bus. 
Scenario: JMS Queue and Database are two participants in the transaction. A proxy service reads a message from an Inbound Queue, publishes it on to an Outbound Queue and the same message is INSERTED into Oracle Database Table, TRAIN.

The expected behavior of the scenario is either two (Queue & TRAIN) or none gets the message.

 Steps: 1. Create an InboundQueue and an OutboundQueue

 


  












2. Make sure Delivery Failure settings are as below:




















3. Create a DbAdapter in JDeveloper and import those artifacts into OSB project.

 











4. Create a proxy service which reads the message from InboundQueue, publishes to OutboundQueue and INSERT into TRAIN.

 



5. Add Routing Options to both Publish and Routing and set property of QoS as 'Exactly Once'.





6. Make sure 'Transaction Required' property is checked in proxy service Message Handling Configuration


7. You can create a Raise Error activity after publish activity or in response pipeline to validate this scenario. You can notice the behaviour.