[jboss-user] [JBoss Portal] - Threads and JBOSS

memurphyiii do-not-reply at jboss.com
Mon May 7 21:04:42 EDT 2007


I'm new to JBOSS and I've been trying to write a portlet. The application that I'm working with runs in a thread and it basically loops every 5 seconds and does something. Now, I'm not really having a problem with the code. I built the WAR file, deployed and I'm able to access a URL and sending things like

http://localhost:8080/myapp?action=start
and
http://localhost:8080/myapp?action=stop

and everything is fine. However, when I issue the start action, the app runs and hits the loop that starts up in the thread's run method and then it does not return back to the browser. I'm not sure this is a JBOSS issue (nor am I completely I'm making any sense at all) but basically I am wondering when I issue a directive to JBOSS to startup my loop, how do I return an appropriate response that will show up in the browser as some witty statement about the process having started?

I should note that when I issue the "stop" URL as above there's no problem. I get back a snazzy message saying the process has stopped so I'm guessing the loop is the issue. Do I need to detach the thread or something like that? Anyway, help is appreciated.

Regards,
Ed



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043811#4043811

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043811



More information about the jboss-user mailing list