Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.net.axis.server
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
                          org.jboss.net.axis.server.EJBProvider

All Implemented Interfaces:
  org.apache.axis.Handler, Serializable

public class EJBProvider
extends org.apache.axis.providers.java.EJBProvider

A JBoss-compatible EJB Provider that exposes the methods of any session bean as a web service endpoint.

Basically it is a slimmed downed derivative of the Axis-EJBProvider without the usual, corba-related configuration mumbo-jumbo that is operating under the presumption that the right classloader has already been set by the request flow chain (@see org.jboss.net.axis.SetClassLoaderHandler).

Since Version 1.5 and thanks to Kevin Conner, we now also support stateful beans that are tied to the service scope (you should reasonably choose scope="session" in the tag of the corresponding web-service.xml) Note that by using a jaxp lifecycle handler we synchronize with web service scopes that can be shorter-lived than the surrounding http-session. However, as I understood Kevin and from my observations, it seems that Axis and hence the jaxp lifecycle does not get notified upon http-session expiration. Hence our lifecycle listener currently implements the http session lifecycle, too (which is not very transport-agnostic, but who cares at the moment).

EJBProvider is able to recognize an `WsdlAwareHttpActionHandler` in its transport chain such that it will set the soap-action headers in the wsdl.

Since:
  5. Oktober 2001, 13:02
Version:
  $Revision: 1.20.4.1 $
Author:
  Christoph G. Jung
See Also:
  Serialized Form

Nested Class Summary
`protected static class` | `EJBProvider.EJBServiceLifeCycle` This is the lifecycle object that is registered in the message scope and that shields the proper bean reference

Field Summary
`protected Method` | `ejbCreateMethod` we are caching the create method for perfomance purposes
`protected Object` | `ejbHome` we are caching the home for perfomance purposes
`protected Class` | `remoteClass` the real remote class we are shielding

Fields inherited from class org.apache.axis.providers.java.EJBProvider
`empty_class_array, empty_object_array, jndiContextClass, jndiPassword, jndiURL, jndiUsername, OPTION_BEANNAME, OPTION_HOMEINTERFACENAME, OPTION_LOCALHOMEINTERFACENAME, OPTION_LOCALINTERFACENAME, OPTION_REMOTEINTERFACENAME`

Fields inherited from class org.apache.axis.providers.java.RPCProvider
`RPC_INVOCATION`

Fields inherited from class org.apache.axis.providers.java.JavaProvider
`OPTION_ALLOWEDMETHODS, OPTION_CLASSNAME, OPTION_CLASSPATH, OPTION_IS_STATIC, OPTION_SCOPE, OPTION_WSDL_INPUTSCHEMA, OPTION_WSDL_PORTTYPE, OPTION_WSDL_SERVICEELEMENT, OPTION_WSDL_SERVICEPORT, OPTION_WSDL_TARGETNAMESPACE`

Fields inherited from class org.apache.axis.handlers.BasicHandler
`makeLockable, name, options`

Constructor Summary
`EJBProvider()` Creates new EJBProvider

Method Summary
`void` | `generateWSDL(org.apache.axis.MessageContext msgContext)` Generate the WSDL for this service.
`protected Method` | `getEJBCreateMethod(String jndiName)` access home factory via jndi if reference is not yet cached
`protected Object` | `getEJBHome(String jndiName)` access home factory via jndi if reference is not yet cached
`protected Class` | `getServiceClass(String beanJndiName, org.apache.axis.handlers.soap.SOAPService service, org.apache.axis.MessageContext msgContext)` Return the class name of the service, note that this could be called outside the correct chain, e.g., by the url mapper.
`void` | `initServiceDesc(org.apache.axis.handlers.soap.SOAPService service, org.apache.axis.MessageContext msgContext)`
`protected Object` | `makeNewServiceObject(org.apache.axis.MessageContext msgContext, String clsName)` Return the object which implements the service lifecycle.
`void` | `processMessage(org.apache.axis.MessageContext msgContext, org.apache.axis.message.SOAPEnvelopeAxisImpl reqEnv, org.apache.axis.message.SOAPEnvelopeAxisImpl resEnv, Object obj)` Override processMessage of super class in order to unpack the service object from the lifecycle

Methods inherited from class org.apache.axis.providers.java.EJBProvider
`getCachedContext, getContext, getEJBHome, getServiceClassNameOptionName, getStrOption`

Methods inherited from class org.apache.axis.providers.java.RPCProvider
`checkMethodName, createRPCInvocation, invokeMethod, invokeTarget`

Methods inherited from class org.apache.axis.providers.java.JavaProvider
`getServiceClassName, getServiceObject, invoke, processException`

Methods inherited from class org.apache.axis.providers.BasicProvider
`addOperation, 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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### remoteClass

    protected Class remoteClass

  the real remote class we are shielding

### ejbHome

    protected Object ejbHome

  we are caching the home for perfomance purposes

### ejbCreateMethod

    protected Method ejbCreateMethod

  we are caching the create method for perfomance purposes

Constructor Detail

### EJBProvider

    public EJBProvider()

  Creates new EJBProvider

Method Detail

### getEJBHome

    protected Object getEJBHome(String jndiName)
                         throws NamingException

  access home factory via jndi if reference is not yet cached

  Throws:
    `NamingException`

### getEJBCreateMethod

    protected Method getEJBCreateMethod(String jndiName)
                                 throws NamingException,
                                        NoSuchMethodException

  access home factory via jndi if reference is not yet cached

  Throws:
    `NamingException`
    `NoSuchMethodException`

### makeNewServiceObject

    protected Object makeNewServiceObject(org.apache.axis.MessageContext msgContext,
                                          String clsName)
                                   throws Exception

  Return the object which implements the service lifecycle. Makes the usual lookup->create call w/o the PortableRemoteDaDaDa for the sake of Corba.

  Parameters:
    `msgContext` - the message context
    `clsName` - The JNDI name of the EJB home class
  Returns:
    an object that implements the service
  Throws:
    `Exception`

### getServiceClass

    protected Class getServiceClass(String beanJndiName,
                                    org.apache.axis.handlers.soap.SOAPService service,
                                    org.apache.axis.MessageContext msgContext)
                             throws org.apache.axis.AxisFault

  Return the class name of the service, note that this could be called outside the correct chain, e.g., by the url mapper. Hence we need to find the right classloader.

  Throws:
    `org.apache.axis.AxisFault`

### generateWSDL

    public void generateWSDL(org.apache.axis.MessageContext msgContext)
                      throws org.apache.axis.AxisFault

  Generate the WSDL for this service. We need to rearrange the classloader stuff for that purpose similar as we did with the service class interface

  Throws:
    `org.apache.axis.AxisFault`

### processMessage

    public void processMessage(org.apache.axis.MessageContext msgContext,
                               org.apache.axis.message.SOAPEnvelopeAxisImpl reqEnv,
                               org.apache.axis.message.SOAPEnvelopeAxisImpl resEnv,
                               Object obj)
                        throws Exception

  Override processMessage of super class in order to unpack the service object from the lifecycle

  Throws:
    `Exception`

### initServiceDesc

    public void initServiceDesc(org.apache.axis.handlers.soap.SOAPService service,
                                org.apache.axis.MessageContext msgContext)
                         throws org.apache.axis.AxisFault

  Throws:
    `org.apache.axis.AxisFault`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.