openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: Override "jta-data-source" with system properties?
Date Mon, 19 Jul 2010 15:15:18 GMT
What about these?

props.put("javax.persistence.jtaDataSource", "");
props.put("javax.persistence.nonJtaDataSource", "");

These are more portable than the openjpa.Foo properties, and a quick test
with just jtaDataSource worked for me.

-mike

On Sat, Jul 17, 2010 at 12:04 PM, Harald Wellmann <
Harald.Wellmann@multi-m.de> wrote:

>
> This does not seem to work in OpenJPA 2.0.0.
>
> I have a <jta-data-source> for a Java EE web app in my persistence.xml,
> which I'm trying to override for unit tests by setting properties when
> creating the EntityManagerFactory in a Java SE environment.
>
>        props.put("openjpa.ConnectionFactory2Name", "");
>        props.put("openjpa.ConnectionFactoryName", "");
>
> Plus more props for my JDBC settings.
>
> However, this seems to have no effect. OpenJPA is always doing a JNDI
> lookup
> which throws an exception.
>
> Is this a regression or am I missing anything...?
>
> Regards,
> Harald
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Override-jta-data-source-with-system-properties-tp4173119p5306503.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message