Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Composite persistence unit without jar files containing persistence.xml

Not the answer I hoped but a definitive answer, now I can stop losing time trying to accomplish something that is not possible thanks for the help Andrei

2014-11-03 19:46 GMT+01:00 andrei ilitchev <andrei.ilitchev@xxxxxxxxxx>:
And again the answer is no - composite members must be defined using <jar-file> element in persistence.xml:
        <jar-file>eclipselink-composite-advanced-model-member_1.jar</jar-file>
        <jar-file>eclipselink-composite-advanced-model-member_2.jar</jar-file>
        <jar-file>eclipselink-composite-advanced-model-member_3.jar</jar-file>

What might work in Java SE case is inserting in each jar file only /META-INF/persistence.xml that would specify all the mapped classes:
        <class>org.eclipse.persistence.testing.models.jpa.beanvalidation.Employee</class>
        <class>org.eclipse.persistence.testing.models.jpa.beanvalidation.Project</class>
        <class>org.eclipse.persistence.testing.models.jpa.beanvalidation.Address</class>
without adding the actual classes to the jar but rather making them available on the main classpath.


On 11/3/2014 1:24 PM, Raúl Arabaolaza wrote:
Hi Andrei,

Thanks for the quick response, I explained myself wrongly, I don't mean without a persistence.xml file but with the persistence.xml file of the composite members not being inside of a jar file. I mean, in all the docs and examples the composite persistence unit uses the <jar-file> tag to indicate a .jar file that contains the persistence.xml of the composite units, I want to know if there's a way to indicate the location of composite members  persistence.xml file if this file is not inside a jar file.  

Thanks again for your help.

Regards, Raúl

2014-11-03 19:18 GMT+01:00 andrei ilitchev <andrei.ilitchev@xxxxxxxxxx>:
No, as any persistence unit, composite persistence unit must be defined in persistence.xml.

On 11/3/2014 1:13 PM, Raúl Arabaolaza wrote:
Hi,

Is it possible in a composite persistence unit to specify the persistence.xml files of the composite members without it being inside a jar file but in the application's classpath??

I've been digging the internet and the code without any success for 5 days, any help is appreciatted.

Regards, Raúl


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top