Yes you are right, and we have to follow the specs as long as it provides
the suitable answer, but I was not talking about refs only I was talking
about names too, which will be assigned to beans, I think we should follow
the same pattern if a name is not provided .

On 9/13/07, Manu George <[EMAIL PROTECTED]> wrote:
>
> The spec says that in case of a reference the name should be
> com.acme.example.ExampleBean/myCart
>
> package com.acme.example;
> @Stateless public class ExampleBean implements Example {
> ...
> @EJB private ShoppingCart myCart;
> ...
> }
>
> So if properly mapped the bean is available in JNDI at
> java:comp/env/com.acme.example.ExampleBean/myCart.
> But this is only for refs. So I guess I like David's proposal better.
> Also won't a name like com/mycomp/myproject/SuperbadBean/MyHome result
> in a large no of JNDI subcontexts?
>
> Regards
> Manu
>
> On 9/13/07, Mohammad Nour El-Din <[EMAIL PROTECTED]> wrote:
> > I think we should use the fully qualified name of the bean class and
> > appending the Interface name, like this
> >
> > com/mycomp/myproject/SuperbadBean/MyHome
> > or
> > com/mycomp/myproject/SuperbadBean/SuperbadBeanRemoteHome
> > ...
> > and the same goes for other interfaces
> >
> > but I prefere the first pattern, cause users expect to use the name they
> > just written into code or deployment descriptor .
> >
> > On 9/13/07, David Blevins <[EMAIL PROTECTED]> wrote:
> > >
> > > Currently for a bean like this:
> > >
> > >      @Stateless
> > >      @RemoteHome(MyHome.class)
> > >      @LocalHome(MyLocalHome.class)
> > >      @Local({SomeLocalInterface.class, AnotherLocalInterface.class})
> > >      @Remote({SomeRemoteInterface.class, AnotherRemoteInterface.class
> })
> > >      public static class SuperbadBean implements SomeLocalInterface,
> > > AnotherLocalInterface, SomeRemoteInterface, AnotherRemoteInterface  {
> > >
> > >      }
> > >
> > > You'd get these JNDI Names:
> > >
> > > INFO - Jndi(name=SuperbadBean)     // for MyHome
> > > INFO - Jndi(name=SuperbadBeanLocal)  // for MyLocalHome
> > > INFO - Jndi(name=SuperbadBeanBusinessLocal) // for SomeLocalInterface
> > > and AnotherLocalInterface
> > > INFO - Jndi(name=SuperbadBeanBusinessRemote) // for
> > > SomeRemoteInterface and AnotherRemoteInterface
> > >
> > > This pattern is completely configurable, but I'm thinking we should
> > > change the default to use the annotation names (@RemoteHome, @Remote,
> > > @LocalHome, @Local):
> > >
> > > INFO - Jndi(name=SuperbadBeanRemoteHome)     // for MyHome
> > > INFO - Jndi(name=SuperbadBeanLocalHome)  // for MyLocalHome
> > > INFO - Jndi(name=SuperbadBeanLocal) // for SomeLocalInterface and
> > > AnotherLocalInterface
> > > INFO - Jndi(name=SuperbadBeanRemote) // for  SomeRemoteInterface and
> > > AnotherRemoteInterface
> > >
> > > Thoughts?
> > >
> > > -David
> > >
> > >
> > >
> >
> >
> > --
> > Thanks
> > - Mohammad Nour
> >
>



-- 
Thanks
- Mohammad Nour

Reply via email to