git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 10 Oct 2017 13:06:05 +0000 (13:06 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 10 Oct 2017 13:06:05 +0000 (13:06 +0000)
29 files changed:
client/DxPlay/DxPlayer.cs
client/Maestro/Maestro.csproj
client/Maestro/Resources/configuration-fxp-isilon.json
client/Maestro/Resources/configuration-fxp.json
client/Maestro/Resources/configuration-ingest - Copy.json [deleted file]
client/Maestro/Resources/configuration-ingest.json
client/Maestro/Resources/configuration-nexio.json
client/Maestro/Resources/configuration-unc.json
server/-configuration/jetty-deploy/etc/jetty.xml [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/keystore [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/localhost.jks [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/login.conf [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/login.properties [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/login_propertyfile.conf [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/sampkey.jks [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/user-jetty-deployer.xml [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/user-jetty-http-redirect.xml [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/user-jetty-http.xml [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/user-jetty-https.xml [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/user-jetty-ssl-context.xml [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/user-jetty-ssl.xml [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/user-jetty.xml [new file with mode: 0644]
server/-configuration/jetty-deploy/etc/webdefault.xml [new file with mode: 0644]
server/-configuration/stop-mediacube.sh
server/-product/mediacube.product
server/-product/pom.xml
server/user.commons.log4j2/src/user/commons/log4j2/appender/SmtpManager.java
server/user.jobengine.osgi.db/database/structure.sql
server/user.jobengine.osgi.db/src/user/jobengine/db/ItemDAOEx.java

index d8dff3b146ea71fa507f4d8e7f06f4f0f3a3f013..174430896f22728c5abd310e469e386a4681c90a 100644 (file)
@@ -254,8 +254,13 @@ namespace DxPlay {
                 hr = m_FilterGraph.AddFilter(m_videoRenderer, "Video Mixing Renderer 9");\r
                 DsError.ThrowExceptionForHR(hr);\r
 \r
+                IVMRDeinterlaceControl9 deinterlace = (IVMRDeinterlaceControl9)m_videoRenderer;\r
+                Guid interlaceMode;\r
+                deinterlace.GetActualDeinterlaceMode(0, out interlaceMode);\r
+\r
                 FilterGraphTools.ConnectFilters(graphBuilder, sampGrabber, "Output", m_videoRenderer, "VMR Input0", true);\r
 \r
+\r
                 ConfigureVideoWindow(hWin);\r
 \r
                 if (DsFindPin.ByName(splitter, "Audio") != null) {\r
index 48484cd1ba32e45bb211337f03856288466e84da..272ea5daef62a3782ec03a675b461b811d328a32 100644 (file)
     <None Include="Resources\configuration-fxp.json">\r
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
     </None>\r
-    <None Include="Resources\configuration-ingest - Copy.json">\r
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
-    </None>\r
     <None Include="Resources\configuration-unc.json">\r
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
     </None>\r
index c5da359057ec3746fbad47f7c44b2fa7f0bfd78c..dbd4e0c14bfe3ad00df04f9c55b45b14eb705178 100644 (file)
@@ -23,7 +23,7 @@
     {\r
       "$type": "OctopusMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/octopus",\r
+        "address": "http://10.10.1.28/services/rest/octopus",\r
         "userName": "dani",\r
         "password": "dani",\r
         "timeout": 1000\r
@@ -41,7 +41,7 @@
     {\r
       "$type": "MediaCubeMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/jobengine",\r
+        "address": "http://10.10.1.28/services/rest/jobengine",\r
         "userName": "dani",\r
         "password": "dani"\r
       }\r
index 6077a5574a59a0ee9ce00fafe22e17bad0f77980..192109ac8a5d2aab9dffdae4e5983798660e505c 100644 (file)
@@ -23,7 +23,7 @@
     {\r
       "$type": "OctopusMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/octopus",\r
+        "address": "http://10.10.1.28/services/rest/octopus",\r
         "userName": "dani",\r
         "password": "dani",\r
         "timeout": 1000\r
@@ -41,7 +41,7 @@
     {\r
       "$type": "MediaCubeMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/jobengine",\r
+        "address": "http://10.10.1.28/services/rest/jobengine",\r
         "userName": "dani",\r
         "password": "dani"\r
       }\r
diff --git a/client/Maestro/Resources/configuration-ingest - Copy.json b/client/Maestro/Resources/configuration-ingest - Copy.json
deleted file mode 100644 (file)
index d382eb3..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-{\r
-  "title": "Betöltés",\r
-  "active": true,\r
-  "startInTray": false,\r
-  "enableCustomMetadataId": false,\r
-  "player": {\r
-    "enabled": true,\r
-    "autoStart": false,\r
-    "segmentEditor": false\r
-  },\r
-  "source": {\r
-    "$type": "UNCSource",\r
-    "local": {\r
-      "address": "file://c:\\_video\\v\\sxs\\xdroot\\clip"\r
-    }\r
-  },\r
-  "metadatas": [\r
-    {\r
-      "$type": "OctopusMetadata",\r
-      "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/octopus/",\r
-        "userName": "user",\r
-        "password": "password",\r
-        "timeout": 1000\r
-      }\r
-    },\r
-    {\r
-      "$type": "TrafficMetadata",\r
-      "server": {\r
-        "address": "Data Source=10.10.1.45\\sql16;Initial Catalog=PA_Echo;Persist Security Info=True;",\r
-        "userName": "MAM",\r
-        "password": "Echotv.hu",\r
-        "timeout": 5\r
-      }\r
-    },\r
-    {\r
-      "$type": "MediaCubeMetadata",\r
-      "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/jobengine/",\r
-        "userName": "user",\r
-        "password": "password",\r
-        "timeout": 1000\r
-      }\r
-    }\r
-  ],\r
-  "targets": [\r
-    {\r
-      "label": "Híranyag betöltés",\r
-      "processor": "UNCTargetProcessor",\r
-      "outputFormat": "%ID%-%SOURCENAME%",\r
-      "tag": "Betöltés",\r
-      "createSubFolder": true,\r
-      "killDateDays": 7,\r
-      "useMetadata": false,\r
-      "remote": {\r
-        "address": "file://10.10.1.100/BRAAVOS/ARCHIVE",\r
-        "userName": "mediacube",\r
-        "password": "Broadca5T"\r
-      }\r
-    },\r
-    {\r
-      "label": "Adásanyag betöltés",\r
-      "processor": "UNCTargetProcessor",\r
-      "outputFormat": "%ID%",\r
-      "tag": "Betöltés",\r
-      "saveSegments": false,\r
-      "killDateDays": 7,\r
-      "createSubFolder": false,\r
-      "useMetadata": false,\r
-      "remote": {\r
-        "address": "file://10.10.1.100/BRAAVOS/PLAYOUT_CHECK",\r
-        "userName": "mediacube",\r
-        "password": "Broadca5T"\r
-      }\r
-    }\r
-  ]\r
-}\r
index afef402901c6eb90e26f35e97c94941e4014300e..2a2d3a317c07c279b2a3b040ce8fcb1568f16429 100644 (file)
@@ -19,7 +19,7 @@
     {\r
       "$type": "OctopusMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/octopus/",\r
+        "address": "http://10.10.1.28/services/rest/octopus/",\r
         "userName": "user",\r
         "password": "password",\r
         "timeout": 1000\r
@@ -37,7 +37,7 @@
     {\r
       "$type": "MediaCubeMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/jobengine/",\r
+        "address": "http://10.10.1.28/services/rest/jobengine/",\r
         "userName": "user",\r
         "password": "password",\r
         "timeout": 1000\r
index f0a69cb46010ac893e843f5e90c4c5519f4eaf79..e6a989ec43a60fc2a167efe22b923cf067dd68f5 100644 (file)
@@ -24,7 +24,7 @@
     {\r
       "$type": "OctopusMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/octopus",\r
+        "address": "http://10.10.1.28/services/rest/octopus",\r
         "userName": "dani",\r
         "password": "dani",\r
         "timeout": 1000\r
@@ -42,7 +42,7 @@
     {\r
       "$type": "MediaCubeMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/jobengine",\r
+        "address": "http://10.10.1.28/services/rest/jobengine",\r
         "userName": "dani",\r
         "password": "dani"\r
       }\r
index f9c9112f2b46019f3a235df93b7b224d4f239489..1a1505e2b117893fad038e10578c61e7d410e863 100644 (file)
@@ -23,7 +23,7 @@
     {\r
       "$type": "OctopusMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/octopus/",\r
+        "address": "http://10.10.1.28/services/rest/octopus/",\r
         "userName": "dani",\r
         "password": "dani",\r
         "timeout": 1000\r
@@ -41,7 +41,7 @@
     {\r
       "$type": "MediaCubeMetadata",\r
       "server": {\r
-        "address": "http://10.10.1.28:8080/services/rest/jobengine/",\r
+        "address": "http://10.10.1.28/services/rest/jobengine/",\r
         "userName": "dani",\r
         "password": "dani"\r
       }\r
diff --git a/server/-configuration/jetty-deploy/etc/jetty.xml b/server/-configuration/jetty-deploy/etc/jetty.xml
new file mode 100644 (file)
index 0000000..f85a955
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
+
+<!-- =============================================================== -->
+<!-- Documentation of this file format can be found at:              -->
+<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax        -->
+<!--                                                                 -->
+<!-- Additional configuration files are available in $JETTY_HOME/etc -->
+<!-- and can be mixed in. See start.ini file for the default         -->
+<!-- configuration files.                                            -->
+<!--                                                                 -->
+<!-- For a description of the configuration mechanism, see the       -->
+<!-- output of:                                                      -->
+<!--   java -jar start.jar -?                                        -->
+<!-- =============================================================== -->
+
+<!-- =============================================================== -->
+<!-- Configure a Jetty Server instance with an ID "Server"           -->
+<!-- Other configuration files may also configure the "Server"       -->
+<!-- ID, in which case they are adding configuration to the same     -->
+<!-- instance.  If other configuration have a different ID, they     -->
+<!-- will create and configure another instance of Jetty.            -->
+<!-- Consult the javadoc of o.e.j.server.Server for all              -->
+<!-- configuration that may be set here.                             -->
+<!-- =============================================================== -->
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+
+    <!-- =========================================================== -->
+    <!-- Configure the Server Thread Pool.                           -->
+    <!-- The server holds a common thread pool which is used by      -->
+    <!-- default as the executor used by all connectors and servlet  -->
+    <!-- dispatches.                                                 -->
+    <!--                                                             -->
+    <!-- Configuring a fixed thread pool is vital to controlling the -->
+    <!-- maximal memory footprint of the server and is a key tuning  -->
+    <!-- parameter for tuning.  In an application that rarely blocks -->
+    <!-- then maximal threads may be close to the number of 5*CPUs.  -->
+    <!-- In an application that frequently blocks, then maximal      -->
+    <!-- threads should be set as high as possible given the memory  -->
+    <!-- available.                                                  -->
+    <!--                                                             -->
+    <!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool   -->
+    <!-- for all configuration that may be set here.                 -->
+    <!-- =========================================================== -->
+    <!-- uncomment to change type of threadpool
+    <Arg name="threadpool"><New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool"/></Arg>
+    -->
+    <Get name="ThreadPool">
+      <Set name="minThreads" type="int"><Property name="jetty.threadPool.minThreads" deprecated="threads.min" default="10"/></Set>
+      <Set name="maxThreads" type="int"><Property name="jetty.threadPool.maxThreads" deprecated="threads.max" default="200"/></Set>
+      <Set name="idleTimeout" type="int"><Property name="jetty.threadPool.idleTimeout" deprecated="threads.timeout" default="60000"/></Set>
+      <Set name="detailedDump">false</Set>
+    </Get>
+
+    <!-- =========================================================== -->
+    <!-- Add shared Scheduler instance                               -->
+    <!-- =========================================================== -->
+    <Call name="addBean">
+      <Arg>
+        <New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/>
+      </Arg>
+    </Call>
+
+    <!-- =========================================================== -->
+    <!-- Http Configuration.                                         -->
+    <!-- This is a common configuration instance used by all         -->
+    <!-- connectors that can carry HTTP semantics (HTTP, HTTPS, etc.)-->
+    <!-- It configures the non wire protocol aspects of the HTTP     -->
+    <!-- semantic.                                                   -->
+    <!--                                                             -->
+    <!-- This configuration is only defined here and is used by      -->
+    <!-- reference from other XML files such as jetty-http.xml,      -->
+    <!-- jetty-https.xml and other configuration files which         -->
+    <!-- instantiate the connectors.                                 -->
+    <!--                                                             -->
+    <!-- Consult the javadoc of o.e.j.server.HttpConfiguration       -->
+    <!-- for all configuration that may be set here.                 -->
+    <!-- =========================================================== -->
+    <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
+      <Set name="secureScheme"><Property name="jetty.httpConfig.secureScheme" default="https" /></Set>
+      <Set name="securePort"><Property name="jetty.httpConfig.securePort" deprecated="jetty.secure.port" default="8443" /></Set>
+      <Set name="outputBufferSize"><Property name="jetty.httpConfig.outputBufferSize" deprecated="jetty.output.buffer.size" default="32768" /></Set>
+      <Set name="outputAggregationSize"><Property name="jetty.httpConfig.outputAggregationSize" deprecated="jetty.output.aggregation.size" default="8192" /></Set>
+      <Set name="requestHeaderSize"><Property name="jetty.httpConfig.requestHeaderSize" deprecated="jetty.request.header.size" default="8192" /></Set>
+      <Set name="responseHeaderSize"><Property name="jetty.httpConfig.responseHeaderSize" deprecated="jetty.response.header.size" default="8192" /></Set>
+      <Set name="sendServerVersion"><Property name="jetty.httpConfig.sendServerVersion" deprecated="jetty.send.server.version" default="true" /></Set>
+      <Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" deprecated="jetty.send.date.header" default="false" /></Set>
+      <Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="512" /></Set>
+      <Set name="delayDispatchUntilContent"><Property name="jetty.httpConfig.delayDispatchUntilContent" deprecated="jetty.delayDispatchUntilContent" default="true"/></Set>
+      <Set name="maxErrorDispatches"><Property name="jetty.httpConfig.maxErrorDispatches" default="10"/></Set>
+      <Set name="blockingTimeout"><Property name="jetty.httpConfig.blockingTimeout" default="-1"/></Set>
+      <Set name="persistentConnectionsEnabled"><Property name="jetty.httpConfig.persistentConnectionsEnabled" default="true"/></Set>
+    </New>
+
+    <!-- =========================================================== -->
+    <!-- Set the default handler structure for the Server            -->
+    <!-- A handler collection is used to pass received requests to   -->
+    <!-- both the ContextHandlerCollection, which selects the next   -->
+    <!-- handler by context path and virtual host, and the           -->
+    <!-- DefaultHandler, which handles any requests not handled by   -->
+    <!-- the context handlers.                                       -->
+    <!-- Other handlers may be added to the "Handlers" collection,   -->
+    <!-- for example the jetty-requestlog.xml file adds the          -->
+    <!-- RequestLogHandler after the default handler                 -->
+    <!-- =========================================================== -->
+    <Set name="handler">
+      <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
+        <Set name="handlers">
+         <Array type="org.eclipse.jetty.server.Handler">
+           <Item>
+             <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
+           </Item>
+           <Item>
+             <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
+           </Item>
+         </Array>
+        </Set>
+      </New>
+    </Set>
+
+    <!-- =========================================================== -->
+    <!-- extra server options                                        -->
+    <!-- =========================================================== -->
+    <Set name="stopAtShutdown"><Property name="jetty.server.stopAtShutdown" default="true"/></Set>
+    <Set name="stopTimeout"><Property name="jetty.server.stopTimeout" default="5000"/></Set>
+    <Set name="dumpAfterStart"><Property name="jetty.server.dumpAfterStart" deprecated="jetty.dump.start" default="false"/></Set>
+    <Set name="dumpBeforeStop"><Property name="jetty.server.dumpBeforeStop" deprecated="jetty.dump.stop" default="false"/></Set>
+
+</Configure>
diff --git a/server/-configuration/jetty-deploy/etc/keystore b/server/-configuration/jetty-deploy/etc/keystore
new file mode 100644 (file)
index 0000000..95d7f4c
Binary files /dev/null and b/server/-configuration/jetty-deploy/etc/keystore differ
diff --git a/server/-configuration/jetty-deploy/etc/localhost.jks b/server/-configuration/jetty-deploy/etc/localhost.jks
new file mode 100644 (file)
index 0000000..95d7f4c
Binary files /dev/null and b/server/-configuration/jetty-deploy/etc/localhost.jks differ
diff --git a/server/-configuration/jetty-deploy/etc/login.conf b/server/-configuration/jetty-deploy/etc/login.conf
new file mode 100644 (file)
index 0000000..7f38fa8
--- /dev/null
@@ -0,0 +1,5 @@
+loginModule {
+       user.jobengine.osgi.service.LoginModule required 
+       debug="true"
+       option="1";
+};
\ No newline at end of file
diff --git a/server/-configuration/jetty-deploy/etc/login.properties b/server/-configuration/jetty-deploy/etc/login.properties
new file mode 100644 (file)
index 0000000..4b91dd7
--- /dev/null
@@ -0,0 +1,4 @@
+me=me,me,roleA
+lol=lol,user,admin
+password=password,user,admin
+user=user,user,admin
diff --git a/server/-configuration/jetty-deploy/etc/login_propertyfile.conf b/server/-configuration/jetty-deploy/etc/login_propertyfile.conf
new file mode 100644 (file)
index 0000000..3829c9b
--- /dev/null
@@ -0,0 +1,5 @@
+loginModule {
+org.eclipse.jetty.plus.jaas.spi.PropertyFileLoginModule required
+debug="true"
+file="/etc/login.properties";
+};
\ No newline at end of file
diff --git a/server/-configuration/jetty-deploy/etc/sampkey.jks b/server/-configuration/jetty-deploy/etc/sampkey.jks
new file mode 100644 (file)
index 0000000..e8da3a6
Binary files /dev/null and b/server/-configuration/jetty-deploy/etc/sampkey.jks differ
diff --git a/server/-configuration/jetty-deploy/etc/user-jetty-deployer.xml b/server/-configuration/jetty-deploy/etc/user-jetty-deployer.xml
new file mode 100644 (file)
index 0000000..ba61d10
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
+
+<!-- =============================================================== -->
+<!-- Create the deployment manager                                   -->
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<!-- The deplyment manager handles the lifecycle of deploying web    -->
+<!-- applications. Apps are provided by instances of the             -->
+<!-- AppProvider interface.                                          -->
+<!-- =============================================================== -->
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+
+  <Call name="addBean">
+    <Arg>
+      <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
+        <Set name="contexts">
+          <Ref refid="Contexts" />
+        </Set>
+        <Call name="setContextAttribute">
+          <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
+          <Arg>.*/[^/]*servlet-api-[^/]*\.jar$|.*/javax.servlet.jsp.jstl-.*\.jar$|.*/org.apache.taglibs.taglibs-standard-impl-.*\.jar$</Arg>
+        </Call>
+
+        <!-- Add a customize step to the deployment lifecycle -->
+        <!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class
+        <Call name="insertLifeCycleNode">
+          <Arg>deployed</Arg>
+          <Arg>starting</Arg>
+          <Arg>customise</Arg>
+        </Call>
+        <Call name="addLifeCycleBinding">
+          <Arg>
+            <New class="org.eclipse.jetty.deploy.bindings.DebugBinding">
+              <Arg>customise</Arg>
+            </New>
+          </Arg>
+        </Call> -->
+
+        <Call id="webappprovider" name="addAppProvider">
+          <Arg>
+            <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
+              <Set name="monitoredDirName">
+                <Property>
+                  <Name>jetty.deploy.monitoredPath</Name>
+                  <Default>
+                    <Property name="jetty.base" default="." />/<Property name="jetty.deploy.monitoredDir" deprecated="jetty.deploy.monitoredDirName" default="."/>
+                  </Default>
+                </Property>
+              </Set>
+              <Set name="defaultsDescriptor">
+                <Property>
+                  <Name>jetty.deploy.defaultsDescriptorPath</Name>
+                  <Default>
+                    <Property name="jetty.home" default="." />/etc/webdefault.xml
+                  </Default>
+                </Property>
+              </Set>
+              <Set name="scanInterval"><Property name="jetty.deploy.scanInterval" default="1"/></Set>
+              <Set name="extractWars"><Property name="jetty.deploy.extractWars" default="true"/></Set>
+              <Set name="configurationManager">
+                <New class="org.eclipse.jetty.deploy.PropertiesConfigurationManager">
+                  <!-- file of context configuration properties
+                  <Set name="file"><SystemProperty name="jetty.base"/>/etc/some.properties</Set>
+                  -->
+                  <!-- set a context configuration property
+                  <Call name="put"><Arg>name</Arg><Arg>value</Arg></Call>
+                  -->
+                </New>
+              </Set>
+            </New>
+          </Arg>
+        </Call>
+      </New>
+    </Arg>
+  </Call>
+</Configure>
diff --git a/server/-configuration/jetty-deploy/etc/user-jetty-http-redirect.xml b/server/-configuration/jetty-deploy/etc/user-jetty-http-redirect.xml
new file mode 100644 (file)
index 0000000..701042c
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
+
+<!-- ============================================================= -->
+<!-- Configure the Jetty Server instance with an ID "Server"       -->
+<!-- by adding a HTTP connector.                                   -->
+<!-- This configuration must be used in conjunction with jetty.xml -->
+<!-- ============================================================= -->
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+
+  <!-- =========================================================== -->
+  <!-- Add a HTTP Connector.                                       -->
+  <!-- Configure an o.e.j.server.ServerConnector with a single     -->
+  <!-- HttpConnectionFactory instance using the common httpConfig  -->
+  <!-- instance defined in jetty.xml                               -->
+  <!--                                                             -->
+  <!-- Consult the javadoc of o.e.j.server.ServerConnector and     -->
+  <!-- o.e.j.server.HttpConnectionFactory for all configuration    -->
+  <!-- that may be set here.                                       -->
+  <!-- =========================================================== -->
+  <Call name="addConnector">
+    <Arg>
+      <New id="httpConnector" class="org.eclipse.jetty.server.ServerConnector">
+        <Arg name="server"><Ref refid="Server" /></Arg>
+        <Arg name="acceptors" type="int"><Property name="jetty.http.acceptors" deprecated="http.acceptors" default="-1"/></Arg>
+        <Arg name="selectors" type="int"><Property name="jetty.http.selectors" deprecated="http.selectors" default="-1"/></Arg>
+        <Arg name="factories">
+          <Array type="org.eclipse.jetty.server.ConnectionFactory">
+            <Item>
+              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
+               <Arg name="config">
+                  <New id="tlsHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
+                                          <Arg>
+                                             <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
+                                                <!-- This says... Redirect to https://host:8443 if server returns "NOT SECURE" error -->
+                                                <Set name="secureScheme">https</Set>
+                                                <Set name="securePort">8443</Set>
+                                             </New>
+                                          </Arg>
+                                          <Call name="addCustomizer">
+                                             <Arg>
+                                                <New class="org.eclipse.jetty.server.SecureRequestCustomizer" />
+                                             </Arg>
+                                          </Call>
+                                       </New>
+                </Arg>
+              </New>
+            </Item>
+          </Array>
+        </Arg>
+        <Set name="host"><Property name="jetty.http.host" deprecated="jetty.host" /></Set>
+        <Set name="port"><Property name="jetty.http.port" deprecated="jetty.port" default="8080" /></Set>
+        <Set name="idleTimeout"><Property name="jetty.http.idleTimeout" deprecated="http.timeout" default="30000"/></Set>
+        <Set name="soLingerTime"><Property name="jetty.http.soLingerTime" deprecated="http.soLingerTime" default="-1"/></Set>
+        <Set name="acceptorPriorityDelta"><Property name="jetty.http.acceptorPriorityDelta" deprecated="http.acceptorPriorityDelta" default="0"/></Set>
+        <Set name="acceptQueueSize"><Property name="jetty.http.acceptQueueSize" deprecated="http.acceptQueueSize" default="0"/></Set>
+      </New>
+    </Arg>
+  </Call>
+
+</Configure>
diff --git a/server/-configuration/jetty-deploy/etc/user-jetty-http.xml b/server/-configuration/jetty-deploy/etc/user-jetty-http.xml
new file mode 100644 (file)
index 0000000..319ae6c
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
+
+<!-- ============================================================= -->
+<!-- Configure the Jetty Server instance with an ID "Server"       -->
+<!-- by adding a HTTP connector.                                   -->
+<!-- This configuration must be used in conjunction with jetty.xml -->
+<!-- ============================================================= -->
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+
+  <!-- =========================================================== -->
+  <!-- Add a HTTP Connector.                                       -->
+  <!-- Configure an o.e.j.server.ServerConnector with a single     -->
+  <!-- HttpConnectionFactory instance using the common httpConfig  -->
+  <!-- instance defined in jetty.xml                               -->
+  <!--                                                             -->
+  <!-- Consult the javadoc of o.e.j.server.ServerConnector and     -->
+  <!-- o.e.j.server.HttpConnectionFactory for all configuration    -->
+  <!-- that may be set here.                                       -->
+  <!-- =========================================================== -->
+  <Call name="addConnector">
+    <Arg>
+      <New class="org.eclipse.jetty.server.ServerConnector">
+        <Arg name="server"><Ref refid="Server" /></Arg>
+        <Arg name="factories">
+          <Array type="org.eclipse.jetty.server.ConnectionFactory">
+            <Item>
+              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
+                <Arg name="config"><Ref refid="httpConfig" /></Arg>
+              </New>
+            </Item>
+          </Array>
+        </Arg>
+        <Set name="host"><Property name="jetty.http.host" /></Set>
+        <Set name="port"><Property name="jetty.http.port" default="80" /></Set>
+        <Set name="idleTimeout"><Property name="jetty.http.idleTimeout" default="30000"/></Set>
+      </New>
+    </Arg>
+  </Call>
+
+</Configure>
diff --git a/server/-configuration/jetty-deploy/etc/user-jetty-https.xml b/server/-configuration/jetty-deploy/etc/user-jetty-https.xml
new file mode 100644 (file)
index 0000000..71a0837
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
+
+<!-- ============================================================= -->
+<!-- Configure a HTTPS connector.                                  -->
+<!-- This configuration must be used in conjunction with jetty.xml -->
+<!-- and jetty-ssl.xml.                                            -->
+<!-- ============================================================= -->
+<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
+
+  <Call name="addIfAbsentConnectionFactory">
+    <Arg>
+      <New class="org.eclipse.jetty.server.SslConnectionFactory">
+        <Arg name="next">http/1.1</Arg>
+        <Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg>
+      </New>
+    </Arg>
+  </Call>
+
+  <Call name="addConnectionFactory">
+    <Arg>
+      <New class="org.eclipse.jetty.server.HttpConnectionFactory">
+        <Arg name="config"><Ref refid="sslHttpConfig" /></Arg>
+        <Arg name="compliance"><Call class="org.eclipse.jetty.http.HttpCompliance" name="valueOf"><Arg><Property name="jetty.http.compliance" default="RFC7230"/></Arg></Call></Arg>
+      </New>
+    </Arg>
+  </Call>
+  
+</Configure>
diff --git a/server/-configuration/jetty-deploy/etc/user-jetty-ssl-context.xml b/server/-configuration/jetty-deploy/etc/user-jetty-ssl-context.xml
new file mode 100644 (file)
index 0000000..2630918
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
+
+<!-- ============================================================= -->
+<!-- SSL ContextFactory configuration                              -->
+<!-- ============================================================= -->
+
+<!-- 
+  To configure Includes / Excludes for Cipher Suites or Protocols see tweak-ssl.xml example at 
+     https://www.eclipse.org/jetty/documentation/current/configuring-ssl.html#configuring-sslcontextfactory-cipherSuites
+-->
+
+<Configure id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
+  <Set name="KeyStorePath"><Property name="jetty.base" default="." />/<Property name="jetty.sslContext.keyStorePath" deprecated="jetty.keystore" default="etc/localhost.jks"/></Set>
+  <Set name="KeyStorePassword"><Property name="jetty.sslContext.keyStorePassword" deprecated="jetty.keystore.password" default="password"/></Set>
+  <Set name="KeyStoreType"><Property name="jetty.sslContext.keyStoreType" default="JKS"/></Set>
+  <Set name="KeyStoreProvider"><Property name="jetty.sslContext.keyStoreProvider"/></Set>
+  <Set name="KeyManagerPassword"><Property name="jetty.sslContext.keyManagerPassword" deprecated="jetty.keymanager.password" default="password"/></Set>
+  <Set name="TrustStorePath"><Property name="jetty.base" default="." />/<Property name="jetty.sslContext.trustStorePath" deprecated="jetty.truststore" default="etc/localhost.jks"/></Set>
+  <Set name="TrustStorePassword"><Property name="jetty.sslContext.trustStorePassword" deprecated="jetty.truststore.password" default="password"/></Set>
+  <Set name="TrustStoreType"><Property name="jetty.sslContext.trustStoreType"/></Set>
+  <Set name="TrustStoreProvider"><Property name="jetty.sslContext.trustStoreProvider"/></Set>
+  <Set name="EndpointIdentificationAlgorithm"></Set>
+  <Set name="NeedClientAuth"><Property name="jetty.sslContext.needClientAuth" deprecated="jetty.ssl.needClientAuth" default="false"/></Set>
+  <Set name="WantClientAuth"><Property name="jetty.sslContext.wantClientAuth" deprecated="jetty.ssl.wantClientAuth" default="false"/></Set>
+  <Set name="useCipherSuitesOrder"><Property name="jetty.sslContext.useCipherSuitesOrder" default="true"/></Set>
+  <Set name="sslSessionCacheSize"><Property name="jetty.sslContext.sslSessionCacheSize" default="-1"/></Set>
+  <Set name="sslSessionTimeout"><Property name="jetty.sslContext.sslSessionTimeout" default="-1"/></Set>
+</Configure>
diff --git a/server/-configuration/jetty-deploy/etc/user-jetty-ssl.xml b/server/-configuration/jetty-deploy/etc/user-jetty-ssl.xml
new file mode 100644 (file)
index 0000000..365ea98
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
+
+<!-- ============================================================= -->
+<!-- Base SSL configuration                                        -->
+<!-- This configuration needs to be used together with 1 or more   -->
+<!-- of jetty-https.xml or jetty-http2.xml                         -->
+<!-- ============================================================= -->
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+
+  <!-- =========================================================== -->
+  <!-- Add a SSL Connector with no protocol factories              -->
+  <!-- =========================================================== -->
+  <Call  name="addConnector">
+    <Arg>
+      <New id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
+        <Arg name="server"><Ref refid="Server" /></Arg>
+        <Arg name="acceptors" type="int"><Property name="jetty.ssl.acceptors" deprecated="ssl.acceptors" default="-1"/></Arg>
+        <Arg name="selectors" type="int"><Property name="jetty.ssl.selectors" deprecated="ssl.selectors" default="-1"/></Arg>
+        <Arg name="factories">
+          <Array type="org.eclipse.jetty.server.ConnectionFactory">
+            <!-- uncomment to support proxy protocol
+            <Item>
+              <New class="org.eclipse.jetty.server.ProxyConnectionFactory"/>
+            </Item>-->
+          </Array>
+        </Arg>
+
+        <Set name="host"><Property name="jetty.ssl.host" deprecated="jetty.host" /></Set>
+        <Set name="port"><Property name="jetty.ssl.port" deprecated="ssl.port" default="443" /></Set>
+        <Set name="idleTimeout"><Property name="jetty.ssl.idleTimeout" deprecated="ssl.timeout" default="30000"/></Set>
+        <Set name="soLingerTime"><Property name="jetty.ssl.soLingerTime" deprecated="ssl.soLingerTime" default="-1"/></Set>
+        <Set name="acceptorPriorityDelta"><Property name="jetty.ssl.acceptorPriorityDelta" deprecated="ssl.acceptorPriorityDelta" default="0"/></Set>
+        <Set name="acceptQueueSize"><Property name="jetty.ssl.acceptQueueSize" deprecated="ssl.acceptQueueSize" default="0"/></Set>
+      </New>
+    </Arg>
+  </Call>
+
+  <!-- =========================================================== -->
+  <!-- Create a TLS specific HttpConfiguration based on the        -->
+  <!-- common HttpConfiguration defined in jetty.xml               -->
+  <!-- Add a SecureRequestCustomizer to extract certificate and    -->
+  <!-- session information                                         -->
+  <!-- =========================================================== -->
+  <New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
+    <Arg><Ref refid="httpConfig"/></Arg>
+    <Call name="addCustomizer">
+      <Arg>
+        <New class="org.eclipse.jetty.server.SecureRequestCustomizer">
+          <Arg name="sniHostCheck" type="boolean"><Property name="jetty.ssl.sniHostCheck" default="true"/></Arg>
+          <Arg name="stsMaxAgeSeconds" type="int"><Property name="jetty.ssl.stsMaxAgeSeconds" default="-1"/></Arg>
+          <Arg name="stsIncludeSubdomains" type="boolean"><Property name="jetty.ssl.stsIncludeSubdomains" default="false"/></Arg>
+        </New>
+      </Arg>
+    </Call>
+  </New>
+
+</Configure>
diff --git a/server/-configuration/jetty-deploy/etc/user-jetty.xml b/server/-configuration/jetty-deploy/etc/user-jetty.xml
new file mode 100644 (file)
index 0000000..0ba3838
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
+
+<!-- =============================================================== -->
+<!-- Documentation of this file format can be found at:              -->
+<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax        -->
+<!--                                                                 -->
+<!-- Additional configuration files are available in $JETTY_HOME/etc -->
+<!-- and can be mixed in. See start.ini file for the default         -->
+<!-- configuration files.                                            -->
+<!--                                                                 -->
+<!-- For a description of the configuration mechanism, see the       -->
+<!-- output of:                                                      -->
+<!--   java -jar start.jar -?                                        -->
+<!-- =============================================================== -->
+
+<!-- =============================================================== -->
+<!-- Configure a Jetty Server instance with an ID "Server"           -->
+<!-- Other configuration files may also configure the "Server"       -->
+<!-- ID, in which case they are adding configuration to the same     -->
+<!-- instance.  If other configuration have a different ID, they     -->
+<!-- will create and configure another instance of Jetty.            -->
+<!-- Consult the javadoc of o.e.j.server.Server for all              -->
+<!-- configuration that may be set here.                             -->
+<!-- =============================================================== -->
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+
+    <!-- =========================================================== -->
+    <!-- Configure the Server Thread Pool.                           -->
+    <!-- The server holds a common thread pool which is used by      -->
+    <!-- default as the executor used by all connectors and servlet  -->
+    <!-- dispatches.                                                 -->
+    <!--                                                             -->
+    <!-- Configuring a fixed thread pool is vital to controlling the -->
+    <!-- maximal memory footprint of the server and is a key tuning  -->
+    <!-- parameter for tuning.  In an application that rarely blocks -->
+    <!-- then maximal threads may be close to the number of 5*CPUs.  -->
+    <!-- In an application that frequently blocks, then maximal      -->
+    <!-- threads should be set as high as possible given the memory  -->
+    <!-- available.                                                  -->
+    <!--                                                             -->
+    <!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool   -->
+    <!-- for all configuration that may be set here.                 -->
+    <!-- =========================================================== -->
+    <!-- uncomment to change type of threadpool
+    <Arg name="threadpool"><New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool"/></Arg>
+    -->
+    <Get name="ThreadPool">
+      <Set name="minThreads" type="int"><Property name="jetty.threadPool.minThreads" deprecated="threads.min" default="10"/></Set>
+      <Set name="maxThreads" type="int"><Property name="jetty.threadPool.maxThreads" deprecated="threads.max" default="200"/></Set>
+      <Set name="idleTimeout" type="int"><Property name="jetty.threadPool.idleTimeout" deprecated="threads.timeout" default="60000"/></Set>
+      <Set name="detailedDump">false</Set>
+    </Get>
+
+    <!-- =========================================================== -->
+    <!-- Add shared Scheduler instance                               -->
+    <!-- =========================================================== -->
+    <Call name="addBean">
+      <Arg>
+        <New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/>
+      </Arg>
+    </Call>
+
+    <!-- =========================================================== -->
+    <!-- Http Configuration.                                         -->
+    <!-- This is a common configuration instance used by all         -->
+    <!-- connectors that can carry HTTP semantics (HTTP, HTTPS, etc.)-->
+    <!-- It configures the non wire protocol aspects of the HTTP     -->
+    <!-- semantic.                                                   -->
+    <!--                                                             -->
+    <!-- This configuration is only defined here and is used by      -->
+    <!-- reference from other XML files such as jetty-http.xml,      -->
+    <!-- jetty-https.xml and other configuration files which         -->
+    <!-- instantiate the connectors.                                 -->
+    <!--                                                             -->
+    <!-- Consult the javadoc of o.e.j.server.HttpConfiguration       -->
+    <!-- for all configuration that may be set here.                 -->
+    <!-- =========================================================== -->
+    <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
+      <Set name="secureScheme"><Property name="jetty.httpConfig.secureScheme" default="https" /></Set>
+      <Set name="securePort"><Property name="jetty.httpConfig.securePort" deprecated="jetty.secure.port" default="8443" /></Set>
+      <Set name="outputBufferSize"><Property name="jetty.httpConfig.outputBufferSize" deprecated="jetty.output.buffer.size" default="32768" /></Set>
+      <Set name="outputAggregationSize"><Property name="jetty.httpConfig.outputAggregationSize" deprecated="jetty.output.aggregation.size" default="8192" /></Set>
+      <Set name="requestHeaderSize"><Property name="jetty.httpConfig.requestHeaderSize" deprecated="jetty.request.header.size" default="8192" /></Set>
+      <Set name="responseHeaderSize"><Property name="jetty.httpConfig.responseHeaderSize" deprecated="jetty.response.header.size" default="8192" /></Set>
+      <Set name="sendServerVersion"><Property name="jetty.httpConfig.sendServerVersion" deprecated="jetty.send.server.version" default="true" /></Set>
+      <Set name="sendDateHeader"><Property name="jetty.httpConfig.sendDateHeader" deprecated="jetty.send.date.header" default="false" /></Set>
+      <Set name="headerCacheSize"><Property name="jetty.httpConfig.headerCacheSize" default="512" /></Set>
+      <Set name="delayDispatchUntilContent"><Property name="jetty.httpConfig.delayDispatchUntilContent" deprecated="jetty.delayDispatchUntilContent" default="true"/></Set>
+      <Set name="maxErrorDispatches"><Property name="jetty.httpConfig.maxErrorDispatches" default="10"/></Set>
+      <Set name="blockingTimeout"><Property name="jetty.httpConfig.blockingTimeout" default="-1"/></Set>
+      <Set name="persistentConnectionsEnabled"><Property name="jetty.httpConfig.persistentConnectionsEnabled" default="true"/></Set>
+    </New>
+
+    <!-- =========================================================== -->
+    <!-- Set the default handler structure for the Server            -->
+    <!-- A handler collection is used to pass received requests to   -->
+    <!-- both the ContextHandlerCollection, which selects the next   -->
+    <!-- handler by context path and virtual host, and the           -->
+    <!-- DefaultHandler, which handles any requests not handled by   -->
+    <!-- the context handlers.                                       -->
+    <!-- Other handlers may be added to the "Handlers" collection,   -->
+    <!-- for example the jetty-requestlog.xml file adds the          -->
+    <!-- RequestLogHandler after the default handler                 -->
+    <!-- =========================================================== -->
+    <Set name="handler">
+      <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
+        <Set name="handlers">
+         <Array type="org.eclipse.jetty.server.Handler">
+           <Item>
+             <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
+           </Item>
+           <Item>
+             <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
+           </Item>
+         </Array>
+        </Set>
+      </New>
+    </Set>
+
+    <!-- =========================================================== -->
+    <!-- extra server options                                        -->
+    <!-- =========================================================== -->
+    <Set name="stopAtShutdown"><Property name="jetty.server.stopAtShutdown" default="true"/></Set>
+    <Set name="stopTimeout">5000</Set>
+    <Set name="dumpAfterStart"><Property name="jetty.server.dumpAfterStart" deprecated="jetty.dump.start" default="false"/></Set>
+    <Set name="dumpBeforeStop"><Property name="jetty.server.dumpBeforeStop" deprecated="jetty.dump.stop" default="false"/></Set>
+
+</Configure>
diff --git a/server/-configuration/jetty-deploy/etc/webdefault.xml b/server/-configuration/jetty-deploy/etc/webdefault.xml
new file mode 100644 (file)
index 0000000..d54d76f
--- /dev/null
@@ -0,0 +1,534 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app 
+   xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+   metadata-complete="false"
+   version="3.1"> 
+
+  <!-- ===================================================================== -->
+  <!-- This file contains the default descriptor for web applications.       -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <!-- The intent of this descriptor is to include jetty specific or common  -->
+  <!-- configuration for all webapps.   If a context has a webdefault.xml    -->
+  <!-- descriptor, it is applied before the context's own web.xml file       -->
+  <!--                                                                       -->
+  <!-- A context may be assigned a default descriptor by calling             -->
+  <!-- WebAppContext.setDefaultsDescriptor(String).                          -->
+  <!--                                                                       -->
+  <!-- This file is present in the jetty-webapp.jar, and is used as the      -->
+  <!-- defaults descriptor if no other is explicitly set on a context.       -->
+  <!--                                                                       -->
+  <!-- A copy of this file is also placed into the $JETTY_HOME/etc dir of    -->
+  <!-- the  distribution, and is referenced by some of the other xml files,  -->
+  <!-- eg the jetty-deploy.xml file.                                         -->
+  <!-- ===================================================================== -->
+
+  <description>
+    Default web.xml file.  
+    This file is applied to a Web application before it's own WEB_INF/web.xml file
+  </description>
+
+  <!-- ==================================================================== -->
+  <!-- Removes static references to beans from javax.el.BeanELResolver to   -->
+  <!-- ensure webapp classloader can be released on undeploy                -->
+  <!-- ==================================================================== -->
+  <listener>
+   <listener-class>org.eclipse.jetty.servlet.listener.ELContextCleaner</listener-class>
+  </listener>
+  
+  <!-- ==================================================================== -->
+  <!-- Removes static cache of Methods from java.beans.Introspector to      -->
+  <!-- ensure webapp classloader can be released on undeploy                -->
+  <!-- ==================================================================== -->  
+  <listener>
+   <listener-class>org.eclipse.jetty.servlet.listener.IntrospectorCleaner</listener-class>
+  </listener>
+  
+
+  <!-- ==================================================================== -->
+  <!-- Context params to control Session Cookies                            -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <!--
+    UNCOMMENT TO ACTIVATE 
+    <context-param> 
+      <param-name>org.eclipse.jetty.servlet.SessionDomain</param-name> 
+      <param-value>127.0.0.1</param-value> 
+    </context-param> 
+    <context-param>
+      <param-name>org.eclipse.jetty.servlet.SessionPath</param-name>
+      <param-value>/</param-value>
+    </context-param>
+    <context-param>
+      <param-name>org.eclipse.jetty.servlet.MaxAge</param-name>
+      <param-value>-1</param-value>
+    </context-param>
+  -->
+
+  <!-- ==================================================================== -->
+  <!-- The default servlet.                                                 -->
+  <!-- This servlet, normally mapped to /, provides the handling for static -->
+  <!-- content, OPTIONS and TRACE methods for the context.                  -->
+  <!-- The following initParameters are supported:                          -->
+  <!--  
+ *  acceptRanges      If true, range requests and responses are
+ *                    supported
+ *
+ *  dirAllowed        If true, directory listings are returned if no
+ *                    welcome file is found. Else 403 Forbidden.
+ *
+ *  welcomeServlets   If true, attempt to dispatch to welcome files
+ *                    that are servlets, but only after no matching static
+ *                    resources could be found. If false, then a welcome
+ *                    file must exist on disk. If "exact", then exact
+ *                    servlet matches are supported without an existing file.
+ *                    Default is true.
+ *
+ *                    This must be false if you want directory listings,
+ *                    but have index.jsp in your welcome file list.
+ *
+ *  redirectWelcome   If true, welcome files are redirected rather than
+ *                    forwarded to.
+ *
+ *  gzip              If set to true, then static content will be served as
+ *                    gzip content encoded if a matching resource is
+ *                    found ending with ".gz"
+ *
+ *  resourceBase      Set to replace the context resource base
+ *
+ *  resourceCache     If set, this is a context attribute name, which the servlet
+ *                    will use to look for a shared ResourceCache instance.
+ *
+ *  relativeResourceBase
+ *                    Set with a pathname relative to the base of the
+ *                    servlet context root. Useful for only serving static content out
+ *                    of only specific subdirectories.
+ *
+ *  pathInfoOnly      If true, only the path info will be applied to the resourceBase
+ *
+ *  stylesheet        Set with the location of an optional stylesheet that will be used
+ *                    to decorate the directory listing html.
+ *
+ *  aliases           If True, aliases of resources are allowed (eg. symbolic
+ *                    links and caps variations). May bypass security constraints.
+ *                    
+ *  etags             If True, weak etags will be generated and handled.
+ *
+ *  maxCacheSize      The maximum total size of the cache or 0 for no cache.
+ *  maxCachedFileSize The maximum size of a file to cache
+ *  maxCachedFiles    The maximum number of files to cache
+ *
+ *  useFileMappedBuffer
+ *                    If set to true, it will use mapped file buffers to serve static content
+ *                    when using an NIO connector. Setting this value to false means that
+ *                    a direct buffer will be used instead of a mapped file buffer.
+ *                    This file sets the value to true.
+ *
+ *  cacheControl      If set, all static content will have this value set as the cache-control
+ *                    header.
+ *
+ -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <servlet>
+    <servlet-name>default</servlet-name>
+    <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
+    <init-param>
+      <param-name>aliases</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>acceptRanges</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>dirAllowed</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>welcomeServlets</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>redirectWelcome</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCacheSize</param-name>
+      <param-value>256000000</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCachedFileSize</param-name>
+      <param-value>200000000</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCachedFiles</param-name>
+      <param-value>2048</param-value>
+    </init-param>
+    <init-param>
+      <param-name>gzip</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>etags</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>useFileMappedBuffer</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <!--
+    <init-param>
+      <param-name>resourceCache</param-name>
+      <param-value>resourceCache</param-value>
+    </init-param>
+    -->
+    <!--
+    <init-param>
+      <param-name>cacheControl</param-name>
+      <param-value>max-age=3600,public</param-value>
+    </init-param>
+    -->
+    <load-on-startup>0</load-on-startup>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>default</servlet-name>
+    <url-pattern>/</url-pattern>
+  </servlet-mapping>
+
+
+  <!-- ==================================================================== -->
+  <!-- JSP Servlet                                                          -->
+  <!-- This is the jasper JSP servlet.                                      -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <!-- The JSP page compiler and execution servlet, which is the mechanism  -->
+  <!-- used by the jsp container to support JSP pages.  Traditionally,      -->
+  <!-- this servlet is mapped to URL pattern "*.jsp".  This servlet         -->
+  <!-- supports the following initialization parameters (default values     -->
+  <!-- are in square brackets):                                             -->
+  <!--                                                                      -->
+  <!--   checkInterval       If development is false and reloading is true, -->
+  <!--                       background compiles are enabled. checkInterval -->
+  <!--                       is the time in seconds between checks to see   -->
+  <!--                       if a JSP page needs to be recompiled. [300]    -->
+  <!--                                                                      -->
+  <!--   compiler            Which compiler Ant should use to compile JSP   -->
+  <!--                       pages.  See the Ant documentation for more     -->
+  <!--                       information. [javac]                           -->
+  <!--                                                                      -->
+  <!--   classdebuginfo      Should the class file be compiled with         -->
+  <!--                       debugging information?  [true]                 -->
+  <!--                                                                      -->
+  <!--   classpath           What class path should I use while compiling   -->
+  <!--                       generated servlets?  [Created dynamically      -->
+  <!--                       based on the current web application]          -->
+  <!--                       Set to ? to make the container explicitly set  -->
+  <!--                       this parameter.                                -->
+  <!--                                                                      -->
+  <!--   development         Is Jasper used in development mode (will check -->
+  <!--                       for JSP modification on every access)?  [true] -->
+  <!--                                                                      -->
+  <!--   enablePooling       Determines whether tag handler pooling is      -->
+  <!--                       enabled  [true]                                -->
+  <!--                                                                      -->
+  <!--   fork                Tell Ant to fork compiles of JSP pages so that -->
+  <!--                       a separate JVM is used for JSP page compiles   -->
+  <!--                       from the one Tomcat is running in. [true]      -->
+  <!--                                                                      -->
+  <!--   ieClassId           The class-id value to be sent to Internet      -->
+  <!--                       Explorer when using <jsp:plugin> tags.         -->
+  <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]   -->
+  <!--                                                                      -->
+  <!--   javaEncoding        Java file encoding to use for generating java  -->
+  <!--                       source files. [UTF-8]                          -->
+  <!--                                                                      -->
+  <!--   keepgenerated       Should we keep the generated Java source code  -->
+  <!--                       for each page instead of deleting it? [true]   -->
+  <!--                                                                      -->
+  <!--   logVerbosityLevel   The level of detailed messages to be produced  -->
+  <!--                       by this servlet.  Increasing levels cause the  -->
+  <!--                       generation of more messages.  Valid values are -->
+  <!--                       FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
+  <!--                       [WARNING]                                      -->
+  <!--                                                                      -->
+  <!--   mappedfile          Should we generate static content with one     -->
+  <!--                       print statement per input line, to ease        -->
+  <!--                       debugging?  [false]                            -->
+  <!--                                                                      -->
+  <!--                                                                      -->
+  <!--   reloading           Should Jasper check for modified JSPs?  [true] -->
+  <!--                                                                      -->
+  <!--   suppressSmap        Should the generation of SMAP info for JSR45   -->
+  <!--                       debugging be suppressed?  [false]              -->
+  <!--                                                                      -->
+  <!--   dumpSmap            Should the SMAP info for JSR45 debugging be    -->
+  <!--                       dumped to a file? [false]                      -->
+  <!--                       False if suppressSmap is true                  -->
+  <!--                                                                      -->
+  <!--   scratchdir          What scratch directory should we use when      -->
+  <!--                       compiling JSP pages?  [default work directory  -->
+  <!--                       for the current web application]               -->
+  <!--                                                                      -->
+  <!--   tagpoolMaxSize      The maximum tag handler pool size  [5]         -->
+  <!--                                                                      -->
+  <!--   xpoweredBy          Determines whether X-Powered-By response       -->
+  <!--                       header is added by generated servlet  [false]  -->
+  <!--                                                                      -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <servlet id="jsp">
+    <servlet-name>jsp</servlet-name>
+    <servlet-class>org.eclipse.jetty.jsp.JettyJspServlet</servlet-class>
+    <init-param>
+      <param-name>logVerbosityLevel</param-name>
+      <param-value>DEBUG</param-value>
+    </init-param>
+    <init-param>
+      <param-name>fork</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>xpoweredBy</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>compilerTargetVM</param-name>
+      <param-value>1.7</param-value>
+    </init-param>
+    <init-param>
+      <param-name>compilerSourceVM</param-name>
+      <param-value>1.7</param-value>
+    </init-param>
+    <!--  
+    <init-param>
+        <param-name>classpath</param-name>
+        <param-value>?</param-value>
+    </init-param>
+    -->
+    <load-on-startup>0</load-on-startup>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>jsp</servlet-name>
+    <url-pattern>*.jsp</url-pattern>
+    <url-pattern>*.jspf</url-pattern>
+    <url-pattern>*.jspx</url-pattern>
+    <url-pattern>*.xsp</url-pattern>
+    <url-pattern>*.JSP</url-pattern>
+    <url-pattern>*.JSPF</url-pattern>
+    <url-pattern>*.JSPX</url-pattern>
+    <url-pattern>*.XSP</url-pattern>
+  </servlet-mapping>
+
+
+  <!-- ==================================================================== -->
+  <!-- Default session configuration                                        -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <session-config>
+    <session-timeout>30</session-timeout>
+  </session-config>
+
+  <!-- ==================================================================== -->
+  <!-- Default MIME mappings                                                -->
+  <!-- The default MIME mappings are provided by the mime.properties        -->
+  <!-- resource in the jetty-http.jar file.  Additional or modified         -->
+  <!-- mappings may be specified here                                       -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <!-- UNCOMMENT TO ACTIVATE
+  <mime-mapping>
+    <extension>mysuffix</extension>
+    <mime-type>mymime/type</mime-type>
+  </mime-mapping>
+  -->
+
+  <!-- ==================================================================== -->
+  <!-- Default welcome files                                                -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+    <welcome-file>index.htm</welcome-file>
+    <welcome-file>index.jsp</welcome-file>
+  </welcome-file-list>
+
+  <!-- ==================================================================== -->
+  <!-- Default locale encodings                                             -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <locale-encoding-mapping-list>
+    <locale-encoding-mapping>
+      <locale>ar</locale>
+      <encoding>ISO-8859-6</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>be</locale>
+      <encoding>ISO-8859-5</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>bg</locale>
+      <encoding>ISO-8859-5</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>ca</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>cs</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>da</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>de</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>el</locale>
+      <encoding>ISO-8859-7</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>en</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>es</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>et</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>fi</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>fr</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>hr</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>hu</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>is</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>it</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>iw</locale>
+      <encoding>ISO-8859-8</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>ja</locale>
+      <encoding>Shift_JIS</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>ko</locale>
+      <encoding>EUC-KR</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>lt</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>lv</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>mk</locale>
+      <encoding>ISO-8859-5</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>nl</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>no</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>pl</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>pt</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>ro</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>ru</locale>
+      <encoding>ISO-8859-5</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>sh</locale>
+      <encoding>ISO-8859-5</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>sk</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>sl</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>sq</locale>
+      <encoding>ISO-8859-2</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>sr</locale>
+      <encoding>ISO-8859-5</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>sv</locale>
+      <encoding>ISO-8859-1</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>tr</locale>
+      <encoding>ISO-8859-9</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>uk</locale>
+      <encoding>ISO-8859-5</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>zh</locale>
+      <encoding>GB2312</encoding>
+    </locale-encoding-mapping>
+    <locale-encoding-mapping>
+      <locale>zh_TW</locale>
+      <encoding>Big5</encoding>
+    </locale-encoding-mapping>
+  </locale-encoding-mapping-list>
+
+  <!-- ==================================================================== -->
+  <!-- Disable TRACE method with security constraint                        -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>Disable TRACE</web-resource-name>
+      <url-pattern>/</url-pattern>
+      <http-method>TRACE</http-method>
+    </web-resource-collection>
+    <auth-constraint/>
+  </security-constraint>
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>Enable everything but TRACE</web-resource-name>
+      <url-pattern>/</url-pattern>
+      <http-method-omission>TRACE</http-method-omission>
+    </web-resource-collection>
+  </security-constraint>
+
+</web-app>
+
index d7f1a8955da20a4a94771a21d22b65de7c457d83..1c31a318ce1a4cd7095492e0886d1cef4279a021 100644 (file)
@@ -1,3 +1,3 @@
-wget -qO- http://localhost:8080/services/rest/jobengine/halt
+wget -qO- http://localhost/services/rest/jobengine/halt
 exit 0
 
index a06024d9b575e3beeb2b34f0081cd4a6aceaaffd..6c6422cfeb65d9b12493957ec7af128f8ef7e355 100644 (file)
@@ -9,21 +9,21 @@
    <launcherArgs>\r
       <programArgs>-consoleLog -console 5555\r
       </programArgs>\r
-      <vmArgs>-Dfile.encoding=UTF-8
--agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888
--Djavax.ws.rs.ext.RuntimeDelegate=org.jboss.resteasy.spi.ResteasyProviderFactory
-
-#System
--Dorg.eclipse.equinox.http.jetty.http.port=8080
--Dorg.eclipse.epp.logging.aeri.skipReports=true 
--Declipse.ignoreApp=true 
--Dosgi.noShutdown=true
--Djetty.home=./configuration/jetty
--Djetty.etc.config.urls=etc/user-jetty.xml,etc/user-jetty-ssl.xml,etc/user-jetty-ssl-context.xml,etc/user-jetty-http.xml,etc/user-jetty-https.xml
--Dlog4j.configurationFile=./configuration/log4j2.xml
--Djobengine.loglevel=INFO
--Djobengine.jobsteps.root=./configuration/executors
--Djobengine.jobtemplates.root=./configuration/jobtemplates
+      <vmArgs>-Dfile.encoding=UTF-8\r
+-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888\r
+-Djavax.ws.rs.ext.RuntimeDelegate=org.jboss.resteasy.spi.ResteasyProviderFactory\r
+\r
+#System\r
+-Dorg.eclipse.equinox.http.jetty.http.port=80\r
+-Dorg.eclipse.epp.logging.aeri.skipReports=true \r
+-Declipse.ignoreApp=true \r
+-Dosgi.noShutdown=true\r
+-Djetty.home=./configuration/jetty\r
+-Djetty.etc.config.urls=etc/user-jetty.xml,etc/user-jetty-ssl.xml,etc/user-jetty-ssl-context.xml,etc/user-jetty-http.xml,etc/user-jetty-https.xml\r
+-Dlog4j.configurationFile=./configuration/log4j2.xml\r
+-Djobengine.loglevel=INFO\r
+-Djobengine.jobsteps.root=./configuration/executors\r
+-Djobengine.jobtemplates.root=./configuration/jobtemplates\r
 -Djobengine.jobscheduling.config=./configuration/scheduledjobs.json\r
       </vmArgs>\r
       <vmArgsLin>#Database
index 6e4635a0ad40b777e8f065f837e9a59b9478e26e..1cc362ae9b5afdd170a6326cc5e3625afe327d19 100644 (file)
                                                        <outputDirectory>${project.build.directory}/products/MediaCube/win32/win32/x86_64/configuration/jetty/etc</outputDirectory>\r
                                                        <resources>\r
                                                                <resource>\r
-                                                                       <directory>${basedir}/../-configuration/jetty/etc</directory>\r
+                                                                       <directory>${basedir}/../-configuration/jetty-deploy/etc</directory>\r
                                                                </resource>\r
                                                        </resources>\r
                                                </configuration>\r
                                                        <outputDirectory>${project.build.directory}/products/MediaCube/linux/gtk/x86_64/configuration/jetty/etc</outputDirectory>\r
                                                        <resources>\r
                                                                <resource>\r
-                                                                       <directory>${basedir}/../-configuration/jetty/etc</directory>\r
+                                                                       <directory>${basedir}/../-configuration/jetty-deploy/etc</directory>\r
                                                                </resource>\r
                                                        </resources>\r
                                                </configuration>\r
index 58d13a5db0fc28953ded772239c119ececb17a57..503e5e2c6e6b1ea9a0d8673d3e88f0c4de4592e8 100644 (file)
@@ -31,11 +31,9 @@ import javax.mail.MessagingException;
 import javax.mail.PasswordAuthentication;
 import javax.mail.Session;
 import javax.mail.Transport;
-import javax.mail.internet.InternetAddress;
 import javax.mail.internet.InternetHeaders;
 import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMessage.RecipientType;
 import javax.mail.internet.MimeMultipart;
 import javax.mail.internet.MimeUtility;
 import javax.mail.util.ByteArrayDataSource;
@@ -299,7 +297,7 @@ public class SmtpManager extends AbstractManager {
                try {
                        if (appendEvent.getMarker() instanceof MediaCubeMarker) {
                                MediaCubeMarker mcm = (MediaCubeMarker) appendEvent.getMarker();
-                               message.setRecipient(RecipientType.TO, new InternetAddress(mcm.getTo()));
+                               //message.setRecipient(RecipientType.TO, new InternetAddress(mcm.getTo()));
                        }
 
                        final LogEvent[] priorEvents = buffer.removeAll();
index e29e660334f54aaf1e14d97d46c331fa139883d4..3a1e2f4799cf4a53d6324485addd5f5deb1af9e5 100644 (file)
@@ -1,3 +1,7 @@
+\r
+ALTER TABLE ITEM ALTER COLUMN DESCRIPTION SET DATA TYPE VARCHAR(5000)\r
+ALTER TABLE MEDIA ALTER COLUMN DESCRIPTION SET DATA TYPE VARCHAR(5000)\r
+\r
 ALTER TABLE MEDIA ALTER COLUMN DESCRIPTION DROP NOT NULL\r
 ALTER TABLE ITEM ALTER COLUMN DESCRIPTION DROP NOT NULL\r
 \r
index a9414c6e57e809b4d38be680862ffad354c8ca58..d2015e5d1579c3fa5eb91164128933155809b7b6 100644 (file)
@@ -21,96 +21,86 @@ public class ItemDAOEx {
                this.manager = manager;\r
        }\r
 \r
-       public SearchResult search(String criteria, int fromResult, int toResult) {\r
-               SearchResult result = new SearchResult();\r
+       private String buildQueryCore(QueryObject parameter) {\r
+               QueryBuilder queryBuilder = new QueryBuilder();\r
+               queryBuilder.getParameters(parameter.getFilters());\r
+               return queryBuilder.getQuery();\r
+       }\r
 \r
-               ResultSet rs = null;\r
-               PreparedStatement st = null;\r
-               DefaultContext context = manager.getDbContext();\r
-               Connection connection = context.getConnection();\r
+       private String buildResultQuery(QueryObject queryObject, String innerQuery, SearchResult csr) {\r
+               StringBuilder resultQuery = new StringBuilder();\r
+               Formatter qf = new Formatter(resultQuery, Locale.getDefault());\r
+               RenderParameter rp = queryObject.getParameters();\r
+               if (rp != null) {\r
+                       long bottom = rp.getPage() * rp.getRowPerPage() + 1;\r
+                       long top = bottom + rp.getRowPerPage() - 1;\r
+                       resultQuery.append("WITH NUMBEREDITEM AS (");\r
+                       Metadata orderMetadata = rp.getOrderBy();\r
+                       if (queryObject.hasOrderInfo())\r
+                               qf.format("SELECT ROWNUMBER() OVER (ORDER BY %1$s %2$s) AS RN, ", orderMetadata.getOrderName("i", "md"), rp.getOrderDirection().name());\r
+                       else\r
+                               resultQuery.append("SELECT ROWNUMBER() OVER () AS RN, ");\r
+                       resultQuery.append("i.ID, i.TITLE, i.DESCRIPTION, i.ITEMTYPEID, i.HOUSEID, i.CREATED, i.ISFOLDER FROM ITEM i ");\r
+                       String orderTableName = orderMetadata.getTableName();\r
+                       if (orderTableName != null)\r
+                               qf.format("LEFT OUTER JOIN %1$s md ON (md.ID = i.ID) ", orderTableName);\r
+                       resultQuery.append("WHERE i.ID IN ");\r
+                       qf.format("(SELECT ii.ID %1$s AND ii.ITEMTYPEID = %2$d))", innerQuery, csr.getItemType().getId());\r
+                       qf.format(" SELECT * FROM NUMBEREDITEM WHERE RN BETWEEN %1$d AND %2$d", bottom, top);\r
+               } else {\r
+                       resultQuery.append("SELECT i.ID, i.TITLE, i.DESCRIPTION, i.ITEMTYPEID, i.HOUSEID, i.CREATED, i.ISFOLDER FROM ITEM i ");\r
+                       resultQuery.append("WHERE i.ID IN ");\r
+                       qf.format("(SELECT ii.ID %1$s) ORDER BY i.TITLE", innerQuery);\r
+               }\r
 \r
-               try {\r
-                       StringBuffer sql = new StringBuffer();\r
-                       sql.append("select * from ((");\r
-                       sql.append(\r
-                                       "select distinct i.id,i.itemtypeid,i.houseid,i.title,i.description,i.isfolder,i.created,i.modified from item i, media m, mediafile mf");\r
-                       sql.append(\r
-                                       " where ((CONTAINS(i.title, ?) >= 1)  OR (CONTAINS(i.description, ?) >= 1)) and m.itemid = i.id and mf.MEDIAID = m.id");\r
-                       sql.append(")UNION(");\r
-                       sql.append(\r
-                                       "select distinct i2.id,i2.itemtypeid,i2.houseid,i2.title,i2.description,i2.isfolder,i2.created,i2.modified from item i2, media m2, mediafile mf2");\r
-                       sql.append(\r
-                                       " where ((CONTAINS(m2.title, ?) >= 1)  OR (CONTAINS(m2.description, ?) >= 1)) and m2.itemid = i2.id and mf2.MEDIAID = m2.id");\r
-                       sql.append(")UNION(");\r
-                       sql.append(\r
-                                       "select distinct i3.id,i3.itemtypeid,i3.houseid,i3.title,i3.description,i3.isfolder,i3.created,i3.modified from item i3, media m3, mediafile mf3");\r
-                       sql.append(" where (CONTAINS(mf3.relativepath, ?) >= 1) and m3.itemid = i3.id and mf3.MEDIAID = m3.id");\r
-                       sql.append(")) order by title");\r
-                       String query = sql.toString();\r
-                       /*                      \r
-                                               query = "SELECT i.* from item i, media m, mediafile mf WHERE m.ITEMID = i.id AND mf.MEDIAID = m.ID"\r
-                                                               + " AND (" + "(CONTAINS(i.TITLE, '" + criteria + "') >= 1) OR (CONTAINS(i.DESCRIPTION, '" + criteria\r
-                                                               + "') >= 1)" + " OR (CONTAINS(m.TITLE, '" + criteria + "') >= 1) OR (CONTAINS(m.DESCRIPTION, '"\r
-                                                               + criteria + "') >= 1)" + " OR (CONTAINS(mf.RELATIVEPATH, '" + criteria\r
-                                                               + "') >= 1)) ORDER BY i.title";\r
-                       */\r
-                       // query = "SELECT * FROM ITEM ORDER BY title";\r
+               logger.info(resultQuery.toString());\r
+               return resultQuery.toString();\r
+       }\r
 \r
-                       st = connection.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\r
-                       for (int s = 1; s <= 5; s++) {\r
-                               st.setString(s, criteria);\r
-                       }\r
-                       rs = st.executeQuery();\r
-                       rs.last();\r
-                       result.setItemCount(rs.getRow());\r
+       private List<SearchResult> getResultHeaders(Connection connection, QueryObject queryObject, String innerQuery) {\r
+               List<SearchResult> results = new ArrayList<SearchResult>();\r
+               String typeQuery;\r
+               if (queryObject.getParameters() == null)\r
+                       typeQuery = String.format("SELECT CAST(COUNT(DISTINCT(ii.ID)) AS BIGINT) %s", innerQuery);\r
+               else\r
+                       typeQuery = String.format("SELECT ii.ITEMTYPEID, CAST(COUNT(DISTINCT(ii.ID)) AS BIGINT) %s GROUP BY ii.ITEMTYPEID", innerQuery);\r
 \r
-                       // set begining position\r
-                       if (fromResult > -1) {\r
-                               if (fromResult <= result.getItemCount()) {\r
-                                       if (fromResult > 1) {\r
-                                               rs.absolute(fromResult - 1);\r
-                                       } else {\r
-                                               rs.beforeFirst();\r
-                                       }\r
+               logger.info(typeQuery.toString());\r
+               PreparedStatement st = null;\r
+               ResultSet rs = null;\r
+               try {\r
+                       st = connection.prepareStatement(typeQuery);\r
+                       rs = st.executeQuery();\r
+                       while (rs.next()) {\r
+                               SearchResult sr = new SearchResult();\r
+                               if (queryObject.getParameters() == null) {\r
+                                       sr.setItemCount(rs.getLong(1));\r
                                } else {\r
-                                       if (result.getItemCount() > 0) {\r
-                                               throw new Exception("Invalid searchResult 'from' position: " + fromResult + " total records: "\r
-                                                               + result.getItemCount() + " " + query);\r
-                                       }\r
+                                       ItemType itemType = (ItemType) manager.get(ItemType.class, rs.getLong(1));\r
+                                       sr.setItemType(itemType);\r
+                                       sr.setItemCount(rs.getLong(2));\r
                                }\r
-                       } else {\r
-                               rs.beforeFirst();\r
-                       }\r
 \r
-                       int maxRecords = toResult - fromResult;\r
-\r
-                       ItemDAO dao = (ItemDAO) manager.getBaseDAO(Item.class);\r
-                       result.setItems((List<Item>) (List<?>) dao.entities(context, rs, maxRecords));\r
-\r
-                       connection.commit();\r
-               } catch (Exception e) {\r
-                       try {\r
-                               connection.rollback();\r
-                       } catch (Exception e1) {\r
-                               e1.printStackTrace();\r
+                               sr.setParameters(queryObject.getParameters());\r
+                               results.add(sr);\r
                        }\r
-                       manager.throwError(e);\r
+               } catch (Exception e) {\r
+                       e.printStackTrace();\r
                } finally {\r
                        try {\r
                                if (rs != null)\r
                                        rs.close();\r
                        } catch (Exception e1) {\r
+                               e1.printStackTrace();\r
                        }\r
                        try {\r
                                if (st != null)\r
                                        st.close();\r
                        } catch (Exception e1) {\r
+                               e1.printStackTrace();\r
                        }\r
-                       manager.putDbContext(context);\r
                }\r
-               manager.traceOut();\r
-\r
-               return result;\r
+               return results;\r
        }\r
 \r
        @SuppressWarnings("unchecked")\r
@@ -187,90 +177,91 @@ public class ItemDAOEx {
                return results;\r
        }\r
 \r
-       private String buildResultQuery(QueryObject queryObject, String innerQuery, SearchResult csr) {\r
-               StringBuilder resultQuery = new StringBuilder();\r
-               Formatter qf = new Formatter(resultQuery, Locale.getDefault());\r
-               RenderParameter rp = queryObject.getParameters();\r
-               if (rp != null) {\r
-                       long bottom = rp.getPage() * rp.getRowPerPage() + 1;\r
-                       long top = bottom + rp.getRowPerPage() - 1;\r
-                       resultQuery.append("WITH NUMBEREDITEM AS (");\r
-                       Metadata orderMetadata = rp.getOrderBy();\r
-                       if (queryObject.hasOrderInfo())\r
-                               qf.format("SELECT ROWNUMBER() OVER (ORDER BY %1$s %2$s) AS RN, ", orderMetadata.getOrderName("i", "md"),\r
-                                               rp.getOrderDirection().name());\r
-                       else\r
-                               resultQuery.append("SELECT ROWNUMBER() OVER () AS RN, ");\r
-                       resultQuery.append(\r
-                                       "i.ID, i.TITLE, i.DESCRIPTION, i.ITEMTYPEID, i.HOUSEID, i.CREATED, i.ISFOLDER FROM ITEM i ");\r
-                       String orderTableName = orderMetadata.getTableName();\r
-                       if (orderTableName != null)\r
-                               qf.format("LEFT OUTER JOIN %1$s md ON (md.ID = i.ID) ", orderTableName);\r
-                       resultQuery.append("WHERE i.ID IN ");\r
-                       qf.format("(SELECT ii.ID %1$s AND ii.ITEMTYPEID = %2$d))", innerQuery, csr.getItemType().getId());\r
-                       qf.format(" SELECT * FROM NUMBEREDITEM WHERE RN BETWEEN %1$d AND %2$d", bottom, top);\r
-               } else {\r
-                       resultQuery.append(\r
-                                       "SELECT i.ID, i.TITLE, i.DESCRIPTION, i.ITEMTYPEID, i.HOUSEID, i.CREATED, i.ISFOLDER FROM ITEM i ");\r
-                       resultQuery.append("WHERE i.ID IN ");\r
-                       qf.format("(SELECT ii.ID %1$s) ORDER BY i.TITLE", innerQuery);\r
-               }\r
-\r
-               logger.info(resultQuery.toString());\r
-               return resultQuery.toString();\r
-       }\r
-\r
-       private String buildQueryCore(QueryObject parameter) {\r
-               QueryBuilder queryBuilder = new QueryBuilder();\r
-               queryBuilder.getParameters(parameter.getFilters());\r
-               return queryBuilder.getQuery();\r
-       }\r
-\r
-       private List<SearchResult> getResultHeaders(Connection connection, QueryObject queryObject, String innerQuery) {\r
-               List<SearchResult> results = new ArrayList<SearchResult>();\r
-               String typeQuery;\r
-               if (queryObject.getParameters() == null)\r
-                       typeQuery = String.format("SELECT CAST(COUNT(DISTINCT(ii.ID)) AS BIGINT) %s", innerQuery);\r
-               else\r
-                       typeQuery = String.format(\r
-                                       "SELECT ii.ITEMTYPEID, CAST(COUNT(DISTINCT(ii.ID)) AS BIGINT) %s GROUP BY ii.ITEMTYPEID",\r
-                                       innerQuery);\r
+       public SearchResult search(String criteria, int fromResult, int toResult) {\r
+               SearchResult result = new SearchResult();\r
 \r
-               logger.info(typeQuery.toString());\r
-               PreparedStatement st = null;\r
                ResultSet rs = null;\r
+               PreparedStatement st = null;\r
+               DefaultContext context = manager.getDbContext();\r
+               Connection connection = context.getConnection();\r
+\r
                try {\r
-                       st = connection.prepareStatement(typeQuery);\r
+                       StringBuffer sql = new StringBuffer();\r
+                       sql.append("select * from ((");\r
+                       sql.append("select distinct i.id,i.itemtypeid,i.houseid,i.title,i.description,i.isfolder,i.created,i.modified from item i, media m, mediafile mf");\r
+                       sql.append(" where ((CONTAINS(i.title, ?) >= 1)  OR (CONTAINS(i.description, ?) >= 1)) and m.itemid = i.id and mf.MEDIAID = m.id");\r
+                       sql.append(")UNION(");\r
+                       sql.append(\r
+                                       "select distinct i2.id,i2.itemtypeid,i2.houseid,i2.title,i2.description,i2.isfolder,i2.created,i2.modified from item i2, media m2, mediafile mf2");\r
+                       sql.append(" where ((CONTAINS(m2.title, ?) >= 1)  OR (CONTAINS(m2.description, ?) >= 1)) and m2.itemid = i2.id and mf2.MEDIAID = m2.id");\r
+                       sql.append(")UNION(");\r
+                       sql.append(\r
+                                       "select distinct i3.id,i3.itemtypeid,i3.houseid,i3.title,i3.description,i3.isfolder,i3.created,i3.modified from item i3, media m3, mediafile mf3");\r
+                       sql.append(" where (CONTAINS(mf3.houseId, ?) >= 1) and m3.itemid = i3.id and mf3.MEDIAID = m3.id");\r
+                       sql.append(")) order by title");\r
+                       String query = sql.toString();\r
+                       /*\r
+                                               query = "SELECT i.* from item i, media m, mediafile mf WHERE m.ITEMID = i.id AND mf.MEDIAID = m.ID"\r
+                                                               + " AND (" + "(CONTAINS(i.TITLE, '" + criteria + "') >= 1) OR (CONTAINS(i.DESCRIPTION, '" + criteria\r
+                                                               + "') >= 1)" + " OR (CONTAINS(m.TITLE, '" + criteria + "') >= 1) OR (CONTAINS(m.DESCRIPTION, '"\r
+                                                               + criteria + "') >= 1)" + " OR (CONTAINS(mf.HOUSEID, '" + criteria\r
+                                                               + "') >= 1)) ORDER BY i.title";\r
+                       */\r
+                       // query = "SELECT * FROM ITEM ORDER BY title";\r
+\r
+                       st = connection.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\r
+                       for (int s = 1; s <= 5; s++) {\r
+                               st.setString(s, criteria);\r
+                       }\r
                        rs = st.executeQuery();\r
-                       while (rs.next()) {\r
-                               SearchResult sr = new SearchResult();\r
-                               if (queryObject.getParameters() == null) {\r
-                                       sr.setItemCount(rs.getLong(1));\r
+                       rs.last();\r
+                       result.setItemCount(rs.getRow());\r
+\r
+                       // set begining position\r
+                       if (fromResult > -1) {\r
+                               if (fromResult <= result.getItemCount()) {\r
+                                       if (fromResult > 1) {\r
+                                               rs.absolute(fromResult - 1);\r
+                                       } else {\r
+                                               rs.beforeFirst();\r
+                                       }\r
                                } else {\r
-                                       ItemType itemType = (ItemType) manager.get(ItemType.class, rs.getLong(1));\r
-                                       sr.setItemType(itemType);\r
-                                       sr.setItemCount(rs.getLong(2));\r
+                                       if (result.getItemCount() > 0) {\r
+                                               throw new Exception("Invalid searchResult 'from' position: " + fromResult + " total records: " + result.getItemCount() + " " + query);\r
+                                       }\r
                                }\r
-\r
-                               sr.setParameters(queryObject.getParameters());\r
-                               results.add(sr);\r
+                       } else {\r
+                               rs.beforeFirst();\r
                        }\r
+\r
+                       int maxRecords = toResult - fromResult;\r
+\r
+                       ItemDAO dao = (ItemDAO) manager.getBaseDAO(Item.class);\r
+                       result.setItems((List<Item>) (List<?>) dao.entities(context, rs, maxRecords));\r
+\r
+                       connection.commit();\r
                } catch (Exception e) {\r
-                       e.printStackTrace();\r
+                       try {\r
+                               connection.rollback();\r
+                       } catch (Exception e1) {\r
+                               e1.printStackTrace();\r
+                       }\r
+                       manager.throwError(e);\r
                } finally {\r
                        try {\r
                                if (rs != null)\r
                                        rs.close();\r
                        } catch (Exception e1) {\r
-                               e1.printStackTrace();\r
                        }\r
                        try {\r
                                if (st != null)\r
                                        st.close();\r
                        } catch (Exception e1) {\r
-                               e1.printStackTrace();\r
                        }\r
+                       manager.putDbContext(context);\r
                }\r
-               return results;\r
+               manager.traceOut();\r
+\r
+               return result;\r
        }\r
 }\r