From: Francisco R. <rev...@us...> - 2002-05-27 22:41:51
|
User: reverbel Date: 02/05/27 15:41:49 Modified: src/main/org/jboss/test/bankiiop/test BankStressTestCase.java Log: Making the bankiiop test work with the multiple invokers code: - The test client uses the CosNaming jndi provider. - Beans use ejb-refs to find each other. - These refs are properly set up for IIOP (in jboss.xml). Revision Changes Path 1.4 +16 -16 jbosstest/src/main/org/jboss/test/bankiiop/test/BankStressTestCase.java Index: BankStressTestCase.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/bankiiop/test/BankStressTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BankStressTestCase.java 18 May 2002 22:37:04 -0000 1.3 +++ BankStressTestCase.java 27 May 2002 22:41:49 -0000 1.4 @@ -24,7 +24,7 @@ * * @see <related> * @author Author: d_jencks among many others - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class BankStressTestCase extends JBossTestCase @@ -61,12 +61,12 @@ throws Exception { TellerHome home = (TellerHome)PortableRemoteObject.narrow( - new InitialContext().lookup(TellerHome.JNDI_NAME), + getInitialContext().lookup(TellerHome.JNDI_NAME), TellerHome.class); Teller teller = home.create(); BankHome bankHome = (BankHome)PortableRemoteObject.narrow( - new InitialContext().lookup(BankHome.JNDI_NAME), + getInitialContext().lookup(BankHome.JNDI_NAME), BankHome.class); Bank bank = bankHome.create(); @@ -93,7 +93,7 @@ getLog().debug("Show balance"); AccountHome accountHome = (AccountHome)PortableRemoteObject.narrow( - new InitialContext().lookup(AccountHome.JNDI_NAME), + getInitialContext().lookup(AccountHome.JNDI_NAME), AccountHome.class); Collection accts = accountHome.findAll(); Iterator enum = accts.iterator(); @@ -114,7 +114,7 @@ { getLog().debug("Get code"); BankHome bankHome = (BankHome)PortableRemoteObject.narrow( - new InitialContext().lookup(BankHome.JNDI_NAME), + getInitialContext().lookup(BankHome.JNDI_NAME), BankHome.class); Bank bank = bankHome.create(); @@ -129,7 +129,7 @@ getLog().debug("Customer test----------------------------------"); getLog().debug("Create Customer"); - CustomerHome customerHome = (CustomerHome)new InitialContext().lookup("Customer"); + CustomerHome customerHome = (CustomerHome)getInitialContext().lookup("Customer"); Account from, to; try { @@ -153,7 +153,7 @@ getLog().debug(to.getPrimaryKey()+":"+to.getBalance()); getLog().debug("Transfer money"); - TellerHome home = (TellerHome)new InitialContext().lookup("Teller"); + TellerHome home = (TellerHome)getInitialContext().lookup("Teller"); Teller teller = home.create(); long start = System.currentTimeMillis(); @@ -177,7 +177,7 @@ throws Exception { TellerHome home = (TellerHome)PortableRemoteObject.narrow( - new InitialContext().lookup(TellerHome.JNDI_NAME), + getInitialContext().lookup(TellerHome.JNDI_NAME), TellerHome.class); final Teller teller = home.create(); @@ -258,7 +258,7 @@ throws Exception { TellerHome home = (TellerHome)PortableRemoteObject.narrow( - new InitialContext().lookup(TellerHome.JNDI_NAME), + getInitialContext().lookup(TellerHome.JNDI_NAME), TellerHome.class); final Teller teller = home.create(); @@ -335,7 +335,7 @@ throws Exception { TellerHome home = (TellerHome)PortableRemoteObject.narrow( - new InitialContext().lookup(TellerHome.JNDI_NAME), + getInitialContext().lookup(TellerHome.JNDI_NAME), TellerHome.class); Teller teller = home.create(); @@ -370,7 +370,7 @@ { TellerHome home = (TellerHome)PortableRemoteObject.narrow( - new InitialContext().lookup(TellerHome.JNDI_NAME), + getInitialContext().lookup(TellerHome.JNDI_NAME), TellerHome.class); Teller teller = home.create(); @@ -408,7 +408,7 @@ { TellerHome home = (TellerHome)PortableRemoteObject.narrow( - new InitialContext().lookup(TellerHome.JNDI_NAME), + getInitialContext().lookup(TellerHome.JNDI_NAME), TellerHome.class); Teller teller = home.create(); @@ -446,7 +446,7 @@ // Create a bunch of customers, to test passivation CustomerHome home = (CustomerHome)PortableRemoteObject.narrow( - new InitialContext().lookup(CustomerHome.JNDI_NAME), + getInitialContext().lookup(CustomerHome.JNDI_NAME), CustomerHome.class); getLog().info("Create customers"); @@ -463,7 +463,7 @@ //create some accounts testPassivation(); AccountHome home = (AccountHome)PortableRemoteObject.narrow( - new InitialContext().lookup(AccountHome.JNDI_NAME), + getInitialContext().lookup(AccountHome.JNDI_NAME), AccountHome.class); getLog().info("Get large accounts"); @@ -484,7 +484,7 @@ getLog().info("Remove accounts"); { AccountHome home = (AccountHome)PortableRemoteObject.narrow( - new InitialContext().lookup(AccountHome.JNDI_NAME), + getInitialContext().lookup(AccountHome.JNDI_NAME), AccountHome.class); Collection accounts = home.findAll(); Iterator enum = accounts.iterator(); @@ -499,7 +499,7 @@ getLog().info("Remove customers"); { CustomerHome home = (CustomerHome)PortableRemoteObject.narrow( - new InitialContext().lookup(CustomerHome.JNDI_NAME), + getInitialContext().lookup(CustomerHome.JNDI_NAME), CustomerHome.class); Collection customers = home.findAll(); Iterator enum = customers.iterator(); |