I'm successfully using an MDB that contains the following in ejb-jar.xml:
<message-driven >
...
<ejb-local-ref >
<ejb-ref-name>ejb/Agreement</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-
home>com.whitesmiths.sacha.ejb.agreement.interfaces.AgreementLocalHome</local-home>
<local>com.whitesmiths.sacha.ejb.agreement.interfaces.AgreementLocal</local>
<ejb-link>Agreement</ejb-link>
</ejb-local-ref>
<ejb-local-ref >
<ejb-ref-name>ejb/Assessor</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-
home>com.whitesmiths.sacha.ejb.credit.interfaces.AssessorLocalHome</local-home>
<local>com.whitesmiths.sacha.ejb.credit.interfaces.AssessorLocal</local>
<ejb-link>Assessor</ejb-link>
</ejb-local-ref>
...
</message-driven>
This also needs the corresponding entries in jboss.xml:
<entity>
<ejb-name>Agreement</ejb-name>
<jndi-name>ejb/agreements/Agreement</jndi-name>
<local-jndi-name>ejb/agreements/AgreementLocal</local-jndi-name>
<read-only>false</read-only>
</entity>
<session>
<ejb-name>Assessor</ejb-name>
<jndi-name>ejb/credit/Assessor</jndi-name>
<local-jndi-name>ejb/credit/AssessorLocal</local-jndi-name>
</session>
The <ejb-link> tags in ejb-jar.xml must correspond to a set of
<ejb-name> tags in jboss.xml.
To get the local home interface of an Agreement EJB, the MDB performs a
JNDI lookup on "java:comp/env/ejb/Agreement".
Good luck
On Friday, May 31, 2002, at 05:10 PM, Chris Chen wrote:
> Hi,
>
> I have a little problem trying to deploy a MDB.
>
> I am doing an local ejb reference to a session bean inside my MDB so
> inside my ejb-jar.xml.
>
> However, when I deploy the MDB using jboss.xml, I get an error that
> says the ref-name does not match a ref-name in ejb-jar.xml. Well, it
> doesn't because it's a local ejb reference.
>
> So am I doing something wrong with the jboss.xml configuration?
>
> When I change the local ejb reference inside the ejb-jar.xml to a
> remote ejb reference, everything works fine.
>
> On that note, if I were to use a remote ejb reference and I am looking
> up and working with the EJB inside the JBOSS container (ie. the MDB),
> does JBoss use a local connection that is much more efficient or does
> it go through a remote route?
>
> I would definitely prefer to use local ejb references but I am not sure
> what I'm doing wrong.. Can something please help me?
>
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user