We have several JBoss instances running in production with TServlet as
transport. Works great!A separate WAR package is deployed with servlets
exposing the Thrift services. Then we call our session beans through the
local EJB interface (we're using EJB3).
This requires some stupid boilerplate code to written for each service, but
at least it's easy to get started.

Check out http://dobesland.wordpress.com/2007/08/01/gwt-to-ejb-bridging/ if
you are looking for some ideas to integrate servlet RPC with EJB.
The GWT community are facing similar problems with their GWT-RPC. There are
many more blog and mailing list entries on this topic, ask Google.

I cannot speak for other app servers but creating a resource adapter (RA) in
JBoss to support other transports, pure sockets for example, isn't difficult
either.

/Charlie


On Thu, Jun 12, 2008 at 4:43 AM, Mark Slee <[EMAIL PROTECTED]> wrote:

> Certainly. Thrift is a pretty self-contained library, so you can run a
> Thrift-server in its own thread as part of any J2EE application.
>
> If you're specifically talking about embedding Thrift in something like
> a Servlet engine, then it's certainly doable, but would require writing
> a bit of boilerplate/framework code to deal with pulling the Thrift data
> out of HTTP requests. We have done something similar for PHP, and I
> think it'd definitely be worth doing for Servlet-based Java
> implementations as well.
>
> -----Original Message-----
> From: Xianzheng Zhou [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 11, 2008 5:37 PM
> To: [email protected]
> Subject: Is there a way to embed thrift into J2EE server?
>
> Hi all,
> I'm very new to thrift.
> Just wondering, is there a way to embed Thrift into J2EE server?
>
> thanks,
>
> Zhou
>
>
>
>

Reply via email to