Bug 1330868 - Can <trans-attribute> be removed from "jboss-ejb3.xml" to pass validation in future EAP release?
Summary: Can <trans-attribute> be removed from "jboss-ejb3.xml" to pass validation in ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.4.0
Hardware: All
OS: All
high
high
Target Milestone: ---
: ---
Assignee: Bartek Spyrko-Smietanko
QA Contact: Jan Martiska
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-27 07:47 UTC by xuzhan
Modified: 2020-01-17 15:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-09 17:20:41 UTC
Type: Feature Request


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEAP-4571 0 Major Reopened Make it possible to specify extended EJB3 attributes in deployment descriptor without providing all details of container... 2016-12-26 07:39:01 UTC

Description xuzhan 2016-04-27 07:47:33 UTC
Description of problem:
In JBDS 8.0.0, to validate <tx:timeout> from "jboss-ejb3.xml", it needs to add <trans-attribute> infron of <tx:trans-timeout>, 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Creating jboss-ejb3.xml as below:
~~~
<?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>
    	<trans-attribute>Supports</trans-attribute>
        <tx:trans-timeout>
        	<tx:timeout>100</tx:timeout>
        	<tx:unit>Seconds</tx:unit>
        </tx:trans-timeout>
    </container-transaction>
    </assembly-descriptor>
</jboss:ejb-jar>
~~~ 
2. Adding following entire to XML Catalog in JBDS settings
 Location: http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd Key: http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd
3. There is no validation errors until removing "<trans-attribute>Supports</trans-attribute>".

Actual results:
~~~
cvc-complex-type.2.4.a: Invalid content was found starting with element 'tx:trans-timeout'. One of '{"http://java.sun.com/xml/ns/javaee":method, "http://java.sun.com/xml/ns/javaee":trans-attribute}' is expected.
~~~

Expected results:
No validation errors

Additional info:
The scenario is that code has been already set @TransactionAttribute and customer don't want duplicate settings.

Comment 2 JBoss JIRA Server 2016-05-24 13:29:17 UTC
Ivo Studensky <istudens> updated the status of jira JBEAP-4571 to Closed

Comment 3 JBoss JIRA Server 2016-06-01 05:56:45 UTC
xu zhang <zhangxu1324> updated the status of jira JBEAP-4571 to Reopened


Note You need to log in before you can comment on or make changes to this bug.