Nico Schlebusch created DELTASPIKE-1229:
-------------------------------------------

             Summary: Allow the use of @Alternative to implement a custom 
TimestampsProvider
                 Key: DELTASPIKE-1229
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1229
             Project: DeltaSpike
          Issue Type: New Feature
          Components: Data-Module, JPA-Module
    Affects Versions: 1.7.2
         Environment: Deltaspike 1.7.2. CDI 1.1 Wildfly AS 9.0.2.Final
            Reporter: Nico Schlebusch


I'm using the JPA {{@EntityListeners(AuditEntityListener.class)}} and the audit 
functionality of Deltaspike Data ({{@CreatedOn}}, {{@ModifiedOn}} and 
{{@ModifiedBy}} annotations) on an entity bean with the difference that I have 
a custom implementation of {{java.time.ChronoLocalDateTime}} which converts any 
{{LocalDateTime}} + {{ZoneOffset}} OR a {{ZonedDateTime}} to be the UTC date & 
time.

Is there a way to implement my own 
{{org.apache.deltaspike.data.impl.audit.PrePersistAuditListener}} and 
{{org.apache.deltaspike.data.impl.audit.PreUpdateAuditListener}} and use them 
to create the instance of {{UTCDateTime}} required by he fields marked with 
{{@InsertedOn}} and {{@ModiefiedOn}}?

See this [SO 
Question|http://stackoverflow.com/questions/41057116/deltaspike-data-cdi-jpa-custom-prepersistauditlistener-and-preupdateauditlis]
 and the discussion on this [mail 
thread|https://lists.apache.org/thread.html/c47a6187d03fc8f665c6b3c7ab760e80084db3b8d4f83fe9d34015d8@%3Cusers.deltaspike.apache.org%3E]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to