Non-http tcp protocol

2009-09-28 Thread Sergio Bello

Hi all,
I'm trying to figure out how to use tomcat as a TCP server. The basic 
idea is to receive tcp connections, through a given port, process them 
and return a response. Has anyone done it? I've googling but I've not 
found much information.

Which do you think is the best/simplest way to do it?
Thanks a lot

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



Re: Non-http tcp protocol

2009-09-28 Thread Sergio Bello

Tim Funk escribió:
Don't - there are other apache projects which can do that much better 
than Tomcat.


-Tim

Sergio Bello wrote:

Hi all,
I'm trying to figure out how to use tomcat as a TCP server. The basic 
idea is to receive tcp connections, through a given port, process 
them and return a response. Has anyone done it? I've googling but 
I've not found much information.

Which do you think is the best/simplest way to do it?



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


I was thinking on tomcat to take advantage of several features (request 
and thread management, etc) that I know have been tested for years, but 
I'm not tied to the use of tomcat.
If you know another project (java/opensource) I can rely on, could you 
tell me its name, please?


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



server.findServices() returns empty array

2009-09-23 Thread Sergio Bello

Hi all,
I'm trying to get access to services defined inside the server element 
on my server.xml. I'm using a Tomcat 5.0.28.

My problem is that when I execute the next code:

Server server = ServerFactory.getServer();
Service[] services = server.findServices();

the services array is 0 length, while I have the default Service 
name=Catalina element inside Server
If I execute other server object's methods, like getInfo() or getPort(), 
it seems to return correct information.
I've read some people on the web saying it's a privileges problem, and 
I've tryed including the privileged=true field inside my application 
Context, without success.

What could be going on?
Thanks a lot

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



Re: server.findServices() returns empty array

2009-09-23 Thread Sergio Bello

Mark Thomas escribió:

Sergio Bello wrote:
  

Hi all,
I'm trying to get access to services defined inside the server element
on my server.xml. I'm using a Tomcat 5.0.28.
My problem is that when I execute the next code:

Server server = ServerFactory.getServer();
Service[] services = server.findServices();

the services array is 0 length, while I have the default Service
name=Catalina element inside Server
If I execute other server object's methods, like getInfo() or getPort(),
it seems to return correct information.
I've read some people on the web saying it's a privileges problem, and
I've tryed including the privileged=true field inside my application
Context, without success.
What could be going on?



No idea but...

5.0.x is unsupported.

The ServerFactory has been removed completely in 7.0.x and has 'issues'
when used in an embedded environment.

There will probably be a better way to access the Server object,
depending on where you are trying to access the Server object from. Is
this in your web app?

Mark




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


  


Yes, I try to access the Server object from a web app. What I really 
want is to create new Connector objects on demand, for what I need to 
access the Service object through the Server one (If I'm not wrong).

Thanks

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



Re: server.findServices() returns empty array

2009-09-23 Thread Sergio Bello

Sergio Bello escribió:

Mark Thomas escribió:

Sergio Bello wrote:
 

Hi all,
I'm trying to get access to services defined inside the server element
on my server.xml. I'm using a Tomcat 5.0.28.
My problem is that when I execute the next code:

Server server = ServerFactory.getServer();
Service[] services = server.findServices();

the services array is 0 length, while I have the default Service
name=Catalina element inside Server
If I execute other server object's methods, like getInfo() or 
getPort(),

it seems to return correct information.
I've read some people on the web saying it's a privileges problem, and
I've tryed including the privileged=true field inside my application
Context, without success.
What could be going on?



No idea but...

5.0.x is unsupported.

The ServerFactory has been removed completely in 7.0.x and has 'issues'
when used in an embedded environment.

There will probably be a better way to access the Server object,
depending on where you are trying to access the Server object from. Is
this in your web app?

Mark




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


  


Yes, I try to access the Server object from a web app. What I really 
want is to create new Connector objects on demand, for what I need to 
access the Service object through the Server one (If I'm not wrong).

Thanks

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



I've just tried using Tomcat 56.0.20 and I get exactly the same problem

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



Re: server.findServices() returns empty array

2009-09-23 Thread Sergio Bello

Sergio Bello escribió:

Sergio Bello escribió:

Mark Thomas escribió:

Sergio Bello wrote:
 

Hi all,
I'm trying to get access to services defined inside the server element
on my server.xml. I'm using a Tomcat 5.0.28.
My problem is that when I execute the next code:

Server server = ServerFactory.getServer();
Service[] services = server.findServices();

the services array is 0 length, while I have the default Service
name=Catalina element inside Server
If I execute other server object's methods, like getInfo() or 
getPort(),

it seems to return correct information.
I've read some people on the web saying it's a privileges problem, and
I've tryed including the privileged=true field inside my application
Context, without success.
What could be going on?



No idea but...

5.0.x is unsupported.

The ServerFactory has been removed completely in 7.0.x and has 'issues'
when used in an embedded environment.

There will probably be a better way to access the Server object,
depending on where you are trying to access the Server object from. Is
this in your web app?

Mark




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


  


Yes, I try to access the Server object from a web app. What I really 
want is to create new Connector objects on demand, for what I need to 
access the Service object through the Server one (If I'm not wrong).

Thanks

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



I've just tried using Tomcat 56.0.20 and I get exactly the same problem

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



Sorry, version is 6.0.20

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