1 25 26 package org.objectweb.easybeans.server; 27 28 import java.io.File ; 29 import java.util.ArrayList ; 30 import java.util.List ; 31 32 36 public class ServerConfig { 37 38 41 private File ejb3Directory = null; 42 43 44 47 private boolean shouldWait = true; 48 49 52 private boolean initJACC = true; 53 54 55 58 private boolean useMBeans = true; 59 60 63 private boolean useNaming = true; 64 65 68 private List <String > extensionFactories = new ArrayList <String >(); 69 70 73 private boolean directoryScanningEnabled = true; 74 75 76 79 public File getEjb3Directory() { 80 return ejb3Directory; 81 } 82 83 87 public void setEjb3Path(final String ejb3Path) { 88 this.ejb3Directory = new File (ejb3Path); 89 if (!ejb3Directory.exists()) { 90 throw new IllegalArgumentException ("Path '" + ejb3Path + "' doesn't exists."); 91 } 92 } 93 94 95 98 public boolean shouldWait() { 99 return shouldWait; 100 } 101 102 106 public void setShouldWait(final boolean shouldWait) { 107 this.shouldWait = shouldWait; 108 } 109 110 111 115 public boolean isUsingMBeans() { 116 return useMBeans; 117 } 118 119 123 public void setUseMBeans(final boolean useMBeans) { 124 this.useMBeans = useMBeans; 125 } 126 127 131 public boolean isUsingNaming() { 132 return useNaming; 133 } 134 135 139 public void setUseNaming(final boolean useNaming) { 140 this.useNaming = useNaming; 141 } 142 143 147 public void addExtensionFactory(final String extension) { 148 this.extensionFactories.add(extension); 149 } 150 151 154 public List <String > getExtensionFactories() { 155 return this.extensionFactories; 156 } 157 158 161 public boolean isDirectoryScanningEnabled() { 162 return directoryScanningEnabled; 163 } 164 165 168 public void setDirectoryScanningEnabled(final boolean directoryScanningEnabled) { 169 this.directoryScanningEnabled = directoryScanningEnabled; 170 } 171 172 176 public void setInitJACC(final boolean initJACC) { 177 this.initJACC = initJACC; 178 } 179 180 183 public boolean initJACC() { 184 return initJACC; 185 } 186 } 187 | Popular Tags |