Hi, the context of EJBContainer is the one of the spec (java:global...)
while new InitialContext is pur 'historical' one.
 Le 21 sept. 2012 07:20, "Edison Xu" <[email protected]> a écrit :

> Hi,
>
> for initializing the context, basically there are two ways:
> 1. Context ctxt = new InitialContext(p);
> 2. Context ctxt = EJBContainer.createEJBContainer(map).getContext();
>
> What's the difference of using this two way of getting context?
> I thought it should be the same. But some different result coming:
> 1. When using createEJBContainer, OpenEJB cannot load jndi.properties for
> testing automatically. Instead, I have to put everything in the map as the
> parameter.
> Is it possible to load jndi.properties automatically by using this way?
>
> 2. In my test project (you can find it  here
> <https://github.com/EdisonXu/Test/tree/master/ejb-intro>  ), I used same
> way
> to get the context and bind the injection.
> But unfortunately, project message-client doesn't work while project
> message-server works fine.
> I didn't see any difference on the usage, but why doe one work and another
> doesn't?
> Am I making some mistakes?
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Difference-of-initializing-context-tp4657559.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Reply via email to