Discussion:
TAO +ACE_5.7.9 muti profile IOR's
(too old to reply)
Graham Walsh
2010-07-16 14:41:07 UTC
Permalink
Hi,

I'm trying to put in place a multi profile IOR, such that when server1
is down, clients automatically route to server2 specified in profile
#2 in the IOR.

In my server, I do the following (pseudo code)

// assume obj1 exists and is the reference for "this" server.
std::string corbaLocString = "corbaloc:iiop:***@HOSTNAME2:16456/";
std::string poaID = // the id of the POA under which the servant is
registered
corbaLocString+=poaID;
corbaLocString+=objectIdOfObjectAsString;

// object ref for second/backup server
CORBA::Object_var obj2 = getORB()-
string_to_object(corbaLocString.c_str());
CORBA::Object_var IORM = orb->resolve_initial_references
("IORManipulation");
TAO_IOP::TAO_IOR_Manipulation_var iorm =
TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in ());
CORBA::Object_var merged = iorm->add_profiles(obj1, obj2);



Now looking at the output of tao_catior -f server.ior , I can see that
the object Id's are not identical (see below)

....NUP...#........RootPOA.IOBSSessionManager.........IOBSSessionManager-
singleton

versus

....NUP...#........RootPOA.IOBSSessionManager.IOBSSessionManager-
singleton


When I take down the first server , the client gets an
OBJECT_NOT_EXIST back from the second server (it connects to it ok,
just the object cannot be
found).

Decoding an IOR:
The Byte Order: Little Endian
The Type Id: "IDL:bnpparibas.com/synapse/obs/IOBSSessionManager:
1.0"
Number of Profiles in IOR: 2
Profile number: 1
IIOP Version: 1.2
Host Name: 1.2.3.4
Port Number: 16281
Object Key len: 82
Object Key as hex:
14 01 0f 00 4e 55 50 00 00 00 23 03 00 00 00 01
00 00 00 52 6f 6f 74 50 4f 41 00 49 4f 42 53 53
65 73 73 69 6f 6e 4d 61 6e 61 67 65 72 00 00 00
00 00 01 00 00 00 49 4f 42 53 53 65 73 73 69 6f
6e 4d 61 6e 61 67 65 72 2d 73 69 6e 67 6c 65 74
6f 6e
The Object Key as string:
....NUP...#........RootPOA.IOBSSessionManager.........IOBSSessionManager-
singleton
The component <1> ID is 0 (TAG_ORB_TYPE)
ORB Type: 0x54414f00 (TAO)
The component <2> ID is 1 (TAG_CODE_SETS)
Component length: 24
Component byte order: Little Endian
Native CodeSet for char: Hex - 10001 Description -
ISO8859_1
Number of CCS for char 1
Conversion Codesets for char are:
1) Hex - 5010001 Description - UTF-8
Native CodeSet for wchar: Hex - 10109 Description - UTF-16
Number of CCS for wchar 0
Profile number: 2
IIOP Version: 1.2
Host Name: HOSTNAME2
Port Number: 16456
Object Key len: 74
Object Key as hex:
14 01 0f 00 4e 55 50 00 00 00 23 03 00 00 00 01
00 00 00 52 6f 6f 74 50 4f 41 00 49 4f 42 53 53
65 73 73 69 6f 6e 4d 61 6e 61 67 65 72 00 49 4f
42 53 53 65 73 73 69 6f 6e 4d 61 6e 61 67 65 72
2d 73 69 6e 67 6c 65 74 6f 6e
The Object Key as string:
....NUP...#........RootPOA.IOBSSessionManager.IOBSSessionManager-
singleton
catior returned true


Curiously, if when creating my CORBA::Object using corbaloc, I insert
the missing hex characters "00 00 00 00 00 01 00 00 00" , everything
works just
fine.

If its important, I have fixed ports/endpoints configured on my
servers.

Could anybody give me some insight so I can get the second profile
running ok. (the POA is not using SYSTEM_ID for its objectId's, for
info).

thanks and have a nice weekend,

GrahamO
Johnny Willemsen
2010-07-16 18:39:44 UTC
Permalink
Hi,

Do you start the servers on a fixed endpoint. The tao lists are a better
place to ask questions, see http://www.cs.wustl.edu/~schmidt/ACE-mail.html

