Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why finder methods are not static?  RSS feed

 
Deepak Gupta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJb and just started learning EJb . I just want to know that "Why finder methods are nonstatic?"
Can somebody help me out
Thanks
Deepak
 
Ismail
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finder methods are declared in interfaces. Interfaces cannot have static methods.
 
Deepak Gupta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply
But In BMP , finder methods , in Entity bean class ,are non static . we can define all the finder methods as static.
then why do we not have static finder methods there??
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the EJB spec leaves open the option of Entity inheritance, something that is not possible with static methods. For instance, in the WebSphere CMP implementation, a finder on a home can bring back a heterogenous collection of both the instances of the bean the home corresponds to and any superclasses of that bean.
Kyle
 
hen fern
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kyle Brown:
Because the EJB spec leaves open the option of Entity inheritance, something that is not possible with static methods. For instance, in the WebSphere CMP implementation, a finder on a home can bring back a heterogenous collection of both the instances of the bean the home corresponds to and any superclasses of that bean.
Kyle


Can you please elaborate on this?
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This article elaborates on the way that it was done in VAJ and WebSphere 3.0/3.5, which is still very close to the way it's implemented in WAS 4.0 and WSAD.
Kyle
[ November 05, 2002: Message edited by: Kyle Brown ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!