Siebel Object Interfaces Reference > Customizing Siebel Object Interfaces > Accessing a Siebel Object Interface >
Accessing the Siebel Java Data Bean
A Java client that uses the Siebel Java Data Bean to connect to the Siebel Server requires JAR files. These files allow the Java language to access the objects and methods of the Siebel Object Interface. These files are specific to the version of the Siebel application. Do not use these JAR files with other versions. For more information, see About the Siebel Java Data Bean Object Interface. To access the Siebel Java Data Bean
- Add the following JAR files to the CLASSPATH:
- Siebel.jar
- SiebelJI_lang.jar
- To install the Siebel Java Data Bean interface, do one of the following:
- Use the Siebel Enterprise Server Installer. Make sure the EAI Siebel Connectors option contains a check mark. For more information, see the Siebel Installation Guide for the operating system you are using.
- Install Siebel Tools. The Oracle Universal Installer installs the Siebel Java Data Bean interface by default when you install Siebel Tools.
- Start a new SiebelDataBean Java object.
- To call the Login method for the object you started in Step 3, use the following code:
SiebelDataBean l_sdb = new SiebelDataBean();
l_sdb.login(<parameters>);
You must use the Login method. You cannot use an object interface method that returns an active Siebel object because no Siebel objects are currently active. You must use your own Siebel objects. For more information, see Step 2.
Example of Accessing the Siebel Java Data Bean
The following example code accesses the Siebel Java Data Bean. You can use a Java IDE to compile and run this code: 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 Java Data Bean m_dataBean = new SiebelDataBean();
// log in to the Siebel 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()); } } }
Using Single Sign-on (SSO) with Siebel Java Data Bean
If you use single sign-on (SSO) with Siebel Java Data Bean, then you must include the following items in the login:
- Login ID of an employee as the username.
- The value of the TrustToken parameter in the connect string. To determine the value for the TrustToken, examine the TrustToken parameter in the Siebel application configuration (CFG) file. For more information, see Setting the Connect String.
For example: m_dataBean.login("Siebel://gatewayserver:2321/enterpriseServer/SCCObjMgr_enu", SADMIN, HELLO,"enu");
where:
- SADMIN is an employee.
- The TrustToken parameter is HELLO in the LDAPSecAdpt section of the Siebel application configuration (CFG) file.
Customizing the Parameters a Third-Party Application Uses to Connect Through the Siebel Java Data Bean
You can customize the parameters that a third-party application uses when it connects to a Siebel application through the Siebel Java Data Bean. To customize the parameters a third-party application uses to connect through the Siebel Java Data Bean
- Open the siebel.properties file.
This file is located in your classpath, which is an operating system environment variable that a Java program references. The siebel.properties file can exist in any location. The CLASSPATH environment variable must include an entry for this file so that the Java Virtual Machine can find the file when it starts.
- Set the properties.
For more information, see Properties of the Siebel Properties File.
Properties of the Siebel Properties File
Table 6 describes the properties of the siebel.properties file.
Table 6. Properties of the Siebel Properties File
|
|
|
Siebel Connection Manager |
siebel.conmgr.txtimeout |
The transaction timeout in milliseconds. The default value is 600000, which is 10 minutes. The maximum value is 2,147,483,647, which is approximately 25 days. |
siebel.conmgr.poolsize |
The connection pool size. For more information, see Determining the Total Number of Open Connections. |
siebel.conmgr.sesstimeout |
The transaction timeout in seconds on the Siebel client. The default value is 2700, which is 45 minutes. The maximum value is 2,147,483,647, which is approximately 68 years. |
siebel.conmgr.retry |
The number of open session retries. The default value is 3. |
siebel.conmgr.jce |
Sets the Java Cryptography Extension (JCE):
- To use JCE, set the value to 1.
- To not use JCE, set the value is 0.
For more information, see Encrypting Communication Between the Java Data Bean and the Siebel Server. |
Siebel created code for Java EE Connector Architecture and Java Data Bean |
siebel.connection.string |
The Siebel connection string. |
siebel.user.name |
The user name to log in to the Object Manager. |
siebel.user.password |
The password to log in to the Object Manager. |
siebel.user.language |
The preferred language for the user. |
siebel.user.encrypted |
Determines if Siebel CRM encrypts the username and password. |
siebel.jdb.classname |
The default Java Data Bean (JDB) classname. |
Java System Properties |
file.encoding |
The character encoding on the Siebel client. For example, cp1252, utf8, unicodeBig, or cp942. Java system properties are not Siebel properties. |
Example of the Siebel Properties File
The following code is an example of the 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
Determining the Total Number of Open Connections
The connection pool maintains a set of connections to a specific server process. The default value for the siebel.conmgr.poolsize property is 2. The maximum value is 500. The siebel.conmgr.poolsize property and the Min MT Server parameter on the object manager determine the total number of open connections. Each MT server process is a Windows process that includes a connection pool. The total number of open connections is the value in the siebel.conmgr.poolsize property multiplied by the value in the Min MT Server parameter. For example, if the siebel.conmgr.poolsize is 2, and if the Min MT Server parameter is 3, then the total number of open connections is six. Customizing Character Encoding for the Siebel Java Data Bean
The character encoding of the Siebel Server and the character encoding of the Siebel client must be the same. This allows the Siebel client and the Siebel Server to communicate correctly. If the Siebel client and the Siebel Server default character encoding cannot be the same, then you can modify the Siebel client character encoding. To customize character encoding for the Siebel Java Data Bean
Table 7 lists character encoding mappings you can use for the Java Data Bean. The Siebel Value column contains the codes you can specify in the CodePageValue variable.
Table 7. Character Encoding Mappings You Can Use for the Java Data Bean
|
|
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 the Java Data Bean and the Siebel Server
To encrypt communication between the Siebel Java Data Bean and the Siebel Server, you can use the Rivest, Shamir and Adleman (RSA) encryption libraries. For information about platforms you can use with encryption, see Siebel System Requirements and Supported Platforms on Oracle Technology Network. To encrypt communication between the Siebel Java Data Bean and the Siebel Server
- Enable encryption in the Object Manager server component that you use for the communication between the Java Data Bean and the Siebel Server.
For more information, see Siebel System Administration Guide.
- Set the encryption parameter of the connect string in the Siebel Java Data Bean to rsa.
For example:
siebel.tcpip.rsa.none:// gateway / enterprise / ObjMgr
where:
- gateway is the name of the gateway
- enterprise is the name of the enterprise
- ObjMgr is the name of the Object Manager
Encrypting Communication on a Platform That the RSA Libraries do Not Support
To use encryption on a platform that the RSA libraries do not support, Oracle uses the Java Cryptography Extension (JCE) v1.2.1 specification. JCE provides a way to encrypt, create the encryption key, create the key agreement, and handle Message Authentication Code. With JCE, you can use some other qualified cryptography library as a service provider. For information about developer resources for Java technology, see the following Web site: http://www.oracle.com/technetwork/java/java-sun-com-138872.html
To encrypt communication on a platform that the RSA libraries do not support
- Download and install the JCE v1.2.1 software, policy files, and documentation.
For information about installing and configuring your Java Virtual Machine for use with JCE, see the following Web site:
http://java.sun.com/products/archive/jce/
Note that you can only use a static specification of JCE providers with the Siebel Java Data Bean.
- Modify the java.security file to specify your provider of choice.
- Make sure the classpath variable includes the necessary provider JAR files.
- Set the siebel.conmgr.jce property in the siebel.properties file to 1.
Login Errors You Might Encounter When You Use the Siebel Java Data Bean
The Siebel Java Data Bean might return a login error that is similar to the following: Siebel Exception thrown invoking login Method. Code--1. Message-Logon request 75 was abandoned after 2ms connection.
Any of the following items can cause this error:
- An Object Manager process is down.
- A hardware reset is required. For example, Object Manager hardware, router, switch, and so forth.
- There is a problem with an operating system setting or the operating system network.
- There is a network failure.
- There is a network address translation timeout.
Using the Siebel Java Data Bean with Multiple Threads
Multiple threads of a single process must not access a common instance of the Siebel Java Data Bean. If a process with multiple threads must use the Siebel Java Data Bean, then each thread must create a separate instance of the Siebel Java Data Bean. Do not reuse an instance of any other object that the Siebel Java Data Bean makes available across multiple threads of the same process. This requirement includes the following objects:
- SiebelBusObject
- SiebelBusComp
- SiebelService
- SiebelPropertySet
CAUTION: You must configure Siebel CRM to create one instance of the Siebel Java Data Bean for each thread that must use it. If a thread gets Siebel Java Data Bean Objects, then do not configure Siebel CRM to share these objects with any other thread.
|