Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » net » axis » server » [javadoc | source]
org.jboss.net.axis.server
public class: EJBProvider [javadoc | source]
java.lang.Object
   org.apache.axis.providers.java.EJBProvider
      org.jboss.net.axis.server.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.

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  Class remoteClass    the real remote class we are shielding 
protected  Object ejbHome    we are caching the home for perfomance purposes 
protected  Method ejbCreateMethod    we are caching the create method for perfomance purposes 
Constructor:
 public EJBProvider() 
Method from org.jboss.net.axis.server.EJBProvider Summary:
generateWSDL,   getEJBCreateMethod,   getEJBHome,   getServiceClass,   initServiceDesc,   makeNewServiceObject,   processMessage
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.net.axis.server.EJBProvider Detail:
 public  void generateWSDL(MessageContext msgContext) throws 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
 protected synchronized Method getEJBCreateMethod(String jndiName) throws NamingException, NoSuchMethodException 
    access home factory via jndi if reference is not yet cached
 protected synchronized Object getEJBHome(String jndiName) throws NamingException 
    access home factory via jndi if reference is not yet cached
 protected synchronized Class getServiceClass(String beanJndiName,
    SOAPService service,
    MessageContext msgContext) throws 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.
 public  void initServiceDesc(SOAPService service,
    MessageContext msgContext) throws AxisFault 
 protected Object makeNewServiceObject(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.
 public  void processMessage(MessageContext msgContext,
    SOAPEnvelope reqEnv,
    SOAPEnvelope resEnv,
    Object obj) throws Exception 
    Override processMessage of super class in order to unpack the service object from the lifecycle