Wednesday, December 7, 2011

Oracle SOA Suite 11g – Advanced Configurations for Database Adapter.

Oracle SOA Suite 11g – Advanced Configurations for Database Adapter.

This blog give the insight on the new features in Database Adapter configuration in Oracle SOA Suite 11g.

Query by Example:

A new Operation type 'Query by Example' has been introduced in Database Adapter Configuration. Query By Example does not require a selection criteria to be specified at design time like SELECT Operation. A selection criteria is inferred from an exemplary input XML record for each invoke. Use queryByExample when you do not want to create a query using the visual query builder and want the flexibility of allowing the input record to share the same XML schema as the output records. The queryByExample operation is will take little more time compared to SELECT operation because a new SELECT must be prepared for each execution.

Doing Synchronous Post to BPEL (Allow In-Order Delivery):

In this feature, the entire invocation is in a single thread and global transaction. By default, initiation is asynchronous and the BPEL process is invoked in a separate global transaction. With Oracle Mediator, it is generally a synchronous invoke so this is only specific to an Oracle BPEL process.


Advanced Options:

A new screen in Adapter configuration wizard for advanced options is added. This screen shows different options based on the type of operation selected. The below are the some of the advanced configurations.

Auto-Retries:

We can set options like no. of retry attempts, interval between retries back-off factor and max interval values.

JDBC Options: 

This includes options like Query timeout value to specify the timeout for query execution.

Interaction Options: 

This includes various interaction options. Get Active UnitOfWork ( advanced setting that forces all invoke activities in the same global transaction to use the same SQL connection if going to the same database), Detect Omissions (allows the MERGE and INSERT operations to ignore empty or missing XML elements in the input payload), Optimize Merge (should always be set to true, as it is a general enhancement to MERGE performance)



Tuesday, December 6, 2011

Oracle SOA Suite - Custom Data Publisher for Sensor Action.


Oracle SOA Suite - Custom Data Publisher for Sensor Action.

This blog will explain the steps to create the custom data publisher for the sensor action in Oracle SOA Suite 11g or Oracle SOA Suite 12c(the same steps will work in Oracle SOA Suite 12c but the screens will be different) .

Steps to create custom data publisher

1. Create the java class e.g. MyCustomSensorPublisher that implements the class DataPublisher in the composite project.
Implement the method - public void publish(ITSensorAction action,ITSensorActionData actiondata,Element xml) to publish the event to the custom publisher.


package customjavasensor;
import com.oracle.bpel.sensor.DataPublisher;
import com.oracle.bpel.sensor.schemas.ITHeaderInfo;
import com.oracle.bpel.sensor.schemas.ITSensorAction;
import com.oracle.bpel.sensor.schemas.ITSensorActionData;
import com.oracle.bpel.sensor.schemas.ITSensorData;
import org.w3c.dom.Element;
public class MyCustomSensorPublisher implements DataPublisher{
public MyCustomSensorPublisher() {
}
public void publish(ITSensorAction action,ITSensorActionData actiondata,Element xml) {
ITHeaderInfo header =actiondata.getHeader();
ITSensorData data=actiondata.getPayload();
System.out.println("Sensor "+header.getSensor().getSensorName()+" fired for BPEL Process "+header.getProcessName());
System.out.println("Sensor Data "+xml.toString());
}
}

2. Open the BPEL file and add the sensor.
Right click on the activity and select Create - Sensor





Oracle SOA Suite – Scheduling the composites using Quartz scheduler.

Oracle SOA Suite – Scheduling the composites using Quartz scheduler.

This blog will explain the approach to schedule the Oracle SOA Suite composites using the Quartz scheduler.

Approach to schedule the Oracle SOA Suite 11g composites 

Create the ADF binding to the composite.xml

Open the composite xml


Copy the service section and give a unique name e.g. bpelhelloworld_client_adf and also make sure the ServiceName specified is correct.


Copy the client partnerlink wire and edit the name of the copied wire as adf service name specified in the previous step.






Thursday, December 1, 2011

Oracle SOA Suite - Using the EJB Adapter to invoke the EJB's deployed in weblogic server

Oracle SOA Suite - Using the EJB Adapter to invoke the EJB's deployed in weblogic server:

We can use the EJB Adapter to expose the EJB remote interface as a service or to invoke the EJB as a reference.

This blog will explain how to use the EJB Adapter to invoke the EJB deployed in the weblogic server as a reference.

I have created a sample EJB (EmployeeDetailsSessionBean), which will be invoked from Composite, to return the employee details.

Refer the sample attached.

Steps:


  • Create a jar file e.g. RemoteInterface.jar including EJB Remote class and the Bean classes.

  • Create a SOA Composite with BPEL and add the EJB Service to the reference section.



Wednesday, November 30, 2011

Resetting Weblogic Server Admin Password

Resetting Weblogic Server Admin Password:

Steps to reset the admin password of weblogic server.

  • cd <DOMAIN_HOME>/security
  •  Rename DefaultAuthenticatorInit.ldift file to DefaultAuthenticatorInit.ldift_BKP
  • Set the Environment - <DOMAIN_HOME>/bin/setDomainEnv.cmd
  • java -cp <WLS_HOME>;/server/lib/weblogic.jar:$CLASSPATH weblogic.security.utils.AdminAccount NewAdminUser NewAdminPassword . (Note the . at the end of the command)
  Make sure you are running the above command is executed from    DOMAIN_HOME>/security,   if you are executing the command from other location copy the   DefaultAuthenticatorInit.ldift file created in the current location to <DOMAIN_HOME>/security
e.g java -cp C:\Oracle\MiddlewareSOA\wlserver_12.1\server\lib\weblogic.jar;%CLASSPATH% weblogic.security.utils.AdminAccount albin albin123  
  • Move data directory under $DOMAIN_HOME/servers/<serverName>/datato another directory like data.bak
  •  Edit user name and password in the following file - <DOMAIN_HOME>/servers/<Server Name>/security/boot.properties
  • Restart the admin server