Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Re: Review for changes required to introduce PersitenceUtilImpl

Mitesh, this is a good solution.
--Gordon

Mitesh Meswani wrote:
Gordon Yorke wrote:
Hello Mitesh,
    The package will have to be discussed with the expert group.  Currently the licensing of the specification does not allow for the extension of the javax.persistence namespace so we will probably have an eclipselink package within the persistence jar.
Thinking more about it...How about placing PersitenceUtil as a private static inner class within Persitsence? This would be on similar lines as PersitenceProviderResolverHolder <-> DefaultPersistenceProviderResolver. I have attached proposed diff to issue 281884

Thanks,
Mitesh
    The stubbed behaviour is fine for now except isLoaded() should return false for the UKNOWN case. ( I understand you need it to return true to test validation for now)
    The PersistenceUtil class is under discussion but will not likely change drastically.
--Gordon


Mitesh Meswani wrote:
Hi Tom, Gordon,

Can you please review attached changes.
  • Introduce PersitenceUtilImpl.java. This implements PersitenceUtilImpl as described in the spec.
    The attached file is under javax.persistence package. We might need to move this if comptibility folks suggest otherwise
    Doug, can you please specially review the header for this file to make sure that no lawyers are offended.
  • Modify Persitence.getPersitenceUtil() to return above PersistenceUtilImpl
  • Modify org.eclipse.persitence.jpa.PersistenceProvider to return LoadState.UNKNOWN for isLoaded*().
    This would flag all objects and attributes as not recognizable by EclipseLink hence would trigger PersitenceUtil.isLoaded*() to return true
    This would of course need to be replaced with correct implementation.
    I plan to implement it in coming week and will trouble you guys with questions about EclipseLink weaving for that :).

I understand that there is still some debate going on within the expert group about PersistenceUtil and it might need to be refactored. However, I am trying to integrate EclipseLink 2.0.0-M4 into GlassFish V3 and running into issues with GlassFish / Bean Validation integration. V3 uses Bean Validation to validate its configuration information. Bean Validation code fails with EclipseLink M4 as Persitence.getPersitenceUtil() returns javax.persitence.spi.PersitenceUtil instead of javax.persistence.PersitenceUtil. (I still need to figure out why GlassFish was not breaking with 2.0.0-M3 where Persitence.getPersistenceUtil was an instance method instead of a static method. But, I guess it is more productive to concentrate on how to move forward from current state).  I had already fixed the return value in EclipseLink trunk, but that is not sufficient as we do not have Persistence.getPersitenceUtil() implemented.

Tom,
Provided I am able to check these changes in, can we get a promoted build of EclipseLink with these changes.

Thanks,
Mitesh

_______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev

_______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev

Back to the top