Charset negotiation error in multiple threads with JacORB 3.9
Gotthard Witsch <[email protected]> Wed, 17 Jan 2018 11:27:05 +0100
| Newsgroups | gmane.comp.corba.jacorb.devel |
|---|---|
| Message-ID | <FDCF7296051FAA4B967818014FE88B23027B04BC1ECF@hermes.ith-icoserve.com> |
Hello JacOrb Team,
I am facing a problem with JacORB 3.9 when sending multiple requests in par=
allel threads. Especially if there are more than 10 threads, sending reques=
ts to the same CORBA endpoint.
After analyzing the problem I figured out that JacORB does not negotiate th=
e correct codeset with the server. There is no request send for codeset neg=
otiation at all! Therefore our CORBA server defaults to the ISO-8859 encodi=
ng, however JacORB does work with UTF-8. As the result we get invalid conte=
nt.
My code does send three requests to the server:
1. Establish a connection to the NamingService
2. Receive the CORBA object named TenantManger
3. Call a method on the CORBA object and read the received data.
Each thread does execute these three steps. I downloaded the source code fo=
r JacORB 3.9 and added some logging statements.
These statements definitely show that the encoding is negotiated for the fi=
rst two requests. However the third request does not negotiate the encoding=
for the used client connection.
Debugging the JacORB source code led me to the org.jacorb.orb.Delegate and =
org.jacorb.orb.giop.ClientConnectionManager class, that are responsible for=
retrieving the connection to the CORBA server.
Unfortunately I could not find any obvious bugs in those classes. I also ha=
d a look at the class org.jacorb.orb.giop.RequestOutputStream and its write=
_to method, but could not find any bugs neither. I added logging statement=
s to the write_to method, but the block for negotiating the codeset is not =
executed on the third request.
Has anyone got a clue, what is causing the error? Or do I miss some importa=
nt configuration?
If I just use 5 threads, for example, everything is fine. When I increase t=
he number of threads it starts causing the described error. At about 10 thr=
eads it's failing all the time.
My JacORB configuration is the following:
props.put("ORBInitRef.NameService", "corbaloc:iiop:" + host + ":" + port + =
"/NameService");
props.put("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
props.put("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");
// Charset properties
props.put("jacorb.codeset", "on");
// Turn on SSL support
props.put("jacorb.security.support_ssl", "on");
// Read certificates from key store (not from trust store)
props.put("jacorb.security.jsse.trustees_from_ks", "on");
// Filename key store file
props.put("jacorb.security.keystore", keyStorePath);
// Password for the key store
props.put("jacorb.security.keystore_password", keyStorePassword);
props.put("jacorb.security.ssl.client.supported_options", "60");
props.put("jacorb.security.ssl.client.required_options", "01");
// Use JSSE
props.put("jacorb.ssl.socket_factory", "org.jacorb.security.ssl.sun_jsse.SS=
LSocketFactory");
props.put("jacorb.ssl.server_socket_factory", "org.jacorb.security.ssl.sun_=
jsse.SSLServerSocketFactory");
props.put("jacorb.maxManagedBufSize", "23");
// connection timeout
props.put("jacorb.retries", "30");
props.put("jacorb.retry_interval", "2000"); // in ms
// dump messages to log
props.put("jacorb.debug.dump_outgoing_messages", "off");
props.put("jacorb.debug.dump_incoming_messages", "off");
Thanks in advance,
Gotthard Witsch
Research & Development syngo.share
E-Mail: [email protected]<mailto:gotthard.witsch@ith-i=
coserve.com>
______________________________________
ITH icoserve technology for healthcare GmbH
a siemens company - HC SV DS ITH
Innrain 98, 6020 Innsbruck, =D6sterreich - www.ith-icoserve.com<http://www.=
ith-icoserve.com/>
Rechtsform: Gesellschaft mit beschr=E4nkter Haftung - Firmensitz: 6020 Inns=
bruck, Innrain 98
Firmenbuchnummer: FN 174117f - Firmenbuchgericht: Innsbruck - DVR: 0983039
_______________________________________________
jacorb-developer maillist - [email protected]
https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer