Package org.jboss.test.cts.keys

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


      CtsBmp bean = null;

      try {
         CtsBmpHome home = getHome();
         AccountPK pk = new AccountPK(BEAN_PK_007);

         getLog().debug("Create a bean...");
         bean = doEjbCreate(pk, BEAN_NAME);
         getLog().debug("OK");
View Full Code Here


      */
      Properties homeProps = new Properties();
      homeProps.setProperty("java.naming.factory.initial", "org.jboss.naming.NamingContextFactory");
      InitialContext ic = new InitialContext(homeProps);
      CtsBmpHome home = (CtsBmpHome) ic.lookup("ejbcts/BMPBean");
      AccountPK pk = new AccountPK(BEAN_PK_007);
      CtsBmp bean = doEjbCreate(pk, BEAN_NAME);
      Handle beanHandle = bean.getHandle();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(out);
      oos.writeObject(beanHandle);
View Full Code Here

      CtsBmp bean = null;

      try {
         CtsBmpHome home = getHome();
         AccountPK pk = new AccountPK(BEAN_PK_007);

         mbx.clearMessages();

         getLog().debug("Create a bean...");
         bean = doEjbCreate(pk, BEAN_NAME);
View Full Code Here

      CtsBmp bean = null;

      try {
         CtsBmpHome home = getHome();
         AccountPK pk = new AccountPK(BEAN_PK_007);

         mbx.clearMessages();

         getLog().debug("Create a bean...");
         bean = doEjbCreate(pk, BEAN_NAME);
View Full Code Here

   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

      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

      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

      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

      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

      CtsBmp bean = null;

      try {
         CtsBmpHome home = getHome();
         AccountPK pk = new AccountPK(BEAN_PK_007);

         getLog().debug("Create a bean...");
         bean = doEjbCreate(pk, BEAN_NAME);
         getLog().debug("OK");
View Full Code Here

TOP

Related Classes of org.jboss.test.cts.keys.AccountPK

Copyright © 2018 www.massapicom. 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.