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:
Serializable,Handler
A basic EJB Provider
- Author:
- Carl Woolf (cwoolf@macromedia.com), Tom Jordahl (tomj@macromedia.com), C?dric Chabanois (cchabanois@ifrance.com)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Class[]protected static final Object[]protected static org.apache.commons.logging.Logstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected static org.apache.commons.logging.Logstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.axis.providers.java.JavaProvider
OPTION_ALLOWEDMETHODS, OPTION_CLASSNAME, OPTION_SCOPEFields 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_TARGETNAMESPACEFields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InitialContextprotected InitialContextgetContext(Properties properties) protected ObjectgetEJBHome(InitialContext context, String beanJndiName) protected ClassgetServiceClass(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 StringReturn the option in the configuration that contains the service class name.protected StringgetStrOption(String optionName, Handler service) Get a String option by looking first in the service options, and then at the Handler's options.protected ObjectinvokeMethod(MessageContext msgContext, Method method, Object obj, Object[] argValues) Override the default implementation such that we can include special handling forServerException.protected ObjectmakeNewServiceObject(MessageContext msgContext, String clsName) Return a object which implements the service.Methods inherited from class org.apache.axis.providers.java.RPCProvider
checkMethodName, createResponseBody, getBody, getOperationDesc, processMessageMethods inherited from class org.apache.axis.providers.java.JavaProvider
getServiceClassName, getServiceObject, initServiceDesc, invokeMethods inherited from class org.apache.axis.providers.BasicProvider
addOperation, generateWSDL, getOperationName, getOperationNames, getOperationQNamesMethods inherited from class org.apache.axis.handlers.BasicHandler
canHandleBlock, cleanup, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
-
Field Details
-
log
protected static org.apache.commons.logging.Log log -
entLog
protected static org.apache.commons.logging.Log entLog -
OPTION_BEANNAME
- See Also:
-
OPTION_HOMEINTERFACENAME
- See Also:
-
OPTION_REMOTEINTERFACENAME
- See Also:
-
OPTION_LOCALHOMEINTERFACENAME
- See Also:
-
OPTION_LOCALINTERFACENAME
- See Also:
-
jndiContextClass
- See Also:
-
jndiURL
- See Also:
-
jndiUsername
- See Also:
-
jndiPassword
- See Also:
-
empty_class_array
-
empty_object_array
-
-
Constructor Details
-
EJBProvider
public EJBProvider()
-
-
Method Details
-
makeNewServiceObject
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:
Exception
-
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
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 Class getServiceClass(String beanJndiName, SOAPService service, MessageContext msgContext) throws 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:
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
- Throws:
NamingException
-
getContext
- Throws:
AxisFaultNamingException
-
getEJBHome
protected Object getEJBHome(InitialContext context, String beanJndiName) throws AxisFault, NamingException - Throws:
AxisFaultNamingException
-
invokeMethod
protected Object invokeMethod(MessageContext msgContext, Method method, Object obj, Object[] argValues) throws 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:
Exception- See Also:
-