This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / EJB:Dear Jabber,in a stateful session bean's ejbCreate(String),I retrieve a record from db to intialize the attributes.Could I do this in one of the constructors instead of ejbCreate?I am confused with this:what should I do in ejbCreate?what in constructor?
-wendywendy(wind);
2001-3-14
{74}
(#33088@0)
-
The answer is no. In the EJB design, create methods play a role of CONTRUCTORs. ----This is a design pattern.
-jabber(jabber);
2001-3-14
(#33272@0)
-
NO. Because you cannot start a transaction in ejbCreate. The container will be responsible for transaction only in business methods.
-guest:.;
2001-3-15
(#33603@0)