users@glassfish.java.net

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

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Mon, 31 Jan 2011 14:00:35 -0500

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>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
>>
>