Siebel Object Interfaces Reference > Programming > Getting Started with the Siebel Object Interfaces >

About Java Data Bean


Siebel Java Data Bean provides users with a native Java interface to access Siebel Object Manager. It provides functional access to the Siebel applications for both reading and writing data. Siebel Data Bean is a set of Java libraries built using J2SE Development Kit (JDK). Users can incorporate these libraries to build Java Applications, Applets, Servlets, JSPs, or Enterprise Java Beans into their Java-based applications. For more information on Java, refer to http://java.sun.com.

A Java client that uses the Java Data Bean interface to connect to the Siebel server needs several JAR files that provide the objects and methods of the Siebel Object Interface to the Java language. The JAR files of the Java Data Bean interface are specific to the Siebel application version with which they were delivered. Do not use these JAR files with other versions of the Siebel server.

NOTE:  Before compilation or execution, add the Siebel JAR files (Siebel.jar and SiebelJI_<lang>.jar) to the CLASSPATH.

Supported Platforms and JDKs

Refer to Siebel System Requirements and Supported Platforms on Oracle Technology Network.

Instantiating the Java Data Bean

To instantiate and use the Siebel Java Data Bean, you must instantiate a new SiebelDataBean Java object and call its login method. You cannot use methods that retrieve active Siebel objects, because there are no current active Siebel objects. You must instantiate your own Siebel objects.

The following is sample code for the Siebel Java Data Bean:

import com.siebel.data.*;
import com.siebel.data.SiebelException;

public class DataBeanDemo
{
   private SiebelDataBean m_dataBean = null;
   private SiebelBusObject   m_busObject = null;
   private SiebelBusComp       m_busComp = null;

   public static void main(String[] args)
   {
      DataBeanDemo demo = new DataBeanDemo();
   }

