Examples of CtsCmpHome


Examples of org.jboss.test.cts.interfaces.CtsCmpHome

      env.setProperty("java.naming.provider.url", super.getJndiURL());
      try
      {
         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
      {
         System.setProperties(sysProps);
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsCmpHome

   }

   public void testOptionD() throws Exception
   {
      InitialContext ctx = new InitialContext();
      CtsCmpHome home = (CtsCmpHome) ctx.lookup("ejbcts/CMPBeanOptionD");
      AccountPK pk = new AccountPK("testOptionD-1");
      home.create(pk, "name1");
      pk = new AccountPK("testOptionD-2");
      home.create(pk, "name2");
     
      ObjectName cache = new ObjectName("jboss.j2ee:service=EJB,jndiName=ejbcts/CMPBeanOptionD,plugin=cache");
      Long cacheSize = (Long) getServer().getAttribute(cache, "CacheSize");
      assertEquals(2, cacheSize.longValue());
     
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsCmpHome

      InitialContext ctx = new InitialContext(env);
      UserTransaction ut = (UserTransaction) ctx.lookup("UserTransaction");
      ut.getStatus();

      ut.begin();
      CtsCmpHome home = (CtsCmpHome) ctx.lookup("ejbcts/CMPBean");
      AccountPK pk = new AccountPK("testWithInvalidDefaultJndiContext");
      CtsCmp bean = home.create(pk, "Scott");
      bean.setPersonsAge(40);
      ut.commit();

      assertTrue("age == 40", bean.getPersonsAge() == 40);
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsCmpHome

      InitialContext ctx = new InitialContext();
      UserTransaction ut = (UserTransaction) ctx.lookup("UserTransaction");
      ut.getStatus();

      ut.begin();
      CtsCmpHome home = (CtsCmpHome) ctx.lookup("ejbcts/CMPBean");
      AccountPK pk = new AccountPK("testWithDefaultJndiContext");
      CtsCmp bean = home.create(pk, "Scott");
      bean.setPersonsAge(40);
      ut.commit();

      assertTrue("age == 40", bean.getPersonsAge() == 40);
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsCmpHome

   }

   public void testOptionD() throws Exception
   {
      InitialContext ctx = new InitialContext();
      CtsCmpHome home = (CtsCmpHome) ctx.lookup("ejbcts/CMPBeanOptionD");
      AccountPK pk = new AccountPK("testOptionD-1");
      home.create(pk, "name1");
      pk = new AccountPK("testOptionD-2");
      home.create(pk, "name2");
     
      ObjectName cache = new ObjectName("jboss.j2ee:service=EJB,jndiName=ejbcts/CMPBeanOptionD,plugin=cache");
      Long cacheSize = (Long) getServer().getAttribute(cache, "CacheSize");
      assertEquals(2, cacheSize.longValue());
     
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsCmpHome

      InitialContext ctx = new InitialContext(env);
      UserTransaction ut = (UserTransaction) ctx.lookup("UserTransaction");
      ut.getStatus();

      ut.begin();
      CtsCmpHome home = (CtsCmpHome) ctx.lookup("ejbcts/CMPBean");
      AccountPK pk = new AccountPK("testWithInvalidDefaultJndiContext");
      CtsCmp bean = home.create(pk, "Scott");
      bean.setPersonsAge(40);
      ut.commit();

      assertTrue("age == 40", bean.getPersonsAge() == 40);
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsCmpHome

      InitialContext ctx = new InitialContext();
      UserTransaction ut = (UserTransaction) ctx.lookup("UserTransaction");
      ut.getStatus();

      ut.begin();
      CtsCmpHome home = (CtsCmpHome) ctx.lookup("ejbcts/CMPBean");
      AccountPK pk = new AccountPK("testWithDefaultJndiContext");
      CtsCmp bean = home.create(pk, "Scott");
      bean.setPersonsAge(40);
      ut.commit();

      assertTrue("age == 40", bean.getPersonsAge() == 40);
View Full Code Here

Examples of org.jboss.test.cts.interfaces.CtsCmpHome

      env.setProperty("java.naming.provider.url", super.getJndiURL());
      try
      {
         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
      {
         System.setProperties(sysProps);
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.