• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

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.
reply
    Bookmark Topic Watch Topic
  • New Topic