Hi Spring gurus,
I'm developing a web application for a customer and I decided to use spring for the first time. All the things I've seen are really cool but I've got a big problem that I've to solve very very quickly because is stopping me and I've timing constraints with the customer that I've to respect.
Basically my application uses org.springframework.ejb.access.LocalStatelessSessi onProxyFactoryBean to to let the front-end objects access a set of stateless session beans that contains my business methods. My stateless session beans does have only LOCAL interfaces. An excerpt of configuration of that kind of bean inside the spring xml configuration file follows below.
<!-- AddressBookManagerBean -->
<bean id="addressbookManagerBean" class="org.springframework.ejb.access.LocalStatele ssSessionProxyFactoryBean">
When the user requires a page from my application a sort of context variable is put in a ThreadLocal variable so that it can be seen from anywhere inside my application very easily . My problem is that the ThreadLocal variable I previously set (and I verified that is set) is correctly seen in every part of my application except inside my session beans. Infact when I access the variable inside my beans's business methods it returns null, but the variable has been set. To test that the variable is set I've tried to put the call to the ThreadLocal.get() for my context in the web tier, just before the call to my EJB's business method, and inside the business method I'm going to call in the session bean. The call in the web-tier gives me correctly the object but, following, the call inside the business tier gives me null :shock::shock::shock::shock:.
Because of the web tier accesses the EJBs through local interfaces the mechanism of accessing ThreadLocal variables has to work. Maybe the Spring's LocalStatelessSessionProxyFactoryBean is introducing some cavets that I'm not able to see and that is scrambling all the things?? Can someone help me in clearing this issue? If so can you suggest me a different way of doing this same thing?
Please help me :cry: it's really urgent.I'll appreciate a lot any help or suggestion given.
Kind regards to everyone.