org.jboss.test.banknew.ejb
Class AccountSessionBean

java.lang.Object
  extended byorg.jboss.test.util.ejb.EnterpriseSupport (src) 
      extended byorg.jboss.test.util.ejb.SessionSupport (src) 
          extended byorg.jboss.test.banknew.ejb.AccountSessionBean
All Implemented Interfaces:
EnterpriseBean (src) , java.io.Serializable, SessionBean (src)

public class AccountSessionBean
extends SessionSupport (src)

The Session bean represents the account's business interface

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.test.util.ejb.SessionSupport (src)
log, sessionCtx
 
Constructor Summary
AccountSessionBean()
           
 
Method Summary
 AccountData createAccount(java.lang.String pCustomerId, int pType, float pInitialDeposit)
           
 void deposit(java.lang.String pAccountId, float pAmount)
           
 AccountData getAccount(java.lang.String pAccountId)
           
 AccountData getAccount(java.lang.String pCustomerId, int pType)
           
 java.util.Collection getAccounts(java.lang.String pCustomerId)
           
 java.util.Collection getTransactions(java.lang.String pAccountId)
           
 void removeAccount(java.lang.String pAccountId)
           
 void removeAccount(java.lang.String pCustomerId, int pType)
           
 void removeTransactions(java.lang.String pAccountId)
           
 void setSessionContext(SessionContext (src)  context)
          Set the associated session context.
 void transfer(java.lang.String pFromAccountId, java.lang.String pToAccountId, float pAmount)
           
 void withdraw(java.lang.String pAccountId, float pAmount)
           
 
Methods inherited from class org.jboss.test.util.ejb.SessionSupport (src)
ejbActivate, ejbCreate, ejbPassivate, ejbRemove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountSessionBean

public AccountSessionBean()
Method Detail

getAccount

public AccountData getAccount(java.lang.String pAccountId)
                       throws FinderException (src) ,
                              java.rmi.RemoteException
Throws:
FinderException (src)
java.rmi.RemoteException

getAccount

public AccountData getAccount(java.lang.String pCustomerId,
                              int pType)
                       throws FinderException (src) ,
                              java.rmi.RemoteException
Throws:
FinderException (src)
java.rmi.RemoteException

getAccounts

public java.util.Collection getAccounts(java.lang.String pCustomerId)
                                 throws FinderException (src) ,
                                        java.rmi.RemoteException
Throws:
FinderException (src)
java.rmi.RemoteException

getTransactions

public java.util.Collection getTransactions(java.lang.String pAccountId)
                                     throws FinderException (src) ,
                                            java.rmi.RemoteException
Throws:
FinderException (src)
java.rmi.RemoteException

createAccount

public AccountData createAccount(java.lang.String pCustomerId,
                                 int pType,
                                 float pInitialDeposit)
                          throws CreateException (src) ,
                                 java.rmi.RemoteException
Throws:
CreateException (src)
java.rmi.RemoteException

removeAccount

public void removeAccount(java.lang.String pAccountId)
                   throws RemoveException (src) ,
                          java.rmi.RemoteException
Throws:
RemoveException (src)
java.rmi.RemoteException

removeAccount

public void removeAccount(java.lang.String pCustomerId,
                          int pType)
                   throws RemoveException (src) ,
                          java.rmi.RemoteException
Throws:
RemoveException (src)
java.rmi.RemoteException

removeTransactions

public void removeTransactions(java.lang.String pAccountId)
                        throws RemoveException (src) ,
                               java.rmi.RemoteException
Throws:
RemoveException (src)
java.rmi.RemoteException

deposit

public void deposit(java.lang.String pAccountId,
                    float pAmount)
             throws FinderException (src) ,
                    java.rmi.RemoteException
Throws:
FinderException (src)
java.rmi.RemoteException

withdraw

public void withdraw(java.lang.String pAccountId,
                     float pAmount)
              throws FinderException (src) ,
                     java.rmi.RemoteException
Throws:
FinderException (src)
java.rmi.RemoteException

transfer

public void transfer(java.lang.String pFromAccountId,
                     java.lang.String pToAccountId,
                     float pAmount)
              throws FinderException (src) ,
                     java.rmi.RemoteException
Throws:
FinderException (src)
java.rmi.RemoteException

setSessionContext

public void setSessionContext(SessionContext (src)  context)
Description copied from interface: SessionBean (src)

Set the associated session context. The container calls this method after the instance creation.

The enterprise Bean instance should store the reference to the context object in an instance variable.

This method is called with no transaction context.

Specified by:
setSessionContext in interface SessionBean (src)
Overrides:
setSessionContext in class SessionSupport (src)