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 2015/04/18 18:57:16 UTC

test override

Hi,
maybe a silly question but is it possible by container properties to
override <jar-file> option in a persistence unit during IT?

br hw



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/jar-file-test-override-tp4674478.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: test override

Posted by Romain Manni-Bucau <rm...@gmail.com>.
yes in this case jar-file is not used IIRC.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-04-19 21:17 GMT+02:00 hwaastad <he...@waastad.org>:

> Hi,
> using containerrules and my provider is eclipselink 2.6.0
>
> br hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/jar-file-test-override-tp4674478p4674489.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: test override

Posted by hwaastad <he...@waastad.org>.
Hi,
using containerrules and my provider is eclipselink 2.6.0

br hw



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/jar-file-test-override-tp4674478p4674489.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: test override

Posted by Romain Manni-Bucau <rm...@gmail.com>.
What is your IT setup? Depends also your provider and PU config.
 Le 18 avr. 2015 22:35, "hwaastad" <he...@waastad.org> a écrit :

> Thx Romain,
>
> I can get away with resource filtering in maven also.
> anyways, turns out that I actually don't need the jar-file reference in my
> PU.
>
> Is this something special about tomee? (that scanning is also run on my jpa
> jar without adding the jar-file reference?)
> or is it working ok since i declare all my entity classes in
> persitence.xml?
>
> br hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/jar-file-test-override-tp4674478p4674484.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: test override

Posted by hwaastad <he...@waastad.org>.
Thx Romain,

I can get away with resource filtering in maven also.
anyways, turns out that I actually don't need the jar-file reference in my
PU.

Is this something special about tomee? (that scanning is also run on my jpa
jar without adding the jar-file reference?)
or is it working ok since i declare all my entity classes in persitence.xml?

br hw



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/jar-file-test-override-tp4674478p4674484.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: test override

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

not out of the box but you can (or):

- do it through JMX at runtime (check our persistence unit mbeans, it is a
reloadable entity manager so do the changes and call reload). a @Singleton
@Startup with a @PostConstruct would do the trick to ensure it is done
before tests
- use openejb.jpa.* to filter classes taken into account. This is
persistence unit properties and can be changed through system properties.


Le 18 avr. 2015 19:11, "hwaastad" <he...@waastad.org> a écrit :

> Hi,
> maybe a silly question but is it possible by container properties to
> override <jar-file> option in a persistence unit during IT?
>
> br hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/jar-file-test-override-tp4674478.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>