On Sat, 2003-03-15 at 00:51, Richard Stack wrote:
> Thanks for the reply. I'm using the following in OrderBean:
> 
> * @ejb.ejb-ref
>  *      ejb-name="Customer"
>  *      view-type="local"
>  *    ref-name="Customer"
>  *
>  * @jboss.ejb-ref-jndi jndi-name="CustomerJNDI"
>  *                     ref-name="Customer"
> 
> and in jboss.xml I get:
> 
> <ejb-ref>
>       <ejb-ref-name>ejb/Customer</ejb-ref-name>
>               <jndi-name>CustomerJNDI</jndi-name>
> </ejb-ref>
> 
> and this error message in JBoss:
> 
> "...DeploymentException: Error in jboss.xml for Bean Order: ejb-ref
> ejb/Customer found in jboss.xml but not in ejb-jar.xml"
> 
> I need to be able to either remove the ejb/ from jboss.xml or add to
> ejb-jar.xml something like :
> 
> <ejb-ref>
>       <ejb-ref-name>ejb/Customer</ejb-ref-name>
> </ejb-ref>
> 
> Or am I doing something wrong?

When in doubt, consult the source...  I notice the jboss_xml.xdt
template contains
        <XDtClass:forAllClassTags tagName="jboss:ejb-ref-jndi">
         <ejb-ref>
            <ejb-ref-name>ejb/<XDtClass:classTagValue
tagName="jboss:ejb-ref-jndi" paramName="ref-name"/></ejb-ref-name>

I guess they're assuming all ejb ref names will begin "ejb/".  Not a bad
practise, to distinguish them from other things in the java:comp/env/
namespace; generally I prefix all my datasources with "jdbc/", mail
sessions with "smtp/", ejb refs with "ejb/" etc.
The template obviously thinks people will always do that, and saves you
the bother of including the prefix in the jboss tag's ref-name
parameter.

Unfortunately, that means there's no way to avoid having to use the
prefix in the ejb-jar.xml file :-(
I suggest you raise a bug report for the JBoss module.


Andrew.



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to