jakartaee / data

Data-API
Apache License 2.0
88 stars 27 forks source link

Lifecycle CDI Event #373

Open hantsy opened 9 months ago

hantsy commented 9 months ago

Like the JPA event listener and do side effect by annotations @Save, @Merge, etc(till now I do not know well about the purpose of these annotations).

Spring Data provides a collection of XXXCallback when converting/saving/updating/delete an entity object.

In Jakarta Data, we can introduce CDI Event instead, make it compatible with all implementation modules.

It is more freely for developers.

gavinking commented 6 months ago

In Jakarta Data, we can introduce CDI Event instead, make it compatible with all implementation modules.

It's an appealing idea to use the CDI event bus for this, actually. Definitely worth considering in future.

[But I doubt it's a priority for 1.0.]