Johnny
Post by Graham Walsh
Hi,
I'm trying to put in place a multi profile IOR, such that when server1
is down, clients automatically route to server2 specified in profile
#2 in the IOR.
In my server, I do the following (pseudo code)
// assume obj1 exists and is the reference for "this" server.
std::string poaID = // the id of the POA under which the servant is
registered
corbaLocString+=poaID;
corbaLocString+=objectIdOfObjectAsString;
// object ref for second/backup server
CORBA::Object_var obj2 = getORB()-
string_to_object(corbaLocString.c_str());
CORBA::Object_var IORM = orb->resolve_initial_references
("IORManipulation");
TAO_IOP::TAO_IOR_Manipulation_var iorm =
TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in ());
CORBA::Object_var merged = iorm->add_profiles(obj1, obj2);
Now looking at the output of tao_catior -f server.ior , I can see that
the object Id's are not identical (see below)
.....NUP...#........RootPOA.IOBSSessionManager.........IOBSSessionManager-
singleton
versus
.....NUP...#........RootPOA.IOBSSessionManager.IOBSSessionManager-
singleton
When I take down the first server , the client gets an
OBJECT_NOT_EXIST back from the second server (it connects to it ok,
just the object cannot be
found).
The Byte Order: Little Endian
1.0"
Number of Profiles in IOR: 2
Profile number: 1
IIOP Version: 1.2
Host Name: 1.2.3.4
Port Number: 16281
Object Key len: 82
14 01 0f 00 4e 55 50 00 00 00 23 03 00 00 00 01
00 00 00 52 6f 6f 74 50 4f 41 00 49 4f 42 53 53
65 73 73 69 6f 6e 4d 61 6e 61 67 65 72 00 00 00
00 00 01 00 00 00 49 4f 42 53 53 65 73 73 69 6f
6e 4d 61 6e 61 67 65 72 2d 73 69 6e 67 6c 65 74
6f 6e
....NUP...#........RootPOA.IOBSSessionManager.........IOBSSessionManager-
singleton
The component <1> ID is 0 (TAG_ORB_TYPE)
ORB Type: 0x54414f00 (TAO)
The component <2> ID is 1 (TAG_CODE_SETS)
Component length: 24
Component byte order: Little Endian
Native CodeSet for char: Hex - 10001 Description -
ISO8859_1
Number of CCS for char 1
1) Hex - 5010001 Description - UTF-8
Native CodeSet for wchar: Hex - 10109 Description - UTF-16
Number of CCS for wchar 0
Profile number: 2
IIOP Version: 1.2
Host Name: HOSTNAME2
Port Number: 16456
Object Key len: 74
14 01 0f 00 4e 55 50 00 00 00 23 03 00 00 00 01
00 00 00 52 6f 6f 74 50 4f 41 00 49 4f 42 53 53
65 73 73 69 6f 6e 4d 61 6e 61 67 65 72 00 49 4f
42 53 53 65 73 73 69 6f 6e 4d 61 6e 61 67 65 72
2d 73 69 6e 67 6c 65 74 6f 6e
....NUP...#........RootPOA.IOBSSessionManager.IOBSSessionManager-
singleton
catior returned true
Curiously, if when creating my CORBA::Object using corbaloc, I insert
the missing hex characters "00 00 00 00 00 01 00 00 00" , everything
works just
fine.
If its important, I have fixed ports/endpoints configured on my
servers.
Could anybody give me some insight so I can get the second profile
running ok. (the POA is not using SYSTEM_ID for its objectId's, for
info).
thanks and have a nice weekend,
GrahamO
Graham Walsh
2010-07-17 14:39:29 UTC
Permalink
Hi Johnny,

Yes, I start them on fixed endpoints. I get the feeling you're going
to tell me something... :)


