
Figure 10-27 CustomerInfoWeb project properties
You can start now on modifying the CustomerXML file, by doing the following:
Open the CustomerXML.java file to start editing it. Modify the import statements to include exactly the following:
import javax.ejb.*; import java.rmi.*;
import registration.Customer; import registration.CustomerKey; import registration.CustomerFactory; import org.w3c.dom.*;
import javax.xml.parsers.*;
Implement a create method that constructs a new CustomerFactory, and invoke its create method using Customer bean’s properties, as shown in Example
Example 10-13 create source code
protected void create() throws
RemoteException,CreateException { CustomerFactory factory = new CustomerFactory(); registration.Customer ejbean =
factory.create(getBean().getMembership().longValue());