thanks. i am using jboss.
(B
(Bis this documented anywhere? kinda threw me for a loop.
(B
(Bbtw, what does COMP_NAME stand for? i understand JNDI_NAME (physical), but (Bis COMP_NAME (logical) used for in-vm (local) calls?
(B
(Balso, 1) is there a place to specify this preference to use the physical, (BJNDI_NAME in ejbdoclet's utilobject subtask, or 2) have ejbdoclet (Bautomatically determine if the jboss subtask is included, and if so, have (Bthe template generate:
(B
(B java.lang.Object objRef = initialContext.lookup(NameHome.JNDI_NAME);
(B ^^^^^^^^^^^^^
(B instead of
(B
(B java.lang.Object objRef = initialContext.lookup(NameHome.COMP_NAME);
(B
(B
(Binside the getHome() methods in the xxxUtil class?
(B
(B
(Bthank you.
(B
(B
(B
(B
(BAt 18:07 02/11/28 +0100, you wrote:
(B>what App Server are you using?
(B>
(B>if it is JBoss, then for each Bean, you need to add such a tag:
(B>
(B>@ejb.util
(B> generate="physical"
(B>
(B>it will generate JNDI_NAME. The default is logical, which will then generate
(B>COMP_NAME in the Util class.
(B>
(B>Marc.
(B>
(B> > -----Urspr$B�O(Bgliche Nachricht-----
(B> > Von: tek1 [SMTP:[EMAIL PROTECTED]]
(B> > Gesendet am: Donnerstag, 28. November 2002 17:55
(B> > An: [EMAIL PROTECTED]
(B> > Betreff: [Xdoclet-user] xdoclet1.2beta1 bug?: xxxUtil.getHome() using
(B> > COMP_NAME instead of JNDI_NAME?
(B> >
(B> > i wrote a very simple client that tries to obtain the home interface of an
(B> >
(B> > entity, say "Name", as in:
(B> >
(B> > NameUtil.getHome();
(B> >
(B> > however, i'm getting the error, "javax.naming.NameNotFoundException: comp
(B> > not bound" when i run the client.
(B> >
(B> > here is the xdoclet-generated source for the NameUtil.getHome() method:
(B> >
(B> >
(B> > public static NameHome getHome() throws NamingException
(B> > {
(B> > // Obtain initial context
(B> > InitialContext initialContext = new InitialContext();
(B> > try {
(B> > java.lang.Object objRef =
(B> > initialContext.lookup(NameHome.COMP_NAME);
(B> > return (NameHome) PortableRemoteObject.narrow(objRef,
(B> > NameHome.class);
(B> > } finally {
(B> > initialContext.close();
(B> > }
(B> > }
(B> >
(B> >
(B> > in the NameHome class, COMP_NAME="java:comp/env/ejb/Name", which i thought
(B> >
(B> > was for in-jvm (internal/local) calls?
(B> >
(B> > in my client program, if i do the following:
(B> >
(B> > InitialContext initialContext = new InitialContext();
(B> > java.lang.Object objRef = initialContext.lookup(NameHome.JNDI_NAME);
(B> > NameHome home = (NameHome) PortableRemoteObject.narrow(objRef,
(B> > NameHome.class);
(B> >
(B> > it works.
(B> >
(B> >
(B> > should the NameUtil.getHome() method use:
(B> >
(B> > java.lang.Object objRef = initialContext.lookup(NameHome.JNDI_NAME);
(B> >
(B> > instead of
(B> >
(B> > java.lang.Object objRef = initialContext.lookup(NameHome.COMP_NAME);
(B> >
(B> >
(B> > ?
(B> >
(B> > thank you.
(B
(B
(B
(B-------------------------------------------------------
(BThis SF.net email is sponsored by: Get the new Palm Tungsten T
(Bhandheld. Power & Color in a compact size!
(Bhttp://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
(B_______________________________________________
(BXdoclet-user mailing list
([EMAIL PROTECTED]
(Bhttps://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to