|
WebLogic Server 6.1 Code Examples, BEA Systems, Inc. | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object | +--examples.iiop.ejb.stateless.server.wls.TraderBean
TraderBean is a stateless Session Bean. This bean illustrates:
| Constructor Summary | |
TraderBean()
|
|
| Method Summary | |
TradeResult |
buy(java.lang.String stockSymbol,
int shares)
Buys shares of a stock for a named customer. |
TradeResult |
buyRemote(java.lang.String stockSymbol,
int shares)
Buys shares of a stock for a named customer from a delegate bean. |
void |
createRemote()
Creates a remote instance of the Trader bean. |
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. |
TradeResult |
sell(java.lang.String stockSymbol,
int shares)
Sells shares of a stock for a named customer. |
TradeResult |
sellRemote(java.lang.String stockSymbol,
int shares)
Sells shares of a stock for a named customer from a delegate bean. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public TraderBean()
| Method Detail |
public TradeResult buy(java.lang.String stockSymbol,
int shares)
throws java.rmi.RemoteException
customerName - String Customer namestockSymbol - String Stock symbolshares - int Number of shares to buy
public TradeResult buyRemote(java.lang.String stockSymbol,
int shares)
throws java.rmi.RemoteException,
javax.ejb.CreateException
customerName - String Customer namestockSymbol - String Stock symbolshares - int Number of shares to buy
public void createRemote()
throws javax.ejb.CreateException
javax.ejb.CreateException - if there is
a communications or systems failureTraderpublic void ejbActivate()
ejbActivate in interface javax.ejb.SessionBean
public void ejbCreate()
throws javax.ejb.CreateException
TraderHome.create(), the container allocates an instance of
the EJBean and calls ejbCreate().javax.ejb.CreateException - if there is
a communications or systems failureTraderpublic void ejbPassivate()
ejbPassivate in interface javax.ejb.SessionBean
public void ejbRemove()
throws java.rmi.RemoteException
ejbRemove in interface javax.ejb.SessionBean
public TradeResult sell(java.lang.String stockSymbol,
int shares)
throws java.rmi.RemoteException
customerName - String Customer namestockSymbol - String Stock symbolshares - int Number of shares to buy
public TradeResult sellRemote(java.lang.String stockSymbol,
int shares)
throws java.rmi.RemoteException,
javax.ejb.CreateException
customerName - String Customer namestockSymbol - String Stock symbolshares - int Number of shares to buypublic void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext in interface javax.ejb.SessionBeanctx - SessionContext Context for session
|
Documentation is available at http://e-docs.bea.com/wls/docs61 |
|||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||