Ok, I was using ejb.local-ref which seems to not exist anymore, well maybe, it never existed. Anyway, what are the implications of always using the global JNDI name with JBoss. Do you know if JBoss optimizes the lookup if it's local (and same jar) when using the JNDI name for local lookups?
Bernhard -----Urspr�ngliche Nachricht----- Von: Marcus Brito [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 19. Dezember 2002 13:17 An: Dylan van Iersel Cc: xdoclet Betreff: Re: [Xdoclet-user] JNDI_NAME & COMP_NAME Dylan van Iersel wrote: > Hi all, > > I am having XDoclet (1.2.0B) generate util objects and want to use them to > look up and cache home interfaces. The generated util objects lookup the > homes interfaces using the COMP_NAME static variable but I keep getting > the error message from JBoss that "javax.naming.NameNotFoundException: ejb > not bound" > > Can somebody tell me what I am doing wrong? > "Manual" JNDI lookup works fine using the JNDI_NAME though. Probably you haven't added an ejb-ref to the referenced bean. COMP_NAME is always a string in the private java:/comp/env namespace, so the referenced bean must be bound to this private namespace before you can look it up. This binding is usually done with an <ejb-ref> (which can be generated by xdoclet). So suppose you have FirstBean and SecondBean, and want to lookup FirstBean from SecondBean. You need the following on FirstBean class level docs: /** * @ejb.ejb-ref * name="FirstBean" * view-type="local" */ The other alternative is not to use COMP_NAME at all, and stick with JNDI_NAME, which is the global binding for the bean. To force the generated util object to use JNDI_NAME instead of COMP_NAME you need to suply the kind="physical" parameter to the <utilobject/> task: <utilobject kind="physical"/> One more alternative: you can specify the kind of the util object to be generated on a per-bean basis. Just add the following to the class level doc: /** * @ejb.util * generate="physical" */ Got it? -- Pz ------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
