Java Reference
In-Depth Information
unmarshaled, they don't have to be serializable. For some applications, this is
the only way that they can use beans.
Finally, keep in mind that the choice of local versus remote interfaces is
not necessarily an either-or choice. For our session bean we have defined both
kinds of interfaces. Then the deployment can determine which one will be used.
22.2.6
In order to compile these bean-related Java classes, you need to have a J2EE
JAR in your classpath. If you've installed JBoss into /usr/local/jboss , you
could add the JAR to your classpath this way:
Compiling Your Beans
export CLASSPATH="/usr/local/jboss/client"\
"/jboss-j2ee.jar:.:${CLASSPATH}"
If you have the Sun J2EE reference implementation installed on your
system (in /usr/local ), then you could use:
export CLASSPATH="/usr/local/SUNWappserver"\
"/lib/j2ee.jar:.:${CLASSPATH}"
If you have Geronimo installed on your system (with an environment
variable GHOME to hold its location), then you would use: 1
export CLASSPATH="${GHOME}/repository/geronimo-spec/jars"\
"/geronimo-spec-j2ee-1.0-M1.jar:.:${CLASSPATH}"
In any case, the point is to have in your classpath the JAR file which
contains the javax/ejb/ classes, such as EJBObject.class . If you haven't
installed one of these containers on your machine, then download a copy of
the JAR from the machine where that container is installed. Put your copy
somewhere in your classpath, as in the examples above.
1. Our JAR is named geronimo-spec-j2ee-1.0-M1.jar but yours will likely have a dif-
ferent name by the time the J2EE-certified version of Geronimo is available. It may likely just
have the trailing -M1 dropped from the name; check in the geronimo-spec/jars directory.
Another option is to use any of the J2EE JARs, for example, from the Sun reference implemen-
tation. That's the advantage of standards. Any of them should work for this compilation step.
The resulting compiled code should be deployable to any server. “Compile once, run
anywhere,” right?
Search WWH ::




Custom Search