Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » actually usable entity events
actually usable entity events [message #1012227] Thu, 21 February 2013 06:15 Go to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
I've just embarked on a new project where we will be using JPA. One of the issues that I came across in previous projects is the fact that the EJB events are not really usable, because you often need to modify other entities and that is not supported. I've tried to find out if the events are going to be improved in a future JPA spec, but I cannot find an answer. But maybe the guys implementing the reference implementation do.

So: are there JPA entity events planned in a future spec where you can modify / persist / remove other entities?

Tom
Re: actually usable entity events [message #1014844 is a reply to message #1012227] Tue, 26 February 2013 15:15 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

I assume this will always be unspecified/provider specific in the Spec.

Depending on the event, and the modification, it may work.

EclipseLink also has its own set of SessionEvents and DescriptorEvents.

Somethings are better done in the application, instead of persistence events.


James : Wiki : Book : Blog : Twitter
Re: actually usable entity events [message #1014871 is a reply to message #1014844] Tue, 26 February 2013 16:09 Go to previous message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 817
Registered: July 2009
Senior Member
On 2013-02-26 16:15, James Sutherland wrote:
> I assume this will always be unspecified/provider specific in the Spec.
>
> Depending on the event, and the modification, it may work.
>
> EclipseLink also has its own set of SessionEvents and DescriptorEvents.
>
> Somethings are better done in the application, instead of persistence events.
>


Too bad. What would be great is that the events would be fired on all entities before they are written to the database. That would allow for changes being made to other entities.

I've initially indeed adopted Eclipse's events to do this, but ended up with an extended entity manager to generate them. Especially cascade remove is something that is hard to do in an application.
Previous Topic:Does eclipselink support oracle database column type ordimage?
Next Topic:ClassWeaver generates buggy code ?
Goto Forum:
  


Current Time: Thu Apr 25 22:14:19 GMT 2024

Powered by FUDForum. Page generated in 0.03486 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top