Adam Bien's Weblog

The JAXB's PostConstruct Callback

There is a JAXB method equivalent to @PostConstruct. The method: void afterUnmarshal(Unmarshaller umarshaller, Object parent) is going to be called by the Umarshaller after the class is instantiated and the contents reconstructed.

There is no further configuration, annotation or interface implementation required.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


NEW workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Nice tip!

Posted by Binh Nguyen on January 28, 2016 at 12:05 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
Online Workshops
...the last 150 posts
...the last 10 comments
License