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

Class GenericEJBMediationHandlerBean

  1. java.lang.Object
  2. extended bycom.ibm.websphere.sib.mediation.handler.ejb.GenericEJBMediationHandlerBean
All implemented interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

  1. public class GenericEJBMediationHandlerBean
  2. extends java.lang.Object
  3. 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

Constructor and Description
GenericEJBMediationHandlerBean()

Method Summary

Modifier and Type Method and Description
  1. void
ejbActivate()
Activate this instance of the session bean
  1. void
ejbCreate()
Called on creation of an EJB instance.
  1. void
ejbPassivate()
Passivate this instance of the session bean
  1. void
ejbRemove()
Remove this instance of the session bean
  1. javax.ejb.SessionContext
getSessionContext()
Return the session context for this instance of the session bean
  1. boolean
handle(javax.xml.rpc.handler.MessageContext messageContext)
Handle a message context (by passing it to the mediation handler).
  1. 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

  1. public GenericEJBMediationHandlerBean( )

Method Detail

ejbCreate

  1. public void ejbCreate()
  2. 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

  1. public boolean handle(javax.xml.rpc.handler.MessageContext messageContext)
  2. 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:

getSessionContext

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

setSessionContext

  1. 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

  1. public void ejbActivate()
Activate this instance of the session bean
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

  1. public void ejbPassivate()
Passivate this instance of the session bean
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbRemove

  1. public void ejbRemove()
Remove this instance of the session bean
Specified by:
ejbRemove in interface javax.ejb.SessionBean