Package org.jboss.test.cmp2.optimisticlock.bug1006723.testentity

Examples of org.jboss.test.cmp2.optimisticlock.bug1006723.testentity.EntityALocal


public class TestSessionBean implements SessionBean {

    public Long setup() throws Exception {
        try {
            /* Add an entity A and then add some entity Bs to it. */
            EntityALocal entityA = getEntityALocalHome().create(new Long(1));
            entityA.addEntityB(getEntityBLocalHome().create(new Long(2)));
            return entityA.getOID();
        } catch (Exception e) {
            sessionContext.setRollbackOnly();
            throw e;
        }
    }
View Full Code Here


        }
    }

    public void test(Long entityAOID) throws Exception {
        try {
            EntityALocal entityA = getEntityALocalHome().findByPrimaryKey
                    (entityAOID);
            Iterator entityBs = entityA.listEntityBs().iterator();
            while (entityBs.hasNext()) {
                ((EntityBLocal) entityBs.next()).setLastModified(new Date());
            }
        } catch (Exception e) {
            sessionContext.setRollbackOnly();
View Full Code Here

      {
         LoginContext login = ApplicationCallbackHandler.login("audituser2", "user2");
         try
         {
            AuditHome home = getAuditEJB();
            Audit audit = home.findByPrimaryKey(id);
            audit.setStringValue(stringValue);
         }
         finally
         {
            if (login != null)
               login.logout();
View Full Code Here

      {
         LoginContext login = ApplicationCallbackHandler.login("old-client-login", "audituser2", "user2");
         try
         {
            AuditHome home = getAuditEJB();
            Audit audit = home.findByPrimaryKey(id);
            audit.setStringValue(stringValue);
         }
         finally
         {
            if (login != null)
               login.logout();
View Full Code Here

      {
         LoginContext login = ApplicationCallbackHandler.login("audituser2", "user2");
         try
         {
            AuditHome home = getAuditChangedNamesEJB();
            Audit audit = home.findByPrimaryKey(id);
            audit.setStringValue(stringValue);
         }
         finally
         {
            if (login != null)
               login.logout();
View Full Code Here

      try
      {
         LoginContext login = ApplicationCallbackHandler.login("audituser1", "user1");
         try
         {
            AuditHome home = getAuditEJB();
            home.create(id);
         }
         finally
         {
            if (login != null)
               login.logout();
View Full Code Here

      try
      {
         LoginContext login = ApplicationCallbackHandler.login("audituser2", "user2");
         try
         {
            AuditHome home = getAuditEJB();
            Audit audit = home.findByPrimaryKey(id);
            audit.setStringValue(stringValue);
         }
         finally
         {
            if (login != null)
View Full Code Here

      try
      {
         LoginContext login = ApplicationCallbackHandler.login("old-client-login", "audituser2", "user2");
         try
         {
            AuditHome home = getAuditEJB();
            Audit audit = home.findByPrimaryKey(id);
            audit.setStringValue(stringValue);
         }
         finally
         {
            if (login != null)
View Full Code Here

      try
      {
         LoginContext login = ApplicationCallbackHandler.login("audituser1", "user1");
         try
         {
            AuditHome home = getAuditChangedNamesEJB();
            home.create(id);
         }
         finally
         {
            if (login != null)
               login.logout();
View Full Code Here

      try
      {
         LoginContext login = ApplicationCallbackHandler.login("audituser2", "user2");
         try
         {
            AuditHome home = getAuditChangedNamesEJB();
            Audit audit = home.findByPrimaryKey(id);
            audit.setStringValue(stringValue);
         }
         finally
         {
            if (login != null)
View Full Code Here

TOP

Related Classes of org.jboss.test.cmp2.optimisticlock.bug1006723.testentity.EntityALocal

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.