java.lang.Object
org.apache.axis.handlers.BasicHandler
org.apache.axis.providers.BasicProvider
org.apache.axis.providers.java.JavaProvider
org.apache.axis.providers.java.RPCProvider
org.apache.axis.providers.java.EJBProvider
- All Implemented Interfaces:
- org.apache.axis.Handler, java.io.Serializable
- public class EJBProvider
- extends RPCProvider
A basic EJB Provider
|
Method Summary |
private java.lang.Object |
createLocalEJB(org.apache.axis.MessageContext msgContext,
java.lang.String beanJndiName,
java.lang.Class homeClass)
Create an EJB using a local home object |
private java.lang.Object |
createRemoteEJB(org.apache.axis.MessageContext msgContext,
java.lang.String beanJndiName,
java.lang.Class homeClass)
Create an EJB using a remote home object |
protected javax.naming.InitialContext |
getCachedContext()
|
private java.lang.Throwable |
getCause(java.lang.Throwable original)
Get the cause of an exception, using reflection so that
it still works under JDK 1.3 |
protected javax.naming.InitialContext |
getContext(java.util.Properties properties)
|
protected java.lang.Object |
getEJBHome(javax.naming.InitialContext context,
java.lang.String beanJndiName)
|
private java.lang.Object |
getEJBHome(org.apache.axis.handlers.soap.SOAPService serviceHandler,
org.apache.axis.MessageContext msgContext,
java.lang.String beanJndiName)
Common routine to do the JNDI lookup on the Home interface object
username and password for jndi lookup are got from the configuration or from
the messageContext if not found in the configuration |
private java.lang.Class |
getRemoteInterfaceClassFromHome(java.lang.String beanJndiName,
org.apache.axis.handlers.soap.SOAPService service,
org.apache.axis.MessageContext msgContext)
Get the remote interface of an ejb from its home class. |
protected java.lang.Class |
getServiceClass(java.lang.String beanJndiName,
org.apache.axis.handlers.soap.SOAPService service,
org.apache.axis.MessageContext msgContext)
Get the class description for the EJB Remote or Local Interface,
which is what we are interested in exposing to the world (i.e. |
protected java.lang.String |
getServiceClassNameOptionName()
Return the option in the configuration that contains the service class
name. |
protected java.lang.String |
getStrOption(java.lang.String optionName,
org.apache.axis.Handler service)
Get a String option by looking first in the service options,
and then at the Handler's options. |
protected java.lang.Object |
invokeMethod(org.apache.axis.MessageContext msgContext,
java.lang.reflect.Method method,
java.lang.Object obj,
java.lang.Object[] argValues)
Override the default implementation such that we can include
special handling for java.rmi.ServerException. |
private boolean |
isLocalEjb(org.apache.axis.handlers.soap.SOAPService service)
Tells if the ejb that will be used to handle this service is a local
one |
private boolean |
isRemoteEjb(org.apache.axis.handlers.soap.SOAPService service)
Tells if the ejb that will be used to handle this service is a remote
one |
protected java.lang.Object |
makeNewServiceObject(org.apache.axis.MessageContext msgContext,
java.lang.String clsName)
Return a object which implements the service. |
| Methods inherited from class org.apache.axis.handlers.BasicHandler |
canHandleBlock, cleanup, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.commons.logging.Log log
entLog
protected static org.apache.commons.logging.Log entLog
OPTION_BEANNAME
public static final java.lang.String OPTION_BEANNAME
- See Also:
- Constant Field Values
OPTION_HOMEINTERFACENAME
public static final java.lang.String OPTION_HOMEINTERFACENAME
- See Also:
- Constant Field Values
OPTION_REMOTEINTERFACENAME
public static final java.lang.String OPTION_REMOTEINTERFACENAME
- See Also:
- Constant Field Values
OPTION_LOCALHOMEINTERFACENAME
public static final java.lang.String OPTION_LOCALHOMEINTERFACENAME
- See Also:
- Constant Field Values
OPTION_LOCALINTERFACENAME
public static final java.lang.String OPTION_LOCALINTERFACENAME
- See Also:
- Constant Field Values
jndiContextClass
public static final java.lang.String jndiContextClass
- See Also:
- Constant Field Values
jndiURL
public static final java.lang.String jndiURL
- See Also:
- Constant Field Values
jndiUsername
public static final java.lang.String jndiUsername
- See Also:
- Constant Field Values
jndiPassword
public static final java.lang.String jndiPassword
- See Also:
- Constant Field Values
empty_class_array
protected static final java.lang.Class[] empty_class_array
empty_object_array
protected static final java.lang.Object[] empty_object_array
cached_context
private static javax.naming.InitialContext cached_context
EJBProvider
public EJBProvider()
makeNewServiceObject
protected java.lang.Object makeNewServiceObject(org.apache.axis.MessageContext msgContext,
java.lang.String clsName)
throws java.lang.Exception
- Return a object which implements the service.
- Overrides:
makeNewServiceObject in class JavaProvider
createRemoteEJB
private java.lang.Object createRemoteEJB(org.apache.axis.MessageContext msgContext,
java.lang.String beanJndiName,
java.lang.Class homeClass)
throws java.lang.Exception
- Create an EJB using a remote home object
createLocalEJB
private java.lang.Object createLocalEJB(org.apache.axis.MessageContext msgContext,
java.lang.String beanJndiName,
java.lang.Class homeClass)
throws java.lang.Exception
- Create an EJB using a local home object
isRemoteEjb
private boolean isRemoteEjb(org.apache.axis.handlers.soap.SOAPService service)
- Tells if the ejb that will be used to handle this service is a remote
one
isLocalEjb
private boolean isLocalEjb(org.apache.axis.handlers.soap.SOAPService service)
- Tells if the ejb that will be used to handle this service is a local
one
getServiceClassNameOptionName
protected java.lang.String getServiceClassNameOptionName()
- Return the option in the configuration that contains the service class
name. In the EJB case, it is the JNDI name of the bean.
- Overrides:
getServiceClassNameOptionName in class JavaProvider
getStrOption
protected java.lang.String getStrOption(java.lang.String optionName,
org.apache.axis.Handler service)
- Get a String option by looking first in the service options,
and then at the Handler's options. This allows defaults to be
specified at the provider level, and then overriden for particular
services.
getRemoteInterfaceClassFromHome
private java.lang.Class getRemoteInterfaceClassFromHome(java.lang.String beanJndiName,
org.apache.axis.handlers.soap.SOAPService service,
org.apache.axis.MessageContext msgContext)
throws java.lang.Exception
- Get the remote interface of an ejb from its home class.
This function can only be used for remote ejbs
getServiceClass
protected java.lang.Class getServiceClass(java.lang.String beanJndiName,
org.apache.axis.handlers.soap.SOAPService service,
org.apache.axis.MessageContext msgContext)
throws org.apache.axis.AxisFault
- Get the class description for the EJB Remote or Local Interface,
which is what we are interested in exposing to the world (i.e. in WSDL).
- Overrides:
getServiceClass in class JavaProvider
getEJBHome
private java.lang.Object getEJBHome(org.apache.axis.handlers.soap.SOAPService serviceHandler,
org.apache.axis.MessageContext msgContext,
java.lang.String beanJndiName)
throws org.apache.axis.AxisFault
- Common routine to do the JNDI lookup on the Home interface object
username and password for jndi lookup are got from the configuration or from
the messageContext if not found in the configuration
getCachedContext
protected javax.naming.InitialContext getCachedContext()
throws javax.naming.NamingException
getContext
protected javax.naming.InitialContext getContext(java.util.Properties properties)
throws org.apache.axis.AxisFault,
javax.naming.NamingException
getEJBHome
protected java.lang.Object getEJBHome(javax.naming.InitialContext context,
java.lang.String beanJndiName)
throws org.apache.axis.AxisFault,
javax.naming.NamingException
invokeMethod
protected java.lang.Object invokeMethod(org.apache.axis.MessageContext msgContext,
java.lang.reflect.Method method,
java.lang.Object obj,
java.lang.Object[] argValues)
throws java.lang.Exception
- Override the default implementation such that we can include
special handling for java.rmi.ServerException.
Converts java.rmi.ServerException exceptions to
java.lang.reflect.InvocationTargetException exceptions with the same cause.
This allows the axis framework to create a SOAP fault.
- Overrides:
invokeMethod in class RPCProvider
getCause
private java.lang.Throwable getCause(java.lang.Throwable original)
- Get the cause of an exception, using reflection so that
it still works under JDK 1.3