users@glassfish.java.net

Re: identifying EJB calling machine

From: Cheng Fang <cheng.fang_at_oracle.com>
Date: Fri, 15 Apr 2011 07:32:07 -0400

Using client cert is a fine approach. You can extract the client
container identity with ejbContext.getCallerPrincipal().

If this is part of your application logic, I would pass this contextual
info via business method params, either as an additional param, or as
part of your existing param data structure. It's easier to understand
and administrate, and more flexible.

On 4/15/11 2:01 AM, Matthieu Bertin wrote:
> Hello,
>
> I am working on an application where a central glassfish server hosts
> EJBs called by several other containers. theses containers can make
> call on their own ( timers ) or because of a customer request.
> When the container calls EJB on its own, how can i identify each of
> them using the EJBContext? Is it possible for the container to
> identify itself ? could it use client certificate? How can i achieve that?