KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.web.tomcat.tc6;
23
24 import javax.management.ObjectName JavaDoc;
25  
26 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
27
28 /**
29  * The tomcat war deployer configuration passed in from the web container.
30  *
31  * @author Scott.Stark@jboss.org
32  * @version $Revision: 56125 $
33  */

34 public class DeployerConfig
35 {
36    /**
37     * The tomcat sar class loader
38     */

39    private ClassLoader JavaDoc serviceClassLoader;
40    /**
41     * The domain used for the tomcat mbeans
42     */

43    private String JavaDoc catalinaDomain = "Catalina";
44
45    /**
46     * The fully qualified name of the class that will be used for session
47     * management if <tt>distributable</tt> is set to true.
48     */

49    private String JavaDoc managerClass = "org.jboss.web.tomcat.tc6.session.JBossManager";
50
51    /**
52     * JMX Object name of the TreeCache MBean. Used by JBossCacheManager
53     */

54    private String JavaDoc cacheName = "jboss.cache:service=TreeCache";
55
56    /**
57     * The web context class to create
58     */

59    private String JavaDoc contextClassName;
60    /**
61     * The parent class loader first model flag
62     */

63    private boolean java2ClassLoadingCompliance = false;
64    /**
65     * A flag indicating if war archives should be unpacked
66     */

67    private boolean unpackWars = true;
68    /**
69     * If true, ejb-links that don't resolve don't cause an error
70     * (fallback to jndi-name)
71     */

72    private boolean lenientEjbLink = false;
73    /**
74     * The tomcat service JMX object name
75     */

76    private ObjectName JavaDoc serviceName;
77    /**
78     * The catalina debug level
79     */

80    private int debugLevel;
81    /**
82     * A flag indicating if the JBoss UCL should be used
83     */

84    private boolean useJBossWebLoader = true;
85    /**
86     * A flag indicating if the working dir for a war deployment should be
87     * delete when the war is undeployed.
88     */

89    private boolean deleteWorkDirs = true;
90    /**
91     * Which snapshot mode should be used in clustered environment?
92     * Default: instant
93     */

94    private String JavaDoc snapshotMode = "instant"; // instant or interval
95
/**
96     * With IntervalSnapshotManager use this interval (in ms) for snapshotting
97     */

98    private int snapshotInterval = 1000;
99
100    /**
101     * Should the clustering code use caching or not?
102     */

103    private boolean useLocalCache;
104
105    /**
106     * Whether to use MOD_JK(2) for sticky session combined with JvmRoute. If set to true,
107     * it will insert a JvmRouteFilter to intercept every request and replace the JvmRoute
108     * if it detects a failover.
109     */

110    private boolean useJK = false;
111
112    /**
113     * Get the request attribute name under which the JAAS Subject is store
114     */

115    private String JavaDoc subjectAttributeName = null;
116    /**
117     * The default security-domain name to use
118     */

119    private String JavaDoc defaultSecurityDomain;
120    /** Package names that should be ignored for class loading */
121    private String JavaDoc[] filteredPackages;
122
123    /**
124     * Flag indicating whether web-app specific context xmls may set the privileged flag.
125     */

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

307    public String JavaDoc getDefaultSecurityDomain()
308    {
309       return defaultSecurityDomain;
310    }
311
312    /**
313     * Set the default security domain implementation to use if a war
314     * does not declare a security-domain.
315     *
316     * @param defaultSecurityDomain - jndi name of the security domain binding
317     * to use.
318     * @jmx:managed-attribute
319     */

320    public void setDefaultSecurityDomain(String JavaDoc defaultSecurityDomain)
321    {
322       this.defaultSecurityDomain = defaultSecurityDomain;
323    }
324
325    public boolean isAllowSelfPrivilegedWebApps()
326    {
327       return allowSelfPrivilegedWebApps;
328    }
329
330    public void setAllowSelfPrivilegedWebApps(boolean allowSelfPrivilegedWebApps)
331    {
332       this.allowSelfPrivilegedWebApps = allowSelfPrivilegedWebApps;
333    }
334    
335    public JaasSecurityManagerServiceMBean getSecurityManagerService()
336    {
337       return secMgrService;
338    }
339    public void setSecurityManagerService(JaasSecurityManagerServiceMBean mgr)
340    {
341       this.secMgrService = mgr;
342    }
343
344    public String JavaDoc[] getFilteredPackages()
345    {
346       return filteredPackages;
347    }
348    public void setFilteredPackages(String JavaDoc[] filteredPackages)
349    {
350       this.filteredPackages = filteredPackages;
351    }
352 }
353
Popular Tags