Session object in concurrent threads
Session object in concurrent threads
- Subject: Session object in concurrent threads
- From: Joe Kramer <email@hidden>
- Date: Mon, 7 Dec 2009 13:39:16 -0800
Hi List,
I was hoping someone could give me some pointers on how to access a session from concurrent threads. I am very new to concurrency, so please forgive me for being naive. I have a thread that runs some shell scripts and I wanted the user to still have a responsive UI while the processing is happening in the background. But in the processing I need access to the session object. I'm wondering the best way to accomplish this. We are using GVC frameworks, so currently I have this in my Thread subclass:
protected WOSession session() {
return (WOSession) WOSession.session();
}
This seems to work in my ideal, single session development environment, but I'm afraid this isn't the best solution. I know this can cause problems because I get this in my log:
ERXThreadStorage - The object for key 'session' was inherited from the parent thread. The usage of inherited objects that are a subclass of 'WOSession' can cause problems.
java.lang.Exception: DEBUG
at er.extensions.foundation.ERXThreadStorage.valueForKey(ERXThreadStorage.java:162)
at net.global_village.woextensions.WOSession.session(WOSession.java:80)
<snip>
Any help on this would be greatly appreciated.
Regards,
Joe Kramer
CyberApps, Inc.
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden