Saturday, July 27, 2013

Contextual session-local Hibernate interceptor with Spring

    Hibernate interceptor can be used for various purposes, e.g. audit trail, simple logging of persistent operations. However, we should have on our minds the fact that Hibernate SessionFactory level interceptor has to be implemented in a thread-safe manner, because it will be shared among all of the sessions. Is there any way to implement the interceptor with single-thread programming model?

Saturday, July 6, 2013

EJB vs. Spring thread safety

    EJB and Spring are capable of providing ecosystem for the implementation of business services. EJB is more specific in its purpose whereas Spring brings us a great deal of flexibility. Can the freedom of Spring be dangerous?