Java Web Server 2.0  

Installing Beans


Documentation Contents / Documentation Index / Glossary / Administration Tool Help

JavaBeansTM components, or more simply Beans, are reusable pieces of functionality (programming logic). They are written in the JavaTM programming language and conform to the JavaBeans design pattern. The design pattern describes a common way of implementing the Bean's functionality and supports the following characteristics of JavaBeans components: introspection, customization, events, properties, and persistence.

JavaBeans components differ from applets (another reusable component type) in that JavaBeans components are accessed on the server-side and have no user interface. In contrast, applets are accessed on the client-side and have a visual representation.

A JavaBeans component is defined as the JAR (Java ARchive) file and, optionally, any associated native code. The JAR file itself contains the Bean class code and any resources.

To Install JavaBeans Components That Access Native Code (JNI):

Some JavaBeans components might access native code. For example, they might encapsulate legacy code for some particular business function and use the Java Native Interface (JNI) to provide access to that logic from Java.

On Windows platforms

  1. Copy the JAR file into the lib/ directory directory of the Java Web Server installation.

  2. Copy the *.dll file holding the JNI module into the lib/ directory.
    (The JNI module and JAR file must be in the same directory.

  3. Restart the Java Web Server.
    The JavaBeans component will be accessible through the default class loader of the server. This means that the JavaBeans component will not be running inside the server sandbox.

On UNIX platforms

  1. Copy the JAR file into the lib/ directory of the Java Web Server installation.

  2. Copy the *.so file holding the JNI module into the lib/solaris/sparc directory.

  3. Restart the Java Web Server.
    The JavaBeans component will be accessible through the default class loader of the server. This means that the JavaBeans component will not be running inside the server sandbox.

Note: The servlet location must be on the class path (for example, in server_root/lib) to use the native methods.

To Install JavaBeans Components With No Native Code:

  1. Move the JavaBeans component (JAR file) into the lib/ directory of the Java Web Server installation.
  2. Restart the Java Web Server.
    The JavaBeans component will be accessible through the default class loader of the server. This means that the JavaBeans component will not be running inside the server sandbox.
     

To Remove JavaBeans Components:

  1. Stop the Java Web Server.
  2. Remove the JAR file and any associated native code.
    (See the Installation procedures above for the location of native code, if any.) To remove the JAR file, either delete the file or move it to a location not on the CLASSPATH.
  3. Restart the server.
     

Top
java-server-feedback@java.sun.com
Copyright © 1999 Sun Microsystems, Inc.
All Rights Reserved.