JEE and Spring

How are people using JEE 5 and Spring these days? There’s a lot of overlap in the technologies, obviously, and there are reasons to use both, but I’m interested in those using them collaboratively…

I’ve seen some articles about how one can integrate the two by accessing a Spring ApplicationContext from within an EJB 3 Session Bean, but none of them seem to address the fact that the two have different life cycles — using dependency injection within a Session Bean’s PostConstruct method could cause some unexpected problems if you’re using Spring’s prototype scoping… there’s no guarantee that the PostConstruct will be called for each invokation, but only when the bean is originally created…

Has anyone out there dealt with this? Would it be possible to create an ‘ejb’ scope with Spring’s new customizable scopings?

2 thoughts on “JEE and Spring

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s