You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Dawn <pe...@gmail.com> on 2006/06/05 07:26:41 UTC

Servlet + Thread + Tapestry problem

hi all,
i have been working on implementing a socket comm architecture within
my web app.

now i have a servlet which starts up a thread which maintains and
listens for socket comm with another third party program. now i have
all that working. but the problem is that i am noticing that my
contextInitialized method is showing up twice in my logs. now this
method contains a ref to my thread method (which maintains and listens
for socket comm). so *i think* that since this method is being called
twice (and i dont know why) i have two threads starting up doing the
same thing. just to clarify, once i start compiling one thread starts
up and then another thread starts up when the war file gets deployed
as per my logs.

now this wouldnt usually be a problem, but i am having another
problem, and i think that this might be the root cause of it. now the
other problem is that this thread of mine is listening for socket
communication and breaking up messages by a carriage return. however
in some of my messages the first character of the beginning of each
message packet is missing (so for some messages i am unable to capture
the first character of the message string).

now again *i think* that this second thread of mine might be eating up
this character of mine and hence the issue. for all i know, these two
things might not be inter-connected and i am doing something else
wrong.

can somebody help me out.

thanks to all.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org