-
Apr 11th, 2006, 04:45 AM
#1
ContextSingletonBeanFactoryLocator creates several times same context ?!?
Hi,
first, here is the context:
- Spring 1.2.7
- one EAR deployed in JBoss 4.0.3
- the EJBs packaged in one EJB-JAR all sharing one ApplicationContext to inject their delegate.
ApplicationContext sharing is achieved using the way recommended on this forum, i.e. by calling setBeanFactoryLocator(ContextSingletonBeanFactoryL ocator.getInstance())
- one WAR (JSF-based usnig JSF-Spring) using several ApplicationContexts
When my webapp calls local EJBs, I can see that one ApplicationContext is created for each call. So it seems that my EJBs do not share the context!
I have made some investigations in EJBs:
- ContextSingletonBeanFactoryLocator.getInstance() does return the same object
- calls to getBeanFactory() indeed, strangely, return different objects
And now the funny part: if I make a *remote* call to one EJB, the problem disappear.
After that, local EJB calls no more cause ApplicationContext creation.
I don't have a clue about what goes wrong.
Any help is appreciated.
Cheers,
J-F
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules