Version 9.6
 —  EntireX Wrapper for Enterprise JavaBeans  —

Controlling Applications - EntireX Wrapper for Enterprise JavaBeans

This document covers the following topics:


Environment Entries to Control EJB

Start of instruction setTo define the behavior of the EJB

Top of page

Using Security/Encryption

Start of instruction setTo use EntireX Security

With these settings the Broker checks user and password.

Start of instruction setTo use EntireX Security with encryption level broker

With these settings the Broker checks user and password, the data of send and receive calls are encrypted from the application server to the Broker.

Start of instruction setTo use EntireX Security with encryption level target

With these settings the Broker checks user and password, and the data of send and receive calls are encrypted from the application server to the RPC server.

Top of page

Using Natural Security

Start of instruction setTo use Natural Security

With these settings the Broker checks Natural user and Natural password.

If you want to use EntireX Security and Natural Security and the Natural Security user name is not the same as the EntireX Security user name, set entry name RPC User to the current Natural user. If the Natural Security password is the same as the EntireX Security password, set entry name RPC User to the current Natural user.

Top of page

Using Compression

Start of instruction setTo use EntireX Compression

Value Description Data Type
9 Best Compression string
1 Best Speed string
Y(es) or 6 Default Compression string
8 Deflated string
N(o) or 0 No Compression string

Top of page

Using Internationalization with Wrapper for EJB

It is assumed that you have read the document Internationalization with EntireX and are familiar with the various internationalization approaches described there.

EntireX Java components use the codepage configured for the Java virtual machine (JVM) to convert the Unicode (UTF-16) representation within Java to the multibyte or single-byte encoding sent to or received from the broker by default. This codepage is also transferred as part of the locale string to tell the broker the encoding of the data if communicating with a broker version 7.2.x and above.

To change the default, see your JVM documentation. On some JVM implementations, it can be changed with the file.encoding property. On some UNIX implementations, it can be changed with the LANG environment variable.

Which encodings are valid depends on the version of your JVM. For a list of valid encodings, see Supported Encodings in your Java documentation. The encoding must also be a supported codepage of the broker, depending on the internationalization approach.

With the entry name Codepage you can

Top of page

Tracing

Start of instruction setTo switch on bean tracing

Some EJB-relevant information is written to the standard output of the application server.

Start of instruction setTo switch on Java ACI tracing

Trace Level Description
0 No trace output
1 Trace all Broker calls and other major actions
2 Dump the send-and-receive buffer
3 Dump the buffers sent to the Broker and received from the Broker

Start of instruction setTo write the trace information to a file

Top of page

Deployment with an Application Server

General Information

Note:
Version numbers to third-party products are listed centrally in the section EntireX Prerequisites. In the examples, notation such as nn or nnn refers to the two- or three-digit version numbers.

Make sure that the application server can access the EntireX Java Runtime.

For the compilation of the generated sources and the generation of the deployment descriptors we use Ant and XDoclet.

Load, install, and verify Ant. See <cd-root>/share/3rdparty/ant nnn.zip or http://ant.apache.org/.

Load, install, and verify XDoclet. See <cd-root>/share/3rdparty/xdoc nnn.zip or http://sourceforge.net/projects/xdoclet/.

Windows users:
If your path names or file names contain blanks, you have to use the short name notation without blanks, e.g.: Use C:\PROGRA~1\XYZ instead of C:\Program Files\xyz

Please refer to the vendor for more details about the application server used.

Deployment with a WebSphere Application Server under UNIX

Note:
The following description has been verified with the delivered EJB example and WebSphere 5 on RedHat Linux Advanced Server 2.1 for x86 and might be different for other WebSphere releases.

The following steps are described in this section:

Compiling the EJB Example

Start of instruction setTo compile the example

  1. You can use the build.xml file as a template, which is provided in directory examples/EJBWrapper.

  2. Change the assignment antfile="example.xml" according to your own XML file name.

  3. Adapt the basedir and the following properties in the build.xml file:

       <project name="Example" default="all" basedir="/SAG/exx/vnnn/examples/ejb_wrapper">
          <target name="init">
            <property name="exx.classes" value="/SAG/exx/vnnn/classes/entirex.jar"/>
            <property name="ant.classes" value="/SAG/antnnn/lib/ant.jar"/>
            <property name="xdoclet.classes" value="/SAG/xdocnnn/lib/xdoclet.jar"/>
          </target>
          <target name="ibm_init" depends="init">
            <property name="java.classes" value="/opt/jdknnn_06/lib/tools.jar"/>
            <property name="j2ee.classes" value="/opt/j2sdkeennn/lib/j2ee.jar"/>
          </target>
  4. Compile the bean components:

    ant -buildfile build.xml ibm_compile
  5. Compile the client main program:

    ant -buildfile build.xml ibm_compile_client

Generating Code for Deployment

Start of instruction setTo generate code for deployment

  1. Start the Assembly tool of WebSphere:

    /opt/WebSphere/AppServer/bin/assembly.sh
  2. From the New tab choose EJB Module.

    In the left frame of the screen the types of beans belonging to the module are listed (Session Beans, Entity Beans, Message Driven Beans, etc.), while the right frame shows the properties.

  3. Create a new deployment descriptor for the bean by selecting Session Beans and choosing New.

    The window New Session Bean will be displayed.

  4. In the tab General enter the EJBName, the EJB class, and in the Remote section Home and Interface:

           EJB name:  EJBExampleBean
           EJB class: example.ejb.EJBExampleBean
           Remote
           Home:      example.interfaces.EJBExampleHome
           Interface: example.interfaces.EJBExample
  5. In the tab Advanced choose session type Stateful.

  6. In the tab Bindings set the JNDI Name

    JNDI name: EJBExample

  7. Confirm with OK.

  8. On the left screen choose Add Files.

  9. Add all class files created by the EntireX Workbench EJB function and compile.

  10. Add all class files of entirex.jar

  11. From the File menu, choose Generate Code for deployment... and then Generate Now.

    A file Deployed_EJBExample.jar will be generated.

  12. Close the bean module.

Creating an Application Client

Start of instruction setTo create an application client

  1. Create a new application client. From the File menu, choose New and Application Client.

  2. Change the Display name and complete the text field Client in the Main class.

  3. Select EJB References and choose New.

  4. In the tab General enter the Bean name ejb/MyExample.

  5. Obtain the environment naming context of the application client.

     

  6. Enter the Home and Remote interface:

          Name:   ejb/MyExample
          Home:   example.interfaces.EJBExampleHome
          Remote: example.interfaces.EJBExample
  7. In the tab Bindings enter the JNDI name.

    JNDI name: EJBExample

  8. Save the application client (ApplicationClient.jar).

Creating an Application

Start of instruction setTo create a new application

  1. From the File menu, choose New and choose Application.

  2. Change the Display name.

  3. Select Application Clients and import ApplicationClient.jar.

  4. Select EJB Module and import Deployed_EJBExample.jar.

  5. Save the application as Application.ear.

EJB Deployment

Start of instruction setTo deploy the EJB

  1. Open an Administration console in a Browser (http://localhost:9090/admin).

  2. From the File menu, choose Applications and choose Install New Application and enter the path to your application (enter path to the file Application.ear).

  3. Choose Next.

  4. Specify the prefix you have already chosen for the client application (etb/MyExample) and choose Do not override existing bindings.

  5. Choose Next.

  6. Choose Enable class reloading and Next.

  7. Verify the JNDI name and choose Next.

  8. Choose EJB Module, Next and then Finish.

  9. Save the configuration with Save to Master Configuration.

  10. Choose Enterprise Applications and start the application.

Top of page