Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 847

Summary: Bidirectional Connection does not work when SSL is enabled
Product: JacORB Reporter: Alex.C.Punnen <alexcpn>
Component: SSL/IIOPAssignee: Nicolas Noffke <Nicolas.Noffke>
Status: RESOLVED FIXED    
Severity: normal CC: alexcpn, franke, rnc
Priority: P2    
Version: 2.3.0   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 886    
Attachments: diff of BiDirConnectionServerInterceptor.java (diff -b -B -E -U 3)
diff of ClientConnectionManager.java (diff -b -B -E -U 3)
diff of ClientConnection.java (diff -b -B -E -U 3)
The changed files for this corection

Description Alex.C.Punnen 2008-12-16 12:52:41 UTC
I set the client to run behind a firewall, and then made the server callback to the client. This is after setting SSL and enabling bidirectional GIIOP.
The server could not connect to the client as it was trying to open another port

Checking the code I found that though the profile was added in BiDirConnectionServerInterceptor::addConnection, the requestId was not found in the ClientConnectionManager::getConnection

I changed the code in the BiDirConnectionServerInterceptor::addConnection and also made the hashmap key in the ClientConnectionManager to a string explicitly,
while setting the keys and getting it.
private final Map connections = new HashMap(); 

ClientConnection clientConnection =
            (ClientConnection)connections.get(profile.toString() );
After these changes the server is able to callback on the client, which is behind the firewall. Also from the jacorb traces I was able to see that the profile is found for the requst id and the same profile is reused. I will attach the diff of the changed files. (Note I am behind company firewall and cannot aceess cvs source direclty and cannot do a cvs diff)


Client Code
 ClientCallback ccb = ClientCallbackHelper.narrow(bidir_poa.servant_to_reference( new ClientCallbackPOAImpl() ));
				
System.out.println("Going to register callback with the Server for Topology Change");
srvCallBack.register_callback(ccb);

Server Code

SrvRegisterCallBackPOAImpl

public void register_callback(ClientCallback clntobj) {
	
		System.out.println("Received the callback from the client");
		callbackobj =clntobj;
		System.out.println("Going to call the client");
		callbackobj.TopologyChanged("192.186.22.44", true);

	}
Comment 1 Alex.C.Punnen 2008-12-16 12:54:45 UTC
Created attachment 353 [details]
diff of BiDirConnectionServerInterceptor.java (diff -b -B -E -U 3)
Comment 2 Alex.C.Punnen 2008-12-16 12:55:55 UTC
Created attachment 354 [details]
diff of ClientConnectionManager.java (diff -b -B -E -U 3)
Comment 3 Alex.C.Punnen 2008-12-16 12:56:22 UTC
Created attachment 355 [details]
diff of ClientConnection.java (diff -b -B -E -U 3)
Comment 4 Alex.C.Punnen 2008-12-16 12:57:48 UTC
Created attachment 356 [details]
The changed files for this corection

The changed files for this corection
Comment 5 Nick Cross 2009-11-23 12:04:00 UTC
This should be fixed by separate PrismTech fixes in CVS.
Comment 6 Alex.C.Punnen 2010-01-21 12:42:46 UTC
The corrections for this are not there in the latest 2.3.1 source. So reopening this
Comment 7 Nick Cross 2010-01-21 15:27:27 UTC
Patches are made into CVS head not against released versions of the code. If you need updates to a stable version you may wish to look at http://www.jacorb.org/support.html where various companies offer commercial support for JacORB.