WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.rmi_iiop.ejb.simplified_idl
Class MyBeanImpl

java.lang.Object
  |
  +--examples.rmi_iiop.ejb.simplified_idl.MyBeanImpl
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

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


Constructor Summary
MyBeanImpl()
           
 
Method Summary
 void buy(int shares)
          Buys shares of a stock for a named customer.
 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 "TraderHome.java".
 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.
 void sell(int shares)
          Sells shares of a stock for a named customer.
 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

MyBeanImpl

public MyBeanImpl()
Method Detail

buy

public void buy(int shares)
Buys shares of a stock for a named customer.
Parameters:
customerName - String Customer name
stockSymbol - String Stock symbol
shares - int Number of shares to buy
Returns:
TradeResult Trade Result if there is an error while buying the shares

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 "TraderHome.java". The parameter sets of the two methods are identical. When the client calls TraderHome.create(), the container allocates an instance of the EJBean and calls ejbCreate().
Throws:
javax.ejb.CreateException - if there is a communications or systems failure
See Also:
Trader

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

sell

public void sell(int shares)
Sells shares of a stock for a named customer.
Parameters:
customerName - String Customer name
stockSymbol - String Stock symbol
shares - int Number of shares to buy
Returns:
TradeResult Trade Result if there is an error while selling the shares

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.