> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jozsa
> Kristof
> Sent: 31. januar 2002 23:14
> To: Dmitri Colebatch; [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-user] Generated Util classes' getHome()
>
>
> hi,
>
> thanks much for the explanation, I see much clearly now :) I don't think I
> have a vote here, but anyway, an other Util class per Bean don't make much
> sense for me. What about using the COMP_NAME for local lookups, and using
> JNDI for remote ones (and making all these overwritable by
> optional xdoclet
> tags)? Usually people use local calls inside the same ejb container for
> speed anyway, and the remote calls from outside would just work as fine..
>

It makes no diff whether the lookup is for local or remote beans. What you
need to do is to have an ejb-ref in the dd for the ejb that does the lookup
(and a corresponding comp->JNDI mapping element in your container's dd). I'm
attaching a slide I've made that illustrated this. (Even if attachments on
mailing lists is a no-no). -Of course if you do a lookup from outside the
container, you'll have to use plain JNDI. -But shouldn't apps that look up
EJBs outside a container be J2EE clients and use application-client.xml and
any additional container dds (like weblogic-appclient.xml)?

Anybody agree with my proposal of adding getHomeJNDI()/getLocalHomeJNDI() ?

Aslak

> Christopher
>
> On Fri, Feb 01, 2002 at 09:01:49AM +1100, Dmitri Colebatch wrote:
> > Christopher,
> >
> > there has been some discussion of this recently on dev (I think
> thats where it was).
> >
> > quick abc on jndi and ejb:  inside an ejb container, the spec
> "recommends" that a bean looks up resources in the java:comp/env
> > namespace, and the container has to provide facilities for
> mapping references to other beans, datasources, etc. into that namespace.
> > Each bean has its own java:comp/env namespace - that is to say
> that depending on your configuration, lookups in one java:comp/env
> > namespace may or may not work elsewhere.
> >
> > so in short - the only reason that java:comp/env works is that
> the container makes it work - so, from outside the container,
> > comp/env isn't going to work.  As you've noticed, looking up
> normally works fine.
> >
> > I cant remember what the direction the recent discussion took,
> but perhaps one of the other guys can chime in with some feedback on
> > intended usage of the util classes - maybe you would like a
> remote util class?
> >
> > cheers
> > dim
> >
> > ----- Original Message -----
> > From: "Jozsa Kristof" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, February 01, 2002 8:53 AM
> > Subject: [Xdoclet-user] Generated Util classes' getHome()
> >
> >
> > > Hello,
> > >
> > > using the generated *Util classes, it seems that their
> getHome() methods
> > > fail when they're invoked 'outside' of the EJB environment.
> As I see if I
> > > get the home manually (getting InitialContext, doing lookup
> and narrow the
> > > home class), and use the classes' JNDI_NAME, it works fine,
> but fails using
> > > COMP_NAME, and unfortunately the *Util classes defaults to that.
> > >
> > > I'm still not an EJB expert, so I cant really explain why the
> beans don't
> > > get bounded into 'java:comp/env/ejb/', I only see that using the plain
> > > JNDI_NAME would be fine for me. Is there any way to change
> the generated
> > > Util classes behaviour from an xdoclet tag or somehow else;
> or shall I do
> > > something else to get my beans working with the current settings?
> > >
> > > All that happens on JBoss3, last working snap, the exact
> error at getHome()
> > > invocation is: 'javax.naming.NameNotFoundException: comp not bound'
> > >
> > > Christopher
> > > --
> > > .Digital.Yearning.for.Networked.Assassination.and.Xenocide
> > >
> > > _______________________________________________
> > > Xdoclet-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >
> >
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>
> --
> .Digital.Yearning.for.Networked.Assassination.and.Xenocide
>
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to