finally got it to work. the trick was to create another thread for it.
so now i have a new listener class which is running in the background
in sep threads for sending and receiving data. thanks to all for their
help.
the only other thing I can see is that my web.xml is flagging an error
on the l
right so thats the problem, my socket call is a blocking call and i
should start it in a new thread. thanks jesse, will give that a shot
and see how i go. i will keep the current implementation and will only
add a sep thread for it. let me know if you think of something else.
Do you mean you are doing a ServerSocket.bind() call? You need to do that in
a new thread, it's a blocking call.
On 5/30/06, Peter Dawn <[EMAIL PROTECTED]> wrote:
i have implemented a separate listener-class which includes the
context-initiliazed and contextdestroyed methods. i have put my sock
i have implemented a separate listener-class which includes the
context-initiliazed and contextdestroyed methods. i have put my socket
connection stuff in the initialized method.
it seems to load up with tomcat and with the webapp and is working
fine. the problem is that once its started the sock
component in the page and have
it start up the process.
regards,
Mark
-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED]
Sent: Tue 5/30/2006 5:07 PM
To: Tapestry users
Subject: Re: TCP-IP Communication help
both hivemind and "ServletContextListener" look good. need to d
both hivemind and "ServletContextListener" look good. need to do a bit
of reading on both i guess.
what do you guys think of just putting that code into a separate class
and into a hidden frame and let it start in the background.
--
I like to use a ServletContextListener to do this: start your
service's thread in contextInitialized(), and end it in
contextDestroyed(). Google "ServletContextListener" for more info.
On May 30, 2006, at 3:44 AM, Peter Dawn wrote:
i will try and have a look at it.
another way of looking a
http://jakarta.apache.org/hivemind/
On 5/30/06, Peter Dawn <[EMAIL PROTECTED]> wrote:
i will try and have a look at it.
another way of looking at my question is, whats the best way of
running a program in the background as a service within the web app
without halting any other processes or pro
i will try and have a look at it.
another way of looking at my question is, whats the best way of
running a program in the background as a service within the web app
without halting any other processes or programs.
any thought.
---
Have you tried to use the asynchronous functions of the socket API
instead of the synchronous ones ?
Peter Dawn wrote:
jesse,
thanks for your feedback.
though, i have managed to get TCP/IP communication happening within
the web application. by that i mean that my web app can send and
receive
jesse,
thanks for your feedback.
though, i have managed to get TCP/IP communication happening within
the web application. by that i mean that my web app can send and
receive messages to another app on a set port.
but i am not sure how should i run this process. i mean i would like
to run this p
Using socket IO communications has little to do with tapestry development,
unless you are talking about IO from browser to server. Maybe your case is
different?
I would go look at the tutorials on the java.sun.com website about socket IO
and create very tiny test classes that don't run in any oth
12 matches
Mail list logo