KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2006, Red Hat Middleware LLC, and individual contributors
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.deployers;
23
24 import java.net.URL JavaDoc;
25
26 import javax.management.ObjectName JavaDoc;
27  
28 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
29
30 /**
31  * The tomcat war deployer configuration passed in from the web container.
32  *
33  * @author Scott.Stark@jboss.org
34  * @version $Revision: 56125 $
35  */

36 public class DeployerConfig
37 {
38    /**
39     * The tomcat sar class loader
40     */

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

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

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

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

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

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

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

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

78    private ObjectName JavaDoc serviceName;
79    /**
80     * The catalina debug level
81     */

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

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

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

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

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

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

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

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

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

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

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

324    public void setDefaultSecurityDomain(String JavaDoc defaultSecurityDomain)
325    {
326       this.defaultSecurityDomain = defaultSecurityDomain;
327    }
328
329    public boolean isAllowSelfPrivilegedWebApps()
330    {
331       return allowSelfPrivilegedWebApps;
332    }
333
334    public void setAllowSelfPrivilegedWebApps(boolean allowSelfPrivilegedWebApps)
335    {
336       this.allowSelfPrivilegedWebApps = allowSelfPrivilegedWebApps;
337    }
338    
339    public JaasSecurityManagerServiceMBean getSecurityManagerService()
340    {
341       return secMgrService;
342    }
343    public void setSecurityManagerService(JaasSecurityManagerServiceMBean mgr)
344    {
345       this.secMgrService = mgr;
346    }
347
348    public String JavaDoc[] getFilteredPackages()
349    {
350       return filteredPackages;
351    }
352    public void setFilteredPackages(String JavaDoc[] filteredPackages)
353    {
354       this.filteredPackages = filteredPackages;
355    }
356
357    public URL JavaDoc getXacmlPolicyURL()
358    {
359       return xacmlPolicyURL;
360    }
361
362    public void setXacmlPolicyURL(URL JavaDoc xacmlPolicyURL)
363    {
364      this.xacmlPolicyURL = xacmlPolicyURL;
365    }
366 }
367
Popular Tags