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

Razor,

On 12/8/2010 7:15 AM, razor wrote:
> I'm writing application composed from few loosely coupled components 
> (dependency
> injection pattern, all compoments written by my team). First of them listens
> for connections, spawns new thread (serversocket.accept) receives data
> in proprietary format and then sends data to next component, next
> component transforms data (optimizes, creates some packages), and next
> component sends data further (probably using WebServices or WebDAV).
> Additionally I need to track/monitor whole application/process by
> external application placed on user computer (connected thru WebServices)
> I want to put this whole application on Tomcat.
> 
> It would perfect if tomcat can accept connection
> (serversocket.accept), spawn new thread (my my code) and pass socket
> (input/output streams) to it.

So, you want to use Tomcat as a TCP connection handler? Most of the
Tomcat code is dedicated to servicing the HTTP services required by the
servlet spec -- very little of it "merely" handles TCP connections.

I'm not familiar with the internals of Tomcat (yet) but something like a
ProtocolHandler would probably work, though you might end up writing a
ton of code to meet Tomcat's requirements.

You may find that writing your own connection management code is more
straightforward and lightweight than using Tomcat as a container for
something other than HTTP-based servlets.

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

iEYEARECAAYFAkz/0jcACgkQ9CaO5/Lv0PAEawCghCxix6MM++HjKTqs8q0V2QiN
ND4AoJyRXeUNnr2VUaBm1G6B0NUfziFT
=X2hB
-----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