This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

EJB 3 in Action - Question

 
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)
 
author
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.
 
today's feeble attempt to support the empire
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic