Examples of BobInnerClass


Examples of net.sf.joafip.entity.BobInnerClass

      FilePersistenceInvalidClassException,
      FilePersistenceNotSerializableException,
      FilePersistenceClassNotFoundException,
      FilePersistenceDataCorruptedException, ProxyException,
      FilePersistenceTooBigForSerializationException, TestException {
    BobInnerClass bob = new BobInnerClass();
    bob.setEntry("hello");
    // final FilePersistence filePersistence = new FilePersistence(1, null,
    // TestConstant.getRuntimeDir(), true, false);
    final FilePersistenceBuilder builder = new FilePersistenceBuilder();
    builder.setFileAccessMode(EnumFileAccessMode.MAPPED_RANDOM_FILE_ACCESS);
    builder.setMaxBufferSize(8 * 1024);
    builder.setMaxNumberOfBuffer(32);
    builder.setPathName(TestConstant.getWinRamDiskRuntimeDir());
    builder.setProxyMode(true);
    builder.setRemoveFiles(false);
    builder.setGarbageManagement(false);
    builder.setCrashSafeMode(false);
    final IFilePersistence filePersistence = builder.build();
    final IDataAccessSession dataAccessSession = filePersistence
        .createDataAccessSession();
    dataAccessSession.open();
    dataAccessSession.setObject("bob", bob);
    dataAccessSession.close(EnumFilePersistenceCloseAction.SAVE);
    dataAccessSession.open();
    bob = (BobInnerClass) dataAccessSession.getObject("bob");

    final Entry entry = bob.getEntry();
    final boolean proxy = ProxyManager2.isProxyOrEnhanced(entry);
    dataAccessSession.close(EnumFilePersistenceCloseAction.DO_NOT_SAVE);
    filePersistence.close();

    assertTrue("must be a proxy", proxy);
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.