-
Feature Request
-
Resolution: Obsolete
-
Major
-
None
-
7.0.0.CR1
-
None
If using jboss-ejb3.xml to specify extended attributes like trans-timeout, the container-transaction element needs to be fully specified to pass the XML validation eg:
<?xml version="1.0" encoding="UTF-8"?>
<jboss:ejb-jar version="3.1" impl-version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns:tx="urn:trans-timeout"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd
urn:trans-timeout http://www.jboss.org/schema/jbossas/trans-timeout-1_0.xsd">
<assembly-descriptor>
<container-transaction>
<description>foobar</description>
<method>
<ejb-name>foobar</ejb-name>
<method-name>foobar</method-name>
</method>
<tx:trans-timeout>
<tx:timeout>100</tx:timeout>
<tx:unit>Seconds</tx:unit>
</tx:trans-timeout>
</container-transaction>
</assembly-descriptor>
</jboss:ejb-jar>
Above will fail because it's missing trans-attribute element. This can lead to duplication when the transaction attribute is set using annotations.
Example use case is when the user wants to set non-standard elements using descriptor and EJB3-compliant elements via annotations.