edu.rice.rubis.beans
Class SB_BuyNowBean
java.lang.Object
|
+--edu.rice.rubis.beans.SB_BuyNowBean
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
- public class SB_BuyNowBean
- extends java.lang.Object
- implements javax.ejb.SessionBean
This is a stateless session bean used to build the html form to buy an item.
- Version:
- 1.1
- Author:
- Emmanuel Cecchet and Julie Marguerite
- See Also:
- Serialized Form
Method Summary |
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 |
java.lang.String |
getBuyNowForm(java.lang.Integer itemId,
java.lang.String username,
java.lang.String password)
Authenticate the user and get the information to build the html form. |
java.lang.String |
printItemDescriptionToBuyNow(int itemId,
java.lang.String itemName,
java.lang.String description,
float buyNow,
int quantity,
int sellerId,
java.lang.String sellerName,
java.lang.String startDate,
java.lang.String endDate,
int userId)
Display item information for the Buy Now servlet |
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 |
sessionContext
protected javax.ejb.SessionContext sessionContext
initialContext
protected javax.naming.Context initialContext
dataSource
protected javax.sql.DataSource dataSource
SB_BuyNowBean
public SB_BuyNowBean()
getBuyNowForm
public java.lang.String getBuyNowForm(java.lang.Integer itemId,
java.lang.String username,
java.lang.String password)
throws java.rmi.RemoteException
- Authenticate the user and get the information to build the html form.
- Returns:
- a string in html format
- Since:
- 1.1
printItemDescriptionToBuyNow
public java.lang.String printItemDescriptionToBuyNow(int itemId,
java.lang.String itemName,
java.lang.String description,
float buyNow,
int quantity,
int sellerId,
java.lang.String sellerName,
java.lang.String startDate,
java.lang.String endDate,
int userId)
throws java.rmi.RemoteException
- Display item information for the Buy Now servlet
- Returns:
- a
String
containing HTML code - Throws:
java.rmi.RemoteException
- if an error occurs- Since:
- 1.0
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.