• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Interface implementation : Entity Beans 2.x

 
author
Posts: 469
20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Consider the following scenario:
I have any local entity bean A which implements interface X. I have another local entity bean B which implements the same interface X.
Can I have another entity bean C which can use either A or B entity bean at runtime based on some business logic ? The EJB 2.1 spec mentions that entity beans support 'interface inheritance' when dealing with local entity beans.In Java language this is simple, I can keep an instance variable of type X and create an object of A or B at runtime, but I am not sure whether this feature is supported in Entity EJBs.

thanks
Ashish
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


However, I haven't done anything like this before with Entity bean, but I would sure give it a try if I have such requirements in my app.
 
We noticed he had no friends. So we gave him this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic