2 Upgrading WebLogic Server 4.5 and 5.1 to Version 7.0
2-22 BEA WebLogic Server 7.0 Upgrade Guide
java -classpath %CLIENTCLASSES%;%CLASSPATH%
examples.ejb.basic.statelessSession.Client
This command ensures that the EJB interfaces are referenced in your client’s
classpath.
Steps for Converting an EJB 1.1 to an EJB 2.0
To convert an EJB 1.1 bean to an EJB 2.0 bean, you can use the WebLogic Server
DDConverter utility.
BEA Systems recommends that you develop EJB 2.0 beans in conjunction with
WebLogic Server 7.0. For 1.1 beans already used in production, it is not necessary to
convert them to 2.0 beans. EJB 1.1 beans are deployable with WebLogic Server 7.0. If
you do wish to convert 1.1 beans to 2.0 beans, see the DDConverter documentation in
Programming WebLogic Enterprise JavaBeans for information on how to do this
conversion.
The basic steps required to convert a simple CMP 1.1 bean to a 2.0 bean are as follows:
1. Make the bean class abstract. EJB 1.1 beans declare CMP fields in the bean. CMP
2.0 beans use abstract
getXXX and setXXX methods for each field. For instance, 1.1
Beans will use
public String name. 2.0 Beans should use public abstract
String getName()
and public abstract void setName(String n). With
this modification, the bean class should now read the container-managed fields
with the
getName method and update them with the setName method.
2. Any CMP 1.1 finder that used
java.util.Enumeration should now use
java.util.Collection. CMP 2.0 finders cannot return
java.util.Enumeration. Change your code to reflect this:
public Enumeration findAllBeans()
Throws FinderException, RemoteException;
becomes:
public Collection findAllBeans()
Throws FinderException, RemoteException;