KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > web > tomcat > tc5 > DeployerConfig


1 /*
2 * JBoss, the OpenSource J2EE webOS
3 *
4 * Distributable under LGPL license.
5 * See terms of license at gnu.org.
6 */

7 package org.jboss.web.tomcat.tc5;
8
9 import javax.management.ObjectName JavaDoc;
10
11 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
12
13 /**
14  * The tomcat war deployer configuration passed in from the web container.
15  *
16  * @author Scott.Stark@jboss.org
17  * @version $Revision: 1.11.2.2 $
18  */

19 public class DeployerConfig
20 {
21    /**
22     * The tomcat sar class loader
23     */

24    private ClassLoader JavaDoc serviceClassLoader;
25    /**
26     * The domain used for the tomcat mbeans
27     */

28    private String JavaDoc catalinaDomain = "Catalina";
29
30    /**
31     * The fully qualified name of the class that will be used for session
32     * management if <tt>distributable</tt> is set to true.
33     */

34    private String JavaDoc managerClass = "org.jboss.web.tomcat.tc5.session.JBossManager";
35
36    /**
37     * JMX Object name of the TreeCache MBean. Used by JBossCacheManager
38     */

39    private String JavaDoc cacheName = "jboss.cache:service=TreeCache";
40
41    /**
42     * The web context class to create
43     */

44    private String JavaDoc contextClassName;
45    /**
46     * The parent class loader first model flag
47     */

48    private boolean java2ClassLoadingCompliance = false;
49    /**
50     * A flag indicating if war archives should be unpacked
51     */

52    private boolean unpackWars = true;
53    /**
54     * If true, ejb-links that don't resolve don't cause an error
55     * (fallback to jndi-name)
56     */

57    private boolean lenientEjbLink = false;
58    /**
59     * The tomcat service JMX object name
60     */

61    private ObjectName JavaDoc serviceName;
62    /**
63     * The catalina debug level
64     */

65    private int debugLevel;
66    /**
67     * A flag indicating if the JBoss UCL should be used
68     */

69    private boolean useJBossWebLoader = true;
70    /**
71     * A flag indicating if the working dir for a war deployment should be
72     * delete when the war is undeployed.
73     */

74    private boolean deleteWorkDirs = true;
75    /**
76     * Which snapshot mode should be used in clustered environment?
77     * Default: instant
78     */

79    private String JavaDoc snapshotMode = "instant"; // instant or interval
80
/**
81     * With IntervalSnapshotManager use this interval (in ms) for snapshotting
82     */

83    private int snapshotInterval = 1000;
84
85    /**
86     * Should the clustering code use caching or not?
87     */

88    private boolean useLocalCache;
89
90    /**
91     * Whether to use MOD_JK(2) for sticky session combined with JvmRoute. If set to true,
92     * it will insert a JvmRouteFilter to intercept every request and replace the JvmRoute
93     * if it detects a failover.
94     */

95    private boolean useJK = false;
96
97    /**
98     * Get the request attribute name under which the JAAS Subject is store
99     */

100    private String JavaDoc subjectAttributeName = null;
101    /**
102     * The default security-domain name to use
103     */

104    private String JavaDoc defaultSecurityDomain;
105    /** Package names that should be ignored for class loading */
106    private String JavaDoc[] filteredPackages;
107
108    /**
109     * Flag indicating whether web-app specific context xmls may set the privileged flag.
110     */

111    private boolean allowSelfPrivilegedWebApps = false;
112    /** The service used to flush authentication cache on session invalidation. */
113    private JaasSecurityManagerServiceMBean secMgrService;
114
115    public ClassLoader JavaDoc getServiceClassLoader()
116    {
117       return serviceClassLoader;
118    }
119
120    public void setServiceClassLoader(ClassLoader JavaDoc serviceClassLoader)
121    {
122       this.serviceClassLoader = serviceClassLoader;
123    }
124
125    public String JavaDoc getManagerClass()
126    {
127       return managerClass;
128    }
129
130    public void setManagerClass(String JavaDoc managerClass)
131    {
132       this.managerClass = managerClass;
133    }
134
135    public String JavaDoc getCacheName()
136    {
137       return cacheName;
138    }
139
140    public void setCacheName(String JavaDoc cacheName)
141    {
142       this.cacheName = cacheName;
143    }
144
145    public String JavaDoc getCatalinaDomain()
146    {
147       return catalinaDomain;
148    }
149
150    public void setCatalinaDomain(String JavaDoc catalinaDomain)
151    {
152       this.catalinaDomain = catalinaDomain;
153    }
154
155    public String JavaDoc getContextClassName()
156    {
157       return contextClassName;
158    }
159
160    public void setContextClassName(String JavaDoc contextClassName)
161    {
162       this.contextClassName = contextClassName;
163    }
164
165    public boolean isJava2ClassLoadingCompliance()
166    {
167       return java2ClassLoadingCompliance;
168    }
169
170    public void setJava2ClassLoadingCompliance(boolean java2ClassLoadingCompliance)
171    {
172       this.java2ClassLoadingCompliance = java2ClassLoadingCompliance;
173    }
174
175    public boolean isUnpackWars()
176    {
177       return unpackWars;
178    }
179
180    public void setUnpackWars(boolean unpackWars)
181    {
182       this.unpackWars = unpackWars;
183    }
184
185    public boolean isLenientEjbLink()
186    {
187       return lenientEjbLink;
188    }
189
190    public void setLenientEjbLink(boolean lenientEjbLink)
191    {
192       this.lenientEjbLink = lenientEjbLink;
193    }
194
195    public ObjectName JavaDoc getServiceName()
196    {
197       return serviceName;
198    }
199
200    public void setServiceName(ObjectName JavaDoc serviceName)
201    {
202       this.serviceName = serviceName;
203    }
204
205    public int getDebugLevel()
206    {
207       return debugLevel;
208    }
209
210    public void setDebugLevel(int debugLevel)
211    {
212       this.debugLevel = debugLevel;
213    }
214
215    public boolean isUseJBossWebLoader()
216    {
217       return useJBossWebLoader;
218    }
219
220    public void setUseJBossWebLoader(boolean useJBossWebLoader)
221    {
222       this.useJBossWebLoader = useJBossWebLoader;
223    }
224
225    public boolean isDeleteWorkDirs()
226    {
227       return deleteWorkDirs;
228    }
229
230    public void setDeleteWorkDirs(boolean deleteWorkDirs)
231    {
232       this.deleteWorkDirs = deleteWorkDirs;
233    }
234
235    public String JavaDoc getSnapshotMode()
236    {
237       return snapshotMode;
238    }
239
240    public void setSnapshotMode(String JavaDoc snapshotMode)
241    {
242       this.snapshotMode = snapshotMode;
243    }
244
245    public int getSnapshotInterval()
246    {
247       return snapshotInterval;
248    }
249
250    public void setSnapshotInterval(int snapshotInterval)
251    {
252       this.snapshotInterval = snapshotInterval;
253    }
254
255    public boolean isUseLocalCache()
256    {
257       return useLocalCache;
258    }
259
260    public void setUseLocalCache(boolean useLocalCache)
261    {
262       this.useLocalCache = useLocalCache;
263    }
264
265    public boolean isUseJK()
266    {
267       return useJK;
268    }
269
270    public void setUseJK(boolean useJK)
271    {
272       this.useJK = useJK;
273    }
274
275    public String JavaDoc getSubjectAttributeName()
276    {
277       return subjectAttributeName;
278    }
279
280    public void setSubjectAttributeName(String JavaDoc subjectAttributeName)
281    {
282       this.subjectAttributeName = subjectAttributeName;
283    }
284
285    /**
286     * Get the default security domain implementation to use if a war
287     * does not declare a security-domain.
288     *
289     * @return jndi name of the security domain binding to use.
290     * @jmx:managed-attribute
291     */

292    public String JavaDoc getDefaultSecurityDomain()
293    {
294       return defaultSecurityDomain;
295    }
296
297    /**
298     * Set the default security domain implementation to use if a war
299     * does not declare a security-domain.
300     *
301     * @param defaultSecurityDomain - jndi name of the security domain binding
302     * to use.
303     * @jmx:managed-attribute
304     */

305    public void setDefaultSecurityDomain(String JavaDoc defaultSecurityDomain)
306    {
307       this.defaultSecurityDomain = defaultSecurityDomain;
308    }
309
310    public boolean isAllowSelfPrivilegedWebApps()
311    {
312       return allowSelfPrivilegedWebApps;
313    }
314
315    public void setAllowSelfPrivilegedWebApps(boolean allowSelfPrivilegedWebApps)
316    {
317       this.allowSelfPrivilegedWebApps = allowSelfPrivilegedWebApps;
318    }
319    public JaasSecurityManagerServiceMBean getSecurityManagerService()
320    {
321       return secMgrService;
322    }
323    public void setSecurityManagerService(JaasSecurityManagerServiceMBean mgr)
324    {
325       this.secMgrService = mgr;
326    }
327
328    public String JavaDoc[] getFilteredPackages()
329    {
330       return filteredPackages;
331    }
332    public void setFilteredPackages(String JavaDoc[] filteredPackages)
333    {
334       this.filteredPackages = filteredPackages;
335    }
336 }
337
Popular Tags