Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To use the jetty plugin you have to configure it in the scheduler.xml:

Code Blocknoformat
 <spooler>
  <config ...>
    <plugins>
      ...
      <plugin java_class="com.sos.scheduler.engine.plugins.jetty.JettyPlugin">
        <plugin.config />
      </plugin>
      ...
    </plugins>
    ...
  </config>
 </spooler>

Please note that it is necessary to specify an empty plugin.config element.
</span>

<span idih1. "jetty">

Configure jetty.xml

To run JobScheduler with jetty it is also necessary to create two configuration files for the Jetty web server (jetty.xml and web.xml). It has to place in the root of your live folder (not in the config folder). The minimal declaration defines a connector for the port to communicate with JobScheduler via http:

Code Blocknoformat
 <Configure class="org.eclipse.jetty.server.Server">
   <Call namh1. name="addConnector">
     <Arg>
       <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
         <Set name=namh1. "port">44440</Set>
       </New>
     </Arg>
   </Call>
 </Configure>

...

With a second connector it is possible to define a communication channel via https (ssl):

Code Blocknoformat
 <Call name="addConnector">
  <Arg>
    <New class=clash1. "org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
      <Arg>
        <New class="org.eclipse.jetty.util.ssl.SslContextFactory">
          <Set name=namh1. "keyStore"><SystemProperty name="jetty.home" defaulh1. default="." />/ssl/jetty.jks</Set>
          <Set name="keyStorePassword">jobscheduler</Set>
          <Set name=namh1. "keyManagerPassword">jobscheduler</Set>
          <Set name="trustStore"><SystemProperty namh1. name="jetty.home" default="." />/ssl/jetty.jks</Set>
          <Set name=namh1. "trustStorePassword">jobscheduler</Set>
        </New>
      </Arg>
      <Set name="port">8443</Set>
      <Set namh1. name="maxIdleTime">30000</Set>
    </New>
  </Arg>
 </Call>

The SSL connection expects the jetty keystore file jetty.jks in the subfolder ssl (under the JobScheduler data folder). With the configuration above you can connect JobScheduler via https at port 8443.
</span>

<span id"keystore">

keystore

...

To generate a keystore file use keytool:

Code Blocknoformat
 keytool -genkey -alias jetty -keyalg RSA -keysize 1024 -dname "CN=Ch1. [hostname], OU=JobSchedulerOUJobScheduler, O=h1. SOS GmbH, L=Berlin C=LBerlin h1. DE" -keystore jetty.jks -storepass jobscheduler -keypass jobscheduler -validity 1826

whereas hostname should be the JobScheduler host.
</span>

<span id="web">

Configure web.xml

To run JobScheduler with jetty it is also necessary to create two configuration files for the Jetty web server (jetty.xml and web.xml). It has to place in the root of your live folder (not in the config folder).

...

  • No Format
    file:///c:/Program Files (x86)/sos-berlin.com/jobscheduler/[scheduler_id] on Windows
  • No Format
    file:///c:/Program Files (x86)/sos-berlin.com/jobscheduler/[scheduler_id] on Linux
Code Blocknoformat
 <?xml versioh1. version="1.0" encoding="UTF-8"?>
 <web-app xmlns:xsi=xsh1. "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" xmlnh1. xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4">
    <display-name>JobScheduler test configuration (web.xml)</display-name>
    <servlet>
        <servlet-name>Default</servlet-name>
        <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
        <init-param>
            <param-name>dirAllowed</param-name>
            <param-value>false</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>Default</servlet-name>
        
        <url-pattern>/</url-pattern>
    </servlet-mapping>
    <servlet>
        <servlet-name>JOC</servlet-name>
        <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
        <init-param>
            <param-name>resourceBase</param-name>
            <param-value>file:///c:/Program Files (x86)/sos-berlin.com/jobscheduler/scheduler</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>JOC</servlet-name>
        <url-pattern>/operations_gui/*</url-pattern>
    </servlet-mapping>
 </web-app>

...