Sep 22, 2009

Exposing Adapter as web service

Below are the configuration settings for exposing DB adapter as web service.

  • Create a New Project ( Empty Project )


  • Right click on the Project and click on create new.
  • Click on Web Service under “Business Tier”


  • Open the adapter configuration and configure the adapter
  • Right click on Project and create a new deployment profile.


  • Right Click on the created Deployment profile and deploy the project to the server


Jul 9, 2009

Working with DB Adapter Polling Settings

DB polling will poll the records from the source database. Polling can be done in different strategies like physical delete, logical delete etc. I am not going to explain about the polling strategies here. Instead I just want to have a quick glance at the various settings available for the polling options.
Through polling frequency one can set the time duration between successive polls in seconds.
“Database rows per xml” is the maximum number of payloads per BPEL instance. For ex: If it set as ‘1’ then for every record there will be a BPEL instance. If it set as ‘10’ then for every 10 record there will be one BPEL instance
“Database rows per transaction” sets the number of records polled per transaction.
“Order by” will choose order the records in ascending order.
“Delay commit” This will delay the deletion of all rows until all have been read.

“Distributed Polling” will be used during the clustered environments. This will avoid the creation of multiple instances of BPEL. Means it will avoid the possibility of picking the same record multiple times in a clustered environment.
“Use batch destroy” Use this to delete all rows at once after they have been read.
Scenario: Select the records one by one ordered by some field from the source database in a clustered environment.
For the above scenario we can try setting “Database rows per transaction” as ‘1’ and set the distributed polling. That will create the SQL query as shown below

But if you check the SQL query carefully this will select the first record and then does the order by , which is of no use J . That won’t help in our scenario. I think that’s the bug in the tool. So using this option we can’t achieve our scenario. For achieving that we can use the “clusterGroupID” property in bpel.xml

Apr 16, 2009

Play with Java API's for BPEL

There is a set of Java API's provided for accessing the BPEL console.


It’s easy to use them if you have a little bit of java knowledge and all the library file are properly placed in your project path.



The following is a sample Java code for connecting to the BPEL domain


Properties props = new Properties();

props.put("orabpel.platform", "ias_10g");

props.put("java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");

props.put("java.naming.provider.url", "opmn:ormi://localhost:6003:home/orabpel"); 

props.put("", "oc4jadmin");

props.put("", "welcome1");

props.setProperty("dedicated.rmicontext", "true");


//Get a locator in default domain

Locator locator = new Locator("default","welcome1",props); 


java naming provider url format is opmn:ormi://yourhost:opmn port:oc4j //instance/orabpel. Note that 6003 is opmn port and in the console the port //may be different

Caution: Purge All Instance

Purge All Instance is an option in the BPEL console( which can be used to delete all the instances till date. But we have to be 
too careful in using that.Since it can delete all the instances within 2 clicks even in production enviornment!!! ... Sadly its difficult to control that option even using role based security. Today I got the sililar requirement from the client to remove/disable the purge All Instance option from the console such that that mistakes never happens. 

So I was searching in blogs / forums to that. Finally I found out a simple solution.  I have edited the file ngDomainActions.jsp under       $ORACLE_HOME/j2ee/OC4J_SOA/applications/orabpel/console such that the Purge All Instance option will not appear in the console.So follow the below steps to complete it

1. Take the back up of ngDomainActions.jsp from th
e location $ORACLE_HOME/j2ee/OC4J_SOA/applications/orabpel/console.
2. Place the attached file on the above mentioned path
3. Restart the server... The option will be gone !!!
4. To activate again , just place the backup file again and restart the server

So it will look like below after removing that option 

For periodic purging of the instances you can write the procedures on the database. The option in the console will be more tempting to purge the instances !!! (specially for newbies )