Hi!
Look in EJB1.1 11.3.5 for details. As a conclusion - you where not only lucky :-) The 
<method-name>*</method-name> gives a default value for the beans all methods and the 
<method-name>needsATransaction</method-name> takes precedence over the default, no 
matter on the ordering of it in the xml file.
/Lennart

----- Original Message ----- 
From: Eric Lindauer <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 17, 2001 10:00 PM
Subject: [JBoss-user] <assembly-descriptor> element


Hi,

I'm creating <container-transaction> elements to control the transactional properties 
of methods in my application.  I've noticed that the <method-name> element accepts "*" 
as a valid entry.

I'm wondering, how does JBoss resolve conflicts that might be caused by this?  For 
example, I'd like to say, for a particular bean, that all the methods are of 
transactional type "Supports", except for one, which is "Required".  Is this legal?:

<assembly-descriptor>
    <container-transaction>
        <ejb-name>MyBean</ejb-name>
        <method-name>*</method-name>
        <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    <container-transaction>
        <ejb-name>MyBean</ejb-name>
        <method-name>needsATransaction</method-name>
        <trans-attribute>Required</trans-attribute>
    </container-transaction>
</assembly-descriptor>

My testing on JBoss seems to indicate that JBoss resolves this correctly, and that 
order does not matter.  I'm wondering, is this just lucky for me, or is this the 
specified behavior for resolving methods in the spec?  I can't find a place in the 
specification that talks about how methods resolution should work in the event that 
there are conflicts in the <assembly-descriptor>.

Thanks in advance for any help.

    -Eric



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to