Package com.arjuna.ats.arjuna.state

Examples of com.arjuna.ats.arjuna.state.InputObjectState


/*      */
/*  299 */       if (this.currentStatus == 0)
/*      */       {
/*  308 */         if (loadObjectState())
/*      */         {
/*  310 */           InputObjectState oldState = null;
/*      */           try
/*      */           {
/*  314 */             oldState = this.objectStore.read_committed(this.objectUid, type());
/*      */           }
/*      */           catch (ObjectStoreException e)
View Full Code Here


/*     */     try
/*     */     {
/*  81 */       TxControl txc = new TxControl();
/*  82 */       ObjectStore imple = TxControl.getStore();
/*     */
/*  84 */       InputObjectState types = new InputObjectState();
/*     */
/*  86 */       if (imple.allTypes(types))
/*     */       {
/*  88 */         String theName = null;
/*  89 */         int count = 0;
/*     */         try
/*     */         {
/*  93 */           boolean endOfList = false;
/*     */
/*  95 */           while (!endOfList)
/*     */           {
/*  97 */             theName = types.unpackString();
/*     */
/*  99 */             if (theName.compareTo("") == 0) {
/* 100 */               endOfList = true; continue;
/* 101 */             }if (!theName.startsWith(baType))
/*     */               continue;
/* 103 */             count++;
/*     */
/* 105 */             System.out.println(count + ": " + theName);
/*     */
/* 107 */             InputObjectState uids = new InputObjectState();
/*     */
/* 109 */             if (imple.allObjUids(theName, uids))
/*     */             {
/* 111 */               Uid theUid = new Uid(Uid.nullUid());
/*     */               try
View Full Code Here

/*  86 */       if (storeImple != null)
/*  87 */         imple = new ObjectStore(new ClassName(storeImple), root);
/*     */       else {
/*  89 */         imple = new ObjectStore(root);
/*     */       }
/*  91 */       InputObjectState types = new InputObjectState();
/*     */
/*  93 */       if (imple.allTypes(types))
/*     */       {
/*  95 */         String theName = null;
/*  96 */         int count = 0;
/*     */         try
/*     */         {
/* 100 */           boolean endOfList = false;
/*     */
/* 102 */           while (!endOfList)
/*     */           {
/* 104 */             theName = types.unpackString();
/*     */
/* 106 */             if (theName.compareTo("") == 0) {
/* 107 */               endOfList = true; continue;
/*     */             }
/*     */
/* 110 */             count++;
/*     */
/* 112 */             System.out.println(count + ": " + theName);
/*     */
/* 114 */             InputObjectState uids = new InputObjectState();
/*     */
/* 116 */             if (imple.allObjUids(theName, uids))
/*     */             {
/* 118 */               Uid theUid = new Uid(Uid.nullUid());
/*     */               try
View Full Code Here

/*     */       try
/*     */       {
/* 218 */         ClassName actionStoreType = new ClassName(arjPropertyManager.propertyManager.getProperty("com.arjuna.ats.arjuna.coordinator.actionStore", ArjunaNames.Implementation_ObjectStore_defaultActionStore().stringForm()));
/*     */
/* 221 */         ObjectStore imple = new ObjectStore(actionStoreType, root);
/* 222 */         InputObjectState types = new InputObjectState();
/*     */
/* 224 */         startSweep();
/*     */
/* 226 */         if (imple.allTypes(types))
/*     */         {
/* 228 */           String fullPathName = null;
/* 229 */           boolean found = false;
/*     */           try
/*     */           {
/* 233 */             boolean endOfList = false;
/* 234 */             DefaultMutableTreeNode currentNode = null;
/* 235 */             DefaultMutableTreeNode currentRoot = top;
/*     */
/* 237 */             while (!endOfList)
/*     */             {
/* 239 */               fullPathName = types.unpackString();
/*     */
/* 241 */               if (fullPathName.compareTo("") == 0) {
/* 242 */                 endOfList = true;
/*     */               }
/*     */               else {
/* 245 */                 found = true;
/*     */
/* 247 */                 InputObjectState uids = new InputObjectState();
/* 248 */                 String nodeName = stripName(fullPathName);
/* 249 */                 boolean added = false;
/*     */
/* 251 */                 currentNode = findNode(fullPathName);
/*     */
View Full Code Here

/*     */     try
/*     */     {
/* 446 */       ClassName actionStoreType = new ClassName(arjPropertyManager.propertyManager.getProperty("com.arjuna.ats.arjuna.coordinator.actionStore", ArjunaNames.Implementation_ObjectStore_defaultActionStore().stringForm()));
/*     */
/* 449 */       ObjectStore imple = new ObjectStore(actionStoreType, root);
/* 450 */       InputObjectState types = new InputObjectState();
/*     */
/* 452 */       if (imple.allTypes(types))
/*     */       {
/* 454 */         String fullPathName = null;
/* 455 */         boolean found = false;
/*     */         try
/*     */         {
/* 459 */           boolean endOfList = false;
/* 460 */           DefaultMutableTreeNode currentNode = null;
/* 461 */           DefaultMutableTreeNode currentRoot = top;
/*     */
/* 463 */           topTran.add(currentRoot);
/*     */
/* 465 */           while (!endOfList)
/*     */           {
/* 467 */             fullPathName = types.unpackString();
/*     */
/* 469 */             if (fullPathName.compareTo("") == 0) {
/* 470 */               endOfList = true;
/*     */             }
/*     */             else {
/* 473 */               found = true;
/*     */
/* 475 */               InputObjectState uids = new InputObjectState();
/* 476 */               String nodeName = stripName(fullPathName);
/*     */
/* 478 */               currentNode = new DefaultMutableTreeNode(nodeName);
/* 479 */               addDirectory(currentNode, fullPathName);
/*     */
View Full Code Here

/*  700 */       return false;
/*      */     }
/*      */
/*      */     try
/*      */     {
/*  706 */       InputObjectState oState = aaStore.read_committed(getSavingUid(), type());
/*      */
/*  708 */       if (oState != null)
/*      */       {
/*  710 */         synchronized (this)
/*      */         {
View Full Code Here

/*     */   private static final int _maxStateSize = 10485760;
/*     */
/*     */   public InputObjectState read_state(Uid objUid, String tName, int ft, String tableName)
/*     */     throws ObjectStoreException
/*     */   {
/*  55 */     InputObjectState newImage = null;
/*     */
/*  57 */     if (!storeValid()) {
/*  58 */       return newImage;
/*     */     }
/*  60 */     if (tName != null)
/*     */     {
/*  62 */       if ((ft == 1) || (ft == 2))
/*     */       {
/*  64 */         int pool = getPool();
/*  65 */         ResultSet rs = null;
/*     */         try
/*     */         {
/*  68 */           PreparedStatement pstmt = this._preparedStatements[pool][4];
/*  69 */           if (pstmt == null)
/*     */           {
/*  71 */             pstmt = this._theConnection[pool].prepareStatement("SELECT ObjectState FROM " + tableName + " WHERE UidString = ? AND TypeName = ? AND StateType = ?");
/*  72 */             this._preparedStatements[pool][4] = pstmt;
/*     */           }
/*     */
/*  75 */           pstmt.setString(1, objUid.stringForm());
/*  76 */           pstmt.setString(2, tName);
/*  77 */           pstmt.setInt(3, ft);
/*     */
/*  79 */           rs = pstmt.executeQuery();
/*     */
/*  81 */           if (!rs.next()) {
/*  82 */             Object localObject1 = null;
/*     */             return localObject1;
/*     */           }
/*  84 */           myBlob = rs.getBlob(1);
/*  85 */           byte[] buffer = ((Blob)myBlob).getBytes(1L, (int)((Blob)myBlob).length());
/*     */
/*  87 */           if (buffer != null)
/*     */           {
/*  89 */             newImage = new InputObjectState(objUid, tName, buffer);
/*     */           }
/*  92 */           else if (tsLogger.arjLoggerI18N.isWarnEnabled())
/*  93 */             tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_1");
/*     */         }
/*     */         catch (Throwable e)
View Full Code Here

/*     */   private static final int _maxStateSize = 10485760;
/*     */
/*     */   public InputObjectState read_state(Uid objUid, String tName, int ft, String tableName)
/*     */     throws ObjectStoreException
/*     */   {
/*  71 */     InputObjectState newImage = null;
/*     */
/*  73 */     if (!storeValid()) {
/*  74 */       return newImage;
/*     */     }
/*  76 */     if (tName != null)
/*     */     {
/*  78 */       if ((ft == 1) || (ft == 2))
/*     */       {
/*  80 */         int pool = getPool();
/*  81 */         ResultSet rs = null;
/*     */         try
/*     */         {
/*  85 */           for (int count = 0; count < 10; count++)
/*     */           {
/*     */             try
/*     */             {
/*  89 */               PreparedStatement pstmt = this._preparedStatements[pool][4];
/*     */
/*  91 */               if (pstmt == null)
/*     */               {
/*  93 */                 pstmt = this._theConnection[pool].prepareStatement("SELECT ObjectState FROM " + tableName + " WHERE UidString = ? AND TypeName = ? AND StateType = ?");
/*     */
/*  95 */                 this._preparedStatements[pool][4] = pstmt;
/*     */               }
/*     */
/*  98 */               pstmt.setString(1, objUid.stringForm());
/*  99 */               pstmt.setString(2, tName);
/* 100 */               pstmt.setInt(3, ft);
/*     */
/* 102 */               rs = pstmt.executeQuery();
/*     */
/* 104 */               if (!rs.next()) {
/* 105 */                 Object localObject1 = null;
/*     */                 try
/*     */                 {
/* 143 */                   if (rs != null)
/* 144 */                     rs.close();
/*     */                 }
/*     */                 catch (Exception re) {
/*     */                 }
/* 148 */                 freePool(pool); return localObject1;
/*     */               }
/* 108 */               Blob myBlob = rs.getBlob(1);
/* 109 */               byte[] buffer = myBlob.getBytes(1L, (int)myBlob.length());
/*     */
/* 111 */               if (buffer != null)
/*     */               {
/* 113 */                 newImage = new InputObjectState(objUid, tName, buffer);
/*     */               }
/* 116 */               else if (tsLogger.arjLoggerI18N.isWarnEnabled()) {
/* 117 */                 tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.jdbc.oracle_1");
/*     */               }
/*     */
/* 120 */               InputObjectState localInputObjectState1 = newImage;
/*     */               try
/*     */               {
/* 143 */                 if (rs != null)
/* 144 */                   rs.close();
/*     */               }
View Full Code Here

/* 241 */   private String blobName = "BLOB";
/*     */
/*     */   public InputObjectState read_state(Uid objUid, String tName, int ft, String tableName)
/*     */     throws ObjectStoreException
/*     */   {
/*  73 */     InputObjectState newImage = null;
/*     */
/*  75 */     if (!storeValid()) {
/*  76 */       return newImage;
/*     */     }
/*  78 */     if (tName != null)
/*     */     {
/*  80 */       if ((ft == 1) || (ft == 2))
/*     */       {
/*  82 */         int pool = getPool();
/*  83 */         ResultSet rs = null;
/*     */         try
/*     */         {
/*  87 */           PreparedStatement pstmt = this._preparedStatements[pool][4];
/*     */
/*  89 */           if (pstmt == null)
/*     */           {
/*  91 */             pstmt = this._theConnection[pool].prepareStatement("SELECT ObjectState FROM " + tableName + " WHERE UidString = ? AND TypeName = ? AND StateType = ?");
/*     */
/*  93 */             this._preparedStatements[pool][4] = pstmt;
/*     */           }
/*     */
/*  96 */           pstmt.setString(1, objUid.stringForm());
/*  97 */           pstmt.setString(2, tName);
/*  98 */           pstmt.setInt(3, ft);
/*     */
/* 100 */           rs = pstmt.executeQuery();
/*     */
/* 102 */           if (!rs.next()) {
/* 103 */             Object localObject1 = null;
/*     */             return localObject1;
/*     */           }
/* 106 */           byte[] buffer = rs.getBytes(1);
/*     */
/* 108 */           rs.close();
/*     */
/* 110 */           if (buffer != null)
/*     */           {
/* 112 */             newImage = new InputObjectState(objUid, tName, buffer);
/*     */           }
/*     */           else {
/* 115 */             tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.drivers.oracle_8_0_1");
/*     */           }
/*     */         }
View Full Code Here

/*     */   private static final int _maxStateSize = 65535;
/*     */
/*     */   public InputObjectState read_state(Uid objUid, String tName, int ft, String tableName)
/*     */     throws ObjectStoreException
/*     */   {
/*  69 */     InputObjectState newImage = null;
/*     */
/*  71 */     if (!storeValid()) {
/*  72 */       return newImage;
/*     */     }
/*  74 */     if (tName != null)
/*     */     {
/*  76 */       if ((ft == 1) || (ft == 2))
/*     */       {
/*  78 */         int pool = getPool();
/*  79 */         ResultSet rs = null;
/*     */         try
/*     */         {
/*  83 */           PreparedStatement pstmt = this._preparedStatements[pool][4];
/*     */
/*  85 */           if (pstmt == null)
/*     */           {
/*  87 */             pstmt = this._theConnection[pool].prepareStatement("SELECT ObjectState FROM " + tableName + " WHERE UidString = ? AND TypeName = ? AND StateType = ?");
/*     */
/*  89 */             this._preparedStatements[pool][4] = pstmt;
/*     */           }
/*     */
/*  92 */           pstmt.setString(1, objUid.stringForm());
/*  93 */           pstmt.setString(2, tName);
/*  94 */           pstmt.setInt(3, ft);
/*     */
/*  96 */           rs = pstmt.executeQuery();
/*     */
/*  98 */           if (!rs.next()) {
/*  99 */             Object localObject1 = null;
/*     */             return localObject1;
/*     */           }
/* 102 */           buffer = rs.getBytes(1);
/*     */
/* 104 */           if (buffer != null)
/*     */           {
/* 106 */             newImage = new InputObjectState(objUid, tName, buffer);
/*     */           }
/* 109 */           else if (tsLogger.arjLoggerI18N.isWarnEnabled())
/* 110 */             tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.objectstore.jdbc.sqlserver_1");
/*     */         }
/*     */         catch (Throwable e)
View Full Code Here

TOP

Related Classes of com.arjuna.ats.arjuna.state.InputObjectState

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.