users@glassfish.java.net

Re: Disambiguating two EJBs in an .ear file

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Fri, 21 Jun 2013 10:52:58 -0700

On Fri, Jun 21, 2013 at 10:31 AM, Marina Vatkina
<marina.vatkina_at_oracle.com>wrote:

> <ejb-local-ref> defines a reference to another EJB that will be looked up.
>

Ah, OK, but does not...does not *per se* cause the injection to happen; for
that I need to specify the <injection-target-*> stuff. Right?

Must I also specify the <ejb-ref-type>, if it is already implicitly
declared by my use of annotations? I would think not.

Revised attempt:

<ejb-name>XBean</ejb-name>
<ejb-local-ref>
  <ejb-ref-name>XBean/y</ejb-ref-name>
  <ejb-link>YBean</ejb-link>
  *<injection-target>*
* <injection-target-class>foo.XBean</injection-target-class>*
* <injection-target-name>y</injection-target-name>*
* </injection-target>*
</ejb-local-ref>

Best,
Laird

-- 
http://about.me/lairdnelson