Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-185

Session bean extending session bean

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.2.CR3
    • 1.0.1.CR1
    • Tests
    • None

      The EJB 3.0 Spec states the following in section "4.6.2 Session Bean Class":

      "The session bean class may have superclasses and/or superinterfaces. ......
      A session bean class must not have a superclass that is itself a session bean class."

      Problem Description:

      According to the ejb-jar.xml, this is an ejb 3.0 ejb-jar:
      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
      version="3.0">

      </ejb-jar>

      So, we have an EJB 3.0 application. Yet, we see declared:

      @Stateful
      public class Farmer implements FarmerLocal {

      and

      @Stateful
      public class LazyFarmer extends Farmer implements LazyFarmerLocal, FarmerLocal {

      Farmer being extended by LazyFarmer violates the spec mentioned above. I believe this is allowed in the 3.1 spec, but not the 3.0 Spec.

      Tests Affected:
      testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean
      testSpecializingBeanHasNameOfSpecializedBean

              Unassigned Unassigned
              lancea_jira Lance Andersen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: