org.jboss.ejb3.common.resolvers.plugins
Class FirstMatchEjbReferenceResolver
java.lang.Object
org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolverBase
org.jboss.ejb3.common.resolvers.plugins.FirstMatchEjbReferenceResolver
- All Implemented Interfaces:
- EjbReferenceResolver
public class FirstMatchEjbReferenceResolver
- extends EjbReferenceResolverBase
- implements EjbReferenceResolver
FirstMatchEjbReferenceResolver
An EJB Reference resolver which will return the first match
found. In cases where the reference may be non-deterministic
this implementation will stop when the reference requirements
are satisfied
NonDeterministicInterfaceException is therefore avoided
when a common interface is used across DeploymentUnits
in the same DU Hierarchy; very simply the first DU
which is able to resolve the reference (without conflicting
with possible references to other EJBs
within that DU) will be used.
|
Method Summary |
java.lang.String |
resolveEjb(org.jboss.deployers.structure.spi.DeploymentUnit du,
EjbReference reference)
Returns the JNDI Name of the proxy described by the specified
arguments. |
protected java.lang.String |
resolveEjbFromRoot(org.jboss.deployers.structure.spi.DeploymentUnit rootDu,
EjbReference reference)
Follows a preorder traversal scheme to resolve the specified reference from the
specified metadata (or its children). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FirstMatchEjbReferenceResolver
public FirstMatchEjbReferenceResolver()
resolveEjb
public java.lang.String resolveEjb(org.jboss.deployers.structure.spi.DeploymentUnit du,
EjbReference reference)
- Description copied from interface:
EjbReferenceResolver
- Returns the JNDI Name of the proxy described by the specified
arguments.
- Specified by:
resolveEjb in interface EjbReferenceResolver
- Parameters:
du - The DeploymentUnit in questionreference - The EJB reference used
- Returns:
resolveEjbFromRoot
protected java.lang.String resolveEjbFromRoot(org.jboss.deployers.structure.spi.DeploymentUnit rootDu,
EjbReference reference)
- Follows a preorder traversal scheme to resolve the specified reference from the
specified metadata (or its children). Returns the resolved target JNDI name.
- Parameters:
rootDu - reference -
- Returns: