flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [07/51] [partial] flex-blazeds git commit: Refactored the directory structure
Date Tue, 04 Aug 2015 10:16:15 GMT
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/team/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/team/WEB-INF/flex/services-config.xml b/attic/apps/team/WEB-INF/flex/services-config.xml
index 0b1ee9e..42c2296 100755
--- a/attic/apps/team/WEB-INF/flex/services-config.xml
+++ b/attic/apps/team/WEB-INF/flex/services-config.xml
@@ -1,414 +1,414 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<services-config>
-
-    <services>
-        <service-include file-path="remoting-config.xml" />
-        <service-include file-path="proxy-config.xml" />
-        <service-include file-path="messaging-config.xml" />
-    </services>
-
-    <security>
-        <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
-        <!-- Uncomment the correct app server
-        <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
-        <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
-        <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
-        <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
-        -->
-
-        <!-- Security constraints that are used by samples in features/security-constraints/ -->
-        <!-- Basic authentication -->
-        <security-constraint id="sample-user-basic">
-            <auth-method>Basic</auth-method>
-            <!-- Roles are defined by the application server.
-                In Tomcat, they are in conf/tomcat-users.xml
-            -->
-            <roles>
-                <role>sampleusers</role>
-            </roles>
-        </security-constraint>
-        <!-- Custom authentication -->
-        <security-constraint id="sample-user-custom">
-            <auth-method>Custom</auth-method>
-            <roles>
-                <role>sampleusers</role>
-            </roles>
-        </security-constraint>
-    </security>
-
-    <channels>
-
-        <!-- AMF -->
-
-        <!-- A regular AMF channel -->
-        <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <polling-enabled>false</polling-enabled>
-                <serialization>
-                    <ignore-property-errors>false</ignore-property-errors>
-                    <include-read-only>true</include-read-only>
-                    <!-- Enable this for remoting_AMF_Vector.mxml test to work -->
-                     <prefer-vectors>false</prefer-vectors>
-                      -->
-                </serialization>
-            </properties>
-        </channel-definition>
-
-        <!-- A secure AMF channel -->
-        <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
-            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
-            <properties>
-                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
-                <add-no-cache-headers>false</add-no-cache-headers>
-            </properties>
-        </channel-definition>
-
-        <!-- A piggybacking AMF channel -->
-        <channel-definition id="my-amf-piggyback" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfpiggyback"
-            class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <polling-enabled>false</polling-enabled>
-                <piggybacking-enabled>true</piggybacking-enabled>
-            </properties>
-        </channel-definition>
-
-        <!-- A polling AMF channel -->
-        <channel-definition id="my-amf-poll" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfpoll"
-            class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>3</polling-interval-seconds>
-            </properties>
-        </channel-definition>
-
-        <!-- A long polling AMF channel -->
-        <channel-definition id="my-amf-longpoll" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamflongpoll"
-            class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <user-agent-settings>
-                    <!--
-                    <user-agent match-on="MSIE" max-streaming-connections-per-session=""1 kickstart-bytes="2048"/>
-                    <user-agent match-on="Firefox" max-streaming-connections-per-session="1" kickstart-bytes="0"/>
-                     -->
-                    <!-- MSIE 5, 6, 7 limit is 2. -->
-                    <user-agent match-on="MSIE" max-persistent-connections-per-session="1" kickstart-bytes="2048"/>
-                    <!-- MSIE 8 limit is 6. -->
-                    <user-agent match-on="MSIE 8" max-persistent-connections-per-session="5" kickstart-bytes="2048"/>
-                    <!-- Firefox 1, 2 limit is 2. -->
-                    <user-agent match-on="Firefox" max-persistent-connections-per-session="1"/>
-                    <!-- Firefox 3 limit is 6. -->
-                    <user-agent match-on="Firefox/3" max-persistent-connections-per-session="5"/>
-                    <!-- Safari 3, 4 limit is 4. -->
-                    <user-agent match-on="Safari" max-persistent-connections-per-session="3"/>
-                    <!-- Chrome 0, 1, 2 limit is 6. -->
-                    <user-agent match-on="Chrome" max-persistent-connections-per-session="5"/>
-                    <!-- Opera 7, 9 limit is 4.-->
-                    <user-agent match-on="Opera" max-persistent-connections-per-session="3"/>
-                    <!-- Opera 8 limit is 8. -->
-                    <user-agent match-on="Opera 8" max-persistent-connections-per-session="7"/>
-                    <!-- Opera 10 limit is 8. -->
-                    <user-agent match-on="Opera 9.8" max-persistent-connections-per-session="7"/>
-                </user-agent-settings>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>0</polling-interval-seconds>
-                <max-waiting-poll-requests>10</max-waiting-poll-requests>
-                <wait-interval-millis>-1</wait-interval-millis>
-                <client-wait-interval-millis>3000</client-wait-interval-millis>
-            </properties>
-        </channel-definition>
-
-        <!-- A second long polling AMF channel -->
-        <channel-definition id="my-amf-longpoll2" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamflongpoll2"
-            class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <user-agent-settings>
-                    <user-agent match-on="Firefox" max-streaming-connections-per-session="4"/>
-                </user-agent-settings>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>0</polling-interval-seconds>
-                <max-waiting-poll-requests>10</max-waiting-poll-requests>
-                <wait-interval-millis>-1</wait-interval-millis>
-                <client-wait-interval-millis>3000</client-wait-interval-millis>
-            </properties>
-        </channel-definition>
-
-        <!-- A secure long polling AMF channel -->
-        <channel-definition id="my-amf-secure-longpoll" class="mx.messaging.channels.SecureAMFChannel">
-            <endpoint url="https://{server.name}:9400/{context.root}/messagebroker/mysecureamflongpoll"
-            class="flex.messaging.endpoints.SecureAMFEndpoint"/>
-            <properties>
-                <user-agent-settings>
-                    <user-agent match-on="Firefox" max-streaming-connections-per-session="4"/>
-                </user-agent-settings>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>0</polling-interval-seconds>
-                <max-waiting-poll-requests>10</max-waiting-poll-requests>
-                <wait-interval-millis>-1</wait-interval-millis>
-                <client-wait-interval-millis>3000</client-wait-interval-millis>
-            </properties>
-        </channel-definition>
-
-        <!-- A streaming AMF channel with default options left in -->
-        <channel-definition id="my-amf-stream" class="mx.messaging.channels.StreamingAMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfstream"
-            class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
-            <properties>
-                <connection-idle-timeout-minutes>2</connection-idle-timeout-minutes>
-                <max-streaming-clients>10</max-streaming-clients>
-                <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
-                <user-agent-settings>
-                    <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="1"/>
-                    <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="4"/>
-                </user-agent-settings>
-            </properties>
-        </channel-definition>
-
-        <channel-definition id="bad-amf-stream" class="mx.messaging.channels.StreamingAMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/badamfstream"
-            class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
-            <properties>
-                <idle-timeout-minutes>0</idle-timeout-minutes>
-                <max-streaming-clients>10</max-streaming-clients>
-                <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
-                <user-agent-settings>
-                    <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="0"/>
-                    <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="4"/>
-                </user-agent-settings>
-            </properties>
-        </channel-definition>
-
-        <!-- HTTP -->
-
-        <!-- A regular HTTP channel -->
-        <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
-            <properties>
-                <polling-enabled>false</polling-enabled>
-            </properties>
-        </channel-definition>
-
-        <!-- A secure HTTP channel -->
-        <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
-            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
-            <properties>
-                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
-                <add-no-cache-headers>false</add-no-cache-headers>
-            </properties>
-        </channel-definition>
-
-        <!-- A piggybacking HTTP channel -->
-        <channel-definition id="my-http-piggyback" class="mx.messaging.channels.HTTPChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttppiggyback"
-            class="flex.messaging.endpoints.HTTPEndpoint"/>
-            <properties>
-                <polling-enabled>false</polling-enabled>
-                <piggybacking-enabled>true</piggybacking-enabled>
-            </properties>
-        </channel-definition>
-
-        <!-- A polling HTTP channel -->
-        <channel-definition id="my-http-poll" class="mx.messaging.channels.HTTPChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttppoll"
-            class="flex.messaging.endpoints.HTTPEndpoint"/>
-            <properties>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>3</polling-interval-seconds>
-            </properties>
-        </channel-definition>
-
-        <!-- A long polling HTTP channel -->
-        <channel-definition id="my-http-longpoll" class="mx.messaging.channels.HTTPChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttplongpoll"
-            class="flex.messaging.endpoints.HTTPEndpoint"/>
-            <properties>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>0</polling-interval-seconds>
-                <max-waiting-poll-requests>10</max-waiting-poll-requests>
-                <wait-interval-millis>-1</wait-interval-millis>
-                <client-wait-interval-millis>3000</client-wait-interval-millis>
-            </properties>
-        </channel-definition>
-
-        <!-- A streaming HTTP channel with default options left out -->
-        <channel-definition id="my-http-stream" class="mx.messaging.channels.StreamingHTTPChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttpstream"
-            class="flex.messaging.endpoints.StreamingHTTPEndpoint"/>
-        </channel-definition>
-
-        <channel-definition id="bad-http-stream" class="mx.messaging.channels.StreamingHTTPChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/badhttpstream"
-            class="flex.messaging.endpoints.StreamingHTTPEndpoint"/>
-            <properties>
-                <max-streaming-clients>10</max-streaming-clients>
-                <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
-                <user-agent-settings>
-                    <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="0"/>
-                    <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="0"/>
-                </user-agent-settings>
-            </properties>
-        </channel-definition>
-
-        <!-- Clustering -->
-
-        <!-- A polling AMF channel to be used in clustered destinations. This means
-             all tokens (server.name, server.port, etc.) removed from endpoint url
-        -->
-        <channel-definition id="my-amf-poll-for-cluster" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://localhost:8400/team/messagebroker/myamfpollforcluster"
-            class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>3</polling-interval-seconds>
-            </properties>
-        </channel-definition>
-
-
-        <!-- A polling HTTP channel to be used in clustered destinations. This means
-             all tokens (server.name, server.port, etc.) removed from endpoint url
-        -->
-        <channel-definition id="my-http-poll-for-cluster" class="mx.messaging.channels.HTTPChannel">
-            <endpoint url="http://localhost:8400/team/messagebroker/myhttppollforcluster"
-            class="flex.messaging.endpoints.HTTPEndpoint"/>
-            <properties>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>3</polling-interval-seconds>
-            </properties>
-        </channel-definition>
-
-        <!-- A secure polling AMF channel to be used in clustered destinations. This means
-             all tokens (server.name, server.port, etc.) removed from endpoint url
-        -->
-        <channel-definition id="my-secure-amf-poll-for-cluster" class="mx.messaging.channels.SecureAMFChannel">
-            <endpoint url="https://localhost:9400/team/messagebroker/mysecureamfpollforcluster"
-            class="flex.messaging.endpoints.SecureAMFEndpoint"/>
-            <properties>
-                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
-                <add-no-cache-headers>false</add-no-cache-headers>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>3</polling-interval-seconds>
-            </properties>
-        </channel-definition>
-
-        <!-- A secure polling HTTP channel to be used in clustered destinations. This means
-             all tokens (server.name, server.port, etc.) removed from endpoint url
-        -->
-        <channel-definition id="my-secure-http-poll-for-cluster" class="mx.messaging.channels.SecureHTTPChannel">
-            <endpoint url="https://localhost:9400/team/messagebroker/mysecurehttppollforcluster"
-            class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
-            <properties>
-                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
-                <add-no-cache-headers>false</add-no-cache-headers>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>3</polling-interval-seconds>
-            </properties>
-        </channel-definition>
-
-        <!-- A regular AMF channel with login-after-disconnect enabled. This channel is used
-             by security-constraint samples.
-         -->
-        <channel-definition id="my-amf-loginafterdisconnect" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfloginafterdisconnect"
-                class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <polling-enabled>false</polling-enabled>
-                <login-after-disconnect>true</login-after-disconnect>
-            </properties>
-        </channel-definition>
-
-    </channels>
-
-    <logging>
-        <target class="flex.messaging.log.ConsoleTarget" level="Debug">
-            <properties>
-                <prefix>[BlazeDS] </prefix>
-                <includeDate>false</includeDate>
-                <includeTime>false</includeTime>
-                <includeLevel>true</includeLevel>
-                <includeCategory>true</includeCategory>
-            </properties>
-            <filters>
-            <!--
-                <pattern>Endpoint.FlexSession</pattern>
-                <pattern>Client.FlexClient</pattern>
-                <pattern>Client.MessageClient</pattern>
-                <pattern>Endpoint.*</pattern>
-                <pattern>Service.*</pattern>
-                <pattern>Configuration</pattern>
-            -->
-            </filters>
-        </target>
-    </logging>
-
-    <system>
-        <!--
-        <enforce-endpoint-validation>false</enforce-endpoint-validation>
-        -->
-        <manageable>true</manageable>
-        <!--
-        <redeploy>
-            <enabled>true</enabled>
-            <watch-interval>20</watch-interval>
-            <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
-            <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
-            <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
-            <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
-            <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
-        </redeploy>
-         -->
-    </system>
-
-    <clusters>
-        <cluster id="default-cluster" properties="jgroups-tcp.xml" default="false" url-load-balancing="true"/>
-        <cluster id="udp-cluster" properties="jgroups-udp.xml" default="false" url-load-balancing="true"/>
-    </clusters>
-
-    <flex-client>
-    <!--
-        <timeout-minutes>45</timeout-minutes>
-        <heartbeat-interval-millis>5000</heartbeat-interval-millis>
-    -->
-    </flex-client>
-
-    <!-- Deserialization validator, uncomment the one you want to use -->
-    <validators>
-        <!--
-        <validator class="features.validators.deserialization.TestDeserializationValidator"/>
-        -->
-        <!--
-        <validator class="flex.messaging.validators.ClassDeserializationValidator">
-            <properties>
-                <disallow-classes>
-                </disallow-classes>
-                <allow-classes>
-                    <class name="java.*"/>
-                    <class name="\[Ljava.*"/>
-                    <class name="flex.*"/>
-                </allow-classes>
-             </properties>
-        </validator>
-        -->
-    </validators>
-</services-config>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<services-config>
+
+    <services>
+        <service-include file-path="remoting-config.xml" />
+        <service-include file-path="proxy-config.xml" />
+        <service-include file-path="messaging-config.xml" />
+    </services>
+
+    <security>
+        <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
+        <!-- Uncomment the correct app server
+        <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
+        <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
+        <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
+        <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
+        -->
+
+        <!-- Security constraints that are used by samples in features/security-constraints/ -->
+        <!-- Basic authentication -->
+        <security-constraint id="sample-user-basic">
+            <auth-method>Basic</auth-method>
+            <!-- Roles are defined by the application server.
+                In Tomcat, they are in conf/tomcat-users.xml
+            -->
+            <roles>
+                <role>sampleusers</role>
+            </roles>
+        </security-constraint>
+        <!-- Custom authentication -->
+        <security-constraint id="sample-user-custom">
+            <auth-method>Custom</auth-method>
+            <roles>
+                <role>sampleusers</role>
+            </roles>
+        </security-constraint>
+    </security>
+
+    <channels>
+
+        <!-- AMF -->
+
+        <!-- A regular AMF channel -->
+        <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>false</polling-enabled>
+                <serialization>
+                    <ignore-property-errors>false</ignore-property-errors>
+                    <include-read-only>true</include-read-only>
+                    <!-- Enable this for remoting_AMF_Vector.mxml test to work -->
+                     <prefer-vectors>false</prefer-vectors>
+                      -->
+                </serialization>
+            </properties>
+        </channel-definition>
+
+        <!-- A secure AMF channel -->
+        <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
+            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
+            <properties>
+                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
+                <add-no-cache-headers>false</add-no-cache-headers>
+            </properties>
+        </channel-definition>
+
+        <!-- A piggybacking AMF channel -->
+        <channel-definition id="my-amf-piggyback" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfpiggyback"
+            class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>false</polling-enabled>
+                <piggybacking-enabled>true</piggybacking-enabled>
+            </properties>
+        </channel-definition>
+
+        <!-- A polling AMF channel -->
+        <channel-definition id="my-amf-poll" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfpoll"
+            class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>3</polling-interval-seconds>
+            </properties>
+        </channel-definition>
+
+        <!-- A long polling AMF channel -->
+        <channel-definition id="my-amf-longpoll" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamflongpoll"
+            class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <user-agent-settings>
+                    <!--
+                    <user-agent match-on="MSIE" max-streaming-connections-per-session=""1 kickstart-bytes="2048"/>
+                    <user-agent match-on="Firefox" max-streaming-connections-per-session="1" kickstart-bytes="0"/>
+                     -->
+                    <!-- MSIE 5, 6, 7 limit is 2. -->
+                    <user-agent match-on="MSIE" max-persistent-connections-per-session="1" kickstart-bytes="2048"/>
+                    <!-- MSIE 8 limit is 6. -->
+                    <user-agent match-on="MSIE 8" max-persistent-connections-per-session="5" kickstart-bytes="2048"/>
+                    <!-- Firefox 1, 2 limit is 2. -->
+                    <user-agent match-on="Firefox" max-persistent-connections-per-session="1"/>
+                    <!-- Firefox 3 limit is 6. -->
+                    <user-agent match-on="Firefox/3" max-persistent-connections-per-session="5"/>
+                    <!-- Safari 3, 4 limit is 4. -->
+                    <user-agent match-on="Safari" max-persistent-connections-per-session="3"/>
+                    <!-- Chrome 0, 1, 2 limit is 6. -->
+                    <user-agent match-on="Chrome" max-persistent-connections-per-session="5"/>
+                    <!-- Opera 7, 9 limit is 4.-->
+                    <user-agent match-on="Opera" max-persistent-connections-per-session="3"/>
+                    <!-- Opera 8 limit is 8. -->
+                    <user-agent match-on="Opera 8" max-persistent-connections-per-session="7"/>
+                    <!-- Opera 10 limit is 8. -->
+                    <user-agent match-on="Opera 9.8" max-persistent-connections-per-session="7"/>
+                </user-agent-settings>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>0</polling-interval-seconds>
+                <max-waiting-poll-requests>10</max-waiting-poll-requests>
+                <wait-interval-millis>-1</wait-interval-millis>
+                <client-wait-interval-millis>3000</client-wait-interval-millis>
+            </properties>
+        </channel-definition>
+
+        <!-- A second long polling AMF channel -->
+        <channel-definition id="my-amf-longpoll2" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamflongpoll2"
+            class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <user-agent-settings>
+                    <user-agent match-on="Firefox" max-streaming-connections-per-session="4"/>
+                </user-agent-settings>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>0</polling-interval-seconds>
+                <max-waiting-poll-requests>10</max-waiting-poll-requests>
+                <wait-interval-millis>-1</wait-interval-millis>
+                <client-wait-interval-millis>3000</client-wait-interval-millis>
+            </properties>
+        </channel-definition>
+
+        <!-- A secure long polling AMF channel -->
+        <channel-definition id="my-amf-secure-longpoll" class="mx.messaging.channels.SecureAMFChannel">
+            <endpoint url="https://{server.name}:9400/{context.root}/messagebroker/mysecureamflongpoll"
+            class="flex.messaging.endpoints.SecureAMFEndpoint"/>
+            <properties>
+                <user-agent-settings>
+                    <user-agent match-on="Firefox" max-streaming-connections-per-session="4"/>
+                </user-agent-settings>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>0</polling-interval-seconds>
+                <max-waiting-poll-requests>10</max-waiting-poll-requests>
+                <wait-interval-millis>-1</wait-interval-millis>
+                <client-wait-interval-millis>3000</client-wait-interval-millis>
+            </properties>
+        </channel-definition>
+
+        <!-- A streaming AMF channel with default options left in -->
+        <channel-definition id="my-amf-stream" class="mx.messaging.channels.StreamingAMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfstream"
+            class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
+            <properties>
+                <connection-idle-timeout-minutes>2</connection-idle-timeout-minutes>
+                <max-streaming-clients>10</max-streaming-clients>
+                <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
+                <user-agent-settings>
+                    <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="1"/>
+                    <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="4"/>
+                </user-agent-settings>
+            </properties>
+        </channel-definition>
+
+        <channel-definition id="bad-amf-stream" class="mx.messaging.channels.StreamingAMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/badamfstream"
+            class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
+            <properties>
+                <idle-timeout-minutes>0</idle-timeout-minutes>
+                <max-streaming-clients>10</max-streaming-clients>
+                <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
+                <user-agent-settings>
+                    <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="0"/>
+                    <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="4"/>
+                </user-agent-settings>
+            </properties>
+        </channel-definition>
+
+        <!-- HTTP -->
+
+        <!-- A regular HTTP channel -->
+        <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
+            <properties>
+                <polling-enabled>false</polling-enabled>
+            </properties>
+        </channel-definition>
+
+        <!-- A secure HTTP channel -->
+        <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
+            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
+            <properties>
+                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
+                <add-no-cache-headers>false</add-no-cache-headers>
+            </properties>
+        </channel-definition>
+
+        <!-- A piggybacking HTTP channel -->
+        <channel-definition id="my-http-piggyback" class="mx.messaging.channels.HTTPChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttppiggyback"
+            class="flex.messaging.endpoints.HTTPEndpoint"/>
+            <properties>
+                <polling-enabled>false</polling-enabled>
+                <piggybacking-enabled>true</piggybacking-enabled>
+            </properties>
+        </channel-definition>
+
+        <!-- A polling HTTP channel -->
+        <channel-definition id="my-http-poll" class="mx.messaging.channels.HTTPChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttppoll"
+            class="flex.messaging.endpoints.HTTPEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>3</polling-interval-seconds>
+            </properties>
+        </channel-definition>
+
+        <!-- A long polling HTTP channel -->
+        <channel-definition id="my-http-longpoll" class="mx.messaging.channels.HTTPChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttplongpoll"
+            class="flex.messaging.endpoints.HTTPEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>0</polling-interval-seconds>
+                <max-waiting-poll-requests>10</max-waiting-poll-requests>
+                <wait-interval-millis>-1</wait-interval-millis>
+                <client-wait-interval-millis>3000</client-wait-interval-millis>
+            </properties>
+        </channel-definition>
+
+        <!-- A streaming HTTP channel with default options left out -->
+        <channel-definition id="my-http-stream" class="mx.messaging.channels.StreamingHTTPChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttpstream"
+            class="flex.messaging.endpoints.StreamingHTTPEndpoint"/>
+        </channel-definition>
+
+        <channel-definition id="bad-http-stream" class="mx.messaging.channels.StreamingHTTPChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/badhttpstream"
+            class="flex.messaging.endpoints.StreamingHTTPEndpoint"/>
+            <properties>
+                <max-streaming-clients>10</max-streaming-clients>
+                <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
+                <user-agent-settings>
+                    <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="0"/>
+                    <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="0"/>
+                </user-agent-settings>
+            </properties>
+        </channel-definition>
+
+        <!-- Clustering -->
+
+        <!-- A polling AMF channel to be used in clustered destinations. This means
+             all tokens (server.name, server.port, etc.) removed from endpoint url
+        -->
+        <channel-definition id="my-amf-poll-for-cluster" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://localhost:8400/team/messagebroker/myamfpollforcluster"
+            class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>3</polling-interval-seconds>
+            </properties>
+        </channel-definition>
+
+
+        <!-- A polling HTTP channel to be used in clustered destinations. This means
+             all tokens (server.name, server.port, etc.) removed from endpoint url
+        -->
+        <channel-definition id="my-http-poll-for-cluster" class="mx.messaging.channels.HTTPChannel">
+            <endpoint url="http://localhost:8400/team/messagebroker/myhttppollforcluster"
+            class="flex.messaging.endpoints.HTTPEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>3</polling-interval-seconds>
+            </properties>
+        </channel-definition>
+
+        <!-- A secure polling AMF channel to be used in clustered destinations. This means
+             all tokens (server.name, server.port, etc.) removed from endpoint url
+        -->
+        <channel-definition id="my-secure-amf-poll-for-cluster" class="mx.messaging.channels.SecureAMFChannel">
+            <endpoint url="https://localhost:9400/team/messagebroker/mysecureamfpollforcluster"
+            class="flex.messaging.endpoints.SecureAMFEndpoint"/>
+            <properties>
+                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
+                <add-no-cache-headers>false</add-no-cache-headers>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>3</polling-interval-seconds>
+            </properties>
+        </channel-definition>
+
+        <!-- A secure polling HTTP channel to be used in clustered destinations. This means
+             all tokens (server.name, server.port, etc.) removed from endpoint url
+        -->
+        <channel-definition id="my-secure-http-poll-for-cluster" class="mx.messaging.channels.SecureHTTPChannel">
+            <endpoint url="https://localhost:9400/team/messagebroker/mysecurehttppollforcluster"
+            class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
+            <properties>
+                <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
+                <add-no-cache-headers>false</add-no-cache-headers>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>3</polling-interval-seconds>
+            </properties>
+        </channel-definition>
+
+        <!-- A regular AMF channel with login-after-disconnect enabled. This channel is used
+             by security-constraint samples.
+         -->
+        <channel-definition id="my-amf-loginafterdisconnect" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfloginafterdisconnect"
+                class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>false</polling-enabled>
+                <login-after-disconnect>true</login-after-disconnect>
+            </properties>
+        </channel-definition>
+
+    </channels>
+
+    <logging>
+        <target class="flex.messaging.log.ConsoleTarget" level="Debug">
+            <properties>
+                <prefix>[BlazeDS] </prefix>
+                <includeDate>false</includeDate>
+                <includeTime>false</includeTime>
+                <includeLevel>true</includeLevel>
+                <includeCategory>true</includeCategory>
+            </properties>
+            <filters>
+            <!--
+                <pattern>Endpoint.FlexSession</pattern>
+                <pattern>Client.FlexClient</pattern>
+                <pattern>Client.MessageClient</pattern>
+                <pattern>Endpoint.*</pattern>
+                <pattern>Service.*</pattern>
+                <pattern>Configuration</pattern>
+            -->
+            </filters>
+        </target>
+    </logging>
+
+    <system>
+        <!--
+        <enforce-endpoint-validation>false</enforce-endpoint-validation>
+        -->
+        <manageable>true</manageable>
+        <!--
+        <redeploy>
+            <enabled>true</enabled>
+            <watch-interval>20</watch-interval>
+            <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
+            <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
+            <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
+            <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
+            <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
+        </redeploy>
+         -->
+    </system>
+
+    <clusters>
+        <cluster id="default-cluster" properties="jgroups-tcp.xml" default="false" url-load-balancing="true"/>
+        <cluster id="udp-cluster" properties="jgroups-udp.xml" default="false" url-load-balancing="true"/>
+    </clusters>
+
+    <flex-client>
+    <!--
+        <timeout-minutes>45</timeout-minutes>
+        <heartbeat-interval-millis>5000</heartbeat-interval-millis>
+    -->
+    </flex-client>
+
+    <!-- Deserialization validator, uncomment the one you want to use -->
+    <validators>
+        <!--
+        <validator class="features.validators.deserialization.TestDeserializationValidator"/>
+        -->
+        <!--
+        <validator class="flex.messaging.validators.ClassDeserializationValidator">
+            <properties>
+                <disallow-classes>
+                </disallow-classes>
+                <allow-classes>
+                    <class name="java.*"/>
+                    <class name="\[Ljava.*"/>
+                    <class name="flex.*"/>
+                </allow-classes>
+             </properties>
+        </validator>
+        -->
+    </validators>
+</services-config>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java
----------------------------------------------------------------------
diff --git a/attic/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java b/attic/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java
index 8bc7512..b0dbc38 100755
--- a/attic/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java
+++ b/attic/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java
@@ -1,254 +1,254 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package features.bootstrapservices;
-
-import flex.messaging.config.ConfigMap;
-import flex.messaging.services.AbstractBootstrapService;
-import flex.messaging.services.Service;
-import flex.messaging.services.http.ExternalProxySettings;
-import flex.messaging.services.http.HTTPConnectionManagerSettings;
-import flex.messaging.services.http.HTTPProxyAdapter;
-import flex.messaging.services.http.HTTPProxyDestination;
-import flex.messaging.services.http.SOAPProxyAdapter;
-
-/**
- * This BootstrapService is used to dynamicaly create a HTTPProxy Service along 
- * with its HTTPProxy Destinations without the need for any configuration files.
- */
-public class HTTPProxyBootstrapService extends AbstractBootstrapService
-{
-    
-    /**
-     * Called by the <code>MessageBroker</code> after all of the server 
-     * components are created but right before they are started. This is 
-     * usually the place to create dynamic components.
-     * 
-     * @param id Id of the <code>AbstractBootstrapService</code>.
-     * @param properties Properties for the <code>AbstractBootstrapService</code>. 
-     */
-    public void initialize(String id, ConfigMap properties)
-    {
-        Service httpProxyService = createService();
-        createDestination1(httpProxyService);
-        createDestination2(httpProxyService);
-        createDestination3(httpProxyService);
-    }
-
-    /**
-     * Called by the <code>MessageBroker</code> as server starts. Useful for
-     * custom code that needs to run after all the components are initialized
-     * and the server is starting up. 
-     */    
-    public void start()
-    {
-        // No-op.
-    }
-
-    /**
-     * Called by the <code>MessageBroker</code> as server stops. Useful for 
-     * custom code that needs to run as the server is shutting down.
-     */
-    public void stop()
-    {
-        // No-op.
-    }
-
-    /*
-    <?xml version="1.0" encoding="UTF-8"?>
-    <service id="proxy-service" class="flex.messaging.services.HTTPProxyService">
-
-    <!-- Example proxy-config.xml -->
-
-    <properties>
-        <connection-manager>
-            <max-total-connections>100</max-total-connections>
-            <default-max-connections-per-host>2</default-max-connections-per-host>
-        </connection-manager>
-
-        <!-- Allow self-signed certificates; should not be used in production -->
-        <allow-lax-ssl>true</allow-lax-ssl>
-
-        <external-proxy>
-            <server>10.10.10.10</server>
-            <port>3128</port>
-            <nt-domain>mycompany</nt-domain>
-            <username>flex</username>
-            <password>flex</password>
-        </external-proxy>
-    </properties>
-
-    <!-- Server-side code that directly contacts a destination object or service -->
-    <adapters>
-        <!--
-           id: a unique id specifying the adapter
-           class: the Flex Enterprise class which implements the adapter
-             possible values: flex.messaging.services.http.HTTPProxyAdapter, flex.messaging.services.http.SOAPProxyAdapter
-           default: an optional attribute identifying the adapter to use when none is specified for the service
-        -->
-        <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
-        <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
-    </adapters>
-
-    <default-channels>
-        <!--
-           Set the ref id of the default channels to use as transport for this service.
-           The channel is defined elsewhere using the channel-definition tag.
-        -->
-        <channel ref="my-http"/>
-        <channel ref="my-amf"/>
-    </default-channels>
-     */
-    private Service createService()
-    {
-        String serviceId = "proxy-service";
-        String serviceClass = "flex.messaging.services.HTTPProxyService";        
-        Service httpProxyService = broker.createService(serviceId, serviceClass);
-
-        // Note that <properties> are not set on the service since they are
-        // adapter related properties and will be configured at adapter level
-
-        httpProxyService.registerAdapter("http-proxy", "flex.messaging.services.http.HTTPProxyAdapter");
-        httpProxyService.registerAdapter("soap-proxy", "flex.messaging.services.http.SOAPProxyAdapter");
-        httpProxyService.setDefaultAdapter("http-proxy");
-
-        httpProxyService.addDefaultChannel("my-http");
-        httpProxyService.addDefaultChannel("my-amf");
-
-        return httpProxyService;
-    }
-
-    /*
-    <!-- Example default http destination -->
-    <destination id="DefaultHTTP">
-        <properties>
-            <dynamic-url>http://{server.name}:/{context.root}/</dynamic-url>
-        </properties>
-    </destination>
-
-    <!-- Example http proxy adapter destination -->
-    <destination id="myHTTPService">
-        <properties>
-            <!-- The endpoint available to the http proxy service -->
-            <url>http://www.mycompany.com/services/myservlet</url>
-
-            <!-- Wild card endpoints available to the http proxy services -->
-            <dynamic-url>http://www.mycompany.com/services/*</dynamic-url>
-        </properties>
-    </destination>
-     */
-    public void createDestination1(Service service)
-    {
-        String destinationId = "DefaultHTTP";
-        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
-
-        destination.addDynamicUrl("http://{server.name}:*/{context.root}/*");
-
-        String adapterId = "http-proxy";
-        HTTPProxyAdapter adapter = (HTTPProxyAdapter)destination.createAdapter(adapterId);
-        addProperties(adapter);
-    }
-
-    /*
-    <!-- Example http proxy adapter destination -->
-    <destination id="myHTTPService">
-        <properties>
-            <!-- The endpoint available to the http proxy service -->
-            <url>http://www.mycompany.com/services/myservlet</url>
-
-            <!-- Wild card endpoints available to the http proxy services -->
-            <dynamic-url>http://www.mycompany.com/services/*</dynamic-url>
-        </properties>
-    </destination>
-     */
-    private void createDestination2(Service service)
-    {
-        String destinationId = "myHTTPService";
-        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
-        
-        destination.setDefaultUrl("http://www.mycompany.com/services/myservlet");
-        destination.addDynamicUrl("http://www.mycompany.com/services/*");
-
-        String adapterId = "http-proxy";
-        HTTPProxyAdapter adapter = (HTTPProxyAdapter)destination.createAdapter(adapterId);
-        addProperties(adapter);
-    }
-
-    /*
-    <!-- Example soap proxy adapter destination -->
-    <destination id="echoSoapService">
-        <properties>
-            <!-- The location of the wsdl defined for soap proxy services -->
-            <wsdl>http://{server.name}:{server.port}/myapp/echo?wsdl</wsdl>
-
-            <!-- The soap endpoints available for access defined for soap proxy services -->
-            <soap>http://{server.name}:/myapp/echo</soap>
-        </properties>
-
-        <!-- A specific adapter ref for the destination may be defined -->
-        <adapter ref="soap-proxy"/>
-    </destination>     
-     */
-    private void createDestination3(Service service)
-    {
-        String destinationId = "echoSoapService";
-        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
-
-        destination.setDefaultUrl("http://{server.name}:{server.port}/myapp/echo?wsdl");
-        destination.addDynamicUrl("http://{server.name}:/myapp/echo");
-
-        String adapterId = "soap-proxy";
-        SOAPProxyAdapter adapter = (SOAPProxyAdapter)destination.createAdapter(adapterId);
-        addProperties(adapter);
-    }
-
-    /*
-    <properties>
-        <connection-manager>
-            <max-total-connections>100</max-total-connections>
-            <default-max-connections-per-host>2</default-max-connections-per-host>
-        </connection-manager>
-
-        <!-- Allow self-signed certificates; should not be used in production -->
-        <allow-lax-ssl>true</allow-lax-ssl>
-
-        <external-proxy>
-            <server>10.10.10.10</server>
-            <port>3128</port>
-            <nt-domain>mycompany</nt-domain>
-            <username>flex</username>
-            <password>flex</password>
-        </external-proxy>
-    </properties>     
-     */
-    private void addProperties(HTTPProxyAdapter adapter)
-    {
-        HTTPConnectionManagerSettings cms = new HTTPConnectionManagerSettings();
-        cms.setMaxTotalConnections(100);
-        cms.setDefaultMaxConnectionsPerHost(2);
-        adapter.setConnectionManagerSettings(cms);
-
-        adapter.setAllowLaxSSL(true);
-
-        ExternalProxySettings eps = new ExternalProxySettings();
-        eps.setProxyServer("10.10.10.10");
-        eps.setProxyPort(3128);
-        eps.setNTDomain("mycompany");
-        eps.setUsername("flex");
-        eps.setPassword("flex");
-        adapter.setExternalProxySettings(eps);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package features.bootstrapservices;
+
+import flex.messaging.config.ConfigMap;
+import flex.messaging.services.AbstractBootstrapService;
+import flex.messaging.services.Service;
+import flex.messaging.services.http.ExternalProxySettings;
+import flex.messaging.services.http.HTTPConnectionManagerSettings;
+import flex.messaging.services.http.HTTPProxyAdapter;
+import flex.messaging.services.http.HTTPProxyDestination;
+import flex.messaging.services.http.SOAPProxyAdapter;
+
+/**
+ * This BootstrapService is used to dynamicaly create a HTTPProxy Service along 
+ * with its HTTPProxy Destinations without the need for any configuration files.
+ */
+public class HTTPProxyBootstrapService extends AbstractBootstrapService
+{
+    
+    /**
+     * Called by the <code>MessageBroker</code> after all of the server 
+     * components are created but right before they are started. This is 
+     * usually the place to create dynamic components.
+     * 
+     * @param id Id of the <code>AbstractBootstrapService</code>.
+     * @param properties Properties for the <code>AbstractBootstrapService</code>. 
+     */
+    public void initialize(String id, ConfigMap properties)
+    {
+        Service httpProxyService = createService();
+        createDestination1(httpProxyService);
+        createDestination2(httpProxyService);
+        createDestination3(httpProxyService);
+    }
+
+    /**
+     * Called by the <code>MessageBroker</code> as server starts. Useful for
+     * custom code that needs to run after all the components are initialized
+     * and the server is starting up. 
+     */    
+    public void start()
+    {
+        // No-op.
+    }
+
+    /**
+     * Called by the <code>MessageBroker</code> as server stops. Useful for 
+     * custom code that needs to run as the server is shutting down.
+     */
+    public void stop()
+    {
+        // No-op.
+    }
+
+    /*
+    <?xml version="1.0" encoding="UTF-8"?>
+    <service id="proxy-service" class="flex.messaging.services.HTTPProxyService">
+
+    <!-- Example proxy-config.xml -->
+
+    <properties>
+        <connection-manager>
+            <max-total-connections>100</max-total-connections>
+            <default-max-connections-per-host>2</default-max-connections-per-host>
+        </connection-manager>
+
+        <!-- Allow self-signed certificates; should not be used in production -->
+        <allow-lax-ssl>true</allow-lax-ssl>
+
+        <external-proxy>
+            <server>10.10.10.10</server>
+            <port>3128</port>
+            <nt-domain>mycompany</nt-domain>
+            <username>flex</username>
+            <password>flex</password>
+        </external-proxy>
+    </properties>
+
+    <!-- Server-side code that directly contacts a destination object or service -->
+    <adapters>
+        <!--
+           id: a unique id specifying the adapter
+           class: the Flex Enterprise class which implements the adapter
+             possible values: flex.messaging.services.http.HTTPProxyAdapter, flex.messaging.services.http.SOAPProxyAdapter
+           default: an optional attribute identifying the adapter to use when none is specified for the service
+        -->
+        <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
+        <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
+    </adapters>
+
+    <default-channels>
+        <!--
+           Set the ref id of the default channels to use as transport for this service.
+           The channel is defined elsewhere using the channel-definition tag.
+        -->
+        <channel ref="my-http"/>
+        <channel ref="my-amf"/>
+    </default-channels>
+     */
+    private Service createService()
+    {
+        String serviceId = "proxy-service";
+        String serviceClass = "flex.messaging.services.HTTPProxyService";        
+        Service httpProxyService = broker.createService(serviceId, serviceClass);
+
+        // Note that <properties> are not set on the service since they are
+        // adapter related properties and will be configured at adapter level
+
+        httpProxyService.registerAdapter("http-proxy", "flex.messaging.services.http.HTTPProxyAdapter");
+        httpProxyService.registerAdapter("soap-proxy", "flex.messaging.services.http.SOAPProxyAdapter");
+        httpProxyService.setDefaultAdapter("http-proxy");
+
+        httpProxyService.addDefaultChannel("my-http");
+        httpProxyService.addDefaultChannel("my-amf");
+
+        return httpProxyService;
+    }
+
+    /*
+    <!-- Example default http destination -->
+    <destination id="DefaultHTTP">
+        <properties>
+            <dynamic-url>http://{server.name}:/{context.root}/</dynamic-url>
+        </properties>
+    </destination>
+
+    <!-- Example http proxy adapter destination -->
+    <destination id="myHTTPService">
+        <properties>
+            <!-- The endpoint available to the http proxy service -->
+            <url>http://www.mycompany.com/services/myservlet</url>
+
+            <!-- Wild card endpoints available to the http proxy services -->
+            <dynamic-url>http://www.mycompany.com/services/*</dynamic-url>
+        </properties>
+    </destination>
+     */
+    public void createDestination1(Service service)
+    {
+        String destinationId = "DefaultHTTP";
+        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
+
+        destination.addDynamicUrl("http://{server.name}:*/{context.root}/*");
+
+        String adapterId = "http-proxy";
+        HTTPProxyAdapter adapter = (HTTPProxyAdapter)destination.createAdapter(adapterId);
+        addProperties(adapter);
+    }
+
+    /*
+    <!-- Example http proxy adapter destination -->
+    <destination id="myHTTPService">
+        <properties>
+            <!-- The endpoint available to the http proxy service -->
+            <url>http://www.mycompany.com/services/myservlet</url>
+
+            <!-- Wild card endpoints available to the http proxy services -->
+            <dynamic-url>http://www.mycompany.com/services/*</dynamic-url>
+        </properties>
+    </destination>
+     */
+    private void createDestination2(Service service)
+    {
+        String destinationId = "myHTTPService";
+        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
+        
+        destination.setDefaultUrl("http://www.mycompany.com/services/myservlet");
+        destination.addDynamicUrl("http://www.mycompany.com/services/*");
+
+        String adapterId = "http-proxy";
+        HTTPProxyAdapter adapter = (HTTPProxyAdapter)destination.createAdapter(adapterId);
+        addProperties(adapter);
+    }
+
+    /*
+    <!-- Example soap proxy adapter destination -->
+    <destination id="echoSoapService">
+        <properties>
+            <!-- The location of the wsdl defined for soap proxy services -->
+            <wsdl>http://{server.name}:{server.port}/myapp/echo?wsdl</wsdl>
+
+            <!-- The soap endpoints available for access defined for soap proxy services -->
+            <soap>http://{server.name}:/myapp/echo</soap>
+        </properties>
+
+        <!-- A specific adapter ref for the destination may be defined -->
+        <adapter ref="soap-proxy"/>
+    </destination>     
+     */
+    private void createDestination3(Service service)
+    {
+        String destinationId = "echoSoapService";
+        HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
+
+        destination.setDefaultUrl("http://{server.name}:{server.port}/myapp/echo?wsdl");
+        destination.addDynamicUrl("http://{server.name}:/myapp/echo");
+
+        String adapterId = "soap-proxy";
+        SOAPProxyAdapter adapter = (SOAPProxyAdapter)destination.createAdapter(adapterId);
+        addProperties(adapter);
+    }
+
+    /*
+    <properties>
+        <connection-manager>
+            <max-total-connections>100</max-total-connections>
+            <default-max-connections-per-host>2</default-max-connections-per-host>
+        </connection-manager>
+
+        <!-- Allow self-signed certificates; should not be used in production -->
+        <allow-lax-ssl>true</allow-lax-ssl>
+
+        <external-proxy>
+            <server>10.10.10.10</server>
+            <port>3128</port>
+            <nt-domain>mycompany</nt-domain>
+            <username>flex</username>
+            <password>flex</password>
+        </external-proxy>
+    </properties>     
+     */
+    private void addProperties(HTTPProxyAdapter adapter)
+    {
+        HTTPConnectionManagerSettings cms = new HTTPConnectionManagerSettings();
+        cms.setMaxTotalConnections(100);
+        cms.setDefaultMaxConnectionsPerHost(2);
+        adapter.setConnectionManagerSettings(cms);
+
+        adapter.setAllowLaxSSL(true);
+
+        ExternalProxySettings eps = new ExternalProxySettings();
+        eps.setProxyServer("10.10.10.10");
+        eps.setProxyPort(3128);
+        eps.setNTDomain("mycompany");
+        eps.setUsername("flex");
+        eps.setPassword("flex");
+        adapter.setExternalProxySettings(eps);
+    }
+}


Mime
View raw message