perhaps you would be straining both the apps servers & the island LAN if you
should use the httpsession object...
for small apps, he shouldn't have any problems with httpsession, and it's
what I would use.
But many times I've seen programmers thinking servlet containers behave
one-way, when they actuallly behave a different way
If the idea is to have a servlet REPLACING th Web server functionality, then
it's ok(say, listening to port 6667 to implement an IRC server, then having
for each room for each client a session bean... it should be ok)
If the idea is to have the servlet WITHIN the Web server (HTTPServlet),
mayhem starts, specially if you want thing to run in different web
servers...
Some web containers use the same instance of a servlet for *EVERY* request
(JRun)
Some use the same instance up to N concurrent users...
So, I wouldn't want to use threads in any HTTPServlet, because it could mean
more trouble than it's worth.
Sometimes, tough, it may become necesary, and when those times come, be
extremely careful designing both the Session Beans and the servlet...
That's all folks
Rifle
-----Original Message-----
From: Robert Krueger [mailto:[EMAIL PROTECTED]]
Sent: Martes, 21 de Noviembre de 2000 11:47
To: Orion-Interest
Subject: RE: Instantiate more than one session bean
At 10:57 21.11.00 , you wrote:
>that's valid... but be careful... some servlet engines are known to 'reuse'
>the same instance of a servlet many times
why would that matter? if he associates the session beans with the
httpsession there is no problem, no matter what type of reuse policy the
servlet container uses or am I missing something? are you implying he's
using instance variables for storing the sb references? that wouldn't be
thread safe. either he uses ThreadLocals or session variables. anything
else would not be correct IMO.
regards,
robert
>-----Original Message-----
>From: Storm Linux User [mailto:[EMAIL PROTECTED]]
>Sent: Lunes, 20 de Noviembre de 2000 17:54
>To: Orion-Interest
>Subject: Instantiate more than one session bean
>
>
>Hi..
>
>Is it possible to instatiate more than one session bean from the same
class,
>
>for the same session? I'm planning to make a mullti-threaded servlet that
you mean the same httpsession, don't you?
>each thread instantiate one session bean object and works with it.
could you describe a little more what you're trying to achieve?
robert
>Thanks!
>
>[]s
>Guilherme Ceschiatti
>[EMAIL PROTECTED]
(-) Robert Kr�ger
(-) SIGNAL 7 Gesellschaft f�r Informationstechnologie mbH
(-) Br�der-Knau�-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de