The fact it has a @Configuration annotation means that the Spring
framework automatically creates an instance of it. Since your not using
spring, you have to wire all that stuff up on your own.
Here are the basics of how the IoC stuff works in spring though.
http://static.springsource.org/spring/docs/2.5.3/reference/beans.html
On 10/04/13 19:57, Denuwanthi Hasanthika wrote:
Thanks for the information.
As I understood, your ServerConfiguration.java class is where the
ThriftServer gets invoked.
Can you please tell me how/where is the
https://github.com/sqlboy/plow/blob/master/server/src/main/java/com/breakersoft/plow/thrift/ServerConfiguration.java
class is invoked?
-Denuwanthi
On Wed, Apr 10, 2013 at 2:53 AM, Matthew Chambers <[email protected]>wrote:
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/ThriftServer.java>
https://github.com/sqlboy/**plow/blob/master/server/src/**
main/java/com/breakersoft/**plow/thrift/**ServerConfiguration.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