## org.apache.jk.server
Class JkMain

    java.lang.Object
      org.apache.jk.server.JkMain

All Implemented Interfaces:
  javax.management.MBeanRegistration

Deprecated. Will be replaced with JMX operations

public class JkMain
extends java.lang.Object
implements javax.management.MBeanRegistration

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

Field Summary
`protected java.lang.String` `domain` Deprecated.
`protected javax.management.MBeanServer` `mserver` Deprecated.
`protected javax.management.ObjectName` `oname` Deprecated.

Constructor Summary
`JkMain()` Deprecated.

Method Summary
`java.lang.String` `getChannelClassName()` Deprecated.
`java.lang.String` `getDomain()` Deprecated.
`java.lang.String` `getErr()` Deprecated.
`long` `getInitTime()` Deprecated. The time it took to initialize jk ( ms)
`java.lang.String` `getJkHome()` Deprecated.
`static JkMain` `getJkMain()` Deprecated.
`javax.management.ObjectName` `getObjectName()` Deprecated.
`java.lang.String` `getOut()` Deprecated.
`java.lang.String` `getPropertiesFile()` Deprecated.
`java.lang.Object` `getProperty(java.lang.String name)` Deprecated. Retrieve a property.
`long` `getStartTime()` Deprecated. The time it took to start jk ( ms )
`java.lang.String` `getWorkerClassName()` Deprecated.
`WorkerEnv` `getWorkerEnv()` Deprecated.
`void` `init()` Deprecated.
`static void` `main(java.lang.String[] args)` Deprecated.
`void` `pause()` Deprecated.
`void` `postDeregister()` Deprecated.
`void` `postRegister(java.lang.Boolean registrationDone)` Deprecated.
`void` `preDeregister()` Deprecated.
`javax.management.ObjectName` `preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)` Deprecated.
`void` `resume()` Deprecated.
`void` `saveProperties()` Deprecated.
`void` `setBeanProperty(java.lang.Object target, java.lang.String name, java.lang.String val)` Deprecated.
`void` `setChannelClassName(java.lang.String name)` Deprecated. Set the `channelClassName` that will used to connect to httpd.
`void` `setErr(java.lang.String s)` Deprecated.
`void` `setJkHome(java.lang.String s)` Deprecated. Set the base dir of jk2.
`void` `setOut(java.lang.String s)` Deprecated.
`void` `setPropertiesFile(java.lang.String p)` Deprecated. Load a .properties file into and set the values into jk2 configuration.
`void` `setProperty(java.lang.String n, java.lang.String v)` Deprecated. Set a name/value as a jk2 property
`void` `setPropertyString(java.lang.String handlerN, java.lang.String name, java.lang.String val)` Deprecated.
`void` `setSaveProperties(boolean b)` Deprecated.
`void` `setWorkerClassName(java.lang.String name)` Deprecated. Set the `workerClassName` that will handle the request.
`void` `setWorkerEnv(WorkerEnv wEnv)` Deprecated.
`void` `start()` Deprecated.
`void` `stop()` Deprecated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### domain

    protected java.lang.String domain

  Deprecated.

### oname

    protected javax.management.ObjectName oname

  Deprecated.

### mserver

    protected javax.management.MBeanServer mserver

  Deprecated.

Constructor Detail

### JkMain

    public JkMain()

  Deprecated.

Method Detail

### getJkMain

    public static JkMain getJkMain()

  Deprecated.

### setPropertiesFile

    public void setPropertiesFile(java.lang.String p)

  Deprecated.
  Load a .properties file into and set the values into jk2 configuration.

### getPropertiesFile

    public java.lang.String getPropertiesFile()

  Deprecated.

### setSaveProperties

    public void setSaveProperties(boolean b)

  Deprecated.

### setProperty

    public void setProperty(java.lang.String n,
                            java.lang.String v)

  Deprecated.
  Set a name/value as a jk2 property

### getProperty

    public java.lang.Object getProperty(java.lang.String name)

  Deprecated.
  Retrieve a property.

### setChannelClassName

    public void setChannelClassName(java.lang.String name)

  Deprecated.
  Set the `channelClassName` that will used to connect to httpd.

### getChannelClassName

    public java.lang.String getChannelClassName()

  Deprecated.

### setWorkerClassName

    public void setWorkerClassName(java.lang.String name)

  Deprecated.
  Set the `workerClassName` that will handle the request. ( sort of 'pivot' in axis :-)

### getWorkerClassName

    public java.lang.String getWorkerClassName()

  Deprecated.

### setJkHome

    public void setJkHome(java.lang.String s)

  Deprecated.
  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.

### getJkHome

    public java.lang.String getJkHome()

  Deprecated.

### setOut

    public void setOut(java.lang.String s)

  Deprecated.

### getOut

    public java.lang.String getOut()

  Deprecated.

### setErr

    public void setErr(java.lang.String s)

  Deprecated.

### getErr

    public java.lang.String getErr()

  Deprecated.

### init

    public void init()
              throws java.io.IOException

  Deprecated.
  Throws:
    `java.io.IOException`

### stop

    public void stop()

  Deprecated.

### start

    public void start()
               throws java.io.IOException

  Deprecated.
  Throws:
    `java.io.IOException`

### getWorkerEnv

    public WorkerEnv getWorkerEnv()

  Deprecated.

### setWorkerEnv

    public void setWorkerEnv(WorkerEnv wEnv)

  Deprecated.

### setBeanProperty

    public void setBeanProperty(java.lang.Object target,
                                java.lang.String name,
                                java.lang.String val)

  Deprecated.

### setPropertyString

    public void setPropertyString(java.lang.String handlerN,
                                  java.lang.String name,
                                  java.lang.String val)

  Deprecated.

### getInitTime

    public long getInitTime()

  Deprecated.
  The time it took to initialize jk ( ms)

### getStartTime

    public long getStartTime()

  Deprecated.
  The time it took to start jk ( ms )

### main

    public static void main(java.lang.String[] args)

  Deprecated.

### saveProperties

    public void saveProperties()

  Deprecated.

### getObjectName

    public javax.management.ObjectName getObjectName()

  Deprecated.

### getDomain

    public java.lang.String getDomain()

  Deprecated.

### preRegister

    public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                                   javax.management.ObjectName name)
                                            throws java.lang.Exception

  Deprecated.
  Specified by:
    `preRegister` in interface `javax.management.MBeanRegistration`
  Throws:
    `java.lang.Exception`

### postRegister

    public void postRegister(java.lang.Boolean registrationDone)

  Deprecated.
  Specified by:
    `postRegister` in interface `javax.management.MBeanRegistration`

### preDeregister

    public void preDeregister()
                       throws java.lang.Exception

  Deprecated.
  Specified by:
    `preDeregister` in interface `javax.management.MBeanRegistration`
  Throws:
    `java.lang.Exception`

### postDeregister

    public void postDeregister()

  Deprecated.
  Specified by:
    `postDeregister` in interface `javax.management.MBeanRegistration`

### pause

    public void pause()
               throws java.lang.Exception

  Deprecated.
  Throws:
    `java.lang.Exception`

### resume

    public void resume()
                throws java.lang.Exception

  Deprecated.
  Throws:
    `java.lang.Exception`

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.