-
Nov 25th, 2005, 10:25 AM
#1
Accessing Statefull Session Bean
Hi all,
Im developing a Framework for back-end functionalities for Corporate Banking
The App Server is WAS6.
My problem is how to hold a reference to a statefull session (from here s.s) bean in my beck-end-context(from here b.e.c). My back-end-context is a "prototype" bean, i.e not a singleton.
My "dream" is to inject the istance of s.s in b.e.c in a declarative fashion.
This is my context:
....some beans...
<bean id="SessionHolderHome" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName"><value>ejb/it/bancaintesa/dsa/framework/ejbs/core/SessionHolderHome</value></property>
</bean>
<bean id="SessionHolderRef" factory-bean="SessionHolderHome" factory-method="create" singleton="false" >
<constructor-arg><ref bean="sessionRetriever"/></constructor-arg>
</bean>
<bean id="ProxyContextManager" class="it.bancaintesa.dsa.framework.core.ProxyCont extImpl" singleton="false" depends-on="SessionHolderRef">
<constructor-arg><ref bean="SessionHolderRef"/></constructor-arg>
</bean>
When I call(once in my code) inside my login stateless session bean :
..some declaration..
bfl = SingletonBeanFactoryLocator.getInstance();
bfr = bfl.useBeanFactory("it.bancaintesa.dsa.framework") ;
BeanFactory bf=bfr.getFactory();
return (AbstractCorporateContext) bf.getBean("ProxyContextManager");
.......
I experience that the method ejbCreate() of my s.s is called twice.
There is something wrong in my architecture??
thanks in advance
Filippo
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