Chapter 7 Creating Enterprise JavaBeans Components
If you are creating components from scratch in EAServer 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 JBuilder with the EAServer plugin, the plugin 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 Chapter 9, "Importing and Exporting Application Components," 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 refresh" for details.
Deploying EJB component 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 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 30, "Configuring Custom Java Class Lists"
If your component calls another Java or EJB component, both must have refresh enabled or both must have refresh disabled.
To disable refresh:
com.sybase.jaguar.component.refresh
to
false (the default is true).
| Copyright (C) 2004. Sybase Inc. All rights reserved. |
| |