0 Replies Latest reply on Nov 10, 2002 9:49 PM by Caleb Land

    EJB Inheritance Design Question

    Caleb Land Newbie

      Hello,
      I'm new to EJB/Jboss, and am working on a site for fun, so I can learn.

      Here's my situation:

      My site is a competitive ladder for a computer game (war3), and as it is I have Ladder beans for var ious ladders, and Rung beans which are supposed to hold Accounts. All of these beans are related to each other through CMR. This was fine until I decided that I wanted to also have Teams be ranked on ladders.

      The first thing I thought was that I should create a Rankable bean that is the parent to the Team and Account beans, and make the CMR field on the Rung hold a Rankable object so either one can be linked, but it seems that EJB doesn't support inheritance.

      As experienced EJB developers, what would you do in this situation? I thought about putting a reference to both Team and Account beans on the Rung, but I'm not sure if that's the best way.

      I know that using EJB for this problem is probably overdoing it (servlets and jsps could probably do it considering I used perl for my war2 ladder), but this is just for learning good design and how J2EE works.

      Thanks,
      Caleb Land