Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

new to EJB needs help

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please answer this question with a little explanation :
1. InitialContext ic = new InitialContext();
2. Object o = ic.lookup("testBean/TestBean");
3. TestHome th = (TestHome)javax.rmi.PortableRemoteObject.narrow(o,TestHome.class);
4. String result = myTest.userMethod();
5. myTest.remove();
6. // Bean state?
Assume the application server has just been started. At the commented-marker in the client code above (Line 6), in which state is this desired bean?

a)Method-ready-tx
b)Method-ready
c)Passivated
d) It does not exist.
e) Active
Thanks
 
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe the answer would be d)Does not exist. This is from the 2.0 spec:
When the client calls remove on the home or remote interface to remove the session object,
the container issues ejbRemove() on the bean instance. This ends the life of the session
bean instance and the associated session object.
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
d
 
He's giving us the slip! Quick! Grab this tiny ad!
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic