Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 258538

Summary: [JPA 2.0] persistence unit properties
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: GeneralAssignee: Tran Le <tranle1>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: neil.hauge, shaun.smith
Version: 2.1Keywords: plan
Target Milestone: 2.3 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard: JPA2.0
Bug Depends on: 249023    
Bug Blocks:    

Description Karen Butzke CLA 2008-12-11 14:45:06 EST
The JPA spec now defines some persistence unit properties
javax.persistence.lock.timeout — value in seconds for pessimistic lock timeout
javax.persistence.query.timeout — value in seconds for query timeout

The following properties defined by this specification are intended for use in Java SE environments:
javax.persistence.jdbc.driver — fully qualified name of the driver class
javax.persistence.jdbc.url — driver-specific URL
javax.persistence.jdbc.user — username used by database connection
javax.persistence.jdbc.password
Comment 1 Karen Butzke CLA 2008-12-12 14:00:43 EST
javax.persistence.lock.timeout - this is supported by EclipseLink in 1.1 bug 248489

javax.persistence.jdbc.driver — fully qualified name of the driver class
javax.persistence.jdbc.url — driver-specific URL
javax.persistence.jdbc.user — username used by database connection
javax.persistence.jdbc.password
These are targeted to EclipseLink 2.0 in bug 249023


javax.persistence.query.timeout - unsure about this one
Comment 2 Neil Hauge CLA 2009-08-06 10:17:22 EDT
I think we want to always use (write) the new jdbc property names for both Generic 2.0 and the EclipseLink 2.0 platforms.  We should also be able to read the old EclipseLink property names for backwards compatibility, but we can always write the new properties out when values are changed.  This would require removing the old property.  The other option would be to update values using the old property names if they are present.
Comment 3 Tran Le CLA 2009-08-06 18:17:01 EDT
We would want to have the same properties organization on JPA 2.0 platform then on the EclipseLink 2.0 platform.
Connection tab
	javax.persistence.jdbc.driver 
	javax.persistence.jdbc.url
	javax.persistence.jdbc.user
	javax.persistence.jdbc.password
Options tab
Miscellaneous Options group 
	javax.persistence.lock.timeout
	javax.persistence.query.timeout
	javax.persistence.validation.group.pre-persist
	javax.persistence.validation.group.pre-update
	javax.persistence.validation.group.pre-remove

Comment 4 Tran Le CLA 2009-09-08 13:22:32 EDT
Dali can now read EclipseLink 1.1 or 2.0 persistence unit properties, and will have the following behavior when legacy properties names are found:
- If there is no change to the persistence.xml, the xml file remains unchanged.
- If EclipseLink 1.1 and 2.0 names are present for the same property, EclipseLink 2.0 name will be retained.
- If there is any change to the persistence.xml, migration to new properties names will take place.