Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 3 in Action - Question  RSS feed

 
Alankar Agarwal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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)
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Likes 2
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!