WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.ejb.subclass
Class ParentBean

java.lang.Object
  |
  +--examples.ejb.subclass.ParentBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
Direct Known Subclasses:
ChildBean

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

ParentBean is a stateless SessionBean. This bean:

Author:
Copyright (c) 1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved.

Field Summary
protected  javax.ejb.SessionContext ctx
           
(package private) static boolean VERBOSE
           
 
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.
protected  void log(java.lang.String s)
           
 java.lang.String nonOverloadedMethod()
          Sends back a pre-defined message identifying the method.
 java.lang.String sayHello()
          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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctx

protected javax.ejb.SessionContext ctx

VERBOSE

static final boolean VERBOSE
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

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:
examples.ejb.subclass.parent.Parent

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

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

log

protected void log(java.lang.String s)

nonOverloadedMethod

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

sayHello

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

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

Documentation is available at
http://e-docs.bea.com/wls/docs60

Copyright © 2000 BEA Systems, Inc. All Rights Reserved.