Creating a Runtime Configuration

You define the context in which the IDE runs the connection code.

The runtime configuration specifies arguments that are passed to the Java™ virtual machine (VM). In this lesson, you define VM variables, set VM arguments, and set security-related properties for the WebSphere IBM Secure Association Service (SAS).

Setting SAS Client Properties

About this task

When global security in the WebSphere Application Server is enabled, the IBM® Secure Association Service (SAS) supplies the security context for communication between the client and the Enterprise JavaBeans running on the server. SAS behavior is controlled by the sas_client_props file, which you must modify. The default location of sas_client_props is specified in the following table.
Development Environment Windows non-Windows
Remote C:\Program Files\IBM\WebSphere\AppClient\properties /opt/IBM/WebSphere/AppClient/properties
Local C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\properties /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties

Procedure

To make the recommended changes to the SAS client properties:

  1. On your system, make a backup copy of sas_client_props.
  2. Open sas_client_props in a text editor.
  3. In the text editor, confirm that the SAS properties listed in the following table have the recommended values.
    Development Environment Values
    Remote

    (Using WebSphere Application Client)

    com.ibm.CORBA.securityServerHost=<ceServerName>
    Note: The Content Engine server name must be resolvable in DNS from your client machine.

    com.ibm.CORBA.securityServerPort=2809

    com.ibm.CORBA.loginSource=none

    com.ibm.CSI.performTransportAssocSSLTLSRequired=false

    com.ibm.CSI.performTransportAssocSSLTLSSupported=true

    Local

    (Using WebSphere Application Server)

    com.ibm.CORBA.loginSource=none

    com.ibm.CSI.performTransportAssocSSLTLSRequired=false com.ibm.CSI.performTransportAssocSSLTLSSupported=true

    Note: For WebSphere Application Server versions 8.0.0.x and higher, the default value for performTransportAssocSSLTLSRequired is true, and the default value for performTransportAssocSSLTLSSupported is false. Therefore, to avoid authentication problems, make sure that you change these values as specified in the previous table.
  4. Save the file and exit the text editor.

Defining VM Variables

About this task

The arguments that are passed to the Java virtual machine (VM) include the path to the WebSphere Application Client for remote development, or to the WebSphere Application Server for local development. To simplify path entry, you can assign a variable to a path string.

Procedure

  1. In the Eclipse menu bar, click Run > Run Configurations.
  2. In the Run Configurations dialog box, click Java Application in the left pane.
  3. Click the New launch configuration icon in the left upper corner.

    By default, Eclipse names the run configuration after the name of your Java class.

  4. If you want to change the default name of the run configuration, modify the value in the Name field.
  5. Click Apply.
  6. Open the Argument tab of the Run Configurations dialog box.
  7. On the Argument tab, click Variables in the VM arguments section.
  8. In the Select Variable dialog box, click Edit Variables.
    1. In the Preferences (Filtered) dialog box, click New.
    2. In the New String Substitution Variable dialog box, enter a variable for the Name field, a path to the WebSphere root directory for the Value field, and, optionally, a description. The following table gives you an idea of the type of values to enter, depending on whether you are using a remote or local development environment.
      Example Variable Name Example Value Example Description
      Remote Development Environment:

      WS_APPCLIENT

      C:\Program Files\IBM\WebSphere\AppClient

      OR

      /opt/IBM/ WebSphere /AppClient
      Root folder for WebSphere Application Client
      Local Development Environment:

      WS_APPSERVER

      C:\Program Files\IBM\WebSphere\AppServer

      OR

      /opt/IBM/WebSphere/AppServer
      Root folder for WebSphere Application Server
    3. Click OK.
  9. In the Preferences (Filtered) dialog box, click OK.
  10. In the Select Variable dialog box, click OK.
  11. On the Arguments tab of the Run Configurations dialog box, remove ${build_files} from the VM arguments field.
  12. Keep the Run Configurations dialog box open and proceed to the next topic.

Setting VM Arguments

About this task

VM arguments indicate the location of security settings and the WebSphere JAR files that are needed for code execution.

Procedure

  1. In the Arguments tab of the Run Configurations dialog box, enter in the VM arguments field the VM arguments that are listed in the following table. Modify the arguments for your environment.
    Development Environment VM Arguments
    Remote

    (Using WebSphere Application Client)

    Windows

    -Djava.security.auth.login.config="c:\Program Files\IBM\FileNet\CEClient\config\samples\jaas.conf. WebSphere "

    -Djava.ext.dirs="${WS_APPCLIENT}\java\jre\lib\ext;${WS_APPCLIENT}\lib;${WS_APPCLIENT}\plugins"

    -Dcom.ibm.CORBA.ConfigURL="file:${WS_APPCLIENT}\properties\sas.client.props"

    non-Windows

    -Djava.security.auth.login.config="/opt/IBM/FileNet/CEClient/config/samples/jaas.conf. WebSphere "

    -Djava.ext.dirs="${WS_APPCLIENT}/java/jre/lib/ext;${WS_APPCLIENT}/lib;${WS_APPCLIENT}/plugins"

    -Dcom.ibm.CORBA.ConfigURL="file:${WS_APPCLIENT}/properties/sas.client.props"

    Local

    (Using WebSphere Application Server)

    Windows

    -Djava.security.auth.login.config="c:\Program Files\IBM\FileNet\ContentEngine\config\samples\jaas.conf. WebSphere "

    -Dcom.ibm.CORBA.ConfigURL="file:${WS_APPSERVER}\profiles\AppSrv01\properties\sas.client.props"

    -Djava.ext.dirs="${WS_APPSERVER}\java\jre\lib\ext;${WS_APPSERVER}\runtimes"

    non-Windows

    -Djava.security.auth.login.config="/opt/IBM/FileNet/ContentEngine/config/samples/jaas.conf. WebSphere "

    -Dcom.ibm.CORBA.ConfigURL="file:${WS_APPSERVER}/profiles/AppSrv01/properties/sas.client.props"

    -Djava.ext.dirs="${WS_APPSERVER}/java/jre/lib/ext;${WS_APPSERVER}/runtimes"

  2. Click Apply.
  3. Click Close.