All Examples All EJB Examples This Package
Class examples.ejb.subclass.parent.ParentBean
java.lang.Object
|
+----examples.ejb.subclass.parent.ParentBean
- public class ParentBean
- extends Object
- implements SessionBean
ParentBean is a stateless SessionBean. This bean illustrates:
- Parent class to the ChildBean subclass
- Contains methods that are inherited and overloaded
in the Child bean
- Note the use of protected instead of private variables
so that the Child bean can inherit them
- Author:
- Copyright (c) 1998 by WebLogic, Inc. All Rights Reserved.
- Copyright (c) 1998-1999 by BEA WebXpress. All Rights Reserved.
-
ctx
-
-
props
-
-
ParentBean()
-
-
ejbActivate()
- This method is required by the EJB Specification,
but is not used by this example.
-
ejbCreate()
- This method corresponds to the create method in the home interface
"ParentHome".
-
ejbPassivate()
- This method is required by the EJB Specification,
but is not used by this example.
-
ejbRemove()
- This method is required by the EJB Specification,
but is not used by this example.
-
parentMethodOnly()
- Sends back a pre-defined message identifying the method.
-
parentSaysHello()
- Sends back a pre-defined message identifying the method.
-
setSessionContext(SessionContext)
- Sets the session context.
ctx
protected transient SessionContext ctx
props
protected transient Properties props
ParentBean
public ParentBean()
ejbActivate
public void ejbActivate()
- This method is required by the EJB Specification,
but is not used by this example.
ejbRemove
public void ejbRemove()
- This method is required by the EJB Specification,
but is not used by this example.
ejbPassivate
public void ejbPassivate()
- This method is required by the EJB Specification,
but is not used by this example.
setSessionContext
public void setSessionContext(SessionContext ctx)
- Sets the session context.
- Parameters:
- ctx - SessionContext Context for session
ejbCreate
public void ejbCreate()
- 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().
- See Also:
- Parent
parentSaysHello
public 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 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
All Examples All EJB Examples This Package