Transports and Interfaces: Siebel Enterprise Application Integration > Integrating Siebel Business Applications with Java Applications >

About Siebel Business Applications and Java Applications


Many enterprises develop Java applications to meet a variety of business requirements. Typically, these applications combine existing enterprise information systems with new business functions to deliver services to a broad range of users. Oracle supports integration of its business services and business objects using the Siebel Java Data Bean. The Siebel Java Data Bean can be used for interaction with various kinds of Siebel application objects:

  • Business objects and business components
  • Business services and property sets
  • Integration objects

In all cases, the Java code acts as client-side proxy stub to the corresponding object on the Siebel Server. It does not implement the functionality of the object in Java.

For ease of use, the Siebel Code Generator can be used to produce Java code based on the Siebel Java Data Bean for any specific business service or integration object. This generated code has an API specific to the chosen business service or integration object.

Additionally, Siebel Business Applications support the Java EE Connector Architecture (JCA) with the Siebel Resource Adapter. The Siebel Resource Adapter supports the invocation of business services.

About the JDB Business Object API

The Java Data Bean provides an API to Siebel business objects and their business components. The API is similar in function to the API provided for other platforms, such as COM.

Example of the Business Object and Business Component Interface

Following is a code sample demonstrating use of the business object API. The sample shows how the Java Data Bean might be used to search for a Contact with a particular login name.

The first step in using the Siebel Java Data Bean is to log in to the Object Manager of the Siebel Server. The first parameter, the connection string, specifies the protocol, server name, enterprise name, and Application Object Manager name. Once logged into the Object Manager, the methods getBusObject and getBusComp are used to obtain business objects and their business components.

The code sample activates fields to allow the query to retrieve data for the specific fields, specifies the search criteria, and executes the query. If the query is successful, the first and last name of the contact are printed to the standard output.

  import com.siebel.data.*;

  public class ObjectInterfaceExample {

public static void main(String[] args) throws SiebelException {

String connectString =

"siebel://examplecomputer:2321/siebel/SCCObjMgr_enu";

SiebelDataBean dataBean = new SiebelDataBean();

dataBean.login(connectString, "USER", "PWD", "enu");

SiebelBusObject busObject = dataBean.getBusObject("Contact");

SiebelBusComp busComp = busObject.getBusComp("Contact");

busComp.setViewMode(3);

busComp.clearToQuery();

busComp.activateField("First Name");

busComp.activateField("Last Name");

busComp.activateField("Id");

busComp.setSearchSpec("Login Name", "thomas");

busComp.executeQuery2(true,true);

if (busComp.firstRecord()) {

System.out.println("Contact ID: " + busComp.getFieldValue("Id"));

System.out.println("First name: " + busComp.getFieldValue("First Name"));

System.out.println("Last name: " + busComp.getFieldValue("Last Name"));

}

busComp.release();

busObject.release();

dataBean.logoff();

}

  If the query results in multiple records, the record set can be iterated as follows:

  if (busComp.firstRecord()) {

// obtain the fields/values from this record

while (busComp.nextRecord()){

// obtain the fields/values from the next record

}

  }

Transports and Interfaces: Siebel Enterprise Application Integration Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices.