WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

examples.webservices.basic.statelessSession
Class HelloWorldBean

java.lang.Object
  |
  +--examples.webservices.basic.statelessSession.HelloWorldBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

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

HelloWorldBean is a stateless session EJB. It has a single method, sayHello(), that takes an integer and a String and returns a String.

The sayHello() method is the public operation of the Web service based on this EJB.

Author:
Copyright (c) 2002 by BEA Systems. All Rights Reserved.

Constructor Summary
HelloWorldBean()
           
 
Method Summary
 void ejbActivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbCreate()
          This method is required by the EJB Specification, but is not used by this example.
 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 sayHello(int num, java.lang.String s)
           
 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
 

Constructor Detail

HelloWorldBean

public HelloWorldBean()
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 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.
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

sayHello

public java.lang.String sayHello(int num,
                                 java.lang.String s)

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/docs70

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