Package nexj.core.util

Examples of nexj.core.util.Binary


       * the FILETIME structure, part of Win32 API)
       */
      Thread.sleep(20);
     
      byte[] data = new byte[] {0x41, 0x42, 0x43, 0x00, (byte)0xFF, 0x0d, 0x0a};
      fConn.write(new Binary(data));
     
      assertEquals(lPreModificationTime, fConn.getLastModified());
     
      long lUpdatedTime = fConn.getLastModifiedThisTxn()//temp file time
     
View Full Code Here


     
      checkAttach(fConn, "data1");
      assertFalse(new File(m_outgoingDirectory, "data1").exists());
     
      byte[] data = new byte[] {0x41, 0x42, 0x43, 0x00, (byte)0xFF, 0x0d, 0x0a};
      fConn.write(new Binary(data));
     
      //Now unattach
      fConn.close();
     
      txM.rollback();
View Full Code Here

     
      checkAttach(fConn, "data1");
      assertFalse(new File(m_outgoingDirectory, "data1").exists());
     
      byte[] data = new byte[] {0x41, 0x42, 0x43, 0x00, (byte)0xFF, 0x0d, 0x0a};
      fConn.write(new Binary(data));
     
      fConn.delete();
     
      Binary readData = fConn.readBinary();
     
      assertNull(readData);
     
      //Now unattach
      fConn.close();
View Full Code Here

     
      checkAttach(fConn, "data1");
      assertTrue(new File(m_outgoingDirectory, "data1").exists());
      checkCannotExclusiveLockFile(new File(m_outgoingDirectory, "data1"));
     
      Binary read1 = fConn.readBinary();
     
      assertEquals(new Binary(existingData), read1);
     
      fConn.delete();
     
      Binary read2 = fConn.readBinary();
     
      assertNull(read2);
     
      //Now unattach
      fConn.close();
View Full Code Here

      checkAttach(fConn, "data1");
      assertTrue(new File(m_outgoingDirectory, "data1").exists());
      checkCannotExclusiveLockFile(new File(m_outgoingDirectory, "data1"));

      Binary read1 = fConn.readBinary();

      assertEquals(new Binary(existingData), read1);

      fConn.delete();

      Binary read2 = fConn.readBinary();

      assertNull(read2);

      //Now unattach (no transaction case commits here too)
      fConn.close();
View Full Code Here

     
      checkAttach(fConn, "data1");
      assertTrue(new File(m_outgoingDirectory, "data1").exists());
      checkCannotExclusiveLockFile(new File(m_outgoingDirectory, "data1"));
     
      Binary read1 = fConn.readBinary();
     
      assertEquals(new Binary(existingData), read1);
     
      fConn.delete();
     
      Binary read2 = fConn.readBinary();
     
      assertNull(read2);
     
      //Now unattach
      fConn.close();
View Full Code Here

     
      checkAttach(fConn, "data1");
      assertFalse(new File(m_outgoingDirectory, "data1").exists());
     
      byte[] data = new byte[] {0x41, 0x42, 0x43, 0x00, (byte)0xFF, 0x0d, 0x0a};
      fConn.write(new Binary(data));
     
      Binary readData = fConn.readBinary();
     
      assertTrue(readData.equals(new Binary(data)));
     
      //Now unattach
      fConn.close();
     
      txM.commit();
View Full Code Here

     
      checkAttach(fConn, "data1");
      assertFalse(new File(m_outgoingDirectory, "data1").exists());
     
      byte[] data = new byte[] {0x41, 0x42, 0x43, 0x00, (byte)0xFF, 0x0d, 0x0a};
      fConn.write(new Binary(data));
     
      xar.end(makeXid(1), XAResource.TMSUCCESS);
      xar.prepare(makeXid(1));
     
      //--- CRASH ---
View Full Code Here

     
      checkAttach(fConn, "data1");
      assertFalse(new File(m_outgoingDirectory, "data1").exists());
     
      byte[] data = new byte[] {0x41, 0x42, 0x43, 0x00, (byte)0xFF, 0x0d, 0x0a};
      fConn.write(new Binary(data));
     
      xar.end(makeXid(1), XAResource.TMSUCCESS);
      xar.prepare(makeXid(1));
     
      //--- CRASH ---
View Full Code Here

      xar.start(makeXid(1), XAResource.TMNOFLAGS);
     
      checkAttach(fConn, "data1");
     
      byte[] data = new byte[] {0x41, 0x42, 0x43, 0x00, (byte)0xFF, 0x0d, 0x0a};
      fConn.write(new Binary(data));
     
      xar.end(makeXid(1), XAResource.TMSUCCESS);
      xar.prepare(makeXid(1));
     
      //--- CRASH ---
View Full Code Here

TOP

Related Classes of nexj.core.util.Binary

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.