tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Saint Croix" <saintx.opensou...@gmail.com>
Subject Re: Alternatives to specifying persistence provider in component jars?
Date Thu, 13 Dec 2007 05:16:44 GMT
Thanks for the fast response, David.

The ability to remove the following four properties is very helpful and a
great start:

Namely the following:
>   javax.persistence.provider
>   javax.persistence.transactionType
>   javax.persistence.jtaDataSource
>   javax.persistence.nonJtaDataSource
>

While packaging up my component beans, I'd rather not specify the
persistence provider from inside the component JAR.  If someone wanted to
use my beans with a different persistence provider they should be able
to--that's what these component JARs are designed for.  So, the plan at the
moment is to write OpenJPA-tailored persistence.xml files, and in the future
if someone wants to use another PP, I'll have to ship JARs with that one
line of code different in the XML file.

Just seems off.  There should be some way to override that at least.  That
would make packaging these component JARs much more straight-forward for me.



> Note that the javax.persistence.provider will default to OpenJPA (i.e.
> org.apache.openjpa.persistence.PersistenceProviderImpl).  While that's
> nice, it doesn't allow you to pass the vendor specific properties,
> namely the truly amazing "openjpa.jdbc.SynchronizeMappings" that will
> basically allow you to squeak by not having to create or drop tables.


Got it.  I'll just keep the <provider> reference in my component JARs for
now.

While fully defining persistence units at the OpenEJB level would be great,
some sort of override function might be better.  "Configuration shadowing",
or some such.

The validation features should come in quite handy soon.  For now, back to
defining entity relations.

Cheers!
--
Alexander R. Saint Croix

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