• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Why finder methods are not static?  RSS feed

 
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
 
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??
 
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
 
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!