8.3 J2EEC Utility for Creating Stubs and Ties for a JAX-RPC Web Service


8.3 J2EEC ” Utility for Creating Stubs and Ties for a JAX-RPC Web Service

8.3.1 Availability

J2EE 1.4 reference implementation.

8.3.2 Synopsis

 j2eec [-keep  -keepgenerated ] [-o output] module 

8.3.3 Description

j2eec is a command-line utility that is part of the J2EE reference implementation. It accepts a deployable J2EE module and creates a JAR file containing some or all of the following:

  • Client-side stubs for EJBs that have a remote interface

  • Client-side stubs for web services

  • Server-side ties for web services

  • A sun-j2ee-ri.xml file containing information that can be used by containers into which the original module is deployed

The newly created JAR file can be used as follows :

  • To deploy the original module to a J2EE RI application server using the -deployGeneratedModule option of the deploytool command (discussed later), without incurring the overhead of stub and tie generation. This technique may be useful if you need to deploy the same module to more than one server.

  • As the stubs file when running a J2EE application client using the runclient utility, as described in Section 6.4. If the client JAR file contains service-ref elements referring to web services deployed in the server, the sun-j2ee-ri.xml file contains the information that the client container needs to bind a generated Service object that can be used to access the service in the application's JNDI environment at runtime.

8.3.4 Options

The behavior of the j2eec command is determined primarily by the deployment descriptors provided in the J2EE module supplied on its command line, which may be an EJB JAR file, a web archive, a J2EE client application archive, or an EAR file containing any combination of the other module types. In the latter case, the generated file includes all of the stubs, ties, and other information required for each of the modules that it contains. The following command-line options are also available:


Synonymous options that cause the Java source files for the stubs and ties and other files generated by j2eec to be retained. By default, these files are deleted. Temporary files are placed in a system-dependent location. For Windows 2000 and Windows XP, for example, you'll find these files in a directory beneath %HOME%\Local Settings\Temp , where %HOME% represents your home directory. The actual location is displayed on standard output when the command is executed.

-o filename

Specifies the name of the JAR file to which j2eec should write its output. If this argument is not supplied, output is written to a file called generated.jar in the caller's working directory.


Java Web Services in a Nutshell
Java Web Services in a Nutshell
ISBN: 0596003994
EAN: 2147483647
Year: 2003
Pages: 257
Authors: Kim Topley
Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net