You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, EJB references defined in java:global are required to have a binding in ibm-*-bnd.xml, to link the ejb reference (@EJB, ejb-ref, or ejb-local-ref) to an actual EJB. Primarily this is because ejb-link only works within an application, whereas it has been assumed a ref in java:global will bind to an EJB in a different application.
However, if an EJB definition would like to define a reference to itself in java:global, so that it may make itself available at a non-standard location, then this isn't possible without a binding.
For example:
@Stateless
@Remote(ClientRemote.class)
@EJB(name = "java:global/env/ejb/ClientBeanRef", beanInterface = ClientRemote.class, beanName = "ClientBean")
public class ClientBean {
Would declare an EJB which may be looked up or injected from two locations in JNDI:
Spec defined location : java:global/<app>/<module>/ClientBean!xxx.xxx.ClientRemote
EJB ref location : java:global/env/ejb/ClientBeanRef
Currently, the above definition will fail, unless the ibm-ejb-jar-bnd.xml file is also provided and defines a binding as:
Relax the checking in EJBProcessor to allow ejb references
in java:global to use auto-link when the application name
is known and ejb-link has been specified (i.e. ejb-link or beanName).
This will allow EJB references in java:global to auto-link to
an EJB specified by ejb-link that exists in the same application.
If the EJB is in a different application, a binding will still be
required.
Also removed a binding from a test that was previously added to
demonstrate the current behavior. The test will now properly link
to the EJB without the need for a binding.
Currently, EJB references defined in java:global are required to have a binding in ibm-*-bnd.xml, to link the ejb reference (
@EJB
,ejb-ref
, orejb-local-ref
) to an actual EJB. Primarily this is because ejb-link only works within an application, whereas it has been assumed a ref in java:global will bind to an EJB in a different application.However, if an EJB definition would like to define a reference to itself in java:global, so that it may make itself available at a non-standard location, then this isn't possible without a binding.
For example:
Would declare an EJB which may be looked up or injected from two locations in JNDI:
Spec defined location :
java:global/<app>/<module>/ClientBean!xxx.xxx.ClientRemote
EJB ref location :
java:global/env/ejb/ClientBeanRef
Currently, the above definition will fail, unless the ibm-ejb-jar-bnd.xml file is also provided and defines a binding as:
This should be supported without the binding, since the
beanName
of the@EJB
annotation references a bean in the same application.The text was updated successfully, but these errors were encountered: