[jboss-jira] [JBoss JIRA] (WFLY-812) jboss-ejb3.xml is not correctly validated

David Lloyd (JIRA) jira-events at lists.jboss.org
Fri Sep 20 14:42:03 EDT 2013


     [ https://issues.jboss.org/browse/WFLY-812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Lloyd resolved WFLY-812.
------------------------------

      Assignee: David Lloyd  (was: jaikiran pai)
    Resolution: Rejected


The way that the {{http://www.jboss.com/xml/ns/javaee}} schema is defined is open-ended enough to allow any root element to be used in any file.  If we want to change that I think the right next step is probably to revisit our schemas and see if it would be appropriate to break up the namespace into components.  Also, there is a backward compatibility concern here as well.

I'm not opposed to changing this behavior but it cannot be as simple as just disallowing a bunch of previously allowed root elements without adequate deprecation time.
                
> jboss-ejb3.xml is not correctly validated
> -----------------------------------------
>
>                 Key: WFLY-812
>                 URL: https://issues.jboss.org/browse/WFLY-812
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>            Reporter: Josef Cacek
>            Assignee: David Lloyd
>
> 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:
> {code:xml}
> <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>
> {code}
> 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>}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list