[jboss-user] [Beginners Corner] - Re: Lookup ejb by its COMP_NAME

lafr do-not-reply at jboss.com
Mon Jul 16 16:34:14 EDT 2007


I think you misunderstood something.
You'll have to add the ejb-local-ref to the bean where you want to lookup LicenseVerfifierFrom from by COMP_NAME.

Just one example from my code base.
In SalesOrderImportMDB I have this for XDoclet to generate the deployment descriptor entries:

  |  * @ejb.ejb-external-ref view-type="local" type="Session"
  |  *   ref-name="ejb/MailServiceLocal"
  |  *   home="ejb.session.core.MailServiceLocalHome"
  |  *   business="ejb.session.core.MailServiceLocal"
  |  *   jndi-name="test/MailServiceLocal"
  | 

ejb-jar.xml:

  | <message-driven>
  |     <display-name>SalesOrderImportMDB</display-name>
  | ...
  |     <ejb-local-ref >
  |         <ejb-ref-name>ejb/MailServiceLocal</ejb-ref-name>
  |         <ejb-ref-type>Session</ejb-ref-type>
  |         <local-home>ejb.session.core.MailServiceLocalHome</local-home>
  |         <local>ejb.session.core.MailServiceLocal</local>
  |     </ejb-local-ref>
  | ...
  | </message-driven >
  | 
jboss.xml:

  | <message-driven>
  |     <ejb-name>SalesOrderImportMDB</ejb-name>
  | ...
  |     <ejb-local-ref>
  |         <ejb-ref-name>ejb/MailServiceLocal</ejb-ref-name>
  |         <local-jndi-name>test/MailServiceLocal</local-jndi-name>
  |     </ejb-local-ref>
  | ...
  | </message-driven>
  | 
jmx-console, JNDI-view:

  | java:comp namespace of the SalesOrderImportMDB bean:
  |   +- env (class: org.jnp.interfaces.NamingContext)
  |   |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   |   +- MailServiceLocal[link -> test/MailServiceLocal] (class: javax.naming.LinkRef)
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064724#4064724

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064724



More information about the jboss-user mailing list