Examples of AccountPK


Examples of org.jboss.test.banknew.interfaces.AccountPK

    **/
   public AccountData getAccount( String pAccountId )
      throws FinderException, RemoteException
   {
      return getAccountHome().findByPrimaryKey(
         new AccountPK( pAccountId )
      ).getData();
   }
View Full Code Here

Examples of org.jboss.test.banknew.interfaces.AccountPK

   public void removeAccount( String pAccountId )
      throws RemoveException, RemoteException
   {
      try {
         Account lAccount = getAccountHome().findByPrimaryKey(
            new AccountPK( pAccountId )
         );
         removeAccount( lAccount );
      }
      catch( FinderException fe ) {
         // When not found then ignore it because account is already removed
View Full Code Here

Examples of org.jboss.test.banknew.interfaces.AccountPK

    **/
   public void deposit( String pAccountId, float pAmount )
      throws FinderException, RemoteException
   {
      Account lAccount = getAccountHome().findByPrimaryKey(
         new AccountPK( pAccountId )
      );
      AccountData lData = lAccount.getData();
      lData.setBalance( lData.getBalance() + pAmount );
      lAccount.setData( lData );
      try {
View Full Code Here

Examples of org.jboss.test.banknew.interfaces.AccountPK

    **/
   public void withdraw( String pAccountId, float pAmount )
      throws FinderException, RemoteException
   {
      Account lAccount = getAccountHome().findByPrimaryKey(
         new AccountPK( pAccountId )
      );
      AccountData lData = lAccount.getData();
      lData.setBalance( lData.getBalance() - pAmount );
      lAccount.setData( lData );
      try {
View Full Code Here

Examples of org.jboss.test.cts.keys.AccountPK

      getLog().debug("+++ testLocalInterfacePassivation");
      StatefulSessionHome sessionHome = ( StatefulSessionHome ) ctx.lookup("ejbcts/StatefulSessionBean");
      StatefulSession sessionBean = sessionHome.create("testLocalInterfacePassivation");   

    getLog().debug("Creating local home");
      AccountPK pk = new AccountPK("123456789");
      sessionBean.createLocalEntity(pk, "jduke");

      getLog().debug("Creating a second session bean, forcing the first one to be passivated?");
      // The pool size has been set to 1 in the container
      // config, so creating another ASession here should
View Full Code Here

Examples of org.jboss.test.cts.keys.AccountPK

      StatefulSession bean = home.create("testRemoveSessionObject");   
      getLog().debug("OK, bean="+bean);
      getLog().debug("Call remove using a primary key");
      try
      {
         home.remove(new AccountPK("pk"));
         fail("[EJB 1.1, p42, section 5.3.2] Expected 'RemoveException' when remove-ing a session object, got NO exception");
      }
      catch(RemoveException e)
      {
         getLog().debug("Remove using a primary key failed as expected");
View Full Code Here

Examples of org.jboss.test.cts.keys.AccountPK

    */
   public void testBasicCmp()
         throws Exception
   {
      getLog().debug("+++ testBasicCmp()");
      AccountPK pk = new AccountPK("testBasicCmp");
      CtsCmp bean = home.create(pk, "testBasicCmp unitTest");
      String result = bean.getPersonsName();
      // Test response
      assertTrue(result.equals("testBasicCmp unitTest"));
      bean.remove();
View Full Code Here

Examples of org.jboss.test.cts.keys.AccountPK

      {
         InitialContext ctx = new InitialContext(env);
         Object ref = ctx.lookup("ejbcts/CMPBean");
         CtsCmpHome home = (CtsCmpHome)
               PortableRemoteObject.narrow(ref, CtsCmpHome.class);
         AccountPK pk1 = new AccountPK("bean1");
         CtsCmp bean1 = home.create(pk1, "testHomeFromRemoteNoDefaultJNDI");
         CtsCmpHome home2 = (CtsCmpHome) bean1.getEJBHome();
         AccountPK pk2 = new AccountPK("bean2");
         CtsCmp bean2 = home2.create(pk2, "testHomeFromRemoteNoDefaultJNDI");
         bean2.remove();
      }
      finally
      {
View Full Code Here

Examples of org.jboss.test.cts.keys.AccountPK

      CtsBmp bean = null;

      try {
         getLog().debug("create bean, name=" + BEAN_NAME);

         bean = doEjbCreate(new AccountPK(BEAN_PK_007), BEAN_NAME);
      } catch (Exception ex) {
         getLog().error("Error in bmptest", ex);
         fail("testEjbCreate has failed!");
      }
View Full Code Here

Examples of org.jboss.test.cts.keys.AccountPK

      try {
         CtsBmpHome home = getHome();

         // First create a bean instance to find
         getLog().debug("Create bean, name=" + BEAN_NAME);
         doEjbCreate(new AccountPK(BEAN_PK_007), BEAN_NAME);

         getLog().debug("Find bean, name=" + BEAN_NAME);

         Collection clct = home.findByPersonsName(BEAN_NAME);
         getLog().debug("Verify result set not empty");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.