users@glassfish.java.net

Re: invoke servlet from EJB w/o posting ?

From: <glassfish_at_javadesktop.org>
Date: Fri, 16 Nov 2007 10:24:35 PST

Well, then why not simply call it through HTTP? What's the issue with that?

Frankly it most likely won't be THAT much slower than calling it directly, since whatever results you're going to get are going to be in HTML anyway. So, the only real difference is serializing the data through a socket rather than through RAM (assuming you passed in, say, a ByteArrayOutputStream as the Servlets output).

You don't have to expose it to the outside world or anything, just set up a new virtual server on some random port that's blocked by you firewall, you can still call it locally from the machine.
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=245849