Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-812

jboss-ejb3.xml is not correctly validated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • EJB
    • None

      When the root element in the jboss-ejb3.xml is not correct, the parser doesn't fail. The parser should contain a better validation.

      For instance ejb-security-interceptors quickstart wrongly uses:

      <jboss xmlns="http://www.jboss.com/xml/ns/javaee"
             xmlns:jee="http://java.sun.com/xml/ns/javaee"
             xmlns:ci ="urn:container-interceptors:1.0">
      
          <jee:assembly-descriptor>
              <ci:container-interceptors>
                  <!-- Class level container-interceptor which will be applicable for all business method
                   invocations on the bean -->
                  <jee:interceptor-binding>
                      <ejb-name>IntermediateEJB</ejb-name>
                      <interceptor-class>org.jboss.as.quickstarts.ejb_security_interceptors.ServerSecurityInterceptor</interceptor-class>
                  </jee:interceptor-binding>            
                  <jee:interceptor-binding>
                      <ejb-name>SecuredEJB</ejb-name>
                      <interceptor-class>org.jboss.as.quickstarts.ejb_security_interceptors.ServerSecurityInterceptor</interceptor-class>
                  </jee:interceptor-binding>
              </ci:container-interceptors>
          </jee:assembly-descriptor>
      </jboss>
      

      And this works. But it works only untill the user wants to specify a security domain for instance. Then it fails, because the root element should not be <jboss> but <ejb-jar>

              dlloyd@redhat.com David Lloyd
              josef.cacek@gmail.com Josef Cacek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: