Adapt to EWF concurrent version.

This commit is contained in:
2015-04-02 18:38:12 +02:00
parent 8382edf9d7
commit 7c1d1325eb
5 changed files with 73 additions and 98 deletions

View File

@@ -9,6 +9,7 @@
<option warning="true" full_class_checking="false" is_attached_by_default="true" void_safety="transitional" syntax="transitional">
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option>
<setting name="console_application" value="true"/>
<setting name="concurrency" value="scoop"/>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="cms" location="..\..\cms-safe.ecf" readonly="false"/>
@@ -23,16 +24,16 @@
<root class="EWF_ROC_SERVER" feature="make_and_launch"/>
<setting name="concurrency" value="scoop"/>
<library name="cgi" location="$EWF_LIBRARY\library\server\wsf\connector\cgi-safe.ecf"/>
<library name="httpd" location="$EWF_LIBRARY\library\server\wsf\connector\httpd-safe.ecf"/>
<library name="libfcgi" location="$EWF_LIBRARY\library\server\wsf\connector\libfcgi-safe.ecf"/>
<library name="nino" location="$EWF_LIBRARY\library\server\wsf\connector\nino-safe.ecf"/>
<library name="standalone" location="$EWF_LIBRARY\library\server\wsf\connector\standalone-safe.ecf"/>
<cluster name="launcher" location=".\launcher\any\" recursive="true"/>
<cluster name="src" location=".\src\" recursive="true"/>
</target>
<target name="demo_httpd" extends="common">
<target name="demo_standalone" extends="common">
<root class="EWF_ROC_SERVER" feature="make_and_launch"/>
<setting name="concurrency" value="scoop"/>
<library name="default_httpd" location="$EWF_LIBRARY\library\server\wsf\default\httpd-safe.ecf"/>
<library name="default_standalone" location="$EWF_LIBRARY\library\server\wsf\default\standalone-safe.ecf"/>
<cluster name="launcher" location=".\launcher\default\" recursive="true"/>
<cluster name="src" location=".\src\" recursive="true"/>
</target>

View File

@@ -23,9 +23,9 @@ feature -- Execution
do
nature := launcher_nature
if nature = Void then
launch_httpd (opts)
elseif nature = nature_httpd then
launch_httpd (opts)
launch_standalone (opts)
elseif nature = nature_standalone then
launch_standalone (opts)
elseif nature = nature_nino then
launch_nino (opts)
elseif nature = nature_cgi then
@@ -54,8 +54,8 @@ feature {NONE} -- Access
ext := l_entry.extension
end
if ext /= Void then
if ext.same_string (nature_httpd) then
Result := nature_httpd
if ext.same_string (nature_standalone) then
Result := nature_standalone
end
if ext.same_string (nature_nino) then
Result := nature_nino
@@ -70,13 +70,13 @@ feature {NONE} -- Access
Result := default_nature
end
feature {NONE} -- httpd
feature {NONE} -- standalone
nature_httpd: STRING = "httpd"
nature_standalone: STRING = "standalone"
launch_httpd (opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
launch_standalone (opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
local
launcher: WSF_HTTPD_SERVICE_LAUNCHER [G]
launcher: WSF_STANDALONE_SERVICE_LAUNCHER [G]
do
create launcher.make_and_launch (opts)
end
@@ -118,7 +118,7 @@ feature -- Default
default_nature: STRING
do
Result := nature_httpd
Result := nature_standalone
end

View File

@@ -8,7 +8,7 @@ class
EWF_ROC_SERVER_EXECUTION
inherit
WSF_EXECUTION
CMS_EXECUTION
redefine
initialize
end
@@ -25,52 +25,6 @@ feature {NONE} -- Initialization
initialize
do
Precursor
initialize_cms (cms_setup)
end
feature -- Access
cms_service: CMS_SERVICE
-- cms service.
layout: CMS_LAYOUT
-- cms layout.
feature -- Execution
execute
local
do
cms_service.execute (request, response)
end
feature -- CMS Initialization
cms_setup: CMS_DEFAULT_SETUP
local
utf: UTF_CONVERTER
do
if attached execution_environment.arguments.separate_character_option_value ('d') as l_dir then
create layout.make_with_directory_name (l_dir)
else
create layout.make_default
end
initialize_logger (layout)
write_debug_log (generator + ".cms_setup based directory %"" + utf.escaped_utf_32_string_to_utf_8_string_8 (layout.path.name) + "%"")
create Result.make (layout)
setup_storage (Result)
end
initialize_cms (a_setup: CMS_SETUP)
local
cms: CMS_SERVICE
api: CMS_API
do
write_debug_log (generator + ".initialize_cms")
setup_modules (a_setup)
create api.make (a_setup)
create cms.make (api)
cms_service := cms
end
feature -- CMS setup