r2corba 1.5.1-x64-mingw32 → 1.6.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +5 -5
- data/README.rdoc +62 -0
- data/THANKS +4 -4
- data/lib/corba/cbase/IORMap.rb +0 -1
- data/lib/corba/cbase/ORB.rb +26 -24
- data/lib/corba/cbase/Request.rb +4 -5
- data/lib/corba/cbase/Streams.rb +2 -3
- data/lib/corba/cbase/Stub.rb +0 -1
- data/lib/corba/cbase/Typecode.rb +6 -7
- data/lib/corba/cbase/Values.rb +4 -3
- data/lib/corba/cbase/exception.rb +6 -5
- data/lib/corba/cbase/poa.rb +1 -2
- data/lib/corba/cbase/policies.rb +3 -4
- data/lib/corba/cbase/post_require.rb +1 -2
- data/lib/corba/cbase/require.rb +10 -2
- data/lib/corba/cmds/base.rb +1 -2
- data/lib/corba/cmds/test.rb +0 -1
- data/lib/corba/common/Any.rb +3 -3
- data/lib/corba/common/IDL.rb +6 -10
- data/lib/corba/common/ORB.rb +22 -23
- data/lib/corba/common/Object.rb +18 -15
- data/lib/corba/common/Request.rb +1 -2
- data/lib/corba/common/Servant.rb +4 -5
- data/lib/corba/common/Struct.rb +1 -2
- data/lib/corba/common/Stub.rb +6 -7
- data/lib/corba/common/Typecode.rb +91 -65
- data/lib/corba/common/Union.rb +6 -2
- data/lib/corba/common/Values.rb +2 -2
- data/lib/corba/common/const.rb +2 -3
- data/lib/corba/common/exception.rb +2 -2
- data/lib/corba/common/require.rb +8 -1
- data/lib/corba/common/version.rb +3 -4
- data/lib/corba/idl/BiDirPolicyC.rb +2 -3
- data/lib/corba/idl/CosNamingC.rb +4 -5
- data/lib/corba/idl/CosNamingS.rb +2 -3
- data/lib/corba/idl/IDL.rb +1 -2
- data/lib/corba/idl/IORTable.pidl +0 -1
- data/lib/corba/idl/IORTableC.rb +2 -3
- data/lib/corba/idl/MessagingC.rb +2 -3
- data/lib/corba/idl/POAC.rb +10 -11
- data/lib/corba/idl/TAO_Ext.pidl +0 -1
- data/lib/corba/idl/TAO_ExtC.rb +2 -3
- data/lib/corba/idl/r2c_orb.rb +5 -6
- data/lib/corba/idl/require.rb +0 -1
- data/lib/corba/jbase/Any.rb +29 -28
- data/lib/corba/jbase/IORMap.rb +1 -2
- data/lib/corba/jbase/ORB.rb +5 -6
- data/lib/corba/jbase/Object.rb +13 -14
- data/lib/corba/jbase/Request.rb +9 -10
- data/lib/corba/jbase/Servant.rb +11 -12
- data/lib/corba/jbase/ServerRequest.rb +8 -9
- data/lib/corba/jbase/Streams.rb +68 -5
- data/lib/corba/jbase/Stub.rb +0 -1
- data/lib/corba/jbase/Typecode.rb +17 -17
- data/lib/corba/jbase/Values.rb +2 -1
- data/lib/corba/jbase/exception.rb +2 -2
- data/lib/corba/jbase/poa.rb +21 -22
- data/lib/corba/jbase/policies.rb +33 -34
- data/lib/corba/jbase/post_require.rb +0 -1
- data/lib/corba/jbase/require.rb +5 -2
- data/lib/corba/naming.rb +0 -1
- data/lib/corba/naming_service.rb +0 -1
- data/lib/corba/poa.rb +1 -2
- data/lib/corba/policies.rb +1 -2
- data/lib/corba/require.rb +2 -3
- data/lib/corba/svcs/ins/cos_naming.rb +74 -68
- data/lib/corba/svcs/ins/ins.rb +58 -59
- data/lib/corba/svcs/ins/naming_service.rb +9 -10
- data/lib/corba.rb +1 -2
- data/lib/ridlbe/ruby/config.rb +78 -74
- data/lib/ridlbe/ruby/require.rb +0 -1
- data/lib/ridlbe/ruby/walker.rb +311 -288
- data/mkrf_conf_bingem.rb +4 -6
- data/rakelib/bin.rake +2 -3
- data/rakelib/bin.rb +4 -5
- data/rakelib/build.rake +22 -22
- data/rakelib/config.rake +2 -3
- data/rakelib/config.rb +32 -34
- data/rakelib/ext.rake +18 -77
- data/rakelib/ext.rb +19 -58
- data/rakelib/ext_r2tao.rb +33 -60
- data/rakelib/gem.rake +53 -38
- data/rakelib/gem.rb +9 -10
- data/rakelib/package.rake +2 -3
- data/rakelib/test.rake +0 -1
- data/test/BiDirectional/Test.idl +0 -1
- data/test/BiDirectional/client.rb +18 -19
- data/test/BiDirectional/run_test.rb +11 -12
- data/test/BiDirectional/server.rb +21 -23
- data/test/CORBA_Services/Naming/BindingIterator/Test.idl +0 -1
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +17 -18
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +19 -20
- data/test/CORBA_Services/Naming/Corbaname/Test.idl +0 -1
- data/test/CORBA_Services/Naming/Corbaname/client.rb +15 -16
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/Corbaname/server.rb +27 -28
- data/test/CORBA_Services/Naming/Simple/Test.idl +0 -1
- data/test/CORBA_Services/Naming/Simple/client.rb +16 -17
- data/test/CORBA_Services/Naming/Simple/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/Simple/server.rb +19 -20
- data/test/Collocation/Diamond.idl +0 -1
- data/test/Collocation/run_test.rb +10 -11
- data/test/Collocation/test.rb +27 -21
- data/test/Connect_Timeout/Test.idl +0 -1
- data/test/Connect_Timeout/client.rb +16 -18
- data/test/Connect_Timeout/run_test.rb +10 -11
- data/test/DII/Test.idl +0 -1
- data/test/DII/client.rb +30 -31
- data/test/DII/run_test.rb +11 -12
- data/test/DII/server.rb +16 -17
- data/test/DSI/Test.idl +0 -1
- data/test/DSI/client.rb +16 -17
- data/test/DSI/run_test.rb +11 -12
- data/test/DSI/server.rb +17 -18
- data/test/Exceptions/Test.idl +0 -1
- data/test/Exceptions/client.rb +22 -23
- data/test/Exceptions/run_test.rb +11 -12
- data/test/Exceptions/server.rb +16 -17
- data/test/Hello/Test.idl +0 -1
- data/test/Hello/client.rb +16 -17
- data/test/Hello/run_test.rb +11 -12
- data/test/Hello/server.rb +17 -18
- data/test/IDL_Test/Test.idl +4 -1
- data/test/IDL_Test/client.rb +24 -23
- data/test/IDL_Test/run_test.rb +11 -12
- data/test/IDL_Test/server.rb +23 -19
- data/test/IORMap/Test.idl +0 -1
- data/test/IORMap/client.rb +14 -15
- data/test/IORMap/run_test.rb +11 -12
- data/test/IORMap/server.rb +23 -24
- data/test/IORTable/Test.idl +0 -1
- data/test/IORTable/client.rb +14 -15
- data/test/IORTable/run_test.rb +11 -12
- data/test/IORTable/server.rb +23 -24
- data/test/Implicit_Conversion/Test.idl +0 -1
- data/test/Implicit_Conversion/client.rb +20 -18
- data/test/Implicit_Conversion/run_test.rb +11 -12
- data/test/Implicit_Conversion/server.rb +16 -17
- data/test/Multi_Threading/Multiple_ORB/Test.idl +0 -1
- data/test/Multi_Threading/Multiple_ORB/client.rb +14 -15
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +12 -13
- data/test/Multi_Threading/Multiple_ORB/server.rb +17 -18
- data/test/Multi_Threading/Simple/Test.idl +0 -1
- data/test/Multi_Threading/Simple/client.rb +17 -18
- data/test/Multi_Threading/Simple/run_test.rb +11 -12
- data/test/Multi_Threading/Simple/server.rb +17 -18
- data/test/Multi_Threading/Threads/Test.idl +0 -4
- data/test/Multi_Threading/Threads/client.rb +23 -26
- data/test/Multi_Threading/Threads/run_test.rb +11 -12
- data/test/Multi_Threading/Threads/server.rb +19 -22
- data/test/Multi_Threading/Threads/watchdog.rb +16 -16
- data/test/Multiple_Servant_Interfaces/Test.idl +0 -1
- data/test/Multiple_Servant_Interfaces/client.rb +14 -15
- data/test/Multiple_Servant_Interfaces/run_test.rb +11 -12
- data/test/Multiple_Servant_Interfaces/server.rb +18 -19
- data/test/Nil/Test.idl +0 -1
- data/test/Nil/run_test.rb +10 -11
- data/test/Nil/test.rb +22 -20
- data/test/OBV/AbstractInterface/client.rb +14 -15
- data/test/OBV/AbstractInterface/run_test.rb +11 -12
- data/test/OBV/AbstractInterface/server.rb +20 -20
- data/test/OBV/AbstractInterface/test.idl +0 -1
- data/test/OBV/Custom/OBV_impl.rb +2 -1
- data/test/OBV/Custom/client.rb +14 -15
- data/test/OBV/Custom/run_test.rb +11 -12
- data/test/OBV/Custom/server.rb +16 -17
- data/test/OBV/Simple/OBV_impl.rb +1 -1
- data/test/OBV/Simple/client.rb +14 -15
- data/test/OBV/Simple/run_test.rb +11 -12
- data/test/OBV/Simple/server.rb +16 -17
- data/test/OBV/Simple_Event/Event_impl.rb +1 -1
- data/test/OBV/Simple_Event/client.rb +14 -15
- data/test/OBV/Simple_Event/run_test.rb +11 -12
- data/test/OBV/Simple_Event/server.rb +16 -17
- data/test/OBV/Supports/client.rb +19 -20
- data/test/OBV/Supports/run_test.rb +11 -12
- data/test/OBV/Supports/server.rb +15 -16
- data/test/OBV/Supports/supports.idl +0 -1
- data/test/OBV/Supports/supports_impl.rb +3 -1
- data/test/OBV/Tree/client.rb +14 -15
- data/test/OBV/Tree/run_test.rb +11 -12
- data/test/OBV/Tree/server.rb +19 -20
- data/test/OBV/Tree/test.idl +0 -1
- data/test/OBV/Truncatable/Extra.idl +0 -1
- data/test/OBV/Truncatable/Truncatable_impl.rb +1 -2
- data/test/OBV/Truncatable/client.rb +57 -58
- data/test/OBV/Truncatable/run_test.rb +11 -12
- data/test/OBV/Truncatable/server.rb +15 -16
- data/test/OBV/ValueBox/client.rb +154 -154
- data/test/OBV/ValueBox/run_test.rb +11 -12
- data/test/OBV/ValueBox/server.rb +42 -42
- data/test/Object/Test.idl +0 -1
- data/test/Object/client.rb +15 -16
- data/test/Object/run_test.rb +11 -12
- data/test/Object/server.rb +19 -20
- data/test/POA/run_test.rb +10 -11
- data/test/POA/test.rb +17 -18
- data/test/Param_Test/client.rb +53 -54
- data/test/Param_Test/run_test.rb +11 -12
- data/test/Param_Test/server.rb +60 -61
- data/test/Performance/Simple/Test.idl +0 -1
- data/test/Performance/Simple/client.rb +16 -17
- data/test/Performance/Simple/run_test.rb +11 -12
- data/test/Performance/Simple/server.rb +16 -17
- data/test/Policies/Test.idl +0 -1
- data/test/Policies/run_test.rb +10 -11
- data/test/Policies/test.rb +23 -25
- data/test/Timeout/client.rb +21 -22
- data/test/Timeout/run_test.rb +11 -12
- data/test/Timeout/server.rb +19 -20
- data/test/Timeout/test.idl +0 -1
- data/test/lib/assert.rb +0 -2
- data/test/lib/test.rb +29 -25
- data/test/test_runner.rb +22 -24
- metadata +24 -52
- data/README +0 -62
- data/test/BiDirectional/server.ior +0 -1
- data/test/CORBA_Services/Naming/BindingIterator/ins.ior +0 -1
- data/test/CORBA_Services/Naming/Corbaname/corbaname.ior +0 -1
- data/test/CORBA_Services/Naming/Corbaname/ins.ior +0 -1
- data/test/CORBA_Services/Naming/Simple/ins.ior +0 -1
- data/test/DII/server.ior +0 -1
- data/test/DSI/server.ior +0 -1
- data/test/Exceptions/server.ior +0 -1
- data/test/IDL_Test/server.ior +0 -1
- data/test/IORMap/server.ior +0 -1
- data/test/IORTable/server.ior +0 -1
- data/test/Implicit_Conversion/server.ior +0 -1
- data/test/Multi_Threading/Multiple_ORB/server0.ior +0 -1
- data/test/Multi_Threading/Multiple_ORB/server1.ior +0 -1
- data/test/Multi_Threading/Simple/server.ior +0 -1
- data/test/Multi_Threading/Threads/server.ior +0 -1
- data/test/Multi_Threading/Threads/watchdog.ior +0 -1
- data/test/Multiple_Servant_Interfaces/server.ior +0 -1
- data/test/OBV/AbstractInterface/server.ior +0 -1
- data/test/OBV/Custom/server.ior +0 -1
- data/test/OBV/Simple/server.ior +0 -1
- data/test/OBV/Simple_Event/server.ior +0 -1
- data/test/OBV/Supports/server.ior +0 -1
- data/test/OBV/Tree/server.ior +0 -1
- data/test/OBV/Truncatable/server.ior +0 -1
- data/test/OBV/ValueBox/server.ior +0 -1
- data/test/Object/server.ior +0 -1
- data/test/Param_Test/server.ior +0 -1
- data/test/Performance/Simple/server.ior +0 -1
- data/test/Timeout/server.ior +0 -1
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -25,25 +24,25 @@ ARGV.options do |opts|
|
|
25
24
|
script_name = File.basename($0)
|
26
25
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
27
26
|
|
28
|
-
opts.separator
|
27
|
+
opts.separator ''
|
29
28
|
|
30
|
-
opts.on(
|
31
|
-
|
32
|
-
"Default: 'corbaname.ior'") { |v| OPTIONS[:iorfile]=v }
|
33
|
-
opts.on(
|
34
|
-
|
35
|
-
|
36
|
-
opts.on(
|
37
|
-
|
38
|
-
|
39
|
-
opts.on(
|
40
|
-
|
41
|
-
|
29
|
+
opts.on('--o FILENAME',
|
30
|
+
'Set corbaname IOR filename.',
|
31
|
+
"Default: 'corbaname.ior'") { |v| OPTIONS[:iorfile] = v }
|
32
|
+
opts.on('--d LVL',
|
33
|
+
'Set ORBDebugLevel value.',
|
34
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
35
|
+
opts.on('--p PORT', Integer,
|
36
|
+
'INS port number.',
|
37
|
+
'Default: 2345') { |v| OPTIONS[:ins_port] = v }
|
38
|
+
opts.on('--use-implement',
|
39
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
40
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
42
41
|
|
43
|
-
opts.separator
|
42
|
+
opts.separator ''
|
44
43
|
|
45
|
-
opts.on(
|
46
|
-
|
44
|
+
opts.on('-h', '--help',
|
45
|
+
'Show this help message.') { puts opts; exit }
|
47
46
|
|
48
47
|
opts.parse!
|
49
48
|
end
|
@@ -62,16 +61,16 @@ class MyHello < POA::Test::Hello
|
|
62
61
|
end
|
63
62
|
|
64
63
|
def get_string()
|
65
|
-
|
64
|
+
'Hello there!'
|
66
65
|
end
|
67
66
|
|
68
67
|
def shutdown()
|
69
68
|
@orb.shutdown()
|
70
69
|
end
|
71
|
-
end #of servant MyHello
|
70
|
+
end # of servant MyHello
|
72
71
|
|
73
72
|
# initialize ORB
|
74
|
-
orb = CORBA.ORB_init([
|
73
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
75
74
|
|
76
75
|
# create NameService corbaloc
|
77
76
|
ins_url = "iiop:localhost:#{OPTIONS[:ins_port]}/NamingService"
|
@@ -79,19 +78,19 @@ ins_url = "iiop:localhost:#{OPTIONS[:ins_port]}/NamingService"
|
|
79
78
|
puts "server: resolving [corbaloc:#{ins_url}]"
|
80
79
|
|
81
80
|
# resolve NamingContext
|
82
|
-
obj = orb.string_to_object('corbaloc:'+ins_url)
|
81
|
+
obj = orb.string_to_object('corbaloc:' + ins_url)
|
83
82
|
|
84
83
|
nc = CosNaming::NamingContextExt._narrow(obj)
|
85
84
|
|
86
85
|
# create context tree for registration
|
87
|
-
full_name = [CosNaming::NameComponent.new('','root'),
|
88
|
-
CosNaming::NameComponent.new('base','dir'),
|
89
|
-
CosNaming::NameComponent.new('Hello','ior')]
|
86
|
+
full_name = [CosNaming::NameComponent.new('', 'root'),
|
87
|
+
CosNaming::NameComponent.new('base', 'dir'),
|
88
|
+
CosNaming::NameComponent.new('Hello', 'ior')]
|
90
89
|
|
91
|
-
nc_new = nc.bind_new_context(full_name[0,1])
|
92
|
-
nc_new = nc_new.bind_new_context(full_name[1,1])
|
90
|
+
nc_new = nc.bind_new_context(full_name[0, 1])
|
91
|
+
nc_new = nc_new.bind_new_context(full_name[1, 1])
|
93
92
|
|
94
|
-
assert_not
|
93
|
+
assert_not 'ERROR: INS IOR resolved to nil object!', CORBA::is_nil(nc)
|
95
94
|
|
96
95
|
# initialize POA
|
97
96
|
obj = orb.resolve_initial_references('RootPOA')
|
@@ -123,7 +122,7 @@ open(OPTIONS[:iorfile], 'w') { |io|
|
|
123
122
|
|
124
123
|
# initialize signal handling
|
125
124
|
Signal.trap('INT') do
|
126
|
-
puts
|
125
|
+
puts 'SIGINT - shutting down ORB...'
|
127
126
|
orb.shutdown()
|
128
127
|
end
|
129
128
|
|
@@ -6,7 +6,6 @@
|
|
6
6
|
* included with this program.
|
7
7
|
*
|
8
8
|
* Copyright (c) Remedy IT Expertise BV
|
9
|
-
* Chamber of commerce Rotterdam nr.276339, The Netherlands
|
10
9
|
*--------------------------------------------------------------------*/
|
11
10
|
|
12
11
|
/// Put the interfaces in a module, to avoid global namespace pollution
|
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -24,22 +23,22 @@ ARGV.options do |opts|
|
|
24
23
|
script_name = File.basename($0)
|
25
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
26
25
|
|
27
|
-
opts.separator
|
26
|
+
opts.separator ''
|
28
27
|
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
"Default: 'file://ins.ior'") { |v| OPTIONS[:iorfile]=v }
|
32
|
-
opts.on(
|
33
|
-
|
34
|
-
|
35
|
-
opts.on(
|
36
|
-
|
37
|
-
|
28
|
+
opts.on('--k IORFILE',
|
29
|
+
'Set IOR.',
|
30
|
+
"Default: 'file://ins.ior'") { |v| OPTIONS[:iorfile] = v }
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
38
37
|
|
39
|
-
opts.separator
|
38
|
+
opts.separator ''
|
40
39
|
|
41
|
-
opts.on(
|
42
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
43
42
|
|
44
43
|
opts.parse!
|
45
44
|
end
|
@@ -52,7 +51,7 @@ else
|
|
52
51
|
end
|
53
52
|
require 'corba/naming'
|
54
53
|
|
55
|
-
orb = CORBA.ORB_init([
|
54
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
56
55
|
|
57
56
|
begin
|
58
57
|
|
@@ -61,10 +60,10 @@ begin
|
|
61
60
|
|
62
61
|
nc = CosNaming::NamingContextExt._narrow(obj)
|
63
62
|
|
64
|
-
assert_not
|
63
|
+
assert_not 'ERROR: INS IOR resolved to nil object!', CORBA::is_nil(nc)
|
65
64
|
|
66
65
|
# retrieve object reference for servant from Naming service
|
67
|
-
name = [CosNaming::NameComponent.new('Hello','ior')]
|
66
|
+
name = [CosNaming::NameComponent.new('Hello', 'ior')]
|
68
67
|
|
69
68
|
obj = nc.resolve(name)
|
70
69
|
|
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
OPTIONS = {
|
@@ -21,19 +20,19 @@ ARGV.options do |opts|
|
|
21
20
|
script_name = File.basename($0)
|
22
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
22
|
|
24
|
-
opts.separator
|
23
|
+
opts.separator ''
|
25
24
|
|
26
|
-
opts.on(
|
27
|
-
|
28
|
-
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
32
31
|
|
33
|
-
opts.separator
|
32
|
+
opts.separator ''
|
34
33
|
|
35
|
-
opts.on(
|
36
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
37
36
|
|
38
37
|
opts.parse!
|
39
38
|
end
|
@@ -43,7 +42,7 @@ include TestUtil
|
|
43
42
|
|
44
43
|
def do_exit(rc)
|
45
44
|
ins_stop = Test.new
|
46
|
-
ins_stop.run("-e \'require \"corba/svcs/ins/ins.rb\"\' -e \'R2CORBA::INS.run\'",
|
45
|
+
ins_stop.run("-e \'require \"corba/svcs/ins/ins.rb\"\' -e \'R2CORBA::INS.run\'", '-- stop --no-daemon')
|
47
46
|
ins_stop.wait(50)
|
48
47
|
exit(rc)
|
49
48
|
end
|
@@ -54,7 +53,7 @@ TestUtil.remove_file(ior_file)
|
|
54
53
|
|
55
54
|
ins = Test.new
|
56
55
|
|
57
|
-
exit(255) if !ins.run("-e \'require \"corba/svcs/ins/ins.rb\"\' -e \'R2CORBA::INS.run\'",
|
56
|
+
exit(255) if !ins.run("-e \'require \"corba/svcs/ins/ins.rb\"\' -e \'R2CORBA::INS.run\'", '-- start')
|
58
57
|
|
59
58
|
do_exit(255) if !TestUtil.wait_for_file(ior_file, 400)
|
60
59
|
|
@@ -73,7 +72,7 @@ end
|
|
73
72
|
|
74
73
|
exrc = clt.wait(400)
|
75
74
|
|
76
|
-
if exrc ==0
|
75
|
+
if exrc == 0
|
77
76
|
srv.wait(400)
|
78
77
|
else
|
79
78
|
srv.wait_term(400)
|
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -24,22 +23,22 @@ ARGV.options do |opts|
|
|
24
23
|
script_name = File.basename($0)
|
25
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
26
25
|
|
27
|
-
opts.separator
|
26
|
+
opts.separator ''
|
28
27
|
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
"Default: 'file://ins.ior'") { |v| OPTIONS[:iorfile]=v }
|
32
|
-
opts.on(
|
33
|
-
|
34
|
-
|
35
|
-
opts.on(
|
36
|
-
|
37
|
-
|
28
|
+
opts.on('--k IORFILE',
|
29
|
+
'Set INS IOR filename.',
|
30
|
+
"Default: 'file://ins.ior'") { |v| OPTIONS[:iorfile] = v }
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
38
37
|
|
39
|
-
opts.separator
|
38
|
+
opts.separator ''
|
40
39
|
|
41
|
-
opts.on(
|
42
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
43
42
|
|
44
43
|
opts.parse!
|
45
44
|
end
|
@@ -58,23 +57,23 @@ class MyHello < POA::Test::Hello
|
|
58
57
|
end
|
59
58
|
|
60
59
|
def get_string()
|
61
|
-
|
60
|
+
'Hello there!'
|
62
61
|
end
|
63
62
|
|
64
63
|
def shutdown()
|
65
64
|
@orb.shutdown()
|
66
65
|
end
|
67
|
-
end #of servant MyHello
|
66
|
+
end # of servant MyHello
|
68
67
|
|
69
68
|
# initialize ORB
|
70
|
-
orb = CORBA.ORB_init([
|
69
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
71
70
|
|
72
71
|
# resolve NamingContext
|
73
72
|
obj = orb.string_to_object(OPTIONS[:iorfile])
|
74
73
|
|
75
74
|
nc = CosNaming::NamingContextExt._narrow(obj)
|
76
75
|
|
77
|
-
assert_not
|
76
|
+
assert_not 'ERROR: INS IOR resolved to nil object!', CORBA::is_nil(nc)
|
78
77
|
|
79
78
|
# initialize POA
|
80
79
|
obj = orb.resolve_initial_references('RootPOA')
|
@@ -91,13 +90,13 @@ hello_srv = MyHello.new(orb)
|
|
91
90
|
hello_obj = hello_srv._this()
|
92
91
|
|
93
92
|
# register object reference with Naming service
|
94
|
-
name = [CosNaming::NameComponent.new('Hello','ior')]
|
93
|
+
name = [CosNaming::NameComponent.new('Hello', 'ior')]
|
95
94
|
|
96
95
|
nc.bind(name, hello_obj)
|
97
96
|
|
98
97
|
# initialize signal handling
|
99
98
|
Signal.trap('INT') do
|
100
|
-
puts
|
99
|
+
puts 'SIGINT - shutting down ORB...'
|
101
100
|
orb.shutdown()
|
102
101
|
end
|
103
102
|
|
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
OPTIONS = {
|
@@ -21,19 +20,19 @@ ARGV.options do |opts|
|
|
21
20
|
script_name = File.basename($0)
|
22
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
22
|
|
24
|
-
opts.separator
|
23
|
+
opts.separator ''
|
25
24
|
|
26
|
-
opts.on(
|
27
|
-
|
28
|
-
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
32
31
|
|
33
|
-
opts.separator
|
32
|
+
opts.separator ''
|
34
33
|
|
35
|
-
opts.on(
|
36
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
37
36
|
|
38
37
|
opts.parse!
|
39
38
|
end
|
data/test/Collocation/test.rb
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -37,19 +36,19 @@ ARGV.options do |opts|
|
|
37
36
|
script_name = File.basename($0)
|
38
37
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
39
38
|
|
40
|
-
opts.separator
|
39
|
+
opts.separator ''
|
41
40
|
|
42
|
-
opts.on(
|
43
|
-
|
44
|
-
|
45
|
-
opts.on(
|
46
|
-
|
47
|
-
|
41
|
+
opts.on('--d LVL',
|
42
|
+
'Set ORBDebugLevel value.',
|
43
|
+
'Default: 0') { |dlvl| ORB_ARG << '-ORBDebugLevel' << dlvl }
|
44
|
+
opts.on('--use-implement',
|
45
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
46
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
48
47
|
|
49
|
-
opts.separator
|
48
|
+
opts.separator ''
|
50
49
|
|
51
|
-
opts.on(
|
52
|
-
|
50
|
+
opts.on('-h', '--help',
|
51
|
+
'Show this help message.') { puts opts; exit }
|
53
52
|
|
54
53
|
opts.parse!
|
55
54
|
end
|
@@ -64,26 +63,29 @@ end
|
|
64
63
|
|
65
64
|
class Top < POA::Diamond::Top
|
66
65
|
def shape
|
67
|
-
|
66
|
+
'a point.'
|
68
67
|
end
|
69
68
|
end
|
70
69
|
|
71
70
|
class Left < POA::Diamond::Left
|
72
71
|
def shape
|
73
|
-
|
72
|
+
'the left line'
|
74
73
|
end
|
74
|
+
|
75
75
|
def color
|
76
|
-
|
76
|
+
'black'
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
80
|
class Right < POA::Diamond::Right
|
81
81
|
def shape
|
82
|
-
|
82
|
+
'the right line'
|
83
83
|
end
|
84
|
+
|
84
85
|
def color
|
85
|
-
|
86
|
+
'red'
|
86
87
|
end
|
88
|
+
|
87
89
|
def width
|
88
90
|
0
|
89
91
|
end
|
@@ -91,17 +93,21 @@ end
|
|
91
93
|
|
92
94
|
class Buttom < POA::Diamond::Buttom
|
93
95
|
def shape
|
94
|
-
|
96
|
+
'a diamond'
|
95
97
|
end
|
98
|
+
|
96
99
|
def color
|
97
|
-
|
100
|
+
'translucent'
|
98
101
|
end
|
102
|
+
|
99
103
|
def name
|
100
|
-
|
104
|
+
'Jubilee'
|
101
105
|
end
|
106
|
+
|
102
107
|
def width
|
103
108
|
100
|
104
109
|
end
|
110
|
+
|
105
111
|
def area(unit)
|
106
112
|
case unit
|
107
113
|
when Diamond::Buttom::MM
|
@@ -121,12 +127,12 @@ class Collocation_Test
|
|
121
127
|
end
|
122
128
|
|
123
129
|
def shutdown
|
124
|
-
@root_poa.destroy(1,1)
|
130
|
+
@root_poa.destroy(1, 1)
|
125
131
|
@orb.destroy
|
126
132
|
end
|
127
133
|
|
128
134
|
def init(args = [])
|
129
|
-
@orb = CORBA.ORB_init([
|
135
|
+
@orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
130
136
|
|
131
137
|
obj = @orb.resolve_initial_references('RootPOA')
|
132
138
|
|
@@ -6,7 +6,6 @@
|
|
6
6
|
* included with this program.
|
7
7
|
*
|
8
8
|
* Copyright (c) Remedy IT Expertise BV
|
9
|
-
* Chamber of commerce Rotterdam nr.276339, The Netherlands
|
10
9
|
*--------------------------------------------------------------------*/
|
11
10
|
|
12
11
|
/// Put the interfaces in a module, to avoid global namespace pollution
|
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
require 'optparse'
|
@@ -24,22 +23,22 @@ ARGV.options do |opts|
|
|
24
23
|
script_name = File.basename($0)
|
25
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
26
25
|
|
27
|
-
opts.separator
|
26
|
+
opts.separator ''
|
28
27
|
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
"Default: 'corbaloc:iiop:192.3.47/10007/RandomObject'") { |v| OPTIONS[:ior]=v }
|
32
|
-
opts.on(
|
33
|
-
|
34
|
-
|
35
|
-
opts.on(
|
36
|
-
|
37
|
-
|
28
|
+
opts.on('--k IOR',
|
29
|
+
'Set IOR.',
|
30
|
+
"Default: 'corbaloc:iiop:192.3.47/10007/RandomObject'") { |v| OPTIONS[:ior] = v }
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
38
37
|
|
39
|
-
opts.separator
|
38
|
+
opts.separator ''
|
40
39
|
|
41
|
-
opts.on(
|
42
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
43
42
|
|
44
43
|
opts.parse!
|
45
44
|
end
|
@@ -64,7 +63,7 @@ def test_timeout(object)
|
|
64
63
|
# First connection happens here..
|
65
64
|
hello = Test::Hello._narrow(object)
|
66
65
|
|
67
|
-
assert_not
|
66
|
+
assert_not 'Nil Test::Hello reference', CORBA::is_nil(hello)
|
68
67
|
|
69
68
|
the_string = hello.get_string()
|
70
69
|
|
@@ -86,12 +85,12 @@ def test_timeout(object)
|
|
86
85
|
end
|
87
86
|
|
88
87
|
|
89
|
-
orb = CORBA.ORB_init([
|
88
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
90
89
|
|
91
90
|
begin
|
92
91
|
tmp = orb.string_to_object(OPTIONS[:ior])
|
93
92
|
|
94
|
-
object = orb.resolve_initial_references(
|
93
|
+
object = orb.resolve_initial_references('PolicyCurrent')
|
95
94
|
|
96
95
|
policy_current = CORBA::PolicyCurrent::_narrow(object)
|
97
96
|
|
@@ -108,4 +107,3 @@ begin
|
|
108
107
|
ensure
|
109
108
|
orb.destroy()
|
110
109
|
end
|
111
|
-
|
@@ -7,7 +7,6 @@
|
|
7
7
|
# included with this program.
|
8
8
|
#
|
9
9
|
# Copyright (c) Remedy IT Expertise BV
|
10
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
11
10
|
#--------------------------------------------------------------------
|
12
11
|
|
13
12
|
OPTIONS = {
|
@@ -21,19 +20,19 @@ ARGV.options do |opts|
|
|
21
20
|
script_name = File.basename($0)
|
22
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
22
|
|
24
|
-
opts.separator
|
23
|
+
opts.separator ''
|
25
24
|
|
26
|
-
opts.on(
|
27
|
-
|
28
|
-
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
32
31
|
|
33
|
-
opts.separator
|
32
|
+
opts.separator ''
|
34
33
|
|
35
|
-
opts.on(
|
36
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
37
36
|
|
38
37
|
opts.parse!
|
39
38
|
end
|
data/test/DII/Test.idl
CHANGED
@@ -6,7 +6,6 @@
|
|
6
6
|
* included with this program.
|
7
7
|
*
|
8
8
|
* Copyright (c) Remedy IT Expertise BV
|
9
|
-
* Chamber of commerce Rotterdam nr.276339, The Netherlands
|
10
9
|
*--------------------------------------------------------------------*/
|
11
10
|
|
12
11
|
/// Put the interfaces in a module, to avoid global namespace pollution
|