Creating a BISession Object

Nearly all applications must instantiate a BISession object. This object creates an application module and then connects to that application module. The application module keeps track of application-wide information, such as information about the user of the application.

Specifying a user of the session

The BISession requires a user for the application. To specify a user, you call setBIUser on the BISession. This sets the BIUSER property, which is defined in oracle.dss.security.BISecurityConstants, to the principal user for the application server.

Setting this property on the BISession also sets the environment property in the hash table for the InitialPersistenceManager .

Connecting to the application module

After you specify a user, you can then connect to the application module. To do this, you call the connect method of the BISession.

Example: Connecting

The following code connects to the application module.


// BIUser is defined in the // oracle.dss.security package BISession session = new BISession(); BIUser user = new BIUser("JDoe"); session.setBIUser(user); session.connect();