FileDocCategorySizeDatePackage
BankBean21.javaAPI DocJBoss 4.2.15335Fri Jul 13 20:53:28 BST 2007org.jboss.ejb3.test.bank

BankBean21

public class BankBean21 extends Object implements javax.ejb.SessionBean
see
author
$Author: dimitris@jboss.org $
version
$Revision: 57207 $

Fields Summary
private static final Logger
log
public DataSource
customerDb
static final String
ID
String
id
String
customerId
static long
nextAccountId
static long
nextCustomerId
String
initialized
private String
activated
Constructors Summary
Methods Summary
public voidannotatedInit()

      initialized += "YES";
   
public java.lang.StringcreateAccountId(Customer customer)

      return getId() + "." + customer.getName() + "." + (nextAccountId++);
   
public java.lang.StringcreateCustomerId()

      return getId() + "." + (nextCustomerId++);
   
public voidejbActivate()

      activated += "_ACTIVATED";
   
public voidejbCreate()

      activated += "_CREATED";
   
public voidejbPassivate()

      
   
public voidejbRemove()

      
   
public java.lang.StringgetId()


     
   
      return id;
   
public voidinit()

      initialized += "YES";
   
public java.lang.StringinterceptCustomerId(java.lang.String customerId)

      return customerId;
   
public java.lang.StringisActivated()

      return activated;
   
public java.lang.StringisInitialized()

      return initialized;
   
public voidremove()

      
   
public java.lang.StringretrieveCustomerId()

      return customerId;
   
public voidsetSessionContext(javax.ejb.SessionContext context)

      
   
public voidstoreCustomerId(java.lang.String customerId)

      this.customerId = customerId;
   
public voidtestResource()

      if (customerDb == null) throw new Exception("customerDb resource not set");
      Connection connection = customerDb.getConnection();
      connection.close();