ejb@glassfish.java.net

Re: Connecting to Glassfish from remote web container

From: Christof Ameye <ameyec_at_dev.java.net>
Date: Mon, 07 Aug 2006 14:07:42 +0200

Hi,

Recently I saw something on the Resin website concerning J2EE Reference
implementation from Sun and I believe it works fine to do the same with
glassfish.
The fact that it does not work from within glassfish is probably that
Resin itself also has its JNDI properties loaded. So it does the lookup
in its own JNDI server, not the one from glassfish.

Anyway I searched the url and here it is using corba for communication:

http://www.caucho.com/resin-3.0/ejb/corba-client.xtp

Correct me if it should be done in a different way (knowing Resin also
has its own stuff via JNDI, so that has precedence I suppose if you give
no properties to the InitialContext constructor).

Just let me know if this solved your problem.

Best regards,

Christof


AKostylev wrote:
>
> I put appserv-rt.jar at web-inf/lib and there is no other
> appserv-rt.jar at web server. So problem is that when using:
>
> Context ic = (Context)new InitialContext();
>
> Object object = ic.lookup(Converter.class.getName());
>
>
> object is null reference.
>
>
>
>
> >
>
>
>
> Hello,
>
>
> Is appserv-rt.jar still in your classpath? The no-arg constructor for
> InitialContext works because of a jndi.properties file within
> appserv-rt.jar, do you possible have another one that is getting
> picked up? Not sure what would happen if that's the case.
>
>
> What is the stack trace your are getting?
>
>
> -Chase
>
>
>
> AKostylev wrote:
>
> Hello, Kenneth. Thank you for your answer. I'm trying to connect to
> Session bean placed at Glassfish from Resin. So those stand-alone
> client steps fro FAQ are working for console application, but not for
> web application placed at Resin web container. So what I'm trying to
> do: Context ic = (Context)new InitialContext(); Object object =
> ic.lookup(Converter.class.getName()); So as I said, this code is
> working when launching at standalone console application but not at
> jsp page at Resin web container. What should I do
>
> AKostylev wrote:
>
>
>
> Hello. How should I connect to Session bean at Glasshfish from remote
> web container (for example. Resin)? Methods for standalone client are
> not workin for this case.
>
> Do you mean you tried the stand-alone client steps outlined in the EJB
> FAQ and encountered an error? If so, can you post the details. Thanks.
>
>
>
> --ken
>
>
>
>
>
>
>
>
>
> --
>
> С уважением,
>
> AKostylev mailto:akostylev_at_ipian.kazan.ru
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net For
> additional commands, e-mail: ejb-help_at_glassfish.dev.java.net