• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFEJB Page 582

 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page 582 describes the scenario in which we have same method name in both home and component interface. I am wondering how is this possible? Home interface contains methods mainly for the bean lifecycle management (and some more in case of EB), and component interface is mainly for business methods.

Practically thinking, can there be any such scenario?

And if this is correct, then shouldn't there be five ways (instead of four) to describe method in the <method-permission>? The fifth being "by method name, method params and interface name".
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody, any thoughts???
 
Greg Charles
Sheriff
Posts: 3002
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In theory, you could have a home business method with the same name as a normal business method in the component interface. In the bean implementation, they would be distinguished because one would be named ejbHomeMyMethod() and the other would just be myMethod(). However, in the deployment descriptor, you need another way to distinguish them.

I believe your "fifth method" is legal. I guess they just didn't bother to count it separately from the other cases.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic