All Examples All Cluster Examples This Example This Package
Interface examples.cluster.ejb.teller.Teller
- public interface Teller
- extends EJBObject
The methods in this interface are the public face of TellerBean.
The signatures of the methods are identical to those of the EJBean, except
that these methods throw a java.rmi.RemoteException.
Note that the EJBean does not implement this interface. The corresponding
code-generated EJBObject, TellerBeanE, implements this interface and
delegates to the bean.
- Author:
- Copyright (c) 1999 by BEA WebXpress, Inc. All Rights Reserved.
-
balance(String)
- Returns the balance of the account in a TellerResult object.
-
checkTransactionId(String)
- Returns true if the transaction with a given
id was completed (ie, the transaction ID can be found
in the transaction log table).
-
deposit(String, double, String)
- Deposits amount in specified account using a specific transactionID.
-
transfer(String, String, double, String)
- Transfers amount from accountFrom to accountTo using a specific transactionID.
-
withdraw(String, double, String)
- Withdraws amount from specified account using a specific transactionID.
balance
public abstract TellerResult balance(String accountId) throws TellerException, RemoteException
- Returns the balance of the account in a TellerResult object.
- Parameters:
- accountId - String Account ID
- Returns:
- TellerResult Result of inquiry
- Throws: TellerException
- if there is an error while checking the balance
- Throws: RemoteException
- if there is
a communications or systems failure
deposit
public abstract TellerResult deposit(String accountId,
double amount,
String transactionId) throws TellerException, RemoteException
- Deposits amount in specified account using a specific transactionID.
- Parameters:
- accountId - String Account ID
- amount - double Amount to deposit
- transactionId - String Transaction ID
- Returns:
- TellerResult Result of inquiry
- Throws: TellerException
- if there is an error while making the deposit
- Throws: RemoteException
- if there is
a communications or systems failure
withdraw
public abstract TellerResult withdraw(String accountId,
double amount,
String transactionId) throws TellerException, RemoteException
- Withdraws amount from specified account using a specific transactionID.
- Parameters:
- accountId - String Account ID
- amount - double Amount to withdraw
- transactionId - String Transaction ID
- Returns:
- TellerResult Result of inquiry
- Throws: TellerException
- if there is an error while making the withdrawal
- Throws: RemoteException
- if there is
a communications or systems failure
transfer
public abstract TellerResult transfer(String accountFromId,
String accountToId,
double amount,
String transactionId) throws TellerException, RemoteException
- Transfers amount from accountFrom to accountTo using a specific transactionID.
- Parameters:
- accountFrom - String Account ID of account taking amount from
- accountTo - String Account ID of account sending amount to
- amount - double Amount to transfer
- transactionId - String Transaction ID
- Returns:
- TellerResult Result of inquiry
- Throws: TellerException
- if there is an error while making the transfer
- Throws: RemoteException
- if there is
a communications or systems failure
checkTransactionId
public abstract boolean checkTransactionId(String transactionId) throws RemoteException
- Returns true if the transaction with a given
id was completed (ie, the transaction ID can be found
in the transaction log table).
Note that the code in this method is specific for Oracle
databases and would require adjustment for other databases.
- Parameters:
- transactionID - String Transaction ID
- Returns:
- boolean
- Throws: RemoteException
- if there is
a communications or systems failure
All Examples All Cluster Examples This Example This Package