Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [MOXy] post-processing after unmarshalling

Hi Matt,

I tested this just now, and the event listener works exactly as you
described.  It suits my needs perfectly.  :)

The xml to use in the project.xml is also like you described:

<events xsi:type="event-policy">
	<event-listeners>
		<event-listener>com.foo.MyEventListener</event-listener>
	</event-listeners>
</events>

Thank you so much!  btw, you might want to update the documentation here to
say that XML Descriptors are supported for event handlers:
http://wiki.eclipse.org/Configuring_a_Descriptor_(ELUG)#Configuring_a_Descriptor_Event_Listener_as_an_Event_Handler

Thanks!

--Polly  



Matt MacIvor wrote:
> 
> 
> Hi Polly, 
> 
> 1. You would want to use the getObject() method to get back your
> Object. getOriginalObject is used for events like postClone or
> postMerge where you may want access to the original object. OXM doesn't
> use any cloning so that OriginalObject wouldn't be set. 
> 
> 2. I believe you would just need to set the event-listener element in
> your deployment XML. 
> 
> 3. In ORM projects, there's a lot of different descriptor events that
> get called, but in OXM, currently, only the postBuild event gets
> raised. The XMLMarshalListener API provides pre and post marshal
> events, but those would be raised for every object (similar to JAXB
> event listeners) and not on a per-descriptor basis. 
> 
> -Matt 
> 
> 

-- 
View this message in context: http://www.nabble.com/-MOXy--post-processing-after-unmarshalling-tp20606821p20611513.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top