IBM WebSphere Application ServerTM
Release 8

com.ibm.websphere.sib.mediation.handler.ejb
Class GenericEJBMediationHandlerBean

java.lang.Object
  extended by com.ibm.websphere.sib.mediation.handler.ejb.GenericEJBMediationHandlerBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class GenericEJBMediationHandlerBean
extends java.lang.Object
implements javax.ejb.SessionBean

Implementation of a generic Stateless Session EJB which queries its deployment descriptor. The values retrieved from the deployment are:

This EJB dynamically instantiates an instance of the MediationHandler class specified in the deployment descriptor. If any properties which exist on the MediationHandler instance are specified in the deployment descriptor then those properties are set using the value(s) specified.

For instance, if the DD has:

    <env-entry>
      <description>foo property </description>
      <env-entry-name>foo</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>"aValue"</env-entry-value>
    </env-entry>
 

then the property foo will be set by invoking setFoo(String) on the MediationHandler instance.

Security related checks are performed based on information defined in the EJBs deployment descriptor. This information is specified in the tooling and can be modified at application installation time.

See Also:
Serialized Form

Constructor Summary
GenericEJBMediationHandlerBean()
           
 
Method Summary
 void ejbActivate()
          Activate this instance of the session bean
 void ejbCreate()
          Called on creation of an EJB instance.
 void ejbPassivate()
          Passivate this instance of the session bean
 void ejbRemove()
          Remove this instance of the session bean
 javax.ejb.SessionContext getSessionContext()
          Return the session context for this instance of the session bean
 boolean handle(javax.xml.rpc.handler.MessageContext messageContext)
          Handle a message context (by passing it to the mediation handler).
 void setSessionContext(javax.ejb.SessionContext ctx)
          Set the session context for this instance of the session bean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericEJBMediationHandlerBean

public GenericEJBMediationHandlerBean()
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Called on creation of an EJB instance. This will instantiate the MediationHandler specified in this EJB's deployment descriptor and set any properties as specified in the DD.

Throws:
javax.ejb.CreateException - if the MediationHandler instance could not be created or its properties could not be set.

handle

public boolean handle(javax.xml.rpc.handler.MessageContext messageContext)
               throws MessageContextException
Handle a message context (by passing it to the mediation handler).

Parameters:
messageContext - The message context to be handled
Returns:
boolean The result of the mediation handler
Throws:
MessageContextException - is thrown if the mediation handler throws it
See Also:
MediationHandler.handle(MessageContext)

getSessionContext

public javax.ejb.SessionContext getSessionContext()
Return the session context for this instance of the session bean

Returns:
javax.ejb.SessionContext The session context

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
Set the session context for this instance of the session bean

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - The session context

ejbActivate

public void ejbActivate()
Activate this instance of the session bean

Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Passivate this instance of the session bean

Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Remove this instance of the session bean

Specified by:
ejbRemove in interface javax.ejb.SessionBean

IBM WebSphere Application ServerTM
Release 8