com.sun.j2ee.blueprints.smarticket.ejb.ticketsales
Class TicketSalesEJB

java.lang.Object
  |
  +--com.sun.j2ee.blueprints.smarticket.ejb.ticketsales.TicketSalesEJB
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

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

Implements the TicketSales EJB component. Takes care of business methods and resource access.

See Also:
Serialized Form

Field Summary
protected  java.lang.String customerID
           
protected  javax.sql.DataSource dataSource
           
protected  java.util.Set seats
           
protected  int showID
           
protected static java.lang.String TICKETSALES_DB
           
 
Constructor Summary
TicketSalesEJB()
           
 
Method Summary
 boolean cancelSeats()
           
 boolean confirmSeats()
           
 void ejbActivate()
           
 void ejbCreate(java.lang.String c, int s)
           
 void ejbPassivate()
           
 void ejbRemove()
           
 SeatingPlan getSeatingPlan()
           
protected  void initDataSources()
           
 boolean reserveSeats(java.util.Set s)
           
 void setSessionContext(javax.ejb.SessionContext sc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TICKETSALES_DB

protected static final java.lang.String TICKETSALES_DB

dataSource

protected javax.sql.DataSource dataSource

customerID

protected java.lang.String customerID

showID

protected int showID

seats

protected java.util.Set seats
Constructor Detail

TicketSalesEJB

public TicketSalesEJB()
Method Detail

ejbCreate

public void ejbCreate(java.lang.String c,
                      int s)

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sc)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

initDataSources

protected void initDataSources()

getSeatingPlan

public SeatingPlan getSeatingPlan()

reserveSeats

public boolean reserveSeats(java.util.Set s)
                     throws UnavailableSeatsException

cancelSeats

public boolean cancelSeats()

confirmSeats

public boolean confirmSeats()


Copyright © 2002 Sun Microsystems Inc. All rights reserved.