Dylan van Iersel wrote:
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).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.
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
