On Sep 30, 2008, at 7:23 AM, Baptiste MATHUS wrote:
> Hi all,
>
> I'm looking for some pointers about how to invoke our SLSB remotely
> using http (I'm not speaking about WebServices, just about RMI
> inside HTTP, something like the Spring HttpInvoker). Something like http://wiki.jboss.org/wiki/Accessing_EJB3s_over_HTTP_HTTPS
> for JBoss, but for GF, obviously.
>
> In fact, we've got an existing architecture that was designed
> without EJB and we're now evaluating the migration from this code to
> EJB3 (for our architecture, this would mainly involve annotating our
> already existing services or entities).
> At the moment, our services are exposed remotely in a webapp, by the
> spring http-invoker servlet.
>
> More generally, what we are looking is how to get rid of the needs
> for specific ports for say JNDI, EJB remote calls, and so on to the
> appserver, as we're not guaranteed our client side will have access
> to the server side other than by the HTTP/S ports.
> We'd like every communications between the server and the client be
> tunnelled inside a http/s tube.
Hi Baptiste,
I assume your requirement for migration is the reason you want the
HTTP option rather than just implementing the EJB components as
webservice endpoints? It would be a whole lot easier to achieve the
extent of decoupling you're looking for.
>
>
> So my questions are quite simple :
> * Is there something related to EJB architecture I should be aware
> of that could render this need very annoying? Really, I'd be
> interested into knowing all potential bad-side effects. At the
> moment, we're fully satisfied with http-invoking, but I might have
> missed something that would not suit EJB specificities.
For invocations on the Remote EJB view where the caller and callee are
part of the same Java EE implementation, the spec does not mandate
that IIOP be used. It only requires the semantics of RMI-IIOP,
meaning : pass-by-copy for parameters and return values, the
associated set of required RMI-IIOP types, support for tx and security
propagation, etc. In that respect there's nothing stopping a vendor
from having an implementation of the Remote view over HTTP as long as
it's transparent to both the caller and callee. Glassfish does not
currently offer a Remote over HTTP option for this case.
For the interoperable Remote EJB 2.x case, where the caller and callee
reside in different Java EE implementations, RMI-IIOP is required, so
HTTP would not be an option.
--ken
>
> * Is there any documentation that would explain how to do that with
> GFv2 (or v3) somewhere?
>
> Thanks a lot.
> Cheers.
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !