users@glassfish.java.net

Re: New Glassfish embedded APIs: any way to look up a properly initialized InitialContext?

From: Bhavanishankar <bshankar_at_sun.com>
Date: Tue, 01 Feb 2011 11:39:30 +0530

Hi Laird,

Thats should work. The devtest
<http://java.net/projects/glassfish/sources/svn/content/trunk/v3/tests/embedded/maven-plugin/remoteejbs/src/test/java/org/glassfish/tests/embedded/remoteejbs/EjbTest.java?rev=44806>
does.

_Bhavani.

On 02/01/2011 12:30 AM, Laird Nelson wrote:
> Yep; blindly tried new InitialContext() and it seems like everything
> works fine. Thanks.
>
> L
>
> On Mon, Jan 31, 2011 at 1:54 PM, Marina Vatkina
> <marina.vatkina_at_oracle.com <mailto:marina.vatkina_at_oracle.com>> wrote:
>
> Laird,
>
> @Remote EJBs should work on the default ports.
>
> -marina
>
>
> Laird Nelson wrote:
>
> javax.ejb.embeddable.EJBContainer--the standard way of
> producing a lite EJB container--no longer suits our purposes
> since it doesn't support working with @Remote EJBs.
>
> Consequently we are looking to move to the newly sanctioned
> Glassfish embedded APIs, which, if I understand correctly,
> have been overhauled for 3.1 and are available at
> http://embedded-glassfish.java.net/nonav/apidocs/.
>
> Emulating javax.ejb.embeddable.EJBContainer seems easy enough.
>
> However, I cannot see how to get an InitialContext from the
> API. This would be extremely convenient, as otherwise I need
> to put together a jndi.properties with all the right values
> set, and I don't know what those values should be.
>
> Am I overlooking something, or is it possible to get an
> InitialContext (or just a javax.naming.Context) from the
> Glassfish embedded APIs?
>
> Thanks,
> Laird
>
>