Graham
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Do you start the servers on a fixed endpoint. The tao lists are a better
place to ask questions, seehttp://www.cs.wustl.edu/~schmidt/ACE-mail.html
Johnny
Post by Graham Walsh
Hi,
I'm trying to put in place a multi profile IOR, such that when server1
is down, clients automatically route to server2 specified in profile
#2 in the IOR.
In my server, I do the following (pseudo code)
// assume obj1 exists and is the reference for "this" server.
std::string poaID = // the id of the POA under which the servant is
registered
corbaLocString+=poaID;
corbaLocString+=objectIdOfObjectAsString;
// object ref for second/backup server
CORBA::Object_var obj2 = getORB()-
string_to_object(corbaLocString.c_str());
CORBA::Object_var IORM =  orb->resolve_initial_references
("IORManipulation");
TAO_IOP::TAO_IOR_Manipulation_var iorm =
TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in ());
CORBA::Object_var merged = iorm->add_profiles(obj1, obj2);
Now looking at the output of tao_catior -f server.ior , I can see that
the object Id's are not identical (see below)
.....NUP...#........RootPOA.IOBSSessionManager.........IOBSSessionManager-
singleton
versus
.....NUP...#........RootPOA.IOBSSessionManager.IOBSSessionManager-
singleton
When I take down the first server , the client gets an
OBJECT_NOT_EXIST back from the second server (it connects to it ok,
just the object cannot be
found).
The Byte Order: Little Endian
1.0"
Number of Profiles in IOR:      2
Profile number: 1
IIOP Version:   1.2
    Host Name:  1.2.3.4
    Port Number:        16281
    Object Key len:     82
    14 01 0f 00 4e 55 50 00 00 00 23 03 00 00 00 01
    00 00 00 52 6f 6f 74 50 4f 41 00 49 4f 42 53 53
    65 73 73 69 6f 6e 4d 61 6e 61 67 65 72 00 00 00
    00 00 01 00 00 00 49 4f 42 53 53 65 73 73 69 6f
    6e 4d 61 6e 61 67 65 72 2d 73 69 6e 67 6c 65 74
    6f 6e
    ....NUP...#........RootPOA.IOBSSessionManager.........IOBSSessionManager-
singleton
    The component <1> ID is 0 (TAG_ORB_TYPE)
            ORB Type: 0x54414f00 (TAO)
    The component <2> ID is 1 (TAG_CODE_SETS)
        Component length: 24
        Component byte order:   Little Endian
        Native CodeSet for char:  Hex - 10001   Description -
ISO8859_1
        Number of CCS for char 1
        1)  Hex - 5010001       Description - UTF-8
        Native CodeSet for wchar:  Hex - 10109  Description - UTF-16
        Number of CCS for wchar 0
Profile number: 2
IIOP Version:   1.2
    Host Name:  HOSTNAME2
    Port Number:        16456
    Object Key len:     74
    14 01 0f 00 4e 55 50 00 00 00 23 03 00 00 00 01
    00 00 00 52 6f 6f 74 50 4f 41 00 49 4f 42 53 53
    65 73 73 69 6f 6e 4d 61 6e 61 67 65 72 00 49 4f
    42 53 53 65 73 73 69 6f 6e 4d 61 6e 61 67 65 72
    2d 73 69 6e 67 6c 65 74 6f 6e
    ....NUP...#........RootPOA.IOBSSessionManager.IOBSSessionManager-
singleton
catior returned true
Curiously, if when creating my CORBA::Object using corbaloc, I insert
the missing hex characters "00 00 00 00 00 01 00 00 00" , everything
works just
fine.
If its important, I have fixed ports/endpoints configured on my
servers.
Could anybody give me some insight  so I can get the second profile
running ok. (the POA is not using SYSTEM_ID for its objectId's, for
info).
thanks and have a nice weekend,
GrahamO
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE -http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJMQKdwAAoJEF6eObUNSFTQ6B4H/19mjkL563zmDazJSOrz2Nvw
2qAlZmGkbOPCtHQhqIwmF3g0MtwTCTCv0YVwviNarcaddAWahW5zw8xIsjKimiKP
V6VEBz18/LuftULW+YbP6yUPtiAVQPU3rgHKeMmI0HGu5uuDuXidhKfdfNPf+bQ/
HtRpxgakolIKxcxkrxY8gzjw+pZONSj6uMd26JV/nWE+Pwi/ZQr/988uTXvTskG1
uN+1hs5mSn4TtHYa5Osu6s9U8h5lvKQecUcg56lfTQ60AxYpl8GNIC8nGg2blPnK
QnJUy3diTWwIY4uMT4bLmXNLthGztc7dW50jnLhT8z8gJHI0au40kupVSNNdr10=
=tru6
-----END PGP SIGNATURE-----
Johnny Willemsen
2010-07-18 18:18:43 UTC
Permalink
Hi,

I would recommend you to do a search in the TAO tests, we probably have
similar tests and see how they work, if not, check the TAO lists, I
don't have time at this moment to sort this out for free, I am focused
at our commercial support at this moment, see http://www.theaceorb.nl

Johnny

On 07/17/2010 04:39 PM, Graham Walsh wrote:
Johnny Willemsen
2010-07-18 18:18:43 UTC
Permalink
Hi,

