[jboss-user] [EJB 3.0] - Re: @PrePersist @PreUpdate within @AroundInvoke results in c

gnulp do-not-reply at jboss.com
Mon Dec 4 07:38:02 EST 2006


but that means that you have NO chance to intercept a business-logic call from a client who is doing an update on an entity that has cascading enabled !!!

Assume 2 entities e.g. person [1:n] address. You have got a business-method that can be called with person as an attribute only, and the client changed a referenced address-object (remember cascade all is enabled !). So we get a call-back in the pre-update-Method of the address, but we will never know that in the interceptor of the business-logic call, due to the late update-callback (unfortunaltelly we can not use an entityManager in listener-callbacks, but we have also no chance doing this in an interceptor !!!)

In other words I would have to check weather any address-object has changed myself although I am using ejb3 that is doing these things anyhow !  So why am I using ejb3, if I have to reinvent the wheel ?

Thx for any feedback







View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990963#3990963

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990963



More information about the jboss-user mailing list