You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by fheinrich <fh...@pcsoft.de> on 2014/06/17 14:26:23 UTC
Using openejb.altdd.prefix. Why orig persistence.xml is not
removed?
Hi,
I'm using OpenEJB for some Integration tests for my datasystem. In
production the entities and DAO's working with Hibernate and JBoss and with
a own persistence.xml. For the integration test I spezified a own
test.persistence.xml which is using H2 memory DB. I was looking for a way
how I can replace or overwrite the orig persistence.xml from the datasystem.
So I found the openejb.altdd.prefix - Property. When I run my tests with
OpenEJB I got this error: @PersistenceContext unitName has multiple matches:
unitName "movieDB" has 2 possible matches. So it seems, that both
configurations are deployed. Make this behaivour sence? I can't changed my
DAO's in datasystem (changed unitName on Entitymanager), they should also
work in prod environment. Maybe a bug? Any workarounds for that?
Thanks
--
View this message in context: http://openejb.979440.n4.nabble.com/Using-openejb-altdd-prefix-Why-orig-persistence-xml-is-not-removed-tp4670052.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.
Re: Using openejb.altdd.prefix. Why orig persistence.xml is not
removed?
Posted by fheinrich <fh...@pcsoft.de>.
The persistence and test.persistence.xml are in different project. When I
move the test.persistence.xml into real datasystem projekt, it will be
replaced.
--
View this message in context: http://openejb.979440.n4.nabble.com/Using-openejb-altdd-prefix-Why-orig-persistence-xml-is-not-removed-tp4670052p4670064.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.
Re: Using openejb.altdd.prefix. Why orig persistence.xml is not removed?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
This is the way it works but you dont need it and can override any
properties from system properties.
I m not sure I get why you need to change it to change the datasource, you
dont use jtadatasource or nonjtadatasource tag?
Le mardi 17 juin 2014, fheinrich <fh...@pcsoft.de> a écrit :
> Hi,
> I'm using OpenEJB for some Integration tests for my datasystem. In
> production the entities and DAO's working with Hibernate and JBoss and
with
> a own persistence.xml. For the integration test I spezified a own
> test.persistence.xml which is using H2 memory DB. I was looking for a way
> how I can replace or overwrite the orig persistence.xml from the
datasystem.
> So I found the openejb.altdd.prefix - Property. When I run my tests with
> OpenEJB I got this error: @PersistenceContext unitName has multiple
matches:
> unitName "movieDB" has 2 possible matches. So it seems, that both
> configurations are deployed. Make this behaivour sence? I can't changed my
> DAO's in datasystem (changed unitName on Entitymanager), they should also
> work in prod environment. Maybe a bug? Any workarounds for that?
>
> Thanks
>
>
>
>
> --
> View this message in context:
http://openejb.979440.n4.nabble.com/Using-openejb-altdd-prefix-Why-orig-persistence-xml-is-not-removed-tp4670052.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>
--
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau