com.ibm.redback.redbeansejb
Class RedBeansSFEJB

java.lang.Object
  |
  +--com.ibm.redback.redbeansejb.RedBeansEJB
        |
        +--com.ibm.redback.redbeansejb.RedBeansSFEJB

public class RedBeansSFEJB
extends RedBeansEJB

Class that provides main behaviour for stateful session beans. Client state is stored in this class and each instance is specific to the client that created it.


Field Summary
protected  java.lang.String objName
           
protected  RBState ourState
           
protected  java.lang.String URL
           
 
Fields inherited from class com.ibm.redback.redbeansejb.RedBeansEJB
sc
 
Constructor Summary
RedBeansSFEJB()
           
 
Method Summary
 void callMethod(java.lang.String methodName)
          Calls an RBO method on the RBO Server.
 void createObj()
          Called when the client wants to create the RBO instance.
 void ejbCreate(java.lang.String objName, java.lang.String URL)
          Called when the Home Interface create the Session Bean, by passing in Object Name and URL, the Session Bean becomes stateful
 void ejbCreate(java.lang.String objName, java.lang.String URL, java.lang.String sessionId)
          Called when the Home Interface create the Session Bean, by passing in Object Name and URL, the Session Bean becomes stateful
 java.lang.String getProperty(java.lang.String name)
           
 RecordSet getRecordSet()
           
 void setProperty(java.lang.String name, java.lang.String value)
          Sets a property with a given value for the current state.
 
Methods inherited from class com.ibm.redback.redbeansejb.RedBeansEJB
callMethod, createObj, createObj, ejbActivate, ejbPassivate, ejbRemove, getProperty, getRecordSet, getSessionContext, setProperty, setRecordSet, setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objName

protected java.lang.String objName

URL

protected java.lang.String URL

ourState

protected RBState ourState
Constructor Detail

RedBeansSFEJB

public RedBeansSFEJB()
Method Detail

ejbCreate

public void ejbCreate(java.lang.String objName,
                      java.lang.String URL)
Called when the Home Interface create the Session Bean, by passing in Object Name and URL, the Session Bean becomes stateful
Parameters:
objName - the RBO name for this Session Bean
URL - the URL for the RBO Server

ejbCreate

public void ejbCreate(java.lang.String objName,
                      java.lang.String URL,
                      java.lang.String sessionId)
Called when the Home Interface create the Session Bean, by passing in Object Name and URL, the Session Bean becomes stateful
Parameters:
objName - the RBO name for this Session Bean
URL - the URL for the RBO Server
sessionId - the current sessionId to be applied to all calls

createObj

public void createObj()
               throws RbException
Called when the client wants to create the RBO instance. Will create the RedObject and do all initialisation required

getProperty

public java.lang.String getProperty(java.lang.String name)
                             throws RbException
Parameters:
name - the property name
Throws:
RbException - thrown if the property name cannot be found

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
                 throws RbException
Sets a property with a given value for the current state. The value is set in the client state and will not update the RBO Server state until a CallMethod is invoked
Parameters:
name - the property name
value - the value to set
Throws:
RbException - thrown if the property name cannot be found

callMethod

public void callMethod(java.lang.String methodName)
                throws RbException
Calls an RBO method on the RBO Server. All current Session Bean state will be passed to the RBO Server and state on the RBO Server will be updated.
Parameters:
methodName - the RBO method to call
Throws:
RbException - thrown if the RedObject returns an exception or if the client state is not valid

getRecordSet

public RecordSet getRecordSet()