Wow... I really did not know I could put xml values on a property...
unfortunately I'm unable to test ir right now because the code is at work,
but on monday, as soon as I test it I'll post the result.

If this works, it's gonna be enough for me. If not, I'm gonna have a look on
OpenJPA to achieve this.

Thanks, Wayne.

Regards,
Rafael Vanderlei.

On Fri, Mar 25, 2011 at 10:36 PM, Wayne Fay <[email protected]> wrote:

> > <persistence-unit name="NAME" transaction-type="${transtype}">
> >
>   ${dbconfig}
> >
> > </persistence>
>
> Try something along these lines:
> <profile>
>  <id>production</production>
>  <properties>
>    <transtype>JTA</transtype>
>
>  
> <dbconfig><![CDATA[<jta-data-source>JNDI_NAME_FOR_MY_DATASOURCE</jta-data-source>]]</dbconfig>
>  </properties>
> </profile>
>
> And yes, you'd need to put the whole <property...> section in a CDATA
> node for your unit test version.
>
> Having said all that, I think I'd look for another option. Surely
> OpenJPA would allow you to specify an alternate P-U config file so you
> could just include both and then instruct OpenJPA which one to use.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to