I'm really struggling remembering the bean things that can be done in various methods.Any tips guys?
posted 11 years ago
These are some points I would keep in mind. It helps me to remember fewer things. If anyone feels that the information below is incorrect, please do correct.
a) Constructor - DON'T DO ANYTHING HERE
b) set<beantype>Context - Almost consistent across all bean types - Session/Entity bean: Home + JNDI - Message Driven bean: JNDI (No Home interface!)
c) Entity Bean Note: method getUserTransaction() can NEVER be called (why? cos BMT does not apply for entity bean)
The equals sign below means that identical operations are allowed as listed in the table in the spec i) ejbRemove = ejbPostCreate = ejbLoad = ejbStore = comp interface business method call ii) ejbCreate = ejbFind = ejbHome
d) Message Driven Bean Note: No HOME INTF, NO COMPONENT INTF, NO CLIENT CONTEXT This automatically eliminates the applicability of the following methods from EJBContext: getEJB(Local)Home, getCallerPrincipal/isCallerInRole [ October 25, 2005: Message edited by: Ramakrishnan Viswanathan ]