An EJB-JAR file contains the implementation classes, interface classes, and deployment descriptor for one or more beans. You can use a Java development tool such as Sybase PowerJ to define and develop beans and create an EJB-JAR file. You can import JAR files in the EJB 1.0, EJB 1.1, or EJB 2.0 formats. EAServer Manager reads the JAR file and creates a package containing a component for each bean in the JAR file.
PowerJ deploys Enterprise JavaBeans directly
to EAServer
If you are developing in PowerJ, use the Enterprise JavaBeans
Deployment Wizard to install EJB components to EAServer. If using
another IDE, use EAServer Manager to import the bean as described
below.
Importing an EJB 1.1 or 2.0 JAR file
Start EAServer Manager if it is not already running, and connect to the server where you want to install the component.
Highlight the top-level Packages folder. Choose File | Deploy | EJB JAR.
Enter the path to the EJB-JAR file.
Choose the Deployment Strategy from the options described in Table 9-1.
Deployment strategy |
Specifies |
---|---|
Full deployment |
The importer generates IDL for every class defined in the JAR, regardless of whether the interface already exists. Use this option when deploying components for the first time or when you want to restore IDL types that have been changed or deleted. |
Incremental deployment |
The importer generates IDL only when the Java types and interfaces have changed from the last time it was imported. The following are compared:
Use this option if you redeploying components and have changed some interfaces or parameter types. |
Optimistic deployment |
Similar to Incremental, except that the check for changed classes in each package ends if the first class comparison indicates no change. Use this option if you are redeploying components, and have changed only the implementation classes. |
Configure the Deployment Options:
Prompt before overwriting existing objects If selected, the importer will confirm any overwrites of existing components, IDL definitions, and other repository entities that may be redefined by the import process.
Automatically generate EJB stubs and skeletons Select this option if you want the importer to generate and compile stubs and skeletons for the new components. To allow compilation, the classes in the EJB-JAR file must be self-contained, in other words classes in the JAR file cannot depend on classes that are not in the JAR file or part of the standard J2EE class distribution.
Home interfaces that use java.util.Enumeration
Do not select the Automatically generate EJB stubs and skeletons option
if entity bean finder methods return java.util.Enumeration. Instead,
generate Stubs and Skeletons after the import completes, and select
the JDK 1.3 or later option.
All entity bean finder methods within one EJB JAR file must return the same list type, either java.util.Collection or java.util.Enumeration.
Use interoperable naming If selected, naming URLs in the EJB Reference properties will use interoperable naming URLs, as described in “Intervendor EJB interoperability” in the EAServer Programmer’s Guide. Select this option when your EJBs have EJB references that link to another vendor's EJB 2.0 server and you need to use the RMI/IIOP protocol for the connection.
Use JAR File Package Naming Naming If selected, the new package name will match the EJB-JAR file
name. Otherwise the new package name matches the display-name
element
in the deployment descriptor.
When you are deploying an EAR or EJB-JAR file containing
a sybase-easerver-config.xml file,
which was previously exported from EAServer, do not use the JAR
File Naming option. When exporting packages to a J2EE archive file,
EAServer optionally creates a sybase-easerver-config.xml file
that includes configuration information based on the package names.
If you deploy a package or an application that contains packages
with the JAR File Naming option, EAServer renames the packages.
When the package names do not match the names in the sybase-easerver-config.xml file, deployment
fails.
Click Finish.
EAServer Manager creates a new package that contains a component for each bean defined in the JAR file, printing status messages and warnings to the Deploy Wizard. The new package has the same name as the EJB JAR display name. If there is no display name, the new package has the same name as the JAR file. For each bean in the EJB-JAR, EAServer creates an EJB component with the same name as the ejb-name element in the EJB-JAR deployment descriptor.
Home names for imported EJB components
EAServer sets an imported bean’s home name to the
EAServer default, package/component,
where package is the EAServer Manager package
name, and component is the EAServer Manager
component name.
Use the status dialog as a to-do list
In the deployment status dialog box, EAServer Manager display
warnings for each setting that requires further attention before
running the application. You can copy and paste this text to a text
editor to use as a to-do list.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |