  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | Use of Threading in WebServer/AppServer | Use of Threading in WebServer/AppServer 2004-08-30 - By Merten Schumann
Back Hello Dhiren, I've got a web service implemented in two variants, servlet and bean. I do use there java.util.Timer (Task) stuff. It seems, it works both in servlet and bean container. So, at least things are working although they recommend to use TimerService stuff in bean environment. cu Merten
__ ____ ____ ____ ____ ____ ____
From: A mailing list for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@(protected)] On Behalf Of Dhiren Mehta Sent: Monday, August 30, 2004 6:28 AM To: J2EE-INTEREST@(protected) Subject: Re: Use of Threading in WebServer/AppServer Importance: High
Hi,
I sent this query few days back, but haven't recd any reply; thus resending it.
Thanks
Dhiren
-- --Original Message-- -- From: Dhiren Mehta Sent: Thursday, August 26, 2004 1:59 PM To: 'A mailing list for Java(tm) 2 Platform, Enterprise Edition' Subject: Use of Threading in WebServer/AppServer
Hi,
I have read several conflicting articles on using Theads in WebServers/AppServers. Can someone advise me (from their experience) if it's safe to use Threads within the WebServer and AppServer JVM? If from a Servlet a helper class that extends Thread is used (in which case the class will get executed under WebServer JVM) will that cause any problem?
And how about using such classes from EJB? (I know EJB Spec strongly suggests not to use Threads). My target AppServers are Weblogic and WebSphere.
Thanks in Advance
Dhiren
======================================================================== === To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2800.1400" name=GENERATOR> <STYLE>@(protected) { font-family: Tahoma; } @(protected) Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORATION: underline } A:visited { COLOR: purple; TEXT-DECORATION: underline } SPAN.MsoHyperlinkFollowed { COLOR: purple; TEXT-DECORATION: underline } P { FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman" } SPAN.emailstyle18 { COLOR: navy; FONT-FAMILY: Arial } SPAN.EmailStyle19 { COLOR: navy; FONT-FAMILY: Arial } DIV.Section1 { page: Section1 } </STYLE> </HEAD> <BODY lang=EN-US vLink=purple link=blue> <DIV dir=ltr align=left><SPAN class=723464308-30082004><FONT face=Arial color=#0000ff size=2>Hello Dhiren,</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=723464308-30082004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV dir=ltr align=left><SPAN class=723464308-30082004><FONT face=Arial color=#0000ff size=2>I've got a web service implemented in two variants, servlet and bean. I do use there java.util.Timer (Task) stuff. It seems, it works both in servlet and bean container. So, at least things are working although they recommend to use TimerService stuff in bean environment.</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=723464308-30082004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV dir=ltr align=left><SPAN class=723464308-30082004><FONT face=Arial color=#0000ff size=2>cu</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=723464308-30082004><FONT face=Arial color=#0000ff size=2> Merten</FONT></SPAN></DIV><BR> <BLOCKQUOTE dir=ltr style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left> <HR tabIndex=-1> <FONT face=Tahoma size=2><B>From:</B> A mailing list for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@(protected)] <B>On Behalf Of </B>Dhiren Mehta<BR><B>Sent:</B> Monday, August 30, 2004 6:28 AM<BR><B>To:</B > J2EE-INTEREST@(protected)<BR><B>Subject:</B> Re: Use of Threading in WebServer/AppServer<BR><B>Importance:</B> High<BR></FONT><BR></DIV> <DIV></DIV> <DIV class=Section1> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi,</SPAN></FONT></P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I sent this query few days back, but haven’t recd any reply; thus resending it.</SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks</SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Dhiren</SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-- --Original Message-- --<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Dhiren Mehta <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, August 26, 2004 1:59 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 'A mailing list for Java(tm) 2 Platform, Enterprise Edition'<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Use of Threading in WebServer/AppServer</SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy">Hi,</SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy">I have read several conflicting articles on using Theads in WebServers/AppServers. Can someone advise me (from their experience) if it’s safe to use Threads within the WebServer and AppServer JVM? If from a Servlet a helper class that extends Thread is used (in which case the class will get executed under WebServer JVM ) will that cause any problem?</SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy">And how about using such classes from EJB? (I know EJB Spec strongly suggests not to use Threads). My target AppServers are Weblogic and WebSphere.</SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy">Thanks in Advance</SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy">Dhiren</SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=navy size=3><SPAN style="FONT-SIZE: 12pt; COLOR: navy"></SPAN></FONT> </P></DIV>========== ================================================================= To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help". <P></P></BLOCKQUOTE></BODY></HTML> =========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help". <p>
|
|
 |