00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 package org.openmobileis.synchro.openmsp.server.util;
00030
00031 import org.openmobileis.common.util.ObjectPool;
00032 import org.openmobileis.common.util.log.*;
00033
00041 public class FileSystemObjectPool extends ObjectPool {
00042 String objectClass;
00043 public FileSystemObjectPool(String fileSystemClass) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
00044 super(fileSystemClass, 50, 10);
00045 }
00046
00047 public FileSystem getFileSystem () {
00048 FileSystem filesystem = (FileSystem) super.getObject();
00049 if (filesystem == null) {
00050 LogManager.traceEmergency(LogServices.SYNCHROSERVICE, "Object pool error FileSystem from pool NULL. Create one. System must be repared.");
00051 } else {
00052 filesystem.clear();
00053 }
00054 return filesystem;
00055 }
00056
00057 }