• 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
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

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!
 
machines help you to do more, but experience less. Experience this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic