Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.347 :

Posted: Fri Apr 15, 2011 8:51 am
by ETS User
Explanations are a bit confusing.

Answer 2 says:
"The Application Assembler is not permitted to use the deployment descriptor to override a bean’s transaction management typeregardless of whether it has been explicitly specified or defaulted by the Bean Provider."

Answer 4 says:
"The Application Assembler is permitted to override the transaction attribute values using the bean’s deployment descriptor."

Aren't the two explanations contradictory?

Re: About Question enthuware.oce-ejbd.v6.2.347 :

Posted: Sat Apr 16, 2011 10:20 am
by admin
No, there is no contradiction. Option 2 is talking about transaction management type (BEAN or CONTAINER), while option 4 is talking about transaction attributes of the method if the bean uses container managed transactions.

This clarification has now been added to the explanation.

Re: About Question enthuware.oce-ejbd.v6.2.347 :

Posted: Fri Feb 08, 2019 3:31 pm
by henrid
So <transaction-type> in DD is redundant?

Re: About Question enthuware.oce-ejbd.v6.2.347 :

Posted: Sat Feb 09, 2019 2:55 am
by admin
No, I wouldn't call it redundant. It is not required only if the bean specifies the transaction type using annotation. Otherwise, it is required.

Re: About Question enthuware.oce-ejbd.v6.2.347 :

Posted: Sat Feb 09, 2019 12:09 pm
by henrid
I read the explanation as: If specified in XML, the value should be the same as in the annotation, even when defaulted (without annotation). So I don't see any purpose for the XML tag, besides documentation. Option 2 says: "whether it has been explicitly specified or defaulted by the Bean Provider". So when there is no annotation, the XML should specify Container explicitly, even when it is already Container by default. Okay, I will just learn the (not to) override part of the question.