edu.rice.rubis.beans
Class SB_StoreBidBean

java.lang.Object
  |
  +--edu.rice.rubis.beans.SB_StoreBidBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

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

This is a stateless session bean used to create e new bid.

Version:
1.1
Author:
Emmanuel Cecchet and Julie Marguerite
See Also:
Serialized Form

Field Summary
protected  javax.sql.DataSource dataSource
           
protected  javax.naming.Context initialContext
           
protected  javax.ejb.SessionContext sessionContext
           
 
Constructor Summary
SB_StoreBidBean()
           
 
Method Summary
 void createBid(java.lang.Integer userId, java.lang.Integer itemId, float bid, float maxBid, int qty)
          Create a new bid and update the number of bids and maxBid on the item.
 void ejbActivate()
          This method is empty for a stateless session bean
 void ejbCreate()
          This method is empty for a stateless session bean
 void ejbPassivate()
          This method is empty for a stateless session bean
 void ejbRemove()
          This method is empty for a stateless session bean
 void setSessionContext(javax.ejb.SessionContext sessionContext)
          Sets the associated session context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionContext

protected javax.ejb.SessionContext sessionContext

initialContext

protected javax.naming.Context initialContext

dataSource

protected javax.sql.DataSource dataSource
Constructor Detail

SB_StoreBidBean

public SB_StoreBidBean()
Method Detail

createBid

public void createBid(java.lang.Integer userId,
                      java.lang.Integer itemId,
                      float bid,
                      float maxBid,
                      int qty)
               throws java.rmi.RemoteException
Create a new bid and update the number of bids and maxBid on the item.
Parameters:
userId - id of the user posting the bid
itemId - id of the item related to the bid
bid - value of the bid
maxBid - maximun bid
qty - number of items
Since:
1.1

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException,
                      java.rmi.RemoteException
This method is empty for a stateless session bean

ejbActivate

public void ejbActivate()
                 throws java.rmi.RemoteException
This method is empty for a stateless session bean
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
                  throws java.rmi.RemoteException
This method is empty for a stateless session bean
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
               throws java.rmi.RemoteException
This method is empty for a stateless session bean
Specified by:
ejbRemove in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
                       throws java.rmi.RemoteException
Sets the associated session context. The container calls this method after the instance creation. This method is called with no transaction context. We also retrieve the Home interfaces of all RUBiS's beans.
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
sessionContext - - A SessionContext interface for the instance.
Throws:
java.rmi.RemoteException - - Thrown if the instance could not perform the function requested by the container because of a system-level error.


Copyright © 2003 - ObjectWeb Consortium - All Rights Reserved.