• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need to know the implementation details of ejbRemove(), ejbActivate for EJB 3.1 exam?

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On p.20 of Frits notes, it says
"The optional SessionBean interface (needed in earlier EJB version) defines 4 methods setSessionContext, ejbRemove..... If the Session bean implements the optional SessionBean
interface and uses the annotations:
@PreDestroy can only be applied on the ejbRemove() method ...."

For EJB 3.1 exam, do we need to know the details of how to implement ejbRemove(), ejbPassivate() , ejbActivate() and setSessionContext() ?

I know in EJB 2.0, we need to provide implementations for these 4 methods when a bean implements SessionBean interface. To my understanding, in EJB 2.0, the developer even needs to set values for transient variables in a Serializable object inside the ejbActivate() method.


 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, on the EJB3.1 exam is without EJB2.0 technology.
So you don't need know anything about this methods.

But in EJB3.1 we have interface @PostConstruct, @PreDestroy ... which I can say they are similar.
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

andrew sydor wrote:No, on the EJB3.1 exam is without EJB2.0 technology.
So you don't need know anything about this methods.


Correct.

I only added this small part as it can be confusing when you let your "new" EJB implement the "old" SessionBean interface. It is possible but you need to be aware that the "new" annotations (e.g. @PreDestroy) can only be place on specific "old" methods (e.g. ejbRemove)
reply
    Bookmark Topic Watch Topic
  • New Topic