Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362707 - System Properties should override persistence.xml properties
Summary: System Properties should override persistence.xml properties
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-02 13:52 EDT by Gordon Yorke CLA
Modified: 2022-06-09 10:26 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Yorke CLA 2011-11-02 13:52:58 EDT
Currently System Properties are only applied if a persistence.xml property is not present.  Usually it is considered that a system property is more specific than an application property so a system property would be a valid override for an application property; in this case properties from the persistence.xml file.
Comment 1 Tom Ware CLA 2011-11-02 14:33:41 EDT
'not sure I agree.  We should discuss.
Comment 2 Tom Ware CLA 2011-11-17 13:52:12 EST
Setting target.  We should discuss this prior to deciding how to address this issue.
Comment 3 Nathan Drew CLA 2011-12-05 10:01:58 EST
From an administrative and remote diagnostic perspective, I agree with Gordon Yorke on this front.

For instance - the logging, and even specifying classes to disable cache for - if we have the ability to tell a customer to set a JVM property to increase logging, or disable caching for a specific class that we've found a problem with then we don't have to tell them to deploy a whole new application that we would have to build for them in order to update the persistence.xml.

In general, in the JEE world the application developer can define settings, at deploy time (which would include JVM properties) the role of the deployer would mean they can decide to override or map specific resources - an example of this is  EJB JNDI names, or mapping JDBC JNDI references to alternative data sources.

As I understand it from the email in the user group, the following areas allow properties to be set:

1. persistence.xml
2. passed properties
3. System properties

I would expect number 1. above to be the least important in terms of overriding. A JEE administrator would expect this, and it is a valuable way to customise settings that are specific to an environment over the top of the built application. Without this, you're stuck with whatever the developer/builder has defined and are powerless without a new application build.

Kind Regards
Nathan
Comment 4 Tom Ware CLA 2012-05-29 10:11:00 EDT
Deferring to next major release.
Comment 5 Tom Ware CLA 2013-04-03 11:54:51 EDT
Missed 2.5.0.  Deferring.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:26:26 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink