You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by hwaastad <he...@waastad.org> on 2014/03/09 13:00:45 UTC

ejb-jar.xml/beans.xml placement in a war

Hi,
I guess this is discussed several places, but I'm still not 100% sure about
my implementation.

OK, here it goes:

I have a war with rest services.
I have implemented bval support for my services defined in ejb-jar.xml.
I have producers for JMS connections and sessions.

In a war, I guess WEB-INF is the place for adding these files.
However, during tests (openejb-cxf-rs) I need these files in
resources/META-INF or else it won't work.

So, my question is: drop using WEB-INF and only META-INF (spec says using
web-inf(?)), adding files to META-INF before tests, or use some kind of
alternative-descriptors

right now I have duplicated ejb-jar.xml/beans.xml; WEB-INF and
WEB-INF/classes/META-INF

Or is arquillian a better way?

Any recommendation is valuable :-)

br,
hw





--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-jar-xml-beans-xml-placement-in-a-war-tp4668144.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb-jar.xml/beans.xml placement in a war

Posted by hwaastad <he...@waastad.org>.
Hi Romain,
and thanks for answering.

Right now I think I'll have to use  src/resources/META-INF since adding
files to src/test/resources/META-INF does'nt seem to work.

I guess it's not a problem, even if IDE's usually complains about non
existing beans.xml :-)

br hw




--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-jar-xml-beans-xml-placement-in-a-war-tp4668144p4668155.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb-jar.xml/beans.xml placement in a war

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

META-INF should be fine for you but WEB-INF is more accurate IMHO.
Using arquillian would make it easy but needs some learning you maybe
don't want. Copying these file (with mvn?) to target/test-classes (or
putting them in src/test/resources/META-INF) is another solution which
can be in between both previous ones.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-03-09 13:00 GMT+01:00 hwaastad <he...@waastad.org>:
> Hi,
> I guess this is discussed several places, but I'm still not 100% sure about
> my implementation.
>
> OK, here it goes:
>
> I have a war with rest services.
> I have implemented bval support for my services defined in ejb-jar.xml.
> I have producers for JMS connections and sessions.
>
> In a war, I guess WEB-INF is the place for adding these files.
> However, during tests (openejb-cxf-rs) I need these files in
> resources/META-INF or else it won't work.
>
> So, my question is: drop using WEB-INF and only META-INF (spec says using
> web-inf(?)), adding files to META-INF before tests, or use some kind of
> alternative-descriptors
>
> right now I have duplicated ejb-jar.xml/beans.xml; WEB-INF and
> WEB-INF/classes/META-INF
>
> Or is arquillian a better way?
>
> Any recommendation is valuable :-)
>
> br,
> hw
>
>
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/ejb-jar-xml-beans-xml-placement-in-a-war-tp4668144.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.