Hi DJencks...

On 8/6/06, David Jencks <[EMAIL PROTECTED]> wrote:


On Aug 6, 2006, at 5:39 AM, Mohammed Nour wrote:

> Hi dblevins...
>
> On 8/6/06, David Blevins <[EMAIL PROTECTED]> wrote:
>
>>
>> On Aug 5, 2006, at 2:05 PM, Mohammed Nour wrote:
>>
>> > Hi Dave...
>> >
>> > On 8/5/06, David Blevins < [EMAIL PROTECTED]> wrote:
>> >> When you want the javax.ejb.EJBHome, you use the name you gave it.
>> >> When you want the LocalHome, you tack on "Local" to the JNDI name.
>> >> Also note, you can't lookup LocalHomes over the
>> >> RemoteInitialContextFactory.
>> >
>> >
>> > :), These info I already know, but my main question is why?, the
>> > client
>> > should provide the JNDI that he\she has provided in the openejb-
>> > jar.xml, and
>> > if the EJB is providing a Local Home interface this lookup should
>> > return the
>> > local Home, and when it is providing the remote Home interface  the
>> > lookup
>> > should return the remote one [...]
>>
>> The answer to that is another question.  A bean can have both remote
>> and local interfaces, so when they look something up from JNDI, which
>> set of interfaces should they get?
>>
>> The answer is probably that we should allow them to explicitly
>> specify the the jndi name for each interface, rather than assuming
>> the jndi name is for the remote interface and creating a jndi name
>> for the local interface by tacking "Local" on to it.
>>
>> That'd definitely be a good feature to add to jira.  Would you like
>> the honors?
>
>
> Yeah man :D, it is my honor to open the JIRA and implement it, and you
> really read my mind, cause we need this feature to help clients
> explicitly
> define separate JNDI name for separate interfaces, including Local
> \Remote
> Home\Business interfaces, I suggest to change the schema of
> *openeb-jar.xml*to help clients use this feature explicitly as
> follows:
>
> For an SLSB\SFSB we need to define a new XML element that is
> *mandatory* to
> be specified under the *<ejb-deployment>* element so the client can
> explicitly specify the *<deployment-id>* that will have 2\3
> attributes:
>
>   1. jndi-name (The JNDI name by  which the client can look up the
>   specified interface).
>   2. interface-name (The fully qualified Java name of the interface -
>   being Local\Remote can be known from the ejb-jar.xml or we can
> define
>   an additional optional attribute that can be used with *business
>   interfaces*, see #3 next).
>   3. isRemote (an optional boolean attribute to specify the
> interface as
>   being Local\Remote - we don't need it with 2.1 Home interface as we
>   can know whether the interface extends Local\Remote EJBHome or not).
>
> An example ejb-deployment:
>
> <ejb-deployment ejb-name="ExampleStatelessBean" container-id="Default
> Stateless Container">
>
>    <deployment-id
>
> jndi-name="client/tests/stateless/BasicStatelessHomeInterface"
>               interface-
> name="ejb3.beans.interfaces.BeanLocalHomeInterface"
> />
>
>     <deployment-id
>               jndi-name="client/tests/stateless/
> BasicStatelessBizInterface"
>               interface-
> name="ejb3.beans.interfaces.BeanLocalBizInterface"
> isRemote="false" />
>
> </ejb-deployment>
>
> Please I need feedback from all the team on the validity of this idea.

Is this for binding ejb homes into global jndi for access through non-
jee mechanisms?  If so it makes sense to me.  You might consider using


No this is for binding different interfaces of an EJB into global JNDI, this
applys for Local\Remote Home\Business interfaces.



jndi-name
and
local-jndi-name

instead of the jndi-name + [isRemote]


+1 on that, I like this :) so we have the *deployment-id* element can look
like this

<ejb-deployment ...>

   <deployment-id jndi-name="some/jndi/name/SomeBeanHome" interface-name="
some.bean.SomeBeanHomeInterface" />

   <deployment-id jndi-name="some/jndi/name/SomeBeanBizIntfc"
                             interface-name="
some.bean.SomeBeanBusinessInterface" />

</ejb-deployment>

Or for local interfaces case

<ejb-deployment ...>

   <deployment-id local-jndi-name="another/jndi/name/AnotherBeanHome"
                             interface-name="
another.bean.AnotherBeanHomeInterface" />

   <deployment-id local-jndi-name="another/jndi/name/AnotherBeanBizIntfc"
                             interface-name="
another.bean.AnotherBeanBusinessInterface" />

</ejb-deployment>

Thanks DJencks very much, still waiting for other beedbacks :)



I haven't looked at the ejb 3 spec yet but I assume it extends the
previous java:comp/env idea in some way so that the spec descriptors/
annotations take care of specifying the target ejb for jee apps?

thanks
david jencks

>
> Thanks and best regards...
> Mohammad Nour El-Din
>
>
>> -David
>>
>>


Reply via email to