Hey,
I developed a webapp which allows a user to register him/herself. One needs to enter an email addy and gets a confirm email to confirm, big surprise there
I didn't create a webflow for the confirm part, as I thought it would be a lot easier to just create a servlet that listens to /confirm/** and then forward to my normal flow.
That works as far as the forwarding and flow goes, but for data and the hashkey it's not going as I expected. I'll clarify.
In order to get the hashkey in my controller bean, in webflow context I used a ThreadLocal. I put the hashkey from the servlet in the threadlocal, and I fetch it from the ThreadLocal in the controller SWF bean. This works well on my local Tomcat server so I went into staging after that on a Websphere server. Only to notice that there it didn't work. I implemented some logging and created a ServletFilter to log all incoming requests, only to see that:
Thread A is used in the servlet and servletfilter. But from the moment that I get into a SWF context a DIFFERENT thread is used (let's say B). Of course this means that the SWF layer is unable to fetch the data from the ThreadLocal object.
I'm rather new to SWF so I had no idea. If anyone knows of a good way to solve this, I'll gladly hear it. I do realize that I might have to create a whole new flow for the confirm. But if I can avoid that I'd prefer it like that.
Thanks!
W



Reply With Quote
