In my previous entry, I talked about how you could easily use Spring from within EJB 3 beans, thanks to the magic of EJB interceptors. But what about the other way? How do you use EJB 3 from Spring?
*Update:* It looks like the Interface21 guys have had similar ideas – check out Project Pitchfork
Continue reading “Using EJB3 with Spring”
Back when we were planning the migration to Glassfish, I realised we would have two dependency-injection frameworks in use – EJB 3 and Spring. For obvious reasons, I wanted to know more about how these would interact. At the time (last July), I couldn’t find anyone who had used EJB 3 and Spring together – even Ben Alex from Interface21 hadn’t come across it. Six months later, and I still haven’t heard of anyone using Spring _from_ EJBs. Except for us.
Continue reading “Using Spring with EJB 3”
Don Brown made a very good point about a gotcha with the IoC technique I demonstrated with Struts: it’s potentially not threadsafe.
Continue reading “Follow-up on IoC with Struts”
It can be pretty useful to supply dependencies to domain objects that you’re loading via Hibernate This is where Hibernate Interceptors come into play.
Continue reading “Roll-Your-Own IoC with Hibernate”
IoC, aka dependency injection, is the current trend. The idea is simple: create your normal class, and rather than going and fetching things you might want (like datasources, factories, and so on), get them given to you instead. This greatly facilitates things like unit testing, because you’ve got a lot less dependencies to set up.
Struts uses Actions to drive an application. This describes a way to use dependency injection techniques with Struts.
Continue reading “Roll-Your-Own IoC with Struts”