![]() |
![]() |
BEA WebLogic Enterprise 4.2 Developer Center |
![]() HOME | SITE MAP | SEARCH | CONTACT | GLOSSARY | PDF FILES | WHAT'S NEW |
||
![]() JAVA REFERENCE | TABLE OF CONTENTS | PREVIOUS TOPIC | NEXT TOPIC |
This chapter describes the following commands:
This chapter is an alphabetical reference that describes each WebLogic Enterprise development command and Interface Repository administration command for developing Java applications for the Windows NT and UNIX environments. A list of valid parameters and options is shown for each command. For information about building C++ client and server applications, see the C++ Programming Reference.
Note:
For descriptions of the Before executing a WebLogic Enterprise command, you must ensure that the WebLogic Enterprise On Windows NT:
On UNIX:
For c shell (csh) For Bourne (sh) or Korn (ksh): Before executing a WebLogic Enterprise command, you must set the environment variables that are listed with each command.
On Windows NT systems, the syntax for setting an environment variable is:
On UNIX systems, the syntax for setting an environment variable is:
idl2ir
, irdel
, and ir2idl
commands, see the Administration Guide.
bin
directory is in your defined path:
Set Path=%TUXDIR%\Bin;%Path%
: set path = ($TUXDIR/bin $path)
PATH=$TUXDIR/bin:$PATH
export PATHset
var
=
value
Synopsis
Constructs a Java WebLogic Enterprise server application
jar
file.Syntax
buildjavaserver [-s
searchpath]
input_fileDescription
Once the class files that make up a server application have been created and specified, along with interface activation and transaction policies, in the Server Description File, you use the
buildjavaserver
command to create thejar
file. Thejar
file contains all the server application class files and a server descriptor. The server descriptor is a serialized Java object that contains:
- Information about all the servant classes implemented by the server application
-s
- Specifies a path to be used by the
buildjavaserver
command to locate the classes and packages needed for building thejar
file. If you do not specify this option, thebuildjavaserver
command uses the class path by default.- input_file
- Specifies the name of the Server Description File. For information about creating this file, see Chapter 2, "Server Description File."
Environment
Variables
TUXDIR
- Finds the WebLogic Enterprise libraries and include files to use when compiling the server application.
LD_LIBRARY_PATH
(Solaris systems)- Indicates which directories contain shared objects to be used by the compiler, in addition to the WebLogic Enterprise shared objects. A colon (
:
) is used to separate the list of directories.LIB
(Windows NT systems)- Indicates a list of directories within which to find libraries. A semicolon (;) is used to separate the list of directories.
Portability
The
buildjavaserver
command is not supported on client-only WebLogic Enterprise systems.Example
The following example builds a Java WebLogic Enterprise server application
jar
file on a Solaris system. This example uses thecom/acme
path for locating classes and packages for the archive and also uses the Server Description FileMyServer.xml
.
buildjavaserver -s com/acme MyServer.xml
Synopsis
Constructs an XA resource manager to be used with a Java server application group.
Syntax
buildXAJS [-v] -r
rmname[-o
outfile]
Description
Use this command to build an XA resource manager that you want to use with a Java server application group. In the application's
UBBCONFIG
file, you use theJavaServerXA
element in place of theJavaServer
element to associate the XA resource manager with a specified server group. Note that a server application configured to use the default XA resource manager (that is,NULL
) cannot coexist in a server group that uses a nondefault XA resource manager, such as Oracle. Refer to the Administration Guide for more information about configuring server groups with an XA resource manager.Options
-v
- Specifies that the
buildXAJS
command should work in verbose mode. In particular, it writes the build command to its standard output.-r
rmname- Specifies the resource manager associated with this server. The value
rmname
must appear in the resource manager table located in$TUXDIR/udataobj/RM
on Solaris systems, or%TUXDIR%\udataobj\RM
on Windows NT systems.- On Solaris systems, each entry in this file is of the form
rmname:rmstructure_name:library_names
. On NT systems, each entry in this file is of the formrmname;rmstructure_name;library_names
.- Using the
rmname
value, the entry in$TUXDIR/udataobj/RM
or%TUXDIR%\udataobj\RM
automatically includes the associated libraries for the resource manager and properly sets up the interface between the transaction manager and the resource manager. The valueTUXEDO/SQL
includes the libraries for the BEA TUXEDO System/SQL resource manager. Other values can be specified as they are added to the resource manager table. If the-r
option is not specified, the default is to use the null resource manager.-o
outfile- Specifies the name of the output file. If no name is specified, the default is
JavaServerXA
.Environment
Variables
TUXDIR
- Finds the WebLogic Enterprise libraries and include files to use when compiling the server application.
LD_LIBRARY_PATH
(Solaris systems)- Indicates which directories contain shared objects to be used by the compiler, in addition to the WebLogic Enterprise shared objects. A colon (:) is used to separate the list of directories.
LIB
(Windows NT systems)- Indicates a list of directories within which to find libraries. A semicolon (;) is used to separate the list of directories.
Portability
The
buildXAJS
command is not supported on client-only WebLogic Enterprise systems.Example
The following example builds a Java server XA resource manager on a Solaris system:
buildXAJS -r oracle7
Synopsis
Compiles the Object Management Group (OMG) Interface Definition Language (IDL) file and generates client stub and server skeleton files required for the interface definitions being implemented in Java. Use this command only when you are creating a Java server application.
Syntax
m3idltojava [-p] [-j
javaDirectory] [-I
directory][-D
symbol]
symbol
[-U] [-f
options]
idl-filename...
Description
The
m3idltojava
command compiles OMG IDL source files into Java source code. You then use the javac compiler to compile that source into Java bytecodes. The OMG IDL declarations from the named OMG IDL files are translated to Java declarations according to the mapping from OMG IDL to Java.Given the provided
idl-filename file(s), the
m3idltojava
command generates the following files for each interface defined in the server application's OMG IDL file:
interface-name
.java
- Contains the Java version of the interface definitions in the OMG IDL file. Each interface implementation extends the
org.omg.CORBA.Object
class._interface-name
Stub.java
- Is the client stub file.
- _
interface-name
ImplBase.java
- Is the Server skeleton file, which is extended by the server application's object implementation classes.
interface-name
Helper.java
- Contains the helper class for the object.
interface-name
Holder.java
- Contains the holder class for the object.
The
m3idltojava
compiler generates the client stub and server skeleton files. Any previous versions are overwritten.If an unknown option is passed to this command, the offending option and a usage message is displayed to the user, and the compile is not performed.
For more information about OMG IDL syntax, see Chapter 1, "OMG IDL Syntax."
Parameter
idl-filename
Represents the name of one or more files that contain OMG IDL statements. Options
-p
package- Specifies that generated Java classes should be part of the given package. The compiler creates the appropriate directory hierarchy and stores the generated files in the directory that corresponds to their package. If you specify the
-j
option, the hierarchy is created under the specified directory. Otherwise, the hierarchy is created under the current directory. You can override this option by using#pragma javaPackage
in the OMG IDL source file.-j
javaDirectory- Specifies that generated Java files should be written to the specified directory. This directory is independent of the
-p
option, if used.-I
directory- Specifies directories within which to search for include files, in addition to any directories specified with the
#include
OMG IDL preprocessor directive. Multiple directories can be specified by using multiple-I
options.There are two types of
#include
OMG IDL preprocessor directives:system
(for example,<a.idl>
) anduser
(for example,"a.idl"
). The path for system#include
directories is the system include directory and any directories specified with the-I
option. The path for user#include
directives is the location of the file containing the#include
directive, followed by the path specified for the system#include
directive.By default, the text in files included with an
#include
directive is not included in the client and server code that is generated.-D
symbol- Specifies a symbol to be defined during OMG IDL file preprocessing. The
m3idltojava
command passes this symbol to the preprocessor.-U
symbol- Specifies a symbol to be undefined during OMG IDL file preprocessing. The
m3idltojava
command passes this symbol to the preprocessor.-f
options- You can enable the following options by specifying them as shown, and disable them by appending the string
no-
. For example, to prevent the C preprocessor from being run on the input OMG IDL files, specify-fno-cpp
.
-flist-flags
- Displays the state of all -f flags. By default, this option is disabled.
-fclient
- Generates the client application files. By default, this option is enabled.
-fserver
- Generates the server application files. By default, this option is enabled.
-fverbose
- Specifies that the
m3idltojava
command should work in verbose mode. In particular, it writes command output to its standard output. By default, this option is disabled.-fversion
- Specifies that the compiler prints its version and timestamp. By default, this option is disabled.
Examples
The following command generates only the server application files for
Simple.idl
:m3idltojava -fno-client Simple.idl
The following command generates only the client application files for
Simple.idl
:m3idltojava -fno-server Simple.idl