0 Replies Latest reply on Aug 17, 2011 4:05 PM by Michal Huniewicz

    EJB 3.1 with a generic interface

    Michal Huniewicz Newbie

      Hi there.


      I have the following interfaces:


      public interface TrackMapper<T extends TrackTo> {
          T map(Map<XmlNodeName, String> trackValues);
          boolean canMap(Map<XmlNodeName, String> trackValues);


      public interface AudiobookMapper extends TrackMapper<AudiobookTo> {


      And now my EJB.

      @Local({ AudiobookMapper.class, TrackMapper.class })
      public class DefaultAudiobookMapper extends
              NonAggregateTrackMapper<AudiobookTo> implements AudiobookMapper {


      As you can see, I have to give it both interfaces on local, but why? I believe I should only have to give it AudiobookMapper.


      See the stacktrace: http://pastebin.com/SNkcAsKj