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

Moderator: admin

Post Reply
ETS User

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

Post 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?

admin
Site Admin
Posts: 8913
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.
If you like our products and services, please help us by posting your review here.

henrid
Posts: 31
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

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

Post by henrid »

So <transaction-type> in DD is redundant?

admin
Site Admin
Posts: 8913
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.
If you like our products and services, please help us by posting your review here.

henrid
Posts: 31
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

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

Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests