• 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

Creating bean Instance

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi group,

While creating a bean instance can the home interface create() method directly invoke the beans newInstance() method with out intercepting remote interface in middle? becoz all the bean methods are accessed via remote interface!?

Please help!
Thanks.
 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shanthi Priya:
Hi group,

While creating a bean instance can the home interface create() method directly invoke the beans newInstance() method with out intercepting remote interface in middle? becoz all the bean methods are accessed via remote interface!?

Please help!
Thanks.



Just to clarify: the bean instance is created by the Container, not the home interface. As interface exposes methods to client, doesn't have business logic implementation. The entity bean creation is not as linear as a plain old Java object creation: the container invokes the constructor to create a new instance of the bean, but then to 'make' the bean properly it invokes setSessionContext/setEntityContext and for session beans also ejbCreate. If you want to pass the exam, start thinking that the beans live like in a minefield: only the container can talk directly to them, because it must put in the middle (between the client and the beans) its services. If you try to access the minefield, without knowing where the bombs are...BUMM!
reply
    Bookmark Topic Watch Topic
  • New Topic