[jboss-as7-dev] Binding MDB to resource adapter by jboss-ejb3.xml

Panzer, Robert Robert.Panzer at wincor-nixdorf.com
Fri Nov 18 07:59:17 EST 2011


I am open to any proposal!

Carlos initial outline was this:
<assembly-descriptor>
<ejb-name>*</ejb-name>
<mdb:resource-adapter>ra-name-of-your-choice</mdb:resource-adapter>
</assembly-descriptor>

But I think he meant that there must be an embracing tag around ejb-name and the resource adapter name.
That's why "invented" the resource-adapter-binding element name and urn name.

Just give me names and I will change them.

Kind regards,
Robert

-----Original Message-----
From: jboss-as7-dev-bounces at lists.jboss.org [mailto:jboss-as7-dev-bounces at lists.jboss.org] On Behalf Of Jaikiran Pai
Sent: Friday, November 18, 2011 1:43 PM
To: jboss-as7-dev at lists.jboss.org
Subject: Re: [jboss-as7-dev] Binding MDB to resource adapter by jboss-ejb3.xml

On Friday 18 November 2011 05:38 PM, Carlo de Wolf wrote:
>
>
> In fact it looks like we just want to add additional items to the MDB
> container itself, so<mdb:resource-adapter-binding>  is wrongly named.
Yeah, that was the "minor comment" that I had in mind in my first reply :)

-Jaikiran

> On 11/18/2011 01:02 PM, Panzer, Robert wrote:
>> Yes, indeed.
>>
>> As far as I could see, it does not work adding a message-driven element to the jboss-ejb3.xml right now - correct me from wrong.
>> So I think Carlo refers to the message-driven element of the ejb-jar.xml which are the same on every application server.
>>
>> In my opinion it should be possible to override properties for a specific environment.
>>
>> WAS for instance resolves this problem by having the activation spec a manageable entity that is not coupled to the application nor the ejb component and there you can define properties. (I hope I did not earn a big Boohhh now... ;-) )
>>
>> I am preparing branching my fork and will post a message when I have a pull-request ready so that you can review the things I've done.
>>
>> Kind regards,
>> Robert
>>
>> -----Original Message-----
>> From: jboss-as7-dev-bounces at lists.jboss.org [mailto:jboss-as7-dev-bounces at lists.jboss.org] On Behalf Of Jaikiran Pai
>> Sent: Friday, November 18, 2011 12:55 PM
>> To: jboss-as7-dev at lists.jboss.org
>> Subject: Re: [jboss-as7-dev] Binding MDB to resource adapter by jboss-ejb3.xml
>>
>>    From what I see in that example, Robert isn't duplicating the
>> activation-config in the jboss-ejb3.xml. Instead he is reusing the jee
>> namespace (that maps to http://java.sun.com/xml/ns/javaee which is used
>> as the target namespace by ejb-jar.xml xsd) to specify those
>> activation-config properties.
>>
>> -Jaikiran
>> On Friday 18 November 2011 05:12 PM, Carlo de Wolf wrote:
>>> activation-config is already an element of message-driven. It would
>>> only lead to confusion if you duplicate it.
>>>
>>> Carlo
>>>
>>> On 11/18/2011 12:02 PM, Panzer, Robert wrote:
>>>> Hi,
>>>>
>>>> I've got something running now, that binds a message driven bean to a resource adapter using the jboss-ejb3.xml so that it is no longer necessary to define it using a JBoss specific annotation in the source nor to modify the default resource adapter in the server configuration.
>>>> It is even possible to redefine activation config properties if they have to have a different value in a JBoss environment.
>>>>
>>>> An example of the file looks like this:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <jboss xmlns="http://www.jboss.com/xml/ns/javaee"
>>>>        xmlns:jee="http://java.sun.com/xml/ns/javaee"
>>>>        xmlns:mdb="urn:resource-adapter-binding"
>>>>        xmlns:security="urn:security">
>>>>
>>>>        <jee:assembly-descriptor>
>>>>            <security:security>
>>>>                <jee:ejb-name>TestCC</jee:ejb-name>
>>>>                <security:security-domain>abc</security:security-domain>
>>>>            </security:security>
>>>>            <mdb:resource-adapter-binding>
>>>>                <jee:ejb-name>FooMDB</jee:ejb-name>
>>>>                <mdb:resource-adapter-name>FooConnector.rar</mdb:resource-adapter-name>
>>>>                <jee:activation-config>
>>>>                    <jee:activation-config-property>
>>>>                        <jee:activation-config-property-name>fooActivationPropertyName</jee:activation-config-property-name>
>>>>                        <jee:activation-config-property-value>FooValue</jee:activation-config-property-value>
>>>>                    </jee:activation-config-property>
>>>>                </jee:activation-config>
>>>>            </mdb:resource-adapter-binding>
>>>>        </jee:assembly-descriptor>
>>>> </jboss>
>>>>
>>>> What do you think about this structure?
>>>>
>>>> If there are no objections to this I would propose a pull request.
>>>>
>>>> The files I have touched are:
>>>> #       modified:   ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/EjbJarParsingDeploymentUnitProcessor.java
>>>> #       modified:   ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/merging/ResourceAdaptorMergingProcessor.java
>>>> #       new file:   ejb3/src/main/java/org/jboss/as/ejb3/resourceadapterbinding/metadata/EJBBoundResourceAdapterBindingMetaData.java
>>>> #       new file:   ejb3/src/main/java/org/jboss/as/ejb3/resourceadapterbinding/parser/EJBBoundResourceAdapterBindingMetaDataParser.java
>>>> #       new file:   ejb3/src/main/resources/jboss-ejb-resource-adapter-binding_1_0.xsd
>>>>
>>>> Kind regards,
>>>> Robert
>>>>
>>>> WINCOR NIXDORF International GmbH
>>>> Sitz der Gesellschaft: Paderborn
>>>> Registergericht Paderborn HRB 3507
>>>> Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
>>>> Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
>>>> Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193
>>>>
>>>> Diese E-Mail enthält vertrauliche Informationen.
>>>> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
>>>> informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
>>>> Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
>>>>
>>>> This e-mail may contain confidential information.
>>>> If you are not the intended recipient (or have received this e-mail in error)
>>>> please notify the sender immediately and destroy this e-mail.
>>>> Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> jboss-as7-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>> WINCOR NIXDORF International GmbH
>> Sitz der Gesellschaft: Paderborn
>> Registergericht Paderborn HRB 3507
>> Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
>> Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
>> Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193
>>
>> Diese E-Mail enthält vertrauliche Informationen.
>> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
>> informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
>> Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
>>
>> This e-mail may contain confidential information.
>> If you are not the intended recipient (or have received this e-mail in error)
>> please notify the sender immediately and destroy this e-mail.
>> Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



More information about the jboss-as7-dev mailing list