Inc. Server User Manual

2 Upgrading WebLogic Server 4.5 and 5.1 to Version 7.0
2-20 BEA WebLogic Server 7.0 Upgrade Guide
Steps for Porting a 1.0 EJB from WebLogic Server 4.5.x to
WebLogic Server 7.0
WebLogic Server 3.1.x, 4.0.x, and 4.5.x supported the EJB 1.0 specification. To port
a 1.0 EJB from WebLogic Server 4.5 to WebLogic Server 7.0:
1. Convert the EJB 1.0 deployment descriptor to either the EJB 1.1 or the EJB 2.0
XML deployment descriptor. You can do this automatically using the DDCreator
tool.
2. Package the deployment descriptor in a JAR file which includes the deployment
descriptors output from step one above and the bean classes.
3. Run the WebLogic Server EJB compiler (ejbc) to compile the JAR file. The
ejbc
tool ensures that when the EJB compiles, it conforms to either the EJB 1.1 or EJB
2.0 specifications.
4. Correct any compliance errors before deploying the EJB in the EJB container.
To ensure EJB 1.1 or 2.0 compliance, make the following changes to the EJB 1.0
beans:
EJB 1.0 beans referred to the SessionContext or EntityContext as transient.
When EJB 1.1 or 2.0 beans are deployed, the reference cannot be transient. For
example:
private transient SessionContext ctx;
should be:
private SessionContext ctx;
The ejbCreate method for EJB 1.0 CMP entity beans had a void return type.
When EJB 1.1 or 2.0 beans are deployed, the return type must be the primary
key class which allows you to write a bean-managed persistent entity bean and
then sub-class it with a CMP implementation. For example:
public void ejbCreate (String name) {
firstName = name;
}
should be:
public AccountPK ejbCreate (String name) {
firstName = name;