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

Bug 387614

Summary: Support interpreting ejb_or_metadata logging category
Product: z_Archived Reporter: Doug Clarke <douglas.clarke>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: jamesssss, neil.hauge
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed Patch
none
Proposed Patch
none
Proposed Patch
none
Fixes for 2.4
none
Fixes for 2.4 branch none

Description Doug Clarke CLA 2012-08-20 10:50:28 EDT
In EclipseLink 2.4.0 there was a change of logging category names.

Example:

ejb_or_metadata -> metadata

NOTE: please do a complete diff between the category names in 2.4.0 and the previous release.

Unfortunately our existing tools (Dali) were not aware and still use the old value. We also have a backwards compatibility issue.

We should add a fix in 2.4.1 to handle converting these values on read and log a warning about them being deprecated.
Comment 1 Doug Clarke CLA 2012-08-20 11:14:20 EDT
For the ejb_or_metadata  category I believe the fix is simply an addition to EntityManagerFactoryProvider's oldPropertyNames[][] such as:

        {PersistenceUnitProperties.LOGGING_LEVEL + "." + SessionLog.EJB_OR_METADATA, PersistenceUnitProperties.LOGGING_LEVEL + ".ejb_or_" + SessionLog.EJB_OR_METADATA}
Comment 2 Doug Clarke CLA 2012-08-20 11:25:00 EDT
        {PersistenceUnitProperties.LOGGING_LEVEL + "." + SessionLog.METAMODEL, PersistenceUnitProperties.LOGGING_LEVEL + ".jpa_" + SessionLog.METAMODEL},
        {PersistenceUnitProperties.LOGGING_LEVEL + "." + SessionLog.EJB_OR_METADATA, PersistenceUnitProperties.LOGGING_LEVEL + ".ejb_or_" + SessionLog.EJB_OR_METADATA}


I also noticed that the SessionLog's JavaDoc header hard codes some of these values. I would suggest using:

 * <table>
 * <tr><td>&nbsp;</td><td>SQL</td>           <td>&nbsp;</td><td>= {@value #SQL}</td></tr>
 * <tr><td>&nbsp;</td><td>TRANSACTION</td>   <td>&nbsp;</td><td>= {@value #TRANSACTION}</td></tr>
 * <tr><td>&nbsp;</td><td>EVENT</td>         <td>&nbsp;</td><td>= {@value #EVENT}</td></tr>
 * <tr><td>&nbsp;</td><td>CONNECTION</td>         <td>&nbsp;</td><td>= {@value #CONNECTION}</td></tr> 
 * <tr><td>&nbsp;</td><td>QUERY</td>         <td>&nbsp;</td><td>= {@value #QUERY}</td></tr>
 * <tr><td>&nbsp;</td><td>CACHE</td>         <td>&nbsp;</td><td>= {@value #CACHE}</td></tr>
 * <tr><td>&nbsp;</td><td>PROPAGATION</td>   <td>&nbsp;</td><td>= {@value #PROPAGATION}</td></tr>
 * <tr><td>&nbsp;</td><td>SEQUENCING</td>    <td>&nbsp;</td><td>= {@value #SEQUENCING}</td></tr>
 * <tr><td>&nbsp;</td><td>EJB</td>           <td>&nbsp;</td><td>= {@value #EJB}</td></tr>
 * <tr><td>&nbsp;</td><td>DMS</td>           <td>&nbsp;</td><td>= {@value #DMS}</td></tr>
 * <tr><td>&nbsp;</td><td>EJB_OR_METADATA</td><td>&nbsp;</td><td>= {@value #EJB_OR_METADATA} </td></tr>
 * <tr><td>&nbsp;</td><td>METAMODEL</td><td>&nbsp;</td><td>= {@value #METAMODEL}</td></tr>
 * <tr><td>&nbsp;</td><td>WEAVER</td>        <td>&nbsp;</td><td>= {@value #WEAVER}</td></tr>
 * <tr><td>&nbsp;</td><td>PROPERTIES</td>        <td>&nbsp;</td><td>= {@value #PROPERTIES}</td></tr>
 * <tr><td>&nbsp;</td><td>SERVER</td>        <td>&nbsp;</td><td>= {@value #SERVER}</td></tr>
 * </table>
Comment 3 Doug Clarke CLA 2012-08-20 13:59:03 EDT
Created attachment 220063 [details]
Proposed Patch

Deprecate EJB_OR_METADATA replacing with METADATA
Add jpa-metamodel and ejb_or_metadata to org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.oldPropertyNames
Comment 4 Doug Clarke CLA 2012-08-20 14:04:35 EDT
Created attachment 220064 [details]
Proposed Patch
Comment 5 Doug Clarke CLA 2012-08-20 14:05:23 EDT
Created attachment 220066 [details]
Proposed Patch
Comment 6 Doug Clarke CLA 2012-08-21 10:41:52 EDT
When running with agent and logging config of:

			<property name="eclipselink.logging.timestamp" value="false"/>
			<property name="eclipselink.logging.level" value="FINE"/>
			<property name="eclipselink.logging.thread" value="false"/>
			<property name="eclipselink.logging.session" value="false"/>
			<property name="eclipselink.logging.exceptions" value="false"/>
			<property name="eclipselink.logging.connection" value="false"/>
			<property name="eclipselink.logging.level.ejb_or_metadata" value="WARNING"/>
			<property name="eclipselink.logging.level.jpa_metamodel" value="WARNING"/>


I am getting duplicate messages based on the various processings of the PU:

[EL Info]: transaction: property eclipselink.logging.level.jpa_metamodel is deprecated, property eclipselink.logging.level.metamodel should be used instead.
[EL Info]: transaction: property eclipselink.logging.level.ejb_or_metadata is deprecated, property eclipselink.logging.level.metadata should be used instead.
[EL Info]: transaction: property eclipselink.logging.level.jpa_metamodel is deprecated, property eclipselink.logging.level.metamodel should be used instead.
[EL Info]: transaction: property eclipselink.logging.level.ejb_or_metadata is deprecated, property eclipselink.logging.level.metadata should be used instead.
[EL Info]: transaction: property eclipselink.logging.level.jpa_metamodel is deprecated, property eclipselink.logging.level.metamodel should be used instead.
[EL Info]: transaction: property eclipselink.logging.level.ejb_or_metadata is deprecated, property eclipselink.logging.level.metadata should be used instead.

			<property name="eclipselink.logging.timestamp" value="false"/>
			<property name="eclipselink.logging.level" value="FINE"/>
			<property name="eclipselink.logging.thread" value="false"/>
			<property name="eclipselink.logging.session" value="false"/>
			<property name="eclipselink.logging.exceptions" value="false"/>
			<property name="eclipselink.logging.connection" value="false"/>
			<property name="eclipselink.logging.level.ejb_or_metadata" value="WARNING"/>
			<property name="eclipselink.logging.level.jpa_metamodel" value="WARNING"/>

Not sure how to address this or if it is important
Comment 7 Doug Clarke CLA 2012-08-27 16:43:56 EDT
Created attachment 220356 [details]
Fixes for 2.4
Comment 8 Doug Clarke CLA 2012-08-27 16:44:26 EDT
Created attachment 220357 [details]
Fixes for 2.4 branch
Comment 9 Doug Clarke CLA 2012-08-28 16:12:50 EDT
Checked into 2.4 and master based on Guy's review and testing
Comment 10 Eclipse Webmaster CLA 2022-06-09 10:20:36 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink