Saturday, November 14, 2009

Adapters - Database and File Adapters

Oracle SOA Suite comes along with some adapters that adapt the underlying Component and wraps it as a Service. Some of the Adapters that are shipped with the application are Database Adapter, File Adapter, JMS Adapter, etc.
Oracle makes the access to the underlying Services easy by wrapping them as Web Services.(There is a WSDL created for each operation you make). It is very tempting to use these adapters. But,thought should be applied if this is the best design. For example, in the case of Database Adapters, it is always better to use the existing Web Services to retrieve the required data. If the Web Service does not exist and if it is in our control then it would be better to write the business logic and expose that as a Web Service. This will increase the maintainablity and reusability of this Service. I think the Database Adapter should be used when all the above options are not feasible. Even when used, it may be a better practice to create this a Web Service and assign them a suitable namespace so that they can be categorised properly.

I was recently asked if a Database Adapter can be used to poll for Orders in the Order table. My solution would be to first see if a trigger can be written on the table to publish a JMS message on the receipt of a new order. I heard that this was possible and found some information here. (Haven't tried it yet though).

1 comment:

  1. Nice overview. I am very pleased with the overview that you have provided about database and file adapters. Its highly informative and provide a good detail about information adapters.
    digital signature software

    ReplyDelete