• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Why finder methods are not static?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic