Package ejava.util.ejb
Class EJBClient
- java.lang.Object
-
- ejava.util.ejb.EJBClient
-
public class EJBClient extends Object
This class provides utiltity functions for working with an EJB in the JNDI tree.
-
-
Constructor Summary
Constructors Constructor Description EJBClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getEJBClientLookupName(String earNameVersion, String ejbModuleNameVersion, String distinctName, String ejbClassName, String remoteInterface, boolean stateful)
This method returns an remote JNDI name that is usable by the jboss-ejb-client org.jboss.ejb.client.naming.ejb.ejbURLContextFactory context factory.static String
getEJBClientLookupName(String earName, String ejbModuleName, String distinctName, String ejbClassName, String remoteInterface, boolean stateful, String version)
This method provides a convenience wrapper around the alternate getEJBLookupName() helper method.static String
getRemoteLookupName(String moduleNameVersion, String ejbClassName, String remoteInterface)
This method returns a JNDI name usable with JBoss remote-naming for EJBs deployed within a WAR (i.e., no EAR).static String
getRemoteLookupName(String earNameVersion, String ejbModuleNameVersion, String ejbClassName, String remoteInterface)
This method returns a JNDI name usable with JBoss remote-naming for EJBs deployed within an EAR.
-
-
-
Method Detail
-
getEJBClientLookupName
public static String getEJBClientLookupName(String earName, String ejbModuleName, String distinctName, String ejbClassName, String remoteInterface, boolean stateful, String version)
This method provides a convenience wrapper around the alternate getEJBLookupName() helper method. This can be used by EJB clients trying to locate EJBs that are part of a deployment that did not turn off maven version numbers in the deployment. This method assumes the EAR and EJB versions are the same value and will appropriately append the version to the EAR and EJB names when forming the jboss-ejb-client JNDI name.- Parameters:
earName
-ejbModuleName
-distinctName
-ejbClassName
-remoteInterface
-version
-- Returns:
- String jndi name that can be used for lookup
-
getEJBClientLookupName
public static String getEJBClientLookupName(String earNameVersion, String ejbModuleNameVersion, String distinctName, String ejbClassName, String remoteInterface, boolean stateful)
This method returns an remote JNDI name that is usable by the jboss-ejb-client org.jboss.ejb.client.naming.ejb.ejbURLContextFactory context factory. To use this, list "org.jboss.ejb.client.naming" as one of your java.naming.factory.url.pkgs and be sure to have org.jboss:jboss-ejb-client listed as a dependency. The physical name will look like the following in JBoss:java:jboss/exported/(ear)/(module)/(ejbClass)!(remoteInterface)
JNDI names returned will be in the following form:ejb:(ear)/(module)/(distinctName)/(ejbClass)!(remoteInterface) ejb:(ear)/(module)/(distinctName)/(ejbClass)!(remoteInterface)?stateful
Where the distinct name is commonly an empty string.- Parameters:
earNameVersion
-ejbModuleNameVersion
-distinctName
-ejbClassName
-remoteInterface
-- Returns:
- String jndi name that can be used for lookup
-
getRemoteLookupName
public static String getRemoteLookupName(String earNameVersion, String ejbModuleNameVersion, String ejbClassName, String remoteInterface)
This method returns a JNDI name usable with JBoss remote-naming for EJBs deployed within an EAR. org.jboss.naming.remote.client.InitialContextFactory The physical JNDI name will be listed as:java:jboss/exported/(ear)/(module)/(ejbClass)!(remoteInterface)
The name returned will have the following form:(ear)/(module)/(ejbClass)!(remoteInterface)
- Parameters:
earNameVersion
-ejbModuleNameVersion
-ejbClassName
-remoteInterface
-- Returns:
- String jndi name that can be used for lookup
-
getRemoteLookupName
public static String getRemoteLookupName(String moduleNameVersion, String ejbClassName, String remoteInterface)
This method returns a JNDI name usable with JBoss remote-naming for EJBs deployed within a WAR (i.e., no EAR). The physical JNDI name will be listed as:java:jboss/exported/(war)/(ejbClass)!(remoteInterface)
The name returned will have the following form:(war)/(ejbClass)!(remoteInterface)
- Parameters:
moduleNameVersion
-ejbClassName
-remoteInterface
-- Returns:
- String jndi name that can be used for lookup
-
-