Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Asynchronous beans for creating thread in Servlet/EJB  RSS feed

 
Sam Gehouse
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone had luck with the content of the article below. The article below talks about creating and managing own threads in an application server (e.g., WebSphere).

http://www-128.ibm.com/developerworks/websphere/techjournal/0606_johnson/0606_johnson.html#download

This article has its importance, as the containers do not encourage creating new thread by the appplication developer for Servlet/EJB based applications.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right, the EJB spec advises you not to mess with threads, and containers may even throw exceptions in some future release if you do. Each container vendor made their own proprietary workarounds. I'd expect this to work just fine, but it won't be portable if you go to another container one day.

BTW: I don't recall if the spec is that tough in the Servlet container, or only in the EJB container. I've actually started my own threads in both, flagrantly breaking the rules, and not been burned at the stake ... yet.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!