• 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

why on bean why not from bean just see

 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear sir i have a confusion in a topics like see.
suppose i have creatd a bean class, a component interface,a home interface. now as we know that the function which will be called remotely will be written in component interface and the code for that function will be in bean class.
now see supose the remotely method is getAdvice() so as in many book i see that this function will be called on bean. I am not getting one thing that FUNCTION WILL CALLED ON BEAN . it should be the FUNCTION WILL CALLED FROM BEAN. why on bean what does bean by this that i would like to know.

with regard

Arun kumar maalik
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a language question rather than an EJB question

Calling a method ON a class means you're executing that method as defined by the class.
Calling a method FROM a class means you're executing that method from another method defined in that class.

So when the container calls someBean.getAdvice() it's calling the getAdvice() method ON that bean (which is an instance of your AdviceBean class or another class the container generates from it at deploytime).

When your getAdvice() method than calls System.out.println() it's calling println() FROM the getAdvice() method and ON the object System.out refers to.
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks sir i have understood.
reply
    Bookmark Topic Watch Topic
  • New Topic