I'm adding some features to an old EJB 2 application using Spring. The Spring application context used by the EJBs is a parent context of the web application as described here.
I'm trying to use a session scoped bean from within the EJBs. The bean in question is initialized from the EJB application context.
However, I get this error when trying to access the bean:
Caused by: java.lang.IllegalStateException: No Scope registered for scope 'session'
From what I've read, this is because the parentContextKey is not an instance of WebApplicationContext. Does anyone have an ideas of how I could get this working?