users@glassfish.java.net

Re: EJB remote deployed on GF 3.1 behind a NAT unaccessible

From: <forums_at_java.net>
Date: Fri, 19 Oct 2012 16:48:03 -0500 (CDT)

Hi again Mauro, does this link work:
https://support.oracle.com/epmos/faces/DocContentDisplay?id=1276760.1 No, I
don't have a blog, and I must not share a PDF of the above outside
MyOracleSupport, so you need to get it from there. What do you mean by a
"client EJB"!? An EJB is a server-side component. Or do you mean that you are
trying to call from an EJB into another EJB in a remote container? So what is
your particular client scenario? There is nothing special at all to the EJB
code as such (so I don't think that a code sample makes much sense - use a
hello world EJB sample if you like), the only thing is that you need to use
an explicit lookup and the specific InitialContext created from the specific
Properties as shown above in order to do the lookup if (and only if) you are
outside the firewall. Of course, this was about a standalone client - I am
not sure whether you will be able to code the same using annotations, i.e. an
"@EJB" reference, from the ACC or from a client GF instance outside a
firewall calling into another one behind the firewall... :-( Your best bet in
these cases most probably also is to use the explicit lookup approach as
described above - even though this thwarts the dependency injection concept
(but I really wouldn't know how to pass the custom Properties into an
InitialContext instance which is to be autoconfigured by the ACC) -
definitely worth another JIRA entry/enhancement request... Hope this helps &
best regards, Andreas

--
[Message sent by forum member 'al130959']
View Post: http://forums.java.net/node/891564