Following is the sentence book ,can anyone explain? "Session bean class must make a no-arg constructor avaiable?" [ April 02, 2002: Message edited by: Win Yu ]
Joined: Jan 26, 2002
According to Monson-Haefel, EJB containers create EJB's using Class.newInstance(). As you know, Class.newInstance() requires a no-argument constructor. Users of the Class class know that you can use the Class.getConstructors() calls to get the constructors if you happen to want to call them, but the container wouldn't know which one to use. EJB's are more abstract than classes anyway, and use the ejbCreate() mechanism for initialization and instantiation.