org.otfeed.j2ee.mdb
Class OtfeedMDB

java.lang.Object
  extended by org.otfeed.j2ee.mdb.OtfeedMDB
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.MessageDrivenBean, javax.jms.MessageListener, IMessageListener

public class OtfeedMDB
extends java.lang.Object
implements javax.ejb.MessageDrivenBean, javax.jms.MessageListener, IMessageListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.otfeed.support.alt.IMessageListener
IMessageListener.ISubscriber
 
Constructor Summary
OtfeedMDB()
           
 
Method Summary
 void ejbCreate()
           
 void ejbRemove()
           
 void onData(java.lang.Object data)
          Called on every data event received.
 void onInit(IMessageListener.ISubscriber subscriber)
          Called at bean initialization time.
 void onMessage(javax.jms.Message message)
           
 void onShutdown(OTError error)
          Can be called by resource adapter on a fatal connection error - no events may arrive after this error is fired.
 void setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OtfeedMDB

public OtfeedMDB()
Method Detail

ejbCreate

public void ejbCreate()

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException
Specified by:
ejbRemove in interface javax.ejb.MessageDrivenBean
Throws:
javax.ejb.EJBException

setMessageDrivenContext

public void setMessageDrivenContext(javax.ejb.MessageDrivenContext ctx)
                             throws javax.ejb.EJBException
Specified by:
setMessageDrivenContext in interface javax.ejb.MessageDrivenBean
Throws:
javax.ejb.EJBException

onInit

public void onInit(IMessageListener.ISubscriber subscriber)
Description copied from interface: IMessageListener
Called at bean initialization time. Bean implementer must specify subscription events by calling subscriber.subscribe() method (possibly multiple times).

Specified by:
onInit in interface IMessageListener
Parameters:
subscriber - callback from the resource adapter allowing bean to specify the desired subscription events.

onData

public void onData(java.lang.Object data)
Description copied from interface: IMessageListener
Called on every data event received.

Specified by:
onData in interface IMessageListener
Parameters:
data - data. Type depends on subscription types requested during onInit() call.

onShutdown

public void onShutdown(OTError error)
Description copied from interface: IMessageListener
Can be called by resource adapter on a fatal connection error - no events may arrive after this error is fired.

Specified by:
onShutdown in interface IMessageListener
Parameters:
error - describes the problem (like connection lost).

onMessage

public void onMessage(javax.jms.Message message)
Specified by:
onMessage in interface javax.jms.MessageListener


Copyright © 2007-2008 Mike Kroutikov. All Rights Reserved.