Package org.apache.axis.providers.java
Class EJBProvider
- 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:
java.io.Serializable,Handler
public class EJBProvider extends RPCProvider
A basic EJB Provider- Author:
- Carl Woolf (cwoolf@macromedia.com), Tom Jordahl (tomj@macromedia.com), C?dric Chabanois (cchabanois@ifrance.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.Class[]empty_class_arrayprotected static java.lang.Object[]empty_object_arrayprotected static org.apache.commons.logging.LogentLogstatic java.lang.StringjndiContextClassstatic java.lang.StringjndiPasswordstatic java.lang.StringjndiURLstatic java.lang.StringjndiUsernameprotected static org.apache.commons.logging.Loglogstatic java.lang.StringOPTION_BEANNAMEstatic java.lang.StringOPTION_HOMEINTERFACENAMEstatic java.lang.StringOPTION_LOCALHOMEINTERFACENAMEstatic java.lang.StringOPTION_LOCALINTERFACENAMEstatic java.lang.StringOPTION_REMOTEINTERFACENAME-
Fields inherited from class org.apache.axis.providers.java.JavaProvider
OPTION_ALLOWEDMETHODS, OPTION_CLASSNAME, OPTION_SCOPE
-
Fields inherited from class org.apache.axis.providers.BasicProvider
OPTION_EXTRACLASSES, OPTION_WSDL_INPUTSCHEMA, OPTION_WSDL_PORTTYPE, OPTION_WSDL_SERVICEELEMENT, OPTION_WSDL_SERVICEPORT, OPTION_WSDL_SOAPACTION_MODE, OPTION_WSDL_TARGETNAMESPACE
-
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options
-
-
Constructor Summary
Constructors Constructor Description EJBProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.naming.InitialContextgetCachedContext()protected javax.naming.InitialContextgetContext(java.util.Properties properties)protected java.lang.ObjectgetEJBHome(javax.naming.InitialContext context, java.lang.String beanJndiName)protected java.lang.ClassgetServiceClass(java.lang.String beanJndiName, SOAPService service, 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.StringgetServiceClassNameOptionName()Return the option in the configuration that contains the service class name.protected java.lang.StringgetStrOption(java.lang.String optionName, Handler service)Get a String option by looking first in the service options, and then at the Handler's options.protected java.lang.ObjectinvokeMethod(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 forServerException.protected java.lang.ObjectmakeNewServiceObject(MessageContext msgContext, java.lang.String clsName)Return a object which implements the service.-
Methods inherited from class org.apache.axis.providers.java.RPCProvider
checkMethodName, createResponseBody, getBody, getOperationDesc, processMessage
-
Methods inherited from class org.apache.axis.providers.java.JavaProvider
getServiceClassName, getServiceObject, initServiceDesc, invoke
-
Methods inherited from class org.apache.axis.providers.BasicProvider
addOperation, generateWSDL, getOperationName, getOperationNames, getOperationQNames
-
Methods inherited from class org.apache.axis.handlers.BasicHandler
canHandleBlock, cleanup, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
-
-
-
-
Field Detail
-
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
-
-
Method Detail
-
makeNewServiceObject
protected java.lang.Object makeNewServiceObject(MessageContext msgContext, java.lang.String clsName) throws java.lang.Exception
Return a object which implements the service.- Overrides:
makeNewServiceObjectin classJavaProvider- Parameters:
msgContext- the message contextclsName- The JNDI name of the EJB home class- Returns:
- an object that implements the service
- Throws:
java.lang.Exception
-
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:
getServiceClassNameOptionNamein classJavaProvider
-
getStrOption
protected java.lang.String getStrOption(java.lang.String optionName, 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.- Parameters:
optionName- the option to retrieve- Returns:
- String the value of the option or null if not found in either scope
-
getServiceClass
protected java.lang.Class getServiceClass(java.lang.String beanJndiName, SOAPService service, MessageContext msgContext) throws AxisFaultGet 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:
getServiceClassin classJavaProvider- Parameters:
msgContext- the message context (can be null)beanJndiName- the JNDI name of the EJB- Returns:
- the class info of the EJB remote or local interface
- Throws:
AxisFault
-
getCachedContext
protected javax.naming.InitialContext getCachedContext() throws javax.naming.NamingException- Throws:
javax.naming.NamingException
-
getContext
protected javax.naming.InitialContext getContext(java.util.Properties properties) throws AxisFault, javax.naming.NamingException- Throws:
AxisFaultjavax.naming.NamingException
-
getEJBHome
protected java.lang.Object getEJBHome(javax.naming.InitialContext context, java.lang.String beanJndiName) throws AxisFault, javax.naming.NamingException- Throws:
AxisFaultjavax.naming.NamingException
-
invokeMethod
protected java.lang.Object invokeMethod(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 forServerException. ConvertsServerExceptionexceptions toInvocationTargetExceptionexceptions with the same cause. This allows the axis framework to create a SOAP fault.- Overrides:
invokeMethodin classRPCProvider- Parameters:
msgContext- MessageContextmethod- the target method.obj- the target objectargValues- the method arguments- Throws:
java.lang.Exception- See Also:
RPCProvider.invokeMethod(org.apache.axis.MessageContext, java.lang.reflect.Method, java.lang.Object, java.lang.Object[])
-
-