samples.j2ee.ejb.subclass.parent
Class ParentBean

java.lang.Object
  |
  +--samples.j2ee.ejb.subclass.parent.ParentBean
Direct Known Subclasses:
ChildBean

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

ParentBean is a stateless SessionBean. This bean illustrates:

See Also:
Serialized Form

Constructor Summary
ParentBean()
           
 
Method Summary
 void ejbActivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbCreate()
          This method corresponds to the create method in the home interface "ParentHome".
 void ejbPassivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbRemove()
          This method is required by the EJB Specification, but is not used by this example.
 java.lang.String parentMethodOnly()
          Sends back a pre-defined message identifying the method.
 java.lang.String parentSaysHello()
          Sends back a pre-defined message identifying the method.
 void setSessionContext(javax.ejb.SessionContext ctx)
          Sets the session context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParentBean

public ParentBean()
Method Detail

ejbActivate

public void ejbActivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context.
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - SessionContext Context for session

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
This method corresponds to the create method in the home interface "ParentHome". The parameter sets of the two methods are identical. When the client calls ParentHome.create(), the container allocates an instance of the EJBean and calls ejbCreate().
Throws:
javax.ejb.CreateException - if there is a problem creating the bean
See Also:
Parent

parentSaysHello

public java.lang.String parentSaysHello()
Sends back a pre-defined message identifying the method. This method is inherited and overloaded by the Child bean.
Returns:
String Message

parentMethodOnly

public java.lang.String parentMethodOnly()
Sends back a pre-defined message identifying the method. This method is inherited but not overloaded by the Child bean.
Returns:
String Message