Seam @Transactional annotation not working?

I'm not familiar with how Seam works so my apologies in advance if this answer does not apply I noticed that the method that is Transactional is protected This implies to me that it is being called by another internal method With Spring's AOP, you mark the public methods with Transactional which are wrapped and replaced with a transaction proxy. When an external class calls the public method, it is calling the proxy which forms the transaction. If the external class calls another public method that is not marked with Transactional which then calls an internal method which is, there will be no transaction created because the proxy is not being called at all In Spring, even if you change your doWork() method to be public, the same problem would happen.No transaction because the proxy object is not being called.

Method calls made inside of the class are not making calls to the proxy object A quick read of some documentation seems to indicate that, like Spring AOP, Seam is using CGLib proxying The question is if it is able to proxy all methods -- even if they are called from within the proxied object. Sorry for wasting your time if this answer does not apply.

I'm not familiar with how Seam works so my apologies in advance if this answer does not apply. I noticed that the method that is @Transactional is protected. This implies to me that it is being called by another internal method.

With Spring's AOP, you mark the public methods with @Transactional which are wrapped and replaced with a transaction proxy. When an external class calls the public method, it is calling the proxy which forms the transaction. If the external class calls another public method that is not marked with @Transactional which then calls an internal method which is, there will be no transaction created because the proxy is not being called at all.In Spring, even if you change your doWork() method to be public, the same problem would happen.

No transaction because the proxy object is not being called. Method calls made inside of the class are not making calls to the proxy object. A quick read of some documentation seems to indicate that, like Spring AOP, Seam is using CGLib proxying.

The question is if it is able to proxy all methods -- even if they are called from within the proxied object. Sorry for wasting your time if this answer does not apply.

Possibly related to stackoverflow. Com/questions/3401821/… – Gray Oct 27 at 14:04 I think you are on to something here – Shervin Oct 31 at 15:49 Accepting this because his it's really close to what the problem turned out to be for us with Seam. The @Transactional annotation isn't used unless you go from one Seam component to another.In this case, we were calling our Transactional method from within the same Seam component (MyComponent).

By pulling the call to the Transactional method out to another component, the TransactionInterceptor is now getting triggered and all is good. – Chris Williams Nov 1 at 20:02 Yeah, I thought it was something like that. Glad it helped.

– Gray Nov 1 at 20:11.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions