Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can these methods exist...

 
Yogesh Mathur
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have a very fundamental doubt.
Can we have a method definition in our Bean's Implementation class without declaring it in the Remote Interface & Home Interface. If yes, that means our Bean Class will have this method, but clients won't have access to this method, indeed makeing it a useless method (or, is it usefull in some cases?)
Please Clarify...
Thanks in advance..
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, u can have a method in the bean class and not have it declare it in the remote i/f..this mean the client cannot use that method..but that method may be called from any other business method..which the client can access throught remote i/f ..If some method is useless why would any one define that method in first place?

Originally posted by Yogesh Mathur:
Hi!
I have a very fundamental doubt.
Can we have a method definition in our Bean's Implementation class without declaring it in the Remote Interface & Home Interface. If yes, that means our Bean Class will have this method, but clients won't have access to this method, indeed makeing it a useless method (or, is it usefull in some cases?)
Please Clarify...
Thanks in advance..
 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess , yes
no harm in having such a method but it dont necessarily have to be useless
it can be a private method or some sort of 'utility'method. If there is some functionality common to more than one methods which u r exposing through interfaces , then that functionality can be kept in such a utility method.
just 1.5 cents of mine
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, yes you can have such method. A commom use of doing so is to have a method who performs some kind of log service, and the clients doesn�t have to know about it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic