Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Interface implementation : Entity Beans 2.x  RSS feed

 
Ashish Sarin
author
Ranch Hand
Posts: 451
15
  • Mark post as helpful
  • send pies
  • 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
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!