Configuring the Adapter for Enterprise Java Beans

In this section:

x

Configuring the adapter consists of specifying connection and authentication information for each of the connections you want to establish.

There are two methods by which a user can be authenticated when connecting to an Enterprise Java Beans database server:

When a client connects to the Reporting Server, the user ID and password are passed to the Web Application Server for authentication, and are not authenticated by the Reporting Server. To implement this type of authentication, start the Server with security turned off. The server permits the client connection and then stores an encrypted form of client connection message. The encrypted message can be used for connection to a Web Application Server at any time during the duration of the server session.


Top of page

x
Declaring Connection Attributes for the Web Application Server

How to:

Reference:

The SET CONNECTION_ATTRIBUTES command allows you to declare a connection to one Web Application Server, and to supply the attributes necessary for connecting to the server.

You can connect to more than one Web Application Server by issuing multiple SET CONNECTION_ATTRIBUTES commands. The actual connection takes place when the first query referencing that connection is issued (see Selecting a Web Application Server to Access). You can include SET CONNECTION_ATTRIBUTES commands in an RPC or a server profile. The profile can be encrypted.

If you issue multiple SET CONNECTION_ATTRIBUTES commands:



x
Procedure: How to Declare Connection Attributes for the Web Application Server

You can configure the adapter from either the Web Console or the Data Management Console.

  1. From the Web Console menu bar, click Adapters.

    or

    From the Data Management Console, expand the Adapters folder.

    The Adapters folder opens.

  2. Expand the Available folder, if it is not already expanded.
  3. Expand the appropriate group folder and the specific adapter folder. The group folder is described in the connection attributes reference.
  4. Right-click the adapter name and/or version and select Configure.

    The Add Adapter to Configuration pane opens.

  5. Enter values for the parameters required by the adapter, as described in the connecton attributes reference.
  6. Click Configure. The configured adapter is added to the Adapters list in the navigation pane.


x
Reference: Connection Attributes for Enterprise Java Beans

The EJB adapter is under the Procedures group folder.

The following list describes the connection attributes for which you can supply values. To complete the attribute declaration, click the Configure button.

Connection name

Arbitrary connection name to be used to reference the connection.

URL

URL of the machine where the Web Application Server is running.

Security

There are two methods by which a user can be authenticated when connecting to a database server:

  • Explicit. The user ID and password are explicitly specified for each connection and passed to the database, at connection time, for authentication.
  • Password Passthru. The user ID and password received from the client application are passed to the database, at connection time, for authentication.
User

User name for the Web Application Server authenticated login.

Password

Password that identifies the entered user name.

Select profile

Select a profile from the drop-down menu to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.

If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field (The extension is added automatically).

Store the connection attributes in the server profile (edasprof).



x
Syntax: How to Declare Connection Attributes for the Web Application Server Manually

For BEA WebLogic Application Server with Explicit authentication:

ENGINE EJB SET CONNECTION_ATTRIBUTES connection_name 
't3://hostname:port'/userid,password

For BEA WebLogic Application Server with Password Passthru authentication:

ENGINE [EJB] SET CONNECTION_ATTRIBUTES connection_name 
't3://hostname:port' 

For IBM WebSphere Application Server with Explicit authentication:

ENGINE [EJB] SET CONNECTION_ATTRIBUTES connection_name 
'iiop://hostname:port'/userid,password

For IBM WebSphere Application Server with Password Passthru authentication

ENGINE [EJB] SET CONNECTION_ATTRIBUTES connection_name 
'iiop://hostname:port'

where:

EJB

Indicates the adapter.

connection_name

Is any name used as a connect descriptor to a Web Application Server across the network.

hostname

Is the host name of the computer where the Web Application Server is running.

port

Is the TCP/IP port number on which the Web Application Server is listening for incoming connections.

userid

Is the authorization ID known to the Web Application Server.

password

Is the password associated with the authorization ID.



Example: Declaring Connection Attributes for the BEA WebLogic Application Server

The following SET CONNECTION_ATTRIBUTES command uses Password Passthru authentication to connect to BEA1, the BEA WebLogic Application Server running on the machine with hostname UNXSOL28:

ENGINE EJB SET CONNECTION_ATTRIBUTES BEA1 't3://UNXSOL28:7001'

The following SET CONNECTION_ATTRIBUTES command uses Explicit authentication to connect to MYBEA, a local BEA WebLogic Application Server:

ENGINE EJB SET CONNECTION_ATTRIBUTES MYBEA 
't3://localhost:7001'/USERA,PWDA


Example: Declaring Connection Attributes for the IBM WebSphere Application Server

The following SET CONNECTION_ATTRIBUTES command uses Password Passthru authentication to connect to IBMCON1, the IBM WebSphere Application Server running on the machine with hostname AIX43:

ENGINE EJB SET CONNECTION_ATTRIBUTES IBMCON1 'iiop://AIX43:900'

The following SET CONNECTION_ATTRIBUTES command uses Explicit authentication to connect to MYWSP, a local IBM WebSphere Application Server:

ENGINE EJB SET CONNECTION_ATTRIBUTES MYWSP 
'iiop://localhost:900'/USERB,PWDB

Top of page

x
Selecting a Web Application Server to Access

After you have used the SET CONNECTION_ATTRIBUTES command to declare which Web Application Servers will be accessed, select a specific Web Application Server from the list of declared servers. You can do this in one of two ways:


Top of page

x
Controlling Connection Scope

How to:

The SET AUTODISCONNECT command controls the persistence of connections each of the connections you want to establish.

A connection occurs at the first interaction with the declared Web Application Server.



x
Syntax: How to Control the Connection Scope
ENGINE EJB SET AUTODISCONNECT ON {FIN|COMMAND|COMMIT}

where:

EJB

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

FIN

Disconnects automatically only after the session has been terminated. FIN is the default value.

COMMAND

Disconnects automatically after each request. Depending on how often the event occurs, the SET AUTODISCONNECT command may result in considerable overhead. Almost all of this overhead is not related to the server. It is related to the operating system and the data source.

COMMIT

Disconnects automatically only after COMMIT or ROLLBACK is issued as a native SQL command.


iWay Software