flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [11/51] [partial] flex-blazeds git commit: Refactored the directory structure
Date Tue, 04 Aug 2015 10:16:19 GMT
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
index 95d13c2..b2a9b9c 100755
--- a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
@@ -1,241 +1,241 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" 
-	backgroundGradientColors="[#FFFFFF,#FFFFFF]"
-	layout="horizontal" horizontalAlign="left" verticalGap="8" 
-	creationComplete="initApp()">
-
-	<mx:Style source="main.css"/>
-
-	<mx:Script>
-		<![CDATA[
-			import mx.messaging.channels.HTTPChannel;
-			import mx.messaging.channels.AMFChannel;
-			import mx.controls.Alert;
-			import mx.collections.ArrayCollection;
-			import mx.messaging.Channel;
-			import mx.messaging.ChannelSet;
-			import mx.messaging.config.ServerConfig;
-			import mx.messaging.events.MessageEvent;
-			import samples.portfolio.Stock;
-			import mx.messaging.Consumer;
-	
-			private var consumers:Object;		
-	
-			[Bindable]
-			private var items:ArrayCollection;
-	
-			private var stockMap:Object;
-			
-			private function initApp():void
-			{
-				var channelSet:ChannelSet = ServerConfig.getChannelSet("market-data-feed");
-				channels.dataProvider = channelSet.channelIds;
-				consumers = new Object();
-				stockMap = new Object();
-				items = new ArrayCollection();
-				initializeWatchList(["IBM", "JBLU", "ADBE", "GE", "C"]);
-				displayChannelInfo();
-			}
-			
-			private function deleteSymbol():void
-			{
-				var symbol:String = dg.selectedItem.symbol;
-				unsubscribe(symbol);
-				items.removeItemAt(dg.selectedIndex);
-				delete stockMap[symbol];
-			}
-			
-			public function initializeWatchList(list:Array):void
-			{
-				for (var i:int=0; i<list.length; i++)
-				{
-					addSymbol(list[i]);	
-				}
-			}
-			
-			private function addSymbol(symbol:String):void
-			{
-				if (symbol == null || symbol == "")
-				{
-					Alert.show("Cannot add an empty symbol");
-					return;
-				}
-	
-				symbol = symbol.toUpperCase();
-				if (stockMap.hasOwnProperty(symbol))
-				{
-					Alert.show("Symbol '" + symbol + "' is already in the list");
-					return;
-				}
-	
-				var stock:Stock = new Stock();
-				stock.symbol = symbol;
-				stockMap[symbol] = stock;
-				items.addItem(stock);
-				subscribe(symbol);
-			}
-			
-			private function subscribe(symbol:String):void
-			{
-				var consumer:Consumer = new Consumer();
-				consumer.destination = "market-data-feed";
-				consumer.subtopic = symbol;
-				consumer.channelSet = new ChannelSet([channels.selectedItem]);
-				consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);
-				consumer.subscribe();
-				consumers[symbol] = consumer;
-			}
-			
-			private function unsubscribe(symbol:String):void
-			{
-				if (consumers[symbol])
-				{
-					var consumer:Consumer = consumers[symbol];
-					consumer.removeEventListener(MessageEvent.MESSAGE, messageHandler);
-					if (consumer.subscribed)
-					{
-						consumer.unsubscribe();
-					}
-					consumer.channelSet.disconnectAll();
-					consumers[symbol] = null;
-				}
-			}
-	
-			private function channelChange():void
-			{
-				displayChannelInfo();	
-
-				var i:int;
-				// Get rid of all the subscriptions that use the previously selected channel 
-				for (i=0; i<items.length; i++)
-				{
-					unsubscribe(items.getItemAt(i).symbol)
-				}
-				
-				// Subscribe using the newly selected channel
-				for (i=0; i<items.length; i++)
-				{
-					subscribe(items.getItemAt(i).symbol)
-				}
-			}
-	
-			private function displayChannelInfo():void
-			{
-				var channel:Object = ServerConfig.getChannel(channels.selectedItem as String);
-				channelId.text = channel.id;
-				channelClass.text = getQualifiedClassName(channel);
-				endpoint.text = channel.endpoint;
-				if (channel is AMFChannel || channel is HTTPChannel)
-				{
-					pollingEnabled.text = channel.pollingEnabled;
-					pollingInterval.text = channel.pollingInterval;
-				}
-				else
-				{
-					pollingEnabled.text = "n/a";
-					pollingInterval.text = "n/a";
-				}
-				perClientSettings.visible = channel.id.indexOf("per-client") >= 0;
-			}
-			
-			private function messageHandler(event:MessageEvent):void 
-			{
-				var changedStock:Stock = event.message.body as Stock;
-				var stock:Stock = stockMap[changedStock.symbol];
-				
-				BackgroundColorRenderer.symbol = changedStock.symbol;
-				
-				if (stock)
-				{
-					stock.open = changedStock.open;
-					stock.change = changedStock.change;
-					stock.last = changedStock.last;
-					stock.high = changedStock.high;
-					stock.low = changedStock.low;
-					stock.date = changedStock.date;
-				}
-	        }
-			
-			private function formatNumber(item:Object, column:DataGridColumn):String
-			{
-				return nf.format(item[column.dataField]);
-			}
-			
-			// Only used for the per-client-qos channels
-			private function setDelay():void
-			{
-				configSrv.setAttribute("market-data-delay", delay.text);
-			}
-
-		
-		]]>
-	</mx:Script>
-	
-	<!-- Only used for the per-client-qos channels to provide per-client config values --> 
-	<mx:RemoteObject id="configSrv" destination="flex-client-qos-config"/>
-	
-	<mx:NumberFormatter id="nf" precision="2"/>
-
-	<mx:Panel title="Watch List" width="400" height="400">
-		<mx:DataGrid id="dg" dataProvider="{items}" width="100%" height="100%">
-			<mx:columns>
-				<mx:DataGridColumn headerText="Symbol" dataField="symbol" width="80"/>
-				<mx:DataGridColumn headerText="Open" dataField="open" labelFunction="formatNumber" textAlign="right" width="60"/>
-				<mx:DataGridColumn headerText="Last" dataField="last" itemRenderer="BackgroundColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
-				<mx:DataGridColumn headerText="Change" dataField="change" itemRenderer="ColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
-				<mx:DataGridColumn headerText="High" dataField="high" labelFunction="formatNumber" textAlign="right" width="60"/>
-				<mx:DataGridColumn headerText="Low" dataField="low" labelFunction="formatNumber" textAlign="right" width="60"/>
-			</mx:columns>
-		</mx:DataGrid>
-		<mx:ControlBar>
-			<mx:TextInput id="symbol" enter="addSymbol(symbol.text);symbol.text='';" width="50"/>
-			<mx:Button label="Add Symbol" click="addSymbol(symbol.text);symbol.text='';"/>
-			<mx:Spacer width="100%"/>
-			<mx:Button label="Delete Symbol" click="deleteSymbol()" enabled="{dg.selectedItem}"/>
-		</mx:ControlBar>
-	</mx:Panel>
-	
-	<mx:Form>
-		<mx:FormItem label="Select a channel">
-			<mx:ComboBox id="channels" change="channelChange()"/>
-		</mx:FormItem>
-		<mx:FormItem label="Channel Id">
-			<mx:Label id="channelId"/>
-		</mx:FormItem>
-		<mx:FormItem label="Channel Class">
-			<mx:Label id="channelClass"/>
-		</mx:FormItem>
-		<mx:FormItem label="Endpoint">
-			<mx:Label id="endpoint"/>
-		</mx:FormItem>
-		<mx:FormItem label="Polling Enabled">
-			<mx:Label id="pollingEnabled"/>
-		</mx:FormItem>
-		<mx:FormItem label="Polling Interval (millis)">
-			<mx:Label id="pollingInterval"/>
-		</mx:FormItem>
-		<mx:FormItem id="perClientSettings" label="Custom (Per Client) Quote Delay" direction="horizontal">
-			<mx:TextInput id="delay" width="80" text="5000"/>
-			<mx:Button label="Apply" click="setDelay()"/>
-		</mx:FormItem>
-	</mx:Form>
-	
-</mx:Application>
+<?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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" 
+	backgroundGradientColors="[#FFFFFF,#FFFFFF]"
+	layout="horizontal" horizontalAlign="left" verticalGap="8" 
+	creationComplete="initApp()">
+
+	<mx:Style source="main.css"/>
+
+	<mx:Script>
+		<![CDATA[
+			import mx.messaging.channels.HTTPChannel;
+			import mx.messaging.channels.AMFChannel;
+			import mx.controls.Alert;
+			import mx.collections.ArrayCollection;
+			import mx.messaging.Channel;
+			import mx.messaging.ChannelSet;
+			import mx.messaging.config.ServerConfig;
+			import mx.messaging.events.MessageEvent;
+			import samples.portfolio.Stock;
+			import mx.messaging.Consumer;
+	
+			private var consumers:Object;		
+	
+			[Bindable]
+			private var items:ArrayCollection;
+	
+			private var stockMap:Object;
+			
+			private function initApp():void
+			{
+				var channelSet:ChannelSet = ServerConfig.getChannelSet("market-data-feed");
+				channels.dataProvider = channelSet.channelIds;
+				consumers = new Object();
+				stockMap = new Object();
+				items = new ArrayCollection();
+				initializeWatchList(["IBM", "JBLU", "ADBE", "GE", "C"]);
+				displayChannelInfo();
+			}
+			
+			private function deleteSymbol():void
+			{
+				var symbol:String = dg.selectedItem.symbol;
+				unsubscribe(symbol);
+				items.removeItemAt(dg.selectedIndex);
+				delete stockMap[symbol];
+			}
+			
+			public function initializeWatchList(list:Array):void
+			{
+				for (var i:int=0; i<list.length; i++)
+				{
+					addSymbol(list[i]);	
+				}
+			}
+			
+			private function addSymbol(symbol:String):void
+			{
+				if (symbol == null || symbol == "")
+				{
+					Alert.show("Cannot add an empty symbol");
+					return;
+				}
+	
+				symbol = symbol.toUpperCase();
+				if (stockMap.hasOwnProperty(symbol))
+				{
+					Alert.show("Symbol '" + symbol + "' is already in the list");
+					return;
+				}
+	
+				var stock:Stock = new Stock();
+				stock.symbol = symbol;
+				stockMap[symbol] = stock;
+				items.addItem(stock);
+				subscribe(symbol);
+			}
+			
+			private function subscribe(symbol:String):void
+			{
+				var consumer:Consumer = new Consumer();
+				consumer.destination = "market-data-feed";
+				consumer.subtopic = symbol;
+				consumer.channelSet = new ChannelSet([channels.selectedItem]);
+				consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);
+				consumer.subscribe();
+				consumers[symbol] = consumer;
+			}
+			
+			private function unsubscribe(symbol:String):void
+			{
+				if (consumers[symbol])
+				{
+					var consumer:Consumer = consumers[symbol];
+					consumer.removeEventListener(MessageEvent.MESSAGE, messageHandler);
+					if (consumer.subscribed)
+					{
+						consumer.unsubscribe();
+					}
+					consumer.channelSet.disconnectAll();
+					consumers[symbol] = null;
+				}
+			}
+	
+			private function channelChange():void
+			{
+				displayChannelInfo();	
+
+				var i:int;
+				// Get rid of all the subscriptions that use the previously selected channel 
+				for (i=0; i<items.length; i++)
+				{
+					unsubscribe(items.getItemAt(i).symbol)
+				}
+				
+				// Subscribe using the newly selected channel
+				for (i=0; i<items.length; i++)
+				{
+					subscribe(items.getItemAt(i).symbol)
+				}
+			}
+	
+			private function displayChannelInfo():void
+			{
+				var channel:Object = ServerConfig.getChannel(channels.selectedItem as String);
+				channelId.text = channel.id;
+				channelClass.text = getQualifiedClassName(channel);
+				endpoint.text = channel.endpoint;
+				if (channel is AMFChannel || channel is HTTPChannel)
+				{
+					pollingEnabled.text = channel.pollingEnabled;
+					pollingInterval.text = channel.pollingInterval;
+				}
+				else
+				{
+					pollingEnabled.text = "n/a";
+					pollingInterval.text = "n/a";
+				}
+				perClientSettings.visible = channel.id.indexOf("per-client") >= 0;
+			}
+			
+			private function messageHandler(event:MessageEvent):void 
+			{
+				var changedStock:Stock = event.message.body as Stock;
+				var stock:Stock = stockMap[changedStock.symbol];
+				
+				BackgroundColorRenderer.symbol = changedStock.symbol;
+				
+				if (stock)
+				{
+					stock.open = changedStock.open;
+					stock.change = changedStock.change;
+					stock.last = changedStock.last;
+					stock.high = changedStock.high;
+					stock.low = changedStock.low;
+					stock.date = changedStock.date;
+				}
+	        }
+			
+			private function formatNumber(item:Object, column:DataGridColumn):String
+			{
+				return nf.format(item[column.dataField]);
+			}
+			
+			// Only used for the per-client-qos channels
+			private function setDelay():void
+			{
+				configSrv.setAttribute("market-data-delay", delay.text);
+			}
+
+		
+		]]>
+	</mx:Script>
+	
+	<!-- Only used for the per-client-qos channels to provide per-client config values --> 
+	<mx:RemoteObject id="configSrv" destination="flex-client-qos-config"/>
+	
+	<mx:NumberFormatter id="nf" precision="2"/>
+
+	<mx:Panel title="Watch List" width="400" height="400">
+		<mx:DataGrid id="dg" dataProvider="{items}" width="100%" height="100%">
+			<mx:columns>
+				<mx:DataGridColumn headerText="Symbol" dataField="symbol" width="80"/>
+				<mx:DataGridColumn headerText="Open" dataField="open" labelFunction="formatNumber" textAlign="right" width="60"/>
+				<mx:DataGridColumn headerText="Last" dataField="last" itemRenderer="BackgroundColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
+				<mx:DataGridColumn headerText="Change" dataField="change" itemRenderer="ColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
+				<mx:DataGridColumn headerText="High" dataField="high" labelFunction="formatNumber" textAlign="right" width="60"/>
+				<mx:DataGridColumn headerText="Low" dataField="low" labelFunction="formatNumber" textAlign="right" width="60"/>
+			</mx:columns>
+		</mx:DataGrid>
+		<mx:ControlBar>
+			<mx:TextInput id="symbol" enter="addSymbol(symbol.text);symbol.text='';" width="50"/>
+			<mx:Button label="Add Symbol" click="addSymbol(symbol.text);symbol.text='';"/>
+			<mx:Spacer width="100%"/>
+			<mx:Button label="Delete Symbol" click="deleteSymbol()" enabled="{dg.selectedItem}"/>
+		</mx:ControlBar>
+	</mx:Panel>
+	
+	<mx:Form>
+		<mx:FormItem label="Select a channel">
+			<mx:ComboBox id="channels" change="channelChange()"/>
+		</mx:FormItem>
+		<mx:FormItem label="Channel Id">
+			<mx:Label id="channelId"/>
+		</mx:FormItem>
+		<mx:FormItem label="Channel Class">
+			<mx:Label id="channelClass"/>
+		</mx:FormItem>
+		<mx:FormItem label="Endpoint">
+			<mx:Label id="endpoint"/>
+		</mx:FormItem>
+		<mx:FormItem label="Polling Enabled">
+			<mx:Label id="pollingEnabled"/>
+		</mx:FormItem>
+		<mx:FormItem label="Polling Interval (millis)">
+			<mx:Label id="pollingInterval"/>
+		</mx:FormItem>
+		<mx:FormItem id="perClientSettings" label="Custom (Per Client) Quote Delay" direction="horizontal">
+			<mx:TextInput id="delay" width="80" text="5000"/>
+			<mx:Button label="Apply" click="setDelay()"/>
+		</mx:FormItem>
+	</mx:Form>
+	
+</mx:Application>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex/messaging-config.xml b/attic/apps/samples/WEB-INF/flex/messaging-config.xml
index 7b331c3..31422b0 100755
--- a/attic/apps/samples/WEB-INF/flex/messaging-config.xml
+++ b/attic/apps/samples/WEB-INF/flex/messaging-config.xml
@@ -1,58 +1,58 @@
-<?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.
-
--->
-<service id="message-service" class="flex.messaging.services.MessageService">
-
-    <adapters>
-        <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
-        <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
-    </adapters>
-    
-    <default-channels>
-		<channel ref="my-streaming-amf"/>
-		<channel ref="my-polling-amf"/>
-    </default-channels>
-
-    <destination id="feed">
-    	<!-- Destination specific channel configuration can be defined if needed
-        <channels>
-            <channel ref="my-streaming-amf"/>
-        </channels>        
-         -->
-    </destination>
-
-    <destination id="chat"/>
-
-    <destination id="dashboard"/>
-    
-    <destination id="market-data-feed">
-        <properties>
-            <server>
-                <allow-subtopics>true</allow-subtopics>
-                <subtopic-separator>.</subtopic-separator>s
-            </server>
-        </properties>
-        <channels>
-			<channel ref="my-polling-amf"/>
-			<channel ref="my-streaming-amf"/>
-            <channel ref="per-client-qos-polling-amf"/>
-        </channels>        
-    </destination>    
-
-</service>
+<?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.
+
+-->
+<service id="message-service" class="flex.messaging.services.MessageService">
+
+    <adapters>
+        <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
+        <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
+    </adapters>
+    
+    <default-channels>
+		<channel ref="my-streaming-amf"/>
+		<channel ref="my-polling-amf"/>
+    </default-channels>
+
+    <destination id="feed">
+    	<!-- Destination specific channel configuration can be defined if needed
+        <channels>
+            <channel ref="my-streaming-amf"/>
+        </channels>        
+         -->
+    </destination>
+
+    <destination id="chat"/>
+
+    <destination id="dashboard"/>
+    
+    <destination id="market-data-feed">
+        <properties>
+            <server>
+                <allow-subtopics>true</allow-subtopics>
+                <subtopic-separator>.</subtopic-separator>s
+            </server>
+        </properties>
+        <channels>
+			<channel ref="my-polling-amf"/>
+			<channel ref="my-streaming-amf"/>
+            <channel ref="per-client-qos-polling-amf"/>
+        </channels>        
+    </destination>    
+
+</service>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex/proxy-config.xml b/attic/apps/samples/WEB-INF/flex/proxy-config.xml
index 158a059..34324da 100755
--- a/attic/apps/samples/WEB-INF/flex/proxy-config.xml
+++ b/attic/apps/samples/WEB-INF/flex/proxy-config.xml
@@ -1,60 +1,60 @@
-<?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.
-
--->
-<service id="proxy-service" class="flex.messaging.services.HTTPProxyService">
-
-    <properties>
-        <connection-manager>
-            <max-total-connections>100</max-total-connections>
-            <default-max-connections-per-host>2</default-max-connections-per-host>
-        </connection-manager>
-
-        <allow-lax-ssl>true</allow-lax-ssl>
-    </properties>
-
-    <default-channels>
-        <channel ref="my-http"/>
-        <channel ref="my-amf"/>
-    </default-channels>
-
-    <adapters>
-        <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>
-
-    <destination id="DefaultHTTP">
-		<properties>
-		</properties>
-    </destination>
-    
-    <destination id="catalog">
-		<properties>
-			<url>/{context.root}/testdrive-httpservice/catalog.jsp</url>
-		</properties>
-    </destination>
-
-    <destination id="ws-catalog">
-        <properties>
-            <wsdl>http://feeds.adobe.com/webservices/mxna2.cfc?wsdl</wsdl>
-            <soap>http://feeds.adobe.com/webservices/mxna2.cfc</soap>
-        </properties>
-        <adapter ref="soap-proxy"/>
-    </destination>
-    
-</service>
+<?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.
+
+-->
+<service id="proxy-service" class="flex.messaging.services.HTTPProxyService">
+
+    <properties>
+        <connection-manager>
+            <max-total-connections>100</max-total-connections>
+            <default-max-connections-per-host>2</default-max-connections-per-host>
+        </connection-manager>
+
+        <allow-lax-ssl>true</allow-lax-ssl>
+    </properties>
+
+    <default-channels>
+        <channel ref="my-http"/>
+        <channel ref="my-amf"/>
+    </default-channels>
+
+    <adapters>
+        <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>
+
+    <destination id="DefaultHTTP">
+		<properties>
+		</properties>
+    </destination>
+    
+    <destination id="catalog">
+		<properties>
+			<url>/{context.root}/testdrive-httpservice/catalog.jsp</url>
+		</properties>
+    </destination>
+
+    <destination id="ws-catalog">
+        <properties>
+            <wsdl>http://feeds.adobe.com/webservices/mxna2.cfc?wsdl</wsdl>
+            <soap>http://feeds.adobe.com/webservices/mxna2.cfc</soap>
+        </properties>
+        <adapter ref="soap-proxy"/>
+    </destination>
+    
+</service>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex/remoting-config.xml b/attic/apps/samples/WEB-INF/flex/remoting-config.xml
index 8b0546b..acee9e3 100755
--- a/attic/apps/samples/WEB-INF/flex/remoting-config.xml
+++ b/attic/apps/samples/WEB-INF/flex/remoting-config.xml
@@ -1,56 +1,56 @@
-<?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.
-
--->
-<service id="remoting-service"
-    class="flex.messaging.services.RemotingService">
-
-    <adapters>
-        <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
-    </adapters>
-
-    <default-channels>
-        <channel ref="my-amf"/>
-    </default-channels>
-
-    <destination id="product">
-        <properties>
-            <source>flex.samples.product.ProductService</source>
-        </properties>
-    </destination>
-    
-    <destination id="productService">
-        <properties>
-            <source>flex.samples.dcd.product.ProductService</source>
-        </properties>
-    </destination>
-
-    <destination id="chat-room-service">
-        <properties>
-            <source>flex.samples.runtimeconfig.ChatRoomService</source>
-            <scope>application</scope>
-        </properties>
-    </destination>
-
-    <destination id="flex-client-qos-config" channels="per-client-qos-polling-amf">
-        <properties>
-            <source>flex.samples.qos.FlexClientConfigService</source>
-        </properties>
-    </destination>
-    
-  </service>
+<?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.
+
+-->
+<service id="remoting-service"
+    class="flex.messaging.services.RemotingService">
+
+    <adapters>
+        <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
+    </adapters>
+
+    <default-channels>
+        <channel ref="my-amf"/>
+    </default-channels>
+
+    <destination id="product">
+        <properties>
+            <source>flex.samples.product.ProductService</source>
+        </properties>
+    </destination>
+    
+    <destination id="productService">
+        <properties>
+            <source>flex.samples.dcd.product.ProductService</source>
+        </properties>
+    </destination>
+
+    <destination id="chat-room-service">
+        <properties>
+            <source>flex.samples.runtimeconfig.ChatRoomService</source>
+            <scope>application</scope>
+        </properties>
+    </destination>
+
+    <destination id="flex-client-qos-config" channels="per-client-qos-polling-amf">
+        <properties>
+            <source>flex.samples.qos.FlexClientConfigService</source>
+        </properties>
+    </destination>
+    
+  </service>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex/services-config.xml b/attic/apps/samples/WEB-INF/flex/services-config.xml
index 13c4069..c8b7d15 100755
--- a/attic/apps/samples/WEB-INF/flex/services-config.xml
+++ b/attic/apps/samples/WEB-INF/flex/services-config.xml
@@ -1,146 +1,146 @@
-<?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 class="flex.samples.DatabaseCheckService" id="hsqldb" />
-        
-        <service-include file-path="remoting-config.xml" />
-        <service-include file-path="proxy-config.xml" />
-        <service-include file-path="messaging-config.xml" />
-        
-	    <service class="flex.samples.runtimeconfig.EmployeeRuntimeRemotingDestination" id="runtime-employee-ro" />
-
-    	<!-- 
-    	Application level default channels. Application level default channels are 
-    	necessary when a dynamic destination is being used by a service component
-    	and no ChannelSet has been defined for the service component. In that case,
-    	application level default channels will be used to contact the destination.
-        -->   
-        <default-channels>
-           <channel ref="my-amf"/>
-        </default-channels>
-    
-	</services>
-
-
-    <security>
-        <security-constraint id="sample-users">
-            <auth-method>Custom</auth-method>
-            <roles>
-                <role>sampleusers</role>
-            </roles>
-        </security-constraint>
-
-		<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>
-
-    <channels>
-    
-        <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
-        </channel-definition>
-    
-        <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>
-            </properties>
-        </channel-definition>
-
-        <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>
-            	<add-no-cache-headers>false</add-no-cache-headers>
-            </properties>
-        </channel-definition>
-
-        <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-seconds>4</polling-interval-seconds>
-            </properties>
-        </channel-definition>
-
-        <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"/>
-        </channel-definition>
-
-        <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>
-            	<add-no-cache-headers>false</add-no-cache-headers>
-            </properties>
-        </channel-definition>
-
-        <channel-definition id="per-client-qos-polling-amf" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/qosamfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
-            <properties>
-                <polling-enabled>true</polling-enabled>
-                <polling-interval-millis>500</polling-interval-millis>
-                <flex-client-outbound-queue-processor class="flex.samples.qos.CustomDelayQueueProcessor">
-                    <properties>
-                        <flush-delay>5000</flush-delay>
-                    </properties>
-                </flex-client-outbound-queue-processor>
-            </properties>
-        </channel-definition>
-
-    </channels>
-
-    <logging>
-        <!-- You may also use flex.messaging.log.ServletLogTarget -->
-        <target class="flex.messaging.log.ConsoleTarget" level="Error">
-            <properties>
-                <prefix>[BlazeDS] </prefix>
-                <includeDate>false</includeDate>
-                <includeTime>false</includeTime>
-                <includeLevel>true</includeLevel>
-                <includeCategory>false</includeCategory>
-            </properties>
-            <filters>
-                <pattern>Endpoint.*</pattern>
-                <pattern>Service.*</pattern>
-                <pattern>Configuration</pattern>
-            </filters>
-        </target>
-    </logging>
-
-    <system>
-        <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>
-
-</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 class="flex.samples.DatabaseCheckService" id="hsqldb" />
+        
+        <service-include file-path="remoting-config.xml" />
+        <service-include file-path="proxy-config.xml" />
+        <service-include file-path="messaging-config.xml" />
+        
+	    <service class="flex.samples.runtimeconfig.EmployeeRuntimeRemotingDestination" id="runtime-employee-ro" />
+
+    	<!-- 
+    	Application level default channels. Application level default channels are 
+    	necessary when a dynamic destination is being used by a service component
+    	and no ChannelSet has been defined for the service component. In that case,
+    	application level default channels will be used to contact the destination.
+        -->   
+        <default-channels>
+           <channel ref="my-amf"/>
+        </default-channels>
+    
+	</services>
+
+
+    <security>
+        <security-constraint id="sample-users">
+            <auth-method>Custom</auth-method>
+            <roles>
+                <role>sampleusers</role>
+            </roles>
+        </security-constraint>
+
+		<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>
+
+    <channels>
+    
+        <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
+        </channel-definition>
+    
+        <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>
+            </properties>
+        </channel-definition>
+
+        <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>
+            	<add-no-cache-headers>false</add-no-cache-headers>
+            </properties>
+        </channel-definition>
+
+        <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-seconds>4</polling-interval-seconds>
+            </properties>
+        </channel-definition>
+
+        <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"/>
+        </channel-definition>
+
+        <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>
+            	<add-no-cache-headers>false</add-no-cache-headers>
+            </properties>
+        </channel-definition>
+
+        <channel-definition id="per-client-qos-polling-amf" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/qosamfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-millis>500</polling-interval-millis>
+                <flex-client-outbound-queue-processor class="flex.samples.qos.CustomDelayQueueProcessor">
+                    <properties>
+                        <flush-delay>5000</flush-delay>
+                    </properties>
+                </flex-client-outbound-queue-processor>
+            </properties>
+        </channel-definition>
+
+    </channels>
+
+    <logging>
+        <!-- You may also use flex.messaging.log.ServletLogTarget -->
+        <target class="flex.messaging.log.ConsoleTarget" level="Error">
+            <properties>
+                <prefix>[BlazeDS] </prefix>
+                <includeDate>false</includeDate>
+                <includeTime>false</includeTime>
+                <includeLevel>true</includeLevel>
+                <includeCategory>false</includeCategory>
+            </properties>
+            <filters>
+                <pattern>Endpoint.*</pattern>
+                <pattern>Service.*</pattern>
+                <pattern>Configuration</pattern>
+            </filters>
+        </target>
+    </logging>
+
+    <system>
+        <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>
+
+</services-config>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java b/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
index a04fa73..67f2abc 100755
--- a/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
@@ -1,59 +1,59 @@
-/*
- * 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 flex.samples;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-
-public class ConnectionHelper
-{
-	private String url;
-	private static ConnectionHelper instance;
-
-	private ConnectionHelper()
-	{
-		try {
-			Class.forName("org.hsqldb.jdbcDriver");
-			url = "jdbc:hsqldb:hsql://localhost:9002/flexdemodb";
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	public static Connection getConnection() throws SQLException {
-		if (instance == null) {
-			instance = new ConnectionHelper();
-		}
-		try {
-			return DriverManager.getConnection(instance.url);
-		} catch (SQLException e) {
-			throw e;
-		}
-	}
-	
-	public static void close(Connection connection)
-	{
-		try {
-			if (connection != null) {
-				connection.close();
-			}
-		} catch (SQLException e) {
-			e.printStackTrace();
-		}
-	}
+/*
+ * 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 flex.samples;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+public class ConnectionHelper
+{
+	private String url;
+	private static ConnectionHelper instance;
+
+	private ConnectionHelper()
+	{
+		try {
+			Class.forName("org.hsqldb.jdbcDriver");
+			url = "jdbc:hsqldb:hsql://localhost:9002/flexdemodb";
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	public static Connection getConnection() throws SQLException {
+		if (instance == null) {
+			instance = new ConnectionHelper();
+		}
+		try {
+			return DriverManager.getConnection(instance.url);
+		} catch (SQLException e) {
+			throw e;
+		}
+	}
+	
+	public static void close(Connection connection)
+	{
+		try {
+			if (connection != null) {
+				connection.close();
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java b/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java
index 3d71e0f..4a06b6b 100755
--- a/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java
@@ -1,38 +1,38 @@
-/*
- * 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 flex.samples;
-
-public class DAOException extends RuntimeException
-{
-	static final long serialVersionUID = -1881205326938716446L;
-
-	public DAOException(String message)
-	{
-		super(message);
-	}
-
-	public DAOException(Throwable cause)
-	{
-		super(cause);
-	}
-
-	public DAOException(String message, Throwable cause)
-	{
-		super(message, cause);
-	}
-
-}
+/*
+ * 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 flex.samples;
+
+public class DAOException extends RuntimeException
+{
+	static final long serialVersionUID = -1881205326938716446L;
+
+	public DAOException(String message)
+	{
+		super(message);
+	}
+
+	public DAOException(Throwable cause)
+	{
+		super(cause);
+	}
+
+	public DAOException(String message, Throwable cause)
+	{
+		super(message, cause);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java b/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
index 68f1990..936ed85 100755
--- a/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
@@ -1,65 +1,65 @@
-/*
- * 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 flex.samples;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-import flex.messaging.config.ConfigMap;
-import flex.messaging.services.AbstractBootstrapService;
-
-public class DatabaseCheckService extends AbstractBootstrapService
-{
-    public void initialize(String id, ConfigMap properties)
-    {
-    	Connection c = null;
-    	try 
-    	{	
-    		// Check that the database is running...
-    		c = ConnectionHelper.getConnection();
-    		// ... if yes return
-    		return;
-    	}
-    	catch (SQLException e)
-    	{
-    		System.out.println("******************************************************************************");
-    		System.out.println("*                                                                            *");
-    		System.out.println("*  Unable to connect to the samples database.                                *");
-    		System.out.println("*  You must start the samples database before you can run the samples.       *");
-    		System.out.println("*  To start the samples database:                                            *");
-    		System.out.println("*    1. Open a command prompt and go to the {install-dir}/sampledb dir       *");
-    		System.out.println("*    2. Run startdb.bat (Windows) or startdb.sh (Unix-based systems)         *");
-    		System.out.println("*                                                                            *");
-    		System.out.println("******************************************************************************");
-    	} 
-    	finally
-    	{
-    		ConnectionHelper.close(c);
-    	}
-    	
-    }
-
-    public void start()
-    {
-    }
-
-
-    public void stop()
-    {
-    }
-
-}
+/*
+ * 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 flex.samples;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import flex.messaging.config.ConfigMap;
+import flex.messaging.services.AbstractBootstrapService;
+
+public class DatabaseCheckService extends AbstractBootstrapService
+{
+    public void initialize(String id, ConfigMap properties)
+    {
+    	Connection c = null;
+    	try 
+    	{	
+    		// Check that the database is running...
+    		c = ConnectionHelper.getConnection();
+    		// ... if yes return
+    		return;
+    	}
+    	catch (SQLException e)
+    	{
+    		System.out.println("******************************************************************************");
+    		System.out.println("*                                                                            *");
+    		System.out.println("*  Unable to connect to the samples database.                                *");
+    		System.out.println("*  You must start the samples database before you can run the samples.       *");
+    		System.out.println("*  To start the samples database:                                            *");
+    		System.out.println("*    1. Open a command prompt and go to the {install-dir}/sampledb dir       *");
+    		System.out.println("*    2. Run startdb.bat (Windows) or startdb.sh (Unix-based systems)         *");
+    		System.out.println("*                                                                            *");
+    		System.out.println("******************************************************************************");
+    	} 
+    	finally
+    	{
+    		ConnectionHelper.close(c);
+    	}
+    	
+    }
+
+    public void start()
+    {
+    }
+
+
+    public void stop()
+    {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
index c13602a..cdfc2af 100755
--- a/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
@@ -1,37 +1,37 @@
-/*
- * 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 flex.samples.crm;
-
-public class ConcurrencyException extends Exception
-{
-	private static final long serialVersionUID = -6405818907028247079L;
-
-	public ConcurrencyException(String message)
-	{
-		super(message);
-	}
-
-	public ConcurrencyException(Throwable cause)
-	{
-		super(cause);
-	}
-
-	public ConcurrencyException(String message, Throwable cause)
-	{
-		super(message, cause);
-	}
-}
+/*
+ * 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 flex.samples.crm;
+
+public class ConcurrencyException extends Exception
+{
+	private static final long serialVersionUID = -6405818907028247079L;
+
+	public ConcurrencyException(String message)
+	{
+		super(message);
+	}
+
+	public ConcurrencyException(Throwable cause)
+	{
+		super(cause);
+	}
+
+	public ConcurrencyException(String message, Throwable cause)
+	{
+		super(message, cause);
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
index 2560ca0..a0a6f2d 100755
--- a/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
@@ -1,38 +1,38 @@
-/*
- * 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 flex.samples.crm;
-
-public class DAOException extends RuntimeException
-{
-	private static final long serialVersionUID = -8852593974738250673L;
-
-	public DAOException(String message)
-	{
-		super(message);
-	}
-
-	public DAOException(Throwable cause)
-	{
-		super(cause);
-	}
-
-	public DAOException(String message, Throwable cause)
-	{
-		super(message, cause);
-	}
-
-}
+/*
+ * 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 flex.samples.crm;
+
+public class DAOException extends RuntimeException
+{
+	private static final long serialVersionUID = -8852593974738250673L;
+
+	public DAOException(String message)
+	{
+		super(message);
+	}
+
+	public DAOException(Throwable cause)
+	{
+		super(cause);
+	}
+
+	public DAOException(String message, Throwable cause)
+	{
+		super(message, cause);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
index 8cd5e24..5881851 100755
--- a/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
@@ -1,105 +1,105 @@
-/*
- * 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 flex.samples.crm.company;
-
-public class Company
-{
-	private int companyId;
-
-	private String name;
-
-	private String address;
-
-	private String city;
-
-	private String zip;
-
-	private String state;
-
-    private String industry;
-
-	public String getAddress()
-	{
-		return address;
-	}
-
-	public void setAddress(String address)
-	{
-		this.address = address;
-	}
-
-	public String getCity()
-	{
-		return city;
-	}
-
-	public void setCity(String city)
-	{
-		this.city = city;
-	}
-
-	public int getCompanyId()
-	{
-		return companyId;
-	}
-
-	public void setCompanyId(int companyId)
-	{
-		this.companyId = companyId;
-	}
-
-	public String getName()
-	{
-		return name;
-	}
-
-	public void setName(String name)
-	{
-		this.name = name;
-	}
-
-	public String getState()
-	{
-		return state;
-	}
-
-	public void setState(String state)
-	{
-		this.state = state;
-	}
-
-	public String getZip()
-	{
-		return zip;
-	}
-
-	public void setZip(String zip)
-	{
-		this.zip = zip;
-	}
-
-    public String getIndustry()
-    {
-        return this.industry;
-    }
-
-    public void setIndustry(String industry)
-    {
-        this.industry = industry;
-    }
-	
-}
+/*
+ * 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 flex.samples.crm.company;
+
+public class Company
+{
+	private int companyId;
+
+	private String name;
+
+	private String address;
+
+	private String city;
+
+	private String zip;
+
+	private String state;
+
+    private String industry;
+
+	public String getAddress()
+	{
+		return address;
+	}
+
+	public void setAddress(String address)
+	{
+		this.address = address;
+	}
+
+	public String getCity()
+	{
+		return city;
+	}
+
+	public void setCity(String city)
+	{
+		this.city = city;
+	}
+
+	public int getCompanyId()
+	{
+		return companyId;
+	}
+
+	public void setCompanyId(int companyId)
+	{
+		this.companyId = companyId;
+	}
+
+	public String getName()
+	{
+		return name;
+	}
+
+	public void setName(String name)
+	{
+		this.name = name;
+	}
+
+	public String getState()
+	{
+		return state;
+	}
+
+	public void setState(String state)
+	{
+		this.state = state;
+	}
+
+	public String getZip()
+	{
+		return zip;
+	}
+
+	public void setZip(String zip)
+	{
+		this.zip = zip;
+	}
+
+    public String getIndustry()
+    {
+        return this.industry;
+    }
+
+    public void setIndustry(String industry)
+    {
+        this.industry = industry;
+    }
+	
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
index 3047319..3126504 100755
--- a/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
@@ -1,228 +1,228 @@
-/*
- * 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 flex.samples.crm.company;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.List;
-
-import flex.samples.ConnectionHelper;
-import flex.samples.crm.ConcurrencyException;
-import flex.samples.crm.DAOException;
-
-public class CompanyDAO
-{
-	public List findCompanies(String name, String industry) throws DAOException
-	{
-		List list = new ArrayList();
-		Connection c = null;
-		try
-		{
-            String sql = "SELECT * FROM company";
-            if (industry != null && industry != "All")
-                sql += " WHERE industry = ?";
-            if (name != null)
-            {
-               if (industry == null)
-                   sql += " WHERE company.name LIKE ?";
-               else
-                   sql += " AND company.name LIKE ?";
-            }
-            sql += " ORDER BY company.name";
-            
-			c = ConnectionHelper.getConnection();
-
-            PreparedStatement ps = c.prepareStatement(sql);
-            ps.setString(1, industry);
-            ps.setString(1, "%" + name + "%");
-            ResultSet rs = ps.executeQuery();
-			Company company;
-			while (rs.next())
-			{
-				company = new Company();
-				company.setCompanyId(rs.getInt("company_id"));
-				company.setName(rs.getString("name"));
-				company.setAddress(rs.getString("address"));
-				company.setCity(rs.getString("city"));
-				company.setZip(rs.getString("zip"));
-				company.setState(rs.getString("state"));
-				company.setIndustry(rs.getString("industry"));
-				list.add(company);
-			}
-            rs.close();
-            ps.close();
-		}
-		catch (SQLException e)
-		{
-			e.printStackTrace();
-			throw new DAOException(e);
-		}
-		finally
-		{
-			ConnectionHelper.close(c);
-		}
-		return list;
-	}
-
-	public Company getCompany(int companyId) throws DAOException
-	{
-		Company company = null;
-		Connection c = null;
-		try
-		{
-			c = ConnectionHelper.getConnection();
-            PreparedStatement ps = c.prepareStatement("SELECT * FROM company WHERE company_id= ?");
-            ps.setInt(1, companyId);
-			ResultSet rs = ps.executeQuery();
-			if (rs.next())
-			{
-				company = new Company();
-				company.setCompanyId(rs.getInt("company_id"));
-				company.setName(rs.getString("name"));
-				company.setAddress(rs.getString("address"));
-				company.setCity(rs.getString("city"));
-				company.setZip(rs.getString("zip"));
-				company.setState(rs.getString("state"));
-				company.setIndustry(rs.getString("industry"));
-			}
-			rs.close();
-			ps.close();
-		}
-		catch (SQLException e)
-		{
-			e.printStackTrace();
-			throw new DAOException(e);
-		}
-		finally
-		{
-			ConnectionHelper.close(c);
-		}
-		return company;
-	}
-
-	public Company create(Company company) throws DAOException
-	{
-		Connection c = null;
-        PreparedStatement ps = null;
-		try
-		{
-			c = ConnectionHelper.getConnection();
-			ps = c.prepareStatement("INSERT INTO company (name, address, city, zip, state, industry) VALUES (?, ?, ?, ?, ?, ?)");
-			ps.setString(1, company.getName());
-			ps.setString(2, company.getAddress());
-			ps.setString(3, company.getCity());
-			ps.setString(4, company.getZip());
-			ps.setString(5, company.getState());
-			ps.setString(6, company.getIndustry());
-			ps.execute();
-            ps.close();
-            ps = null;
-			Statement s = c.createStatement();
-			// HSQLDB Syntax to get the identity (company_id) of inserted row
-			ResultSet rs = s.executeQuery("CALL IDENTITY()");
-			rs.next();
-
-            // Update the id in the returned object.  This is important as this
-            // value must get returned to the client.
-			company.setCompanyId(rs.getInt(1));
-
-		}
-		catch (SQLException e)
-		{
-			e.printStackTrace();
-			throw new DAOException(e);
-		}
-		finally
-		{
-			ConnectionHelper.close(c);
-		}
-		return company;
-	}
-
-	public void update(Company newVersion, Company previousVersion, List changes) throws DAOException, ConcurrencyException
-	{
-		Connection c = null;
-        PreparedStatement ps = null;
-		try
-		{
-			c = ConnectionHelper.getConnection();
-            ps = c.prepareStatement("UPDATE company SET name=?, address=?, city=?, zip=?, state=?, industry=? WHERE company_id=? AND name=? AND address=? AND city=? AND zip=? AND state=?" );
-            ps.setString(1, newVersion.getName());
-            ps.setString(2, newVersion.getAddress());
-            ps.setString(3, newVersion.getCity());
-            ps.setString(4, newVersion.getZip());
-            ps.setString(5, newVersion.getState());
-            ps.setString(6, newVersion.getIndustry());
-            ps.setInt(7, newVersion.getCompanyId());
-			ps.setString(8, previousVersion.getName());
-			ps.setString(9, previousVersion.getAddress());
-			ps.setString(10, previousVersion.getCity());
-			ps.setString(11, previousVersion.getZip());
-			ps.setString(12, previousVersion.getState());
-			if (ps.executeUpdate() == 0)
-			{
-				throw new ConcurrencyException("Item not found");
-			}
-            ps.close();
-            ps = null;
-		}
-		catch (SQLException e)
-		{
-			e.printStackTrace();
-			throw new DAOException(e);
-		}
-		finally
-		{
-			ConnectionHelper.close(c);
-		}
-	}
-
-	public void delete(Company company) throws DAOException, ConcurrencyException
-	{
-		Connection c = null;
-        PreparedStatement ps = null;
-		try
-		{
-			c = ConnectionHelper.getConnection();
-
-			ps = c.prepareStatement("DELETE FROM company WHERE company_id=? AND name=? AND address=? AND city=? AND zip=? AND state=?");
-			ps.setInt(1, company.getCompanyId());
-			ps.setString(2, company.getName());
-			ps.setString(3, company.getAddress());
-			ps.setString(4, company.getCity());
-			ps.setString(5, company.getZip());
-			ps.setString(6, company.getState());
-			if (ps.executeUpdate() == 0)
-			{
-				throw new ConcurrencyException("Item not found");
-			}
-		}
-		catch (SQLException e)
-		{
-			e.printStackTrace();
-			throw new DAOException(e);
-		}
-		finally
-		{
-			ConnectionHelper.close(c);
-		}
-	}
+/*
+ * 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 flex.samples.crm.company;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import flex.samples.ConnectionHelper;
+import flex.samples.crm.ConcurrencyException;
+import flex.samples.crm.DAOException;
+
+public class CompanyDAO
+{
+	public List findCompanies(String name, String industry) throws DAOException
+	{
+		List list = new ArrayList();
+		Connection c = null;
+		try
+		{
+            String sql = "SELECT * FROM company";
+            if (industry != null && industry != "All")
+                sql += " WHERE industry = ?";
+            if (name != null)
+            {
+               if (industry == null)
+                   sql += " WHERE company.name LIKE ?";
+               else
+                   sql += " AND company.name LIKE ?";
+            }
+            sql += " ORDER BY company.name";
+            
+			c = ConnectionHelper.getConnection();
+
+            PreparedStatement ps = c.prepareStatement(sql);
+            ps.setString(1, industry);
+            ps.setString(1, "%" + name + "%");
+            ResultSet rs = ps.executeQuery();
+			Company company;
+			while (rs.next())
+			{
+				company = new Company();
+				company.setCompanyId(rs.getInt("company_id"));
+				company.setName(rs.getString("name"));
+				company.setAddress(rs.getString("address"));
+				company.setCity(rs.getString("city"));
+				company.setZip(rs.getString("zip"));
+				company.setState(rs.getString("state"));
+				company.setIndustry(rs.getString("industry"));
+				list.add(company);
+			}
+            rs.close();
+            ps.close();
+		}
+		catch (SQLException e)
+		{
+			e.printStackTrace();
+			throw new DAOException(e);
+		}
+		finally
+		{
+			ConnectionHelper.close(c);
+		}
+		return list;
+	}
+
+	public Company getCompany(int companyId) throws DAOException
+	{
+		Company company = null;
+		Connection c = null;
+		try
+		{
+			c = ConnectionHelper.getConnection();
+            PreparedStatement ps = c.prepareStatement("SELECT * FROM company WHERE company_id= ?");
+            ps.setInt(1, companyId);
+			ResultSet rs = ps.executeQuery();
+			if (rs.next())
+			{
+				company = new Company();
+				company.setCompanyId(rs.getInt("company_id"));
+				company.setName(rs.getString("name"));
+				company.setAddress(rs.getString("address"));
+				company.setCity(rs.getString("city"));
+				company.setZip(rs.getString("zip"));
+				company.setState(rs.getString("state"));
+				company.setIndustry(rs.getString("industry"));
+			}
+			rs.close();
+			ps.close();
+		}
+		catch (SQLException e)
+		{
+			e.printStackTrace();
+			throw new DAOException(e);
+		}
+		finally
+		{
+			ConnectionHelper.close(c);
+		}
+		return company;
+	}
+
+	public Company create(Company company) throws DAOException
+	{
+		Connection c = null;
+        PreparedStatement ps = null;
+		try
+		{
+			c = ConnectionHelper.getConnection();
+			ps = c.prepareStatement("INSERT INTO company (name, address, city, zip, state, industry) VALUES (?, ?, ?, ?, ?, ?)");
+			ps.setString(1, company.getName());
+			ps.setString(2, company.getAddress());
+			ps.setString(3, company.getCity());
+			ps.setString(4, company.getZip());
+			ps.setString(5, company.getState());
+			ps.setString(6, company.getIndustry());
+			ps.execute();
+            ps.close();
+            ps = null;
+			Statement s = c.createStatement();
+			// HSQLDB Syntax to get the identity (company_id) of inserted row
+			ResultSet rs = s.executeQuery("CALL IDENTITY()");
+			rs.next();
+
+            // Update the id in the returned object.  This is important as this
+            // value must get returned to the client.
+			company.setCompanyId(rs.getInt(1));
+
+		}
+		catch (SQLException e)
+		{
+			e.printStackTrace();
+			throw new DAOException(e);
+		}
+		finally
+		{
+			ConnectionHelper.close(c);
+		}
+		return company;
+	}
+
+	public void update(Company newVersion, Company previousVersion, List changes) throws DAOException, ConcurrencyException
+	{
+		Connection c = null;
+        PreparedStatement ps = null;
+		try
+		{
+			c = ConnectionHelper.getConnection();
+            ps = c.prepareStatement("UPDATE company SET name=?, address=?, city=?, zip=?, state=?, industry=? WHERE company_id=? AND name=? AND address=? AND city=? AND zip=? AND state=?" );
+            ps.setString(1, newVersion.getName());
+            ps.setString(2, newVersion.getAddress());
+            ps.setString(3, newVersion.getCity());
+            ps.setString(4, newVersion.getZip());
+            ps.setString(5, newVersion.getState());
+            ps.setString(6, newVersion.getIndustry());
+            ps.setInt(7, newVersion.getCompanyId());
+			ps.setString(8, previousVersion.getName());
+			ps.setString(9, previousVersion.getAddress());
+			ps.setString(10, previousVersion.getCity());
+			ps.setString(11, previousVersion.getZip());
+			ps.setString(12, previousVersion.getState());
+			if (ps.executeUpdate() == 0)
+			{
+				throw new ConcurrencyException("Item not found");
+			}
+            ps.close();
+            ps = null;
+		}
+		catch (SQLException e)
+		{
+			e.printStackTrace();
+			throw new DAOException(e);
+		}
+		finally
+		{
+			ConnectionHelper.close(c);
+		}
+	}
+
+	public void delete(Company company) throws DAOException, ConcurrencyException
+	{
+		Connection c = null;
+        PreparedStatement ps = null;
+		try
+		{
+			c = ConnectionHelper.getConnection();
+
+			ps = c.prepareStatement("DELETE FROM company WHERE company_id=? AND name=? AND address=? AND city=? AND zip=? AND state=?");
+			ps.setInt(1, company.getCompanyId());
+			ps.setString(2, company.getName());
+			ps.setString(3, company.getAddress());
+			ps.setString(4, company.getCity());
+			ps.setString(5, company.getZip());
+			ps.setString(6, company.getState());
+			if (ps.executeUpdate() == 0)
+			{
+				throw new ConcurrencyException("Item not found");
+			}
+		}
+		catch (SQLException e)
+		{
+			e.printStackTrace();
+			throw new DAOException(e);
+		}
+		finally
+		{
+			ConnectionHelper.close(c);
+		}
+	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
index 7c59871..df61b32 100755
--- a/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
@@ -1,106 +1,106 @@
-/*
- * 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 flex.samples.crm.employee;
-
-import flex.samples.crm.company.Company;
-
-public class Employee
-{
-	private int employeeId;
-
-	private String firstName;
-
-	private String lastName;
-
-	private String title;
-
-	private String email;
-
-	private String phone;
-
-    private Company company;
-	
-	public String getEmail()
-	{
-		return email;
-	}
-
-	public void setEmail(String email)
-	{
-		this.email = email;
-	}
-
-	public int getEmployeeId()
-	{
-		return employeeId;
-	}
-
-	public void setEmployeeId(int employeeId)
-	{
-		this.employeeId = employeeId;
-	}
-
-	public String getFirstName()
-	{
-		return firstName;
-	}
-
-	public void setFirstName(String firstName)
-	{
-		this.firstName = firstName;
-	}
-
-	public String getLastName()
-	{
-		return lastName;
-	}
-
-	public void setLastName(String lastName)
-	{
-		this.lastName = lastName;
-	}
-
-	public String getPhone()
-	{
-		return phone;
-	}
-
-	public void setPhone(String phone)
-	{
-		this.phone = phone;
-	}
-
-	public String getTitle()
-	{
-		return title;
-	}
-
-	public void setTitle(String title)
-	{
-		this.title = title;
-	}
-
-    public Company getCompany()
-    {
-        return company;
-    }
-
-    public void setCompany(Company company)
-    {
-        this.company = company;
-    }
-}
+/*
+ * 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 flex.samples.crm.employee;
+
+import flex.samples.crm.company.Company;
+
+public class Employee
+{
+	private int employeeId;
+
+	private String firstName;
+
+	private String lastName;
+
+	private String title;
+
+	private String email;
+
+	private String phone;
+
+    private Company company;
+	
+	public String getEmail()
+	{
+		return email;
+	}
+
+	public void setEmail(String email)
+	{
+		this.email = email;
+	}
+
+	public int getEmployeeId()
+	{
+		return employeeId;
+	}
+
+	public void setEmployeeId(int employeeId)
+	{
+		this.employeeId = employeeId;
+	}
+
+	public String getFirstName()
+	{
+		return firstName;
+	}
+
+	public void setFirstName(String firstName)
+	{
+		this.firstName = firstName;
+	}
+
+	public String getLastName()
+	{
+		return lastName;
+	}
+
+	public void setLastName(String lastName)
+	{
+		this.lastName = lastName;
+	}
+
+	public String getPhone()
+	{
+		return phone;
+	}
+
+	public void setPhone(String phone)
+	{
+		this.phone = phone;
+	}
+
+	public String getTitle()
+	{
+		return title;
+	}
+
+	public void setTitle(String title)
+	{
+		this.title = title;
+	}
+
+    public Company getCompany()
+    {
+        return company;
+    }
+
+    public void setCompany(Company company)
+    {
+        this.company = company;
+    }
+}


Mime
View raw message