• 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

EJB 3 in Action - Question

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have started to read first edition of EJB 3 in Action. I've few questions as i'm going through the book.

1. For stateful session bean, we use @PrePassivate and @PreDestroy callbacks on same method. Will this cause duplicate (double) invocation in case of Bean destruction?

2. We can have multiple PostConstruct and PreDestroy methods, will they be invoked in a perticular order?

3. In "working with multiple business interfaces", what will access type of parent interface methods (Local) if child has different access type (Remote)
 
author
Posts: 580
5
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Answers below:
1. Passivation and destruction will never occur together. It's always one or the other.
2. Order is not guaranteed and you should not depend on it.
3. The extending interface settings take precedence, so it will be remote. It's usually a bad idea to use inheritance in this way in the real world.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic