Chapter 7 Creating Enterprise JavaBeans Components
If you are creating components from scratch in Jaguar Manager, you must follow the steps in this section to deploy the component class and other classes that it depends on. If you deploy from PowerJ, PowerJ performs these steps for you. If you are using another EJB development tool that can export EJB JAR files, import the EJB JAR file as described in the EAServer System Administration Guide. If you import an EJB-JAR file that calls EAServer components that are not implemented in the same JAR file, you must list the stub classes for the called components in the custom class list as described below.
EAServer supports hot refresh of components by using a Java class loader. This feature speeds the development process by allowing you to deploy new class versions without restarting the server. Repeat the steps below to deploy new versions of your implementation.
In a production environment, you may wish to disable refresh to improve performance. See "Disabling component Refresh" for details.
Deploying EJB component classes
The custom class list To support component refresh, you must specify the custom class list to be loaded when a component is refreshed. The custom class list is configured on the Java Classes tab in the Component Properties window. See Chapter 28, "Configuring Custom Java Class Lists" for more information.
You can also configure a custom class list that is shared by all components in the package, or by all components and Web applications in a server or J2EE application, as described in Chapter 28, "Configuring Custom Java Class Lists"
The custom class list for an EJB component must contain these classes:
Troubleshooting ClassCastException errors
When calling javax.naming.InitialContext.lookup,
if you see NamingContext exceptions with root-cause
exception ClassCastException, check for the following
errors:
Disabling component Refresh In a production server, you may wish to disable refresh for Java components to decrease memory use and increase performance. When refresh is enabled, duplicate copies of common Java classes can be loaded for components. When refresh is disabled, you must restart the server in order for it to load a new version of your component class. You can also reduce duplicate in-memory classes by configuring the custom class list at the package, server, or application level as described in Chapter 28, "Configuring Custom Java Class Lists"
Refresh property and intercomponent calls
If your component calls another Java component, both must
have refresh enabled or both must have refresh disabled.
Disabling refresh
com.sybase.jaguar.component.refresh
to
false (the default is true).
Copyright © 2002 Sybase, Inc. All rights reserved. |
![]() |