thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Chambers <mchamb...@wetafx.co.nz>
Subject Re: Running a Thrift server inside Tomcat.
Date Tue, 09 Apr 2013 21:23:01 GMT
Doesn't really matter what servlet container you are using, you do it 
pretty much the same way.  Since starting the server blocks you have to 
start it in a thread.

Here is an example using Spring I did a long time ago, I'd probably do 
an anonymous runnable if I did it again.
https://github.com/sqlboy/plow/blob/master/server/src/main/java/com/breakersoft/plow/thrift/ThriftServer.java
https://github.com/sqlboy/plow/blob/master/server/src/main/java/com/breakersoft/plow/thrift/ServerConfiguration.java

A non spring example would just initialize and wrap the serve() function 
in a thread.

-Matt


On 09/04/13 21:51, Denuwanthi Hasanthika wrote:
> Hi,
>
> I want to run a Thrift server inside Apache Tomcat server.
> As for now, I  implemented a Thrift Server and tested it with clients
> .*But, I want to know wether there is a way to deploy a Thrift Server
> inside
> Tomcat? .*
> *If not, is there a way to run a Thrift server inside a servlet deployed in
> Tomcat?.*
>   I tried doing that by calling the Thrift Server inside the init() method
> of the servlet. But, didn't work. I use Eclipse IDE in my development work
> and configured Tomcat to run from Eclipse.
>
>
> Thanks,
> Denuwanthi
>


Mime
View raw message