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

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 JDK 1.3.1_03. Users can incorporate these libraries to build Java Applications, Applets, Servlets, JSPs, or Enterprise Java Beans into their Java-based applications.

NOTE:  The Siebel JAR files (SiebelJI.jar, SiebelJI_common.jar and SiebelJI_<lang>) need to be added to the CLASSPATH prior to compilation or execution.

Supported Platforms and JDKs

Siebel Systems supports the use of the platforms and JDK versions specified in the system requirements and supported platforms documentation for your Siebel application.

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 the 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();

         // login to the server
         m_dataBean.login("Siebel://gatewayserver/enterpriseServer/ObjMgr/SiebelServer", CCONWAY, CCONWAY,"enu");

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

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

         // logoff
         m_dataBean.logoff();
      }

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

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 9 shows the properties in the siebel.properties file.

Table 9.  Properties in the siebel.properties File
Property Type
Property
Description
Siebel Connection Manager Connection properties
siebel.conmgr.txtimeout
Indicates the transaction timeout (in seconds). Defaulted to 2700 = 45m.
siebel.conmgr.poolsize
Indicates the connection pool size. Connection pool maintains a set of connections to a specific server process. Defaulted to 2. Max connection pool size is 500.
siebel.conmgr.sesstimeout
Indicates the transaction timeout (in seconds) on the client side. Defaulted to 600 = 10m.
siebel.conmgr.retry
Indicates the number of open session retries. Defaulted to 3.
siebel.conmgr.jce
Indicates the usage of Java Cryptography Extension. 1 for jce usage and 0 for no usage.
Siebel Generated code for JCA/JDB properties
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 code page on the client side. For example, cp1252, utf8, unicodeBig, cp942.

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

Here 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 10 lists codepage mappings for JDB.

Table 10.  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 eBusiness Applications 7.5 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 the system requirements and supported platforms documentation for your Siebel eBusiness Applications software.

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 Server Administration Guidefor 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>/<SiebSrvr>
  3. 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, Siebel Systems supports the Java Cryptography Extension (JCE) v1.2.1 specification. JCE is designed so that other qualified cryptography libraries can be used as service providers.

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.
  4. 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 may be one of the following:


 Siebel Object Interfaces Reference 
 Published: 18 June 2003