-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

Oops... I managed to send this to the OP and not to the list.

- -chris

- -------- Original Message --------
Subject: Re: how to enable Tomcat to handle proprietary TCP streams
(non-http data)
Date: Wed, 08 Dec 2010 15:04:40 -0500
From: Christopher Schultz <ch...@christopherschultz.net>
To: Łukasz Tołwiński <lukasz.tolwin...@gmail.com>

Łukasz,

On 12/8/2010 2:47 PM, Łukasz Tołwiński wrote:
> So i can just start my own thread (threads) for receiving non-http
> data (where to put initialization/starting stuff? as a new servlet ? )

You can start your own threads from any code you wish. I would recommend
against using a servlet at all: instead, create your own connection
management class and launch it from a ServletContextListener's init
method (and remember to shut it down in the destroy method).

> and then my code will put received data in some 'public' synchronized
> queue/collection or database (like HSQLDB)
> and other threads/modules

You can do whatever you want with that data.

> (and again, where should i start them? in new servlets?)

That's entirely up to you: Tomcat only provides infrastructure to
support servlets and route HTTP requests to them. Anything else is up to
you.

> can process data
> and at the end next threads have to send data using webservices or/and
> webdav (a lot of data and i need resume option if something goes
> wrong)

If you are sending data to an external web service, you will not be
using any of Tomcat's code, anyway. Presumably, you're using something
like Apache Axis to connect, and that code is unrelated to Tomcat... you
can use it in any context you want.

> Is my thinking correct ?

It's tough to tell :)

- -chris


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0BDAEACgkQ9CaO5/Lv0PCLlQCgluPmCz8WNY8gHaH/Y7dz/QzS
3xQAnjUiL4K8ZqaxPraLRNQiKpCvfljQ
=tcy0
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to