   public DataBeanDemo()
   {
      try
      {
         // instantiate the Siebel Data Bean
         m_dataBean = new SiebelDataBean();

         // log in to the server
         // SiebelServerhost = the name or IP address of your Siebel Server
         // SCBPort = listening port number for the SCBroker component (default 2321)
         m_dataBean.login("Siebel://SiebelServerhost:SCBPort/enterpriseServer/
          AppObjMgr_enu", CCONWAY, CCONWAY, "enu");

         // get the business object
         m_busObject = m_dataBean.getBusObject("Opportunity");

         // get the business component
         m_busComp = m_busObject.getBusComp("Opportunity");

         // log off
         m_dataBean.logoff();
      }

      catch (SiebelException e)
      {
         System.out.println(e.getErrorMessage());
      }
   }
}

NOTE:  If you are using a single sign-on (SSO) with Java Data Bean, you must use the login ID of an employee as the username and the value of the trust token (the TrustToken parameter in the application's CFG file) in the connect string to log into the server. For more information, see Connect String.

Java Data Bean and the siebel.properties File

The siebel.properties file, which is located in your classpath, can be used to provide default parameters for client applications connecting to Siebel applications using the Java Data Bean.

Table 8 shows the properties in the siebel.properties file.

Table 8. Properties in the siebel.properties File
Property Type
Property
Description

Siebel Connection Manager

siebel.conmgr.txtimeout

Indicates the transaction timeout (in milliseconds). Defaults to 600000 = 10 minutes. The maximum value is 2,147,483,647 ms (approximately 25 days).

siebel.conmgr.poolsize

Indicates the connection pool size. Connection pool maintains a set of connections to a specific server process. Defaults to 2. Max connection pool size is 500.

siebel.conmgr.sesstimeout

Indicates the transaction timeout (in seconds) on the client side. Defaults to 2700 = 45 minutes. The maximum value is 2,147,483,647 s (approximately 68 years).

siebel.conmgr.retry

Indicates the number of open session retries. Defaults to 3.

siebel.conmgr.jce

Indicates the usage of Java Cryptography Extension (JCE). For more information on JCE, see Encrypting Communication Between JDB and Siebel Server.

The value is 1 if using JCE and 0 if not using JCE.

Siebel generated code for Java EE Connector Architecture (JCA) and Java Data Bean (JDB)

siebel.connection.string

Specifies the Siebel connection string.

siebel.user.name

Specifies the user name to be used for logging in to Object Manager.

siebel.user.password

Specifies the password to be used for logging in to Object Manager.

siebel.user.language

Specifies the user's preferred language.

siebel.user.encrypted

Specifies whether the username and password is encrypted.

siebel.jdb.classname

Specifies the default JDB classname

Java System Properties

file.encoding

Indicates the codepage on the client side. For example, cp1252, utf8, unicodeBig, cp942.

NOTE:  Java System Properties are System Properties, not Siebel Properties.

The following is a sample siebel.properties file:

siebel.connection.string = siebel.tcpip.rsa.none://test.siebel.com/siebel/sseobjmgr_enu/test

siebel.user.name          = User1

siebel.user.password      = password

siebel.user.language      = enu

siebel.user.encrypted     = false

siebel.conmgr.txtimeout   = 3600

siebel.conmgr.poolsize    = 5

siebel.conmgr.sesstimeout = 300000

siebel.conmgr.retry       = 5

siebel.conmgr.jce         = 1

Java Data Bean and Codepage Support

For the client and server to communicate correctly, the codepage of the Siebel server and client must be the same. If the client and server default codepages cannot be the same, you can alter the client codepage by setting the system property file.encoding to the proper codepage. You can set the system property for the entire JVM (for example, java -Dfile.encoding=ascii <java_application> on the command line or with the use of the environment variable; reference your particular JVM for details) or for the given Java component by adding the following line to your Java component. System.setProperty("file.encoding", CodePageValue);.

Table 9 lists codepage mappings for JDB.

Table 9. Codepage Mappings for Java Data Bean
Java Value
Siebel Value

ascii

1

cp1252

1252

iso8859_1

1252

iso8859-1

1252

unicodebig

1201

unicodelittle

1200

utf8

65001

big5

950

cp942

932

cp942c

932

cp943

932

cp943c

932

cp949

949

cp949c

949

cp950

950

cp1250

1250

cp1251

1251

cp1253

1253

cp1254

1254

cp1255

1255

cp1256

1256

cp1257

1257

cp1258

1258

gbk

936

ms874

874

ms932

932

ms936

936

ms949

949

ms950

950

sjis

932

tis620

874

Encrypting Communication Between JDB and Siebel Server

Siebel Business Applications supports the encryption of communication between the Java Data Bean (JDB) and the Siebel Server. Preconfigured, it is possible to encrypt communication between the JDB and the Siebel Server using RSA's encryption libraries. For more information on supported platforms, see Siebel System Requirements and Supported Platforms on Oracle Technology Network.

To enable encryption support between the Siebel Server and a component built using the Java Data Bean

  1. Enable encryption in the corresponding Object Manager Server Component. Please refer to Siebel System Administration Guide for details on how to enable encryption within an Object Manager Server Component.
  2. Set the encryption parameter of the connect string in the Java Data Bean to rsa, which enables encryption support. For example, siebel.tcpip.rsa.none://<gateway>/<enterprise>/<ObjMgr>

    After completing the two previous steps, communications between the Java Data Bean and the Siebel Server is encrypted.

To support encryption on platforms not supported by the RSA libraries, Oracle supports the Java Cryptography Extension (JCE) v1.2.1 specification. JCE provides a framework and implementations for encryption, key generation and key agreement, and Message Authentication Code (MAC) algorithms. JCE is designed so that other qualified cryptography libraries can be used as service providers. For more information on JCE, see http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html.

To enable JCE support

  1. Download and install the JCE v1.2.1 software, policy files and documentation. Please refer to http://java.sun.com/products/jce/index-121.html for additional information on obtaining, installing and configuring your JVM for use with JCE. Please note that the Java Data Bean only supports static specification of JCE providers.
  2. Modify the java.security file to specify your provider of choice and make sure that the necessary provider JAR files are included in the CLASSPATH.
  3. Set the siebel.conmgr.jce property in the siebel.properties file to 1.

    After completing the three previous steps, communications between the Java Data Bean and the Siebel Server is encrypted.

Login Errors

The Siebel Data Bean may return a login error including the following text:

Siebel Exception thrown invoking login Method. Code--1. Message-Logon request 75 was abandoned after 2ms connection

The root cause of this error can be one of the following:

  • OM or OM process down
  • Hardware reset (OM hardware, router, switch, and so on)
  • OS settings or OS networking issue
  • Network failure
  • NAT timeout
Siebel Object Interfaces Reference Copyright © 2008, Oracle. All rights reserved.