Mark Woyna wrote:
> On Aug 20, 6:10 am, ap...@[EMAIL PROTECTED]
wrote:
I found out what was wrong. The code below:
> > OrbCurrent orbCurrent = _OrbixWeb.Current();
> > Object socketRef = orbCurrent.get_socket();
> > Socket socket = (Socket)socketRef;
only works if you say:
java.util.Properties props = new java.util.Properties();
props.setProperty("OrbixWeb.IT_MULTI_THREADED_SERVER",
"true");
ORB orb = _OrbixWeb.ORB(ORB.init(args, props));
when you initialise the ORB.
> > I then get the IP Address and ****t number from the socket and use
> > these as a form of client id. The trouble is, this does not always
> > work. Sometimes during testing when I have two clients I seem to get
> > getting the Socket object for the wrong client. It is as if
> > OrbixWeb.Current() sometimes returns the wrong value.
It was returning the wrong value due to a race condition. The ORB init
code code above has to be used according to the IONA KnowledgeBase
article at
https://www.iona.com/sup****t/kb/entry!default.jspa?categoryID=3&externalID=1933.942&fromSearchPage=true
> Since you're rewriting the application in Java, do you have to stick
> with OrbixWeb?
Yes. I wish it was not so.
> You'd probably get a lot more help/sup****t if you used
> JacORB, which has a much larger active community than OrbixWeb.
Agreed. That is why when I first started the development I did use
JacORB. It enabled me to get most of the development done without
having to worry about setting up a commercial installation, checking
that I had got licences, putting in a purchase order then waiting
three months etc etc.
Regards,
Andrew Marlow


|