I would recommend you to do a search in the TAO tests, we probably have
similar tests and see how they work, if not, check the TAO lists, I
don't have time at this moment to sort this out for free, I am focused
at our commercial support at this moment, see http://www.theaceorb.nl

Johnny
Post by Graham Walsh
Hi Johnny,
Yes, I start them on fixed endpoints. I get the feeling you're going
to tell me something... :)
Graham
Hi,
Do you start the servers on a fixed endpoint. The tao lists are a better
place to ask questions, seehttp://www.cs.wustl.edu/~schmidt/ACE-mail.html
Johnny
Post by Graham Walsh
Hi,
I'm trying to put in place a multi profile IOR, such that when server1
is down, clients automatically route to server2 specified in profile
#2 in the IOR.
In my server, I do the following (pseudo code)
// assume obj1 exists and is the reference for "this" server.
std::string poaID = // the id of the POA under which the servant is
registered
corbaLocString+=poaID;
corbaLocString+=objectIdOfObjectAsString;
// object ref for second/backup server
CORBA::Object_var obj2 = getORB()-
string_to_object(corbaLocString.c_str());
CORBA::Object_var IORM = orb->resolve_initial_references
("IORManipulation");
TAO_IOP::TAO_IOR_Manipulation_var iorm =
TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in ());
CORBA::Object_var merged = iorm->add_profiles(obj1, obj2);
Now looking at the output of tao_catior -f server.ior , I can see that
the object Id's are not identical (see below)
.....NUP...#........RootPOA.IOBSSessionManager.........IOBSSessionManager-
singleton
versus
.....NUP...#........RootPOA.IOBSSessionManager.IOBSSessionManager-
singleton
When I take down the first server , the client gets an
OBJECT_NOT_EXIST back from the second server (it connects to it ok,
just the object cannot be
found).
The Byte Order: Little Endian
1.0"
Number of Profiles in IOR: 2
Profile number: 1
IIOP Version: 1.2
Host Name: 1.2.3.4
Port Number: 16281
Object Key len: 82
14 01 0f 00 4e 55 50 00 00 00 23 03 00 00 00 01
00 00 00 52 6f 6f 74 50 4f 41 00 49 4f 42 53 53
65 73 73 69 6f 6e 4d 61 6e 61 67 65 72 00 00 00
00 00 01 00 00 00 49 4f 42 53 53 65 73 73 69 6f
6e 4d 61 6e 61 67 65 72 2d 73 69 6e 67 6c 65 74
6f 6e
....NUP...#........RootPOA.IOBSSessionManager.........IOBSSessionManager-
singleton
The component <1> ID is 0 (TAG_ORB_TYPE)
ORB Type: 0x54414f00 (TAO)
The component <2> ID is 1 (TAG_CODE_SETS)
Component length: 24
Component byte order: Little Endian
Native CodeSet for char: Hex - 10001 Description -
ISO8859_1
Number of CCS for char 1
1) Hex - 5010001 Description - UTF-8
Native CodeSet for wchar: Hex - 10109 Description - UTF-16
Number of CCS for wchar 0
Profile number: 2
IIOP Version: 1.2
Host Name: HOSTNAME2
Port Number: 16456
Object Key len: 74
14 01 0f 00 4e 55 50 00 00 00 23 03 00 00 00 01
00 00 00 52 6f 6f 74 50 4f 41 00 49 4f 42 53 53
65 73 73 69 6f 6e 4d 61 6e 61 67 65 72 00 49 4f
42 53 53 65 73 73 69 6f 6e 4d 61 6e 61 67 65 72
2d 73 69 6e 67 6c 65 74 6f 6e
....NUP...#........RootPOA.IOBSSessionManager.IOBSSessionManager-
singleton
catior returned true
Curiously, if when creating my CORBA::Object using corbaloc, I insert
the missing hex characters "00 00 00 00 00 01 00 00 00" , everything
works just
fine.
If its important, I have fixed ports/endpoints configured on my
servers.
Could anybody give me some insight so I can get the second profile
running ok. (the POA is not using SYSTEM_ID for its objectId's, for
info).
thanks and have a nice weekend,
GrahamO
Johnny Willemsen
2010-07-18 18:18:43 UTC
Permalink
Hi,

I would recommend you to do a search in the TAO tests, we probably have
similar tests and see how they work, if not, check the TAO lists, I
don't have time at this moment to sort this out for free, I am focused
at our commercial support at this moment, see http://www.theaceorb.nl

Johnny

On 07/17/2010 04:39 PM, Graham Walsh wrote:

Loading...