org.objectweb.jonas_ejb.container
Class JServiceEndpoint

java.lang.Object
  extended by javax.rmi.PortableRemoteObject
      extended by org.objectweb.jonas_ejb.container.JServiceEndpoint
All Implemented Interfaces:
java.rmi.Remote, javax.xml.rpc.server.ServiceLifecycle

public class JServiceEndpoint
extends javax.rmi.PortableRemoteObject
implements java.rmi.Remote, javax.xml.rpc.server.ServiceLifecycle

Implementation of the Service Endpoint Interface. The lifeCycle of this object is managed by the JOnASEJBProvider. Although this object implements Remote, it is accessed locally today.

Author:
Guillaume Sauthier, Philippe Durieux

Field Summary
protected  JStatelessFactory bf
          bean factory
protected  JSessionSwitch bs
          switch instance to use
protected static org.objectweb.util.monolog.api.Logger logger
          Logger, used also in the generated part.
 
Constructor Summary
JServiceEndpoint(JStatelessFactory sf)
           
 
Method Summary
 void checkSecurity(EJBInvocation ejbInv)
          Check if the access to the bean is authorized
 void destroy()
          remove the bean instance.
 javax.xml.rpc.handler.MessageContext getMessageContext()
          Get the messageContext
 void init(java.lang.Object arg0)
          Nothing to do here.
 void postInvoke(RequestCtx rctx)
          postInvoke is called after any request.
 RequestCtx preInvoke(int txa)
          preInvoke is called before any request.
 void setMessageContext(javax.xml.rpc.handler.MessageContext msgctx)
          Set the MessageContext in the StatelessContext
 void setSessionSwitch(JSessionSwitch bs)
          finish initialization
 
Methods inherited from class javax.rmi.PortableRemoteObject
connect, exportObject, narrow, toStub, unexportObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.objectweb.util.monolog.api.Logger logger
Logger, used also in the generated part.


bs

protected JSessionSwitch bs
switch instance to use


bf

protected JStatelessFactory bf
bean factory

Constructor Detail

JServiceEndpoint

public JServiceEndpoint(JStatelessFactory sf)
                 throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
Method Detail

setMessageContext

public void setMessageContext(javax.xml.rpc.handler.MessageContext msgctx)
Set the MessageContext in the StatelessContext

Parameters:
msgctx - Axis MessageContext

getMessageContext

public javax.xml.rpc.handler.MessageContext getMessageContext()
Get the messageContext

Parameters:
mc - JAX-RPC MessageContext

setSessionSwitch

public void setSessionSwitch(JSessionSwitch bs)
finish initialization

Parameters:
bs - The Session Switch

preInvoke

public RequestCtx preInvoke(int txa)
                     throws java.rmi.RemoteException
preInvoke is called before any request.

Parameters:
txa - Transaction Attribute (Supports, Required, ...)
Returns:
A RequestCtx object
Throws:
java.rmi.RemoteException - preInvoke fail

checkSecurity

public void checkSecurity(EJBInvocation ejbInv)
Check if the access to the bean is authorized

Parameters:
ejbInv - object containing security signature of the method, args of method, etc

postInvoke

public void postInvoke(RequestCtx rctx)
                throws java.rmi.RemoteException
postInvoke is called after any request.

Parameters:
rctx - The RequestCtx that was returned at preInvoke()
Throws:
java.rmi.RemoteException - postInvoke fail

init

public void init(java.lang.Object arg0)
          throws javax.xml.rpc.ServiceException
Nothing to do here.

Specified by:
init in interface javax.xml.rpc.server.ServiceLifecycle
Throws:
javax.xml.rpc.ServiceException

destroy

public void destroy()
remove the bean instance.

Specified by:
destroy in interface javax.xml.rpc.server.ServiceLifecycle