| java.lang.Object org.apache.jk.server.JkMain
JkMain | public class JkMain implements MBeanRegistration(Code) | | Main class used to startup and configure jk. It manages the conf/jk2.properties file
and is the target of JMX proxy.
It implements a policy of save-on-change - whenever a property is changed at
runtime the jk2.properties file will be overriden.
You can edit the config file when tomcat is stoped ( or if you don't use JMX or
other admin tools ).
The format of jk2.properties:
- TYPE[.LOCALNAME].PROPERTY_NAME=VALUE
- Set a property on the associated component. TYPE will be used to
find the class name and instantiate the component. LOCALNAME allows
multiple instances. In JMX mode, TYPE and LOCALNAME will form the
JMX name ( eventually combined with a 'jk2' component )
- NAME=VALUE
- Define global properties to be used in ${} substitutions
- class.COMPONENT_TYPE=JAVA_CLASS_NAME
- Adds a new 'type' of component. We predefine all known types.
Instances are created the first time a component name is found. In addition,
'handler.list' property will override the list of 'default' components that are
loaded automatically.
Note that the properties file is just one (simplistic) way to configure jk. We hope
to see configs based on registry, LDAP, db, etc. ( XML is not necesarily better )
author: Costin Manolache |
Constructor Summary | |
public | JkMain() |
log | static org.apache.commons.logging.Log log(Code) | | |
modified | boolean modified(Code) | | |
saveProperties | boolean saveProperties(Code) | | |
startTime | long startTime(Code) | | |
getChannelClassName | public String getChannelClassName()(Code) | | |
getInitTime | public long getInitTime()(Code) | | The time it took to initialize jk ( ms)
|
getStartTime | public long getStartTime()(Code) | | The time it took to start jk ( ms )
|
postDeregister | public void postDeregister()(Code) | | |
postRegister | public void postRegister(Boolean registrationDone)(Code) | | |
saveProperties | public void saveProperties()(Code) | | |
setChannelClassName | public void setChannelClassName(String name)(Code) | | Set the channelClassName that will used to connect to
httpd.
|
setJkHome | public void setJkHome(String s)(Code) | | Set the base dir of jk2. ( including WEB-INF if in a webapp ).
We'll try to guess it from classpath if none is set ( for
example on command line ), but if in a servlet environment
you need to use Context.getRealPath or a system property or
set it expliciltey.
|
setPropertiesFile | public void setPropertiesFile(String p)(Code) | | Load a .properties file into and set the values
into jk2 configuration.
|
setProperty | public void setProperty(String n, String v)(Code) | | Set a name/value as a jk2 property
|
setSaveProperties | public void setSaveProperties(boolean b)(Code) | | |
setWorkerClassName | public void setWorkerClassName(String name)(Code) | | Set the workerClassName that will handle the request.
( sort of 'pivot' in axis :-)
|
|
|