Class AmbiguousEJBReferenceException
- All Implemented Interfaces:
Serializable
This may occur for the following scenarios :
- A 'simple name' binding has been provided for an EJB which has
more than one remote or local interface, and an attempt is made
to lookup the EJB using the simple name.
Since the 'simple name' does not uniquely identify a single interface, it is considered ambiguous. Instead, the lookup String should have '#
' appended, where is the desired local or remote interface. - Default short form bindings are being used, and multiple EJBs are configured to implement the same interface.
Since the short form binding does not uniquely identify a specific EJB, it is considered ambiguous. Instead, the lookup should be performed using the long form binding name, or a specific binding should be provided.
- ejb-link (xml) or beanName (annotation) has been configured, and more than one bean with the specified name exists in the application.
Since the bean name does not uniquely identify a specific EJB, it is considered ambiguous. Instead, the module name should also be specified (module#beanName).
- Auto-link is used, either injecting into a field/method of a specific type, or with beanInterface specified, and more than one bean in the application implements the interface.
Since the interface does not uniquely identify a specific EJB, it is considered ambiguous. Instead, either ejb-link should be used, or a binding provided.
- Default short form bindings are being used, and multiple EJBs are configured to implement the same interface.
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a new AmbiguousEJBReferenceException.AmbiguousEJBReferenceException
(String detailMessage) Constructs a new AmbiguousEJBReferenceException with the specified detail message.AmbiguousEJBReferenceException
(String detailMessage, Exception cause) Constructs a new AmbiguousEJBReferenceException with the specified detail message and cause. -
Method Summary
Methods inherited from class jakarta.ejb.EJBException
getCause, getCausedByException, getMessage, printStackTrace, printStackTrace, printStackTrace
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
AmbiguousEJBReferenceException
public AmbiguousEJBReferenceException()Constructs a new AmbiguousEJBReferenceException. All fields are set to null. -
AmbiguousEJBReferenceException
Constructs a new AmbiguousEJBReferenceException with the specified detail message. All other fields are set to null. -
AmbiguousEJBReferenceException
Constructs a new AmbiguousEJBReferenceException with the specified detail message and cause.
-