Support for alt-dd element in application.xml

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Support for alt-dd element in application.xml

Christian Koppen
Hi,

I'm currently evaluating OpenEJB 3.1.4 and have a question concerning JNDI names.

I have an EJB module that I want to assemble in an EAR file. I cannot change the
EJB module for non-technical reasons. Does OpenEJB allow me to change the EJB's
JNDI name without touching the EJB?

My preferred way would be usage of an alternative deployment descriptor by
setting the element 'alt-dd' in the application.xml file. I could then use
'mapped-name' to set the JNDI name. But it seems that OpenEJB ignores the alt-dd
element.

I found out that the default JNDI name can be set by configuration
('openejb.jndiname.format'), too. I'd like to avoid this option since the JNDI
name would then depend on the container configuration.

I've read the following pages but didn't find a solution:

   http://openejb.apache.org/3.0/alternate-descriptors.html
   http://openejb.apache.org/3.0/jndi-names.html

Any hint is appreciated.

Christian Koppen

Reply | Threaded
Open this post in threaded view
|

Re: Support for alt-dd element in application.xml

Christian Koppen
Does anyone have an idea?

Is the element 'alt-dd' in the application.xml file supported by OpenEJB?

Christian Koppen


Christian Koppen schrieb:

> Hi,
>
> I'm currently evaluating OpenEJB 3.1.4 and have a question concerning
> JNDI names.
>
> I have an EJB module that I want to assemble in an EAR file. I cannot
> change the EJB module for non-technical reasons. Does OpenEJB allow me
> to change the EJB's JNDI name without touching the EJB?
>
> My preferred way would be usage of an alternative deployment descriptor
> by setting the element 'alt-dd' in the application.xml file. I could
> then use 'mapped-name' to set the JNDI name. But it seems that OpenEJB
> ignores the alt-dd element.
>
> I found out that the default JNDI name can be set by configuration
> ('openejb.jndiname.format'), too. I'd like to avoid this option since
> the JNDI name would then depend on the container configuration.
>
> I've read the following pages but didn't find a solution:
>
>   http://openejb.apache.org/3.0/alternate-descriptors.html
>   http://openejb.apache.org/3.0/jndi-names.html
>
> Any hint is appreciated.
>
> Christian Koppen
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Support for alt-dd element in application.xml

Jacek Laskowski
In reply to this post by Christian Koppen
On Mon, Dec 6, 2010 at 10:14 AM, Christian Koppen
<[hidden email]> wrote:

> I have an EJB module that I want to assemble in an EAR file. I cannot change
> the EJB module for non-technical reasons. Does OpenEJB allow me to change
> the EJB's JNDI name without touching the EJB?

Hi Christian,

I've been reading the docs about JNDI names and alt-dd, but couldn't
find a solution to your issue. I might be missing something
(definitely too long since I was using openejb).

Just to pursue it further, I'd like to know what you mean by EJB. Is
it the EJB jar file or the code? Why is the idea of
alternate-descriptors [1] not satisfactory? It could be that you don't
want to change the entire EJB module itself, do you? If you could
elaborate a bit more, it'd be very helpful.

[1] http://openejb.apache.org/3.0/alternate-descriptors.html

Jacek

--
Jacek Laskowski
Notatnik Projektanta Java EE - http://jaceklaskowski.pl
Reply | Threaded
Open this post in threaded view
|

Re: Support for alt-dd element in application.xml

Christian Koppen
Hi Jacek,

first of all, sorry for the delay.

 > I'd like to know what you mean by EJB.
 > Is it the EJB jar file or the code?

I have an EJB JAR file that contains a 'META-INF/ejb-jar.xml' entry.
I may not modify this JAR file (as I told before, for non-technical reasons).


 > Why is the idea of alternate-descriptors [1] not satisfactory?

I would have to add another ejb-jar.xml into my EJB JAR file. Since I may not
modify the file, this is not an option. Is there a way to put the ejb-jar.xml
somewhere else?


Jacek Laskowski schrieb:

> On Mon, Dec 6, 2010 at 10:14 AM, Christian Koppen
> <[hidden email]> wrote:
>
>> I have an EJB module that I want to assemble in an EAR file. I cannot change
>> the EJB module for non-technical reasons. Does OpenEJB allow me to change
>> the EJB's JNDI name without touching the EJB?
>
> Hi Christian,
>
> I've been reading the docs about JNDI names and alt-dd, but couldn't
> find a solution to your issue. I might be missing something
> (definitely too long since I was using openejb).
>
> Just to pursue it further, I'd like to know what you mean by EJB. Is
> it the EJB jar file or the code? Why is the idea of
> alternate-descriptors [1] not satisfactory? It could be that you don't
> want to change the entire EJB module itself, do you? If you could
> elaborate a bit more, it'd be very helpful.
>
> [1] http://openejb.apache.org/3.0/alternate-descriptors.html
>
> Jacek
>
Reply | Threaded
Open this post in threaded view
|

Re: Support for alt-dd element in application.xml

Jacek Laskowski
On Mon, Dec 20, 2010 at 4:51 PM, Christian Koppen
<[hidden email]> wrote:

> I have an EJB JAR file that contains a 'META-INF/ejb-jar.xml' entry.
> I may not modify this JAR file (as I told before, for non-technical
> reasons).
....
> I would have to add another ejb-jar.xml into my EJB JAR file. Since I may
> not modify the file, this is not an option. Is there a way to put the
> ejb-jar.xml somewhere else?

I don't really know at the moment. How would you, as an end user, us
to handle it? Is EAR packaging necessary/possible? I wonder if an
external DD for an EJB-jar, specified by a property was an acceptable
solution? Anything else?

Jacek

--
Jacek Laskowski
Notatnik Projektanta Java EE - http://jaceklaskowski.pl