Wednesday 19 June 2013

DB Polling Issue faced for SYBASE database


Distributed polling mechanism is used when a DB poller process is deployed in an active/active cluster environment. In that case a deployed process will have two instances of process polling on the same table. Distributed polling techniques can be used for inbound Database Adapters to ensure that the same data is not retrieved more than once.

For a typical DB adapter polling from oracle database table, it is very easy to add distributed polling mechanism by just checking Distributed polling check box in the adapter creation wizard.





But when a DB adapter is polling from a sybase database table, the same configuration will not work and we might face issue like the same record is polled twice in an active-active cluster environment. To work distributed polling for a sybase database poller properly we will need to add few additional steps as part of the adapter configuration. Below are the steps to apply distributed polling for a sybase database adapter…


1.   Before configuring the database adapter go to the connection factory settings from console->Deployments->DbAdapter->Configuration->Outbound Connection Pool.
Click on your connection factory which is using the Sybase data source and change the platformClassName value to org.eclipse.persistence.platform.database.DatabasePlatform.
Save and active changes.
2.    Now go to the adapter configuration wizard. In the page where we select the column name and read/unread value set Resereved value as R${weblogic.Name-2}-${IP-2}-${instance}


1.    Go to next page and check distributed polling check box. We will see a new pre poling SQL is generated this time. Click next and finish the adapter configuration wizard…


Now the polling process can be deployed and tested in a cluster environment.

Note: The read column (RequestStatusCd in above example) should have the column length to take reserved value (R${weblogic.Name-2}-${IP-2}-${instance}) which may vary from one environment to another.



No comments:

Post a Comment