Posted By:
leo_liu
Posted On:
Wednesday, April 17, 2002 07:23 PM
Dear All: I have a requestion about the return value of CMP bean of EJB2.0. In my mind the cmp's ejbCreate() method always return null , and Container will handle the createException.But when I see the example from j2sdkee1.3.1 (download from sun), the ejbCreate() return primariyKey? I don't know why, is there anybody can tell me the reason? the example code like following: public String ejbCreate ( String cid, String id, String street, String city, String zip, String state) throws CreateException { //Log.trace("AddressBean.ejbCreate..."); return create (id, street, city, zip, state); } private
More>>
Dear All:
I have a requestion about the return value of CMP bean of EJB2.0. In my mind the cmp's ejbCreate() method always
return null
, and Container will handle the createException.But when I see the example from j2sdkee1.3.1
(download from sun), the ejbCreate() return primariyKey?
I don't know why, is there anybody can tell me the reason?
the example code like following:
public String ejbCreate (
String cid,
String id,
String street,
String city,
String zip,
String state)
throws CreateException {
//Log.trace("AddressBean.ejbCreate...");
return create (id, street, city, zip, state);
}
private String create(
String id,
String street,
String city,
String zip,
String state)
throws CreateException {
setAddressID(id);
setStreet(street);
setCity(city);
setZip(zip);
setState(state);
return id;
}
<<Less