User: reverbel
Date: 02/03/15 14:36:29
Added: src/main/org/jboss/test/bankiiop/interfaces Account.java
AccountData.java AccountHome.java Bank.java
BankException.java BankHome.java Customer.java
CustomerHome.java CustomerPK.java Teller.java
TellerHome.java
Log:
Initial version of the bank test for JBoss/IIOP.
Revision Changes Path
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/Account.java
Index: Account.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.rmi.*;
import javax.ejb.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public interface Account
extends EJBObject
{
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public void deposit(float amount)
throws RemoteException;
public void withdraw(float amount)
throws RemoteException;
public float getBalance()
throws RemoteException;
public Customer getOwner()
throws RemoteException;
public void setData(AccountData data)
throws RemoteException;
public AccountData getData()
throws RemoteException;
}
/*
* $Id: Account.java,v 1.1 2002/03/15 22:36:28 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: Account.java,v $
* Revision 1.1 2002/03/15 22:36:28 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.2 2001/01/07 23:14:35 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/AccountData.java
Index: AccountData.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public class AccountData
implements java.io.Serializable
{
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
public String id;
public float balance;
public Customer owner;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public float getBalance()
{
return balance;
}
public void setBalance(float balance)
{
this.balance = balance;
}
public Customer getOwner()
{
return owner;
}
public void setOwner(Customer owner)
{
this.owner = owner;
}
}
/*
* $Id: AccountData.java,v 1.1 2002/03/15 22:36:28 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: AccountData.java,v $
* Revision 1.1 2002/03/15 22:36:28 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.2 2001/01/07 23:14:35 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/AccountHome.java
Index: AccountHome.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.util.*;
import java.rmi.*;
import javax.ejb.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public interface AccountHome
extends EJBHome
{
// Constants -----------------------------------------------------
public static final String COMP_NAME = "java:comp/env/ejb/Account";
public static final String JNDI_NAME = "bank/Account";
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public Account create(AccountData data)
throws RemoteException, CreateException;
public Account findByPrimaryKey(String id)
throws RemoteException, FinderException;
public Collection findAll()
throws RemoteException, FinderException;
public Collection findByOwner(Customer owner)
throws RemoteException, FinderException;
public Collection findLargeAccounts(int balance)
throws RemoteException, FinderException;
}
/*
* $Id: AccountHome.java,v 1.1 2002/03/15 22:36:28 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: AccountHome.java,v $
* Revision 1.1 2002/03/15 22:36:28 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.3 2001/01/20 16:32:52 osh
* More cleanup to avoid verifier warnings.
*
* Revision 1.2 2001/01/07 23:14:35 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1 jbosstest/src/main/org/jboss/test/bankiiop/interfaces/Bank.java
Index: Bank.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.rmi.*;
import javax.ejb.*;
import javax.naming.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public interface Bank
extends EJBObject
{
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public String getId()
throws RemoteException;
public String createAccountId(Customer customer)
throws RemoteException;
public String createCustomerId()
throws RemoteException;
}
/*
* $Id: Bank.java,v 1.1 2002/03/15 22:36:28 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: Bank.java,v $
* Revision 1.1 2002/03/15 22:36:28 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.2 2001/01/07 23:14:35 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/BankException.java
Index: BankException.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.rmi.*;
import javax.ejb.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public class BankException
extends Exception
{
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
Exception cause;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public BankException(String message)
{
super(message);
}
public BankException(String message, Exception e)
{
super(message);
cause = e;
}
// Public --------------------------------------------------------
public Throwable getCause() { return cause; }
public String toString() { return super.toString()+", Cause:"+cause; }
}
/*
* $Id: BankException.java,v 1.1 2002/03/15 22:36:28 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: BankException.java,v $
* Revision 1.1 2002/03/15 22:36:28 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.3 2001/12/04 18:36:47 boissier
* * In JDK 1.4, the Throwable interface has a new method:
* public Throwable getCause()
* This causes a conflict with the file BankException.java.
* This patch fixes that.
*
* Revision 1.2 2001/01/07 23:14:35 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/BankHome.java
Index: BankHome.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.rmi.*;
import javax.ejb.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public interface BankHome
extends EJBHome
{
// Constants -----------------------------------------------------
public static final String COMP_NAME = "java:comp/env/ejb/Bank";
public static final String JNDI_NAME = "bank/Bank";
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public Bank create()
throws RemoteException, CreateException;
}
/*
* $Id: BankHome.java,v 1.1 2002/03/15 22:36:29 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: BankHome.java,v $
* Revision 1.1 2002/03/15 22:36:29 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.3 2001/01/20 16:32:52 osh
* More cleanup to avoid verifier warnings.
*
* Revision 1.2 2001/01/07 23:14:35 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/Customer.java
Index: Customer.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.rmi.*;
import java.util.*;
import javax.ejb.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public interface Customer
extends EJBObject
{
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public String getName()
throws RemoteException;
public void setName(String name)
throws RemoteException;
public Collection getAccounts()
throws RemoteException;
public void addAccount(Account acct)
throws RemoteException;
public void removeAccount(Account acct)
throws RemoteException;
}
/*
* $Id: Customer.java,v 1.1 2002/03/15 22:36:29 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: Customer.java,v $
* Revision 1.1 2002/03/15 22:36:29 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.3 2001/01/07 23:14:36 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.2 2000/09/30 01:00:57 fleury
* Updated bank tests to work with new jBoss version
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/CustomerHome.java
Index: CustomerHome.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.util.*;
import java.rmi.*;
import javax.ejb.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public interface CustomerHome
extends EJBHome
{
// Constants -----------------------------------------------------
public static final String COMP_NAME = "java:comp/env/ejb/Customer";
public static final String JNDI_NAME = "bank/Customer";
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public Customer create(String id, String name)
throws RemoteException, CreateException;
public Customer findByPrimaryKey(CustomerPK pk)
throws RemoteException, FinderException;
public Collection findAll()
throws RemoteException, FinderException;
}
/*
* $Id: CustomerHome.java,v 1.1 2002/03/15 22:36:29 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: CustomerHome.java,v $
* Revision 1.1 2002/03/15 22:36:29 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.3 2001/01/20 16:32:52 osh
* More cleanup to avoid verifier warnings.
*
* Revision 1.2 2001/01/07 23:14:36 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/CustomerPK.java
Index: CustomerPK.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public class CustomerPK
implements java.io.Serializable
{
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
public String id;
public String name;
// Public --------------------------------------------------------
public boolean equals(Object pk)
{
return ((CustomerPK)pk).id.equals(id) && ((CustomerPK)pk).name.equals(name);
}
public int hashCode()
{
return id.hashCode();
}
public String toString()
{
return "Customer:"+id+"/"+name;
}
}
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/Teller.java
Index: Teller.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.rmi.*;
import javax.ejb.*;
import javax.naming.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public interface Teller
extends EJBObject
{
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public void transfer(Account from, Account to, float amount)
throws RemoteException, BankException;
public Account createAccount(Customer customer, float balance)
throws RemoteException, BankException;
public Account getAccount(Customer customer, float balance)
throws RemoteException, BankException;
public Customer getCustomer(String name)
throws RemoteException, BankException;
public void transferTest(Account from, Account to, float amount, int iter)
throws java.rmi.RemoteException, BankException;
}
/*
* $Id: Teller.java,v 1.1 2002/03/15 22:36:29 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: Teller.java,v $
* Revision 1.1 2002/03/15 22:36:29 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.2 2001/01/07 23:14:36 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
1.1
jbosstest/src/main/org/jboss/test/bankiiop/interfaces/TellerHome.java
Index: TellerHome.java
===================================================================
/*
* Copyright 1999 by dreamBean Software,
* All rights reserved.
*/
package org.jboss.test.bankiiop.interfaces;
import java.rmi.*;
import javax.ejb.*;
/**
*
* @see <related>
* @author $Author: reverbel $
* @version $Revision: 1.1 $
*/
public interface TellerHome
extends EJBHome
{
// Constants -----------------------------------------------------
public static final String COMP_NAME = "java:comp/env/ejb/Teller";
public static final String JNDI_NAME = "bank/Teller";
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public Teller create()
throws RemoteException, CreateException;
}
/*
* $Id: TellerHome.java,v 1.1 2002/03/15 22:36:29 reverbel Exp $
* Currently locked by:$Locker: $
* Revision:
* $Log: TellerHome.java,v $
* Revision 1.1 2002/03/15 22:36:29 reverbel
* Initial version of the bank test for JBoss/IIOP.
*
* Revision 1.3 2001/01/20 16:32:52 osh
* More cleanup to avoid verifier warnings.
*
* Revision 1.2 2001/01/07 23:14:36 peter
* Trying to get JAAS to work within test suite.
*
* Revision 1.1.1.1 2000/06/21 15:52:38 oberg
* Initial import of jBoss test. This module contains CTS tests, some simple
examples, and small bean suites.
*
*
*
*/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development