Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLink 2.5 now Available

På onsdag 29. mai 2013 kl. 14:43:52, skrev Tom Ware <tom.ware@xxxxxxxxxx>:
Hi Joseph,

   EclipseLink has always had a pretty extensive converter API, JPA 2.1 has
simply formalized more of it.  It should be reasonably easy to write converters
for the various joda-time data structures.

   Can you please describe a bit more what you mean by converters
auto-registering themselves?
 
Ok, so I understand there is no drop-in library for joda-time converters for JPA-2.1.
 
By autoregistering I mean I just have to set the JPA-property jadira.usertype.autoRegisterUserTypes=true and have the usertype.core.jar in the classpath and I can use joda-time's classes without doing anything else. This is due to Hibernate-4.x's integrator-API http://docs.jboss.org/hibernate/orm/4.0/devguide/en-US/html/ch07.html#integrators
 
I see JPA-2.1 provides a @Converter(autoApply=true) annotation, does this make the provider, EclipseLink, pick up the converter automatically and use it for all mappings?
 
BTW; I'm using Hibernate in a non-JEE container, Tomcat, and am looking for similar configuration working with EclipseLink.
 
Thanks.
 
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
 

Back to the top