• 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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