V S P
2009-05-16 22:50:06 UTC
Sorry for being off topic
but just wanted to quickly check if anybody on the list
can get
Jdk 6x corba servant (or client) to connect to omni names?
(stubs generated with idlj)
In my first attempt I cannot, and just wanted to see
if this will be a fruitless path.
----------- java side ------------
public static void main(String[] args) {
Properties props = System.getProperties();
props.setProperty("org.omg.CORBA.ORBClass",
"com.sun.corba.se.internal.POA.POAORB");
props.setProperty("org.omg.CORBA.ORBSingletonClass",
"com.sun.corba.se.internal.corba.ORBSingleton");
props.setProperty( "org.omg.CORBA.ORBInitialHost",
"localhost" ); //naming service host
props.setProperty( "org.omg.CORBA.ORBInitialPort",
"2809" ); //haming service port
try {
// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props);
// Get a reference to the root POA
org.omg.CORBA.Object obj = orb.resolve_initial_references("RootPOA");
POA poaRoot = POAHelper.narrow(obj);
// Create policies for our persistent POA
org.omg.CORBA.Policy[] policies = {
// poaRoot.create_lifespan_policy(LifespanPolicyValue.PERSISTENT),
poaRoot.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID),
poaRoot.create_thread_policy(ThreadPolicyValue.ORB_CTRL_MODEL),
poaRoot.create_request_processing_policy(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT),
poaRoot.create_id_uniqueness_policy(IdUniquenessPolicyValue.MULTIPLE_ID)
};
// Create myPOA with the right policies
POA poa = poaRoot.create_POA("View2ExcelServerImpl_poa", poaRoot.the_POAManager(), policies);
// Create the servant
View2ExcelServerImpl servant = new View2ExcelServerImpl();
poa.set_servant(servant);
byte[] objectId = "AnyObjectID".getBytes();
String typeId = com.View2ExcelHelper.type().id();
obj = poa.create_reference_with_id(objectId, typeId);
// Activate the POA manager
poaRoot.the_POAManager().activate();
//exception here org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: OMG minor
code: 1 completed: No
org.omg.CORBA.Object ncobj =
orb.resolve_initial_references("NameService");
--- omni names Log -----------------------------------
Checkpointing completed.
omniORB: (1) 2009-05-16 12:14:43.265000: Server accepted connection from
giop:tc
p:127.0.0.1:1189
omniORB: (2) 2009-05-16 12:14:43.265000: AsyncInvoker: thread id = 2 has
started
. Total threads = 2
omniORB: (2) 2009-05-16 12:14:43.265000: Scavenger task execute.
omniORB: (3) 2009-05-16 12:14:43.265000: AsyncInvoker: thread id = 3 has
started
. Total threads = 3
omniORB: (3) 2009-05-16 12:14:43.265000: giopWorker task execute.
omniORB: (3) 2009-05-16 12:14:43.265000: Accepted connection from
giop:tcp:127.0
.0.1:1189 because of this rule: "* unix,ssl,tcp"
omniORB: (3) 2009-05-16 12:14:43.265000: inputMessage: from
giop:tcp:127.0.0.1:1
189 264 bytes
omniORB: (3) 2009-05-16 12:14:43.265000:
4749 4f50 0100 0000 0000 00fc 0000 0003 GIOP............
0000 0011 0000 0002 0002 0000 4e45 4f00 ............NEO.
0000 0002 0014 0000 0000 0006 0000 00aa ................
0000 0000 0000 0028 4944 4c3a 6f6d 672e .......(IDL:omg.
6f72 672f 5365 6e64 696e 6743 6f6e 7465 org/SendingConte
7874 2f43 6f64 6542 6173 653a 312e 3000 xt/CodeBase:1.0.
0000 0001 0000 0000 0000 006e 0001 0200 ...........n....
0000 000e 3139 322e 3136 382e 302e 3130 ....192.168.0.10
3600 04a1 0000 0019 afab cb00 0000 0002 6...............
4a33 95a3 0000 0008 0000 0000 0000 0000 J3..............
1400 0000 0000 0002 0000 0001 0000 0020 ...............
0000 0000 0001 0001 0000 0002 0501 0001 ................
0001 0020 0001 0109 0000 0001 0001 0100 ... ............
0000 0026 0000 0002 0002 0000 0000 0005 ...&............
0100 0000 0000 0004 494e 4954 0000 0004 ........INIT....
6765 7400 0000 0000 0000 000c 4e61 6d65 get.........Name
5365 7276 6963 6500 Service.
omniORB: (3) 2009-05-16 12:14:43.265000: throw OBJECT_NOT_EXIST from
GIOP_S.cc:3
72 (NO,OBJECT_NOT_EXIST_NoMatch)
omniORB: (3) 2009-05-16 12:14:43.265000: sendChunk: to
giop:tcp:127.0.0.1:1189 7
6 bytes
omniORB: (3) 2009-05-16 12:14:43.265000:
4749 4f50 0100 0101 4000 0000 0000 0000 ***@.......
0500 0000 0200 0000 2700 0000 4944 4c3a ........'...IDL:
6f6d 672e 6f72 672f 434f 5242 412f 4f42 omg.org/CORBA/OB
4a45 4354 5f4e 4f54 5f45 5849 5354 3a31 JECT_NOT_EXIST:1
2e30 0000 0100 4d4f 0100 0000 .0....MO....
but just wanted to quickly check if anybody on the list
can get
Jdk 6x corba servant (or client) to connect to omni names?
(stubs generated with idlj)
In my first attempt I cannot, and just wanted to see
if this will be a fruitless path.
----------- java side ------------
public static void main(String[] args) {
Properties props = System.getProperties();
props.setProperty("org.omg.CORBA.ORBClass",
"com.sun.corba.se.internal.POA.POAORB");
props.setProperty("org.omg.CORBA.ORBSingletonClass",
"com.sun.corba.se.internal.corba.ORBSingleton");
props.setProperty( "org.omg.CORBA.ORBInitialHost",
"localhost" ); //naming service host
props.setProperty( "org.omg.CORBA.ORBInitialPort",
"2809" ); //haming service port
try {
// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props);
// Get a reference to the root POA
org.omg.CORBA.Object obj = orb.resolve_initial_references("RootPOA");
POA poaRoot = POAHelper.narrow(obj);
// Create policies for our persistent POA
org.omg.CORBA.Policy[] policies = {
// poaRoot.create_lifespan_policy(LifespanPolicyValue.PERSISTENT),
poaRoot.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID),
poaRoot.create_thread_policy(ThreadPolicyValue.ORB_CTRL_MODEL),
poaRoot.create_request_processing_policy(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT),
poaRoot.create_id_uniqueness_policy(IdUniquenessPolicyValue.MULTIPLE_ID)
};
// Create myPOA with the right policies
POA poa = poaRoot.create_POA("View2ExcelServerImpl_poa", poaRoot.the_POAManager(), policies);
// Create the servant
View2ExcelServerImpl servant = new View2ExcelServerImpl();
poa.set_servant(servant);
byte[] objectId = "AnyObjectID".getBytes();
String typeId = com.View2ExcelHelper.type().id();
obj = poa.create_reference_with_id(objectId, typeId);
// Activate the POA manager
poaRoot.the_POAManager().activate();
//exception here org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: OMG minor
code: 1 completed: No
org.omg.CORBA.Object ncobj =
orb.resolve_initial_references("NameService");
--- omni names Log -----------------------------------
Checkpointing completed.
omniORB: (1) 2009-05-16 12:14:43.265000: Server accepted connection from
giop:tc
p:127.0.0.1:1189
omniORB: (2) 2009-05-16 12:14:43.265000: AsyncInvoker: thread id = 2 has
started
. Total threads = 2
omniORB: (2) 2009-05-16 12:14:43.265000: Scavenger task execute.
omniORB: (3) 2009-05-16 12:14:43.265000: AsyncInvoker: thread id = 3 has
started
. Total threads = 3
omniORB: (3) 2009-05-16 12:14:43.265000: giopWorker task execute.
omniORB: (3) 2009-05-16 12:14:43.265000: Accepted connection from
giop:tcp:127.0
.0.1:1189 because of this rule: "* unix,ssl,tcp"
omniORB: (3) 2009-05-16 12:14:43.265000: inputMessage: from
giop:tcp:127.0.0.1:1
189 264 bytes
omniORB: (3) 2009-05-16 12:14:43.265000:
4749 4f50 0100 0000 0000 00fc 0000 0003 GIOP............
0000 0011 0000 0002 0002 0000 4e45 4f00 ............NEO.
0000 0002 0014 0000 0000 0006 0000 00aa ................
0000 0000 0000 0028 4944 4c3a 6f6d 672e .......(IDL:omg.
6f72 672f 5365 6e64 696e 6743 6f6e 7465 org/SendingConte
7874 2f43 6f64 6542 6173 653a 312e 3000 xt/CodeBase:1.0.
0000 0001 0000 0000 0000 006e 0001 0200 ...........n....
0000 000e 3139 322e 3136 382e 302e 3130 ....192.168.0.10
3600 04a1 0000 0019 afab cb00 0000 0002 6...............
4a33 95a3 0000 0008 0000 0000 0000 0000 J3..............
1400 0000 0000 0002 0000 0001 0000 0020 ...............
0000 0000 0001 0001 0000 0002 0501 0001 ................
0001 0020 0001 0109 0000 0001 0001 0100 ... ............
0000 0026 0000 0002 0002 0000 0000 0005 ...&............
0100 0000 0000 0004 494e 4954 0000 0004 ........INIT....
6765 7400 0000 0000 0000 000c 4e61 6d65 get.........Name
5365 7276 6963 6500 Service.
omniORB: (3) 2009-05-16 12:14:43.265000: throw OBJECT_NOT_EXIST from
GIOP_S.cc:3
72 (NO,OBJECT_NOT_EXIST_NoMatch)
omniORB: (3) 2009-05-16 12:14:43.265000: sendChunk: to
giop:tcp:127.0.0.1:1189 7
6 bytes
omniORB: (3) 2009-05-16 12:14:43.265000:
4749 4f50 0100 0101 4000 0000 0000 0000 ***@.......
0500 0000 0200 0000 2700 0000 4944 4c3a ........'...IDL:
6f6d 672e 6f72 672f 434f 5242 412f 4f42 omg.org/CORBA/OB
4a45 4354 5f4e 4f54 5f45 5849 5354 3a31 JECT_NOT_EXIST:1
2e30 0000 0100 4d4f 0100 0000 .0....MO....
--
V S P
***@fastmail.fm
--
http://www.fastmail.fm - The way an email service should be
V S P
***@fastmail.fm
--
http://www.fastmail.fm - The way an email service should be