Created attachment 468 [details] Client, server and server request interceptor code for given server I am trying to use server request interceptor but it doesn't works at all. I am registering it as states in respective examples and trying to use it. Its constructor is run and server notifies that 1 server request interceptor is registered but it doesn't reacts on client requests i.e. it's methods are not called when client initiates request and when it receives response from server. Attached you may find the whole code I am using.
You are activating two orbs and activating the object in the first ORB (which doesn't have server interceptors). Removing the second ORB fixes the problem for me ( or just put the interceptors in the correct ORB ).
(In reply to Nick Cross from comment #1) > You are activating two orbs and activating the object in the first ORB > (which doesn't have server interceptors). Removing the second ORB fixes the > problem for me ( or just put the interceptors in the correct ORB ). Hi Nick, can you modify the code as you proposing and send me the code to my email address? Kujtim
diff -b -B -w original/ConnManServer.java ConnManServer.java 9c9,11 < org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null); --- > java.util.Properties props = new java.util.Properties(); > props.put("org.omg.PortableInterceptor.ORBInitializerClass.ServerInitializer","ServerInitializer"); > org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, props); 30d31 < orb = orb.init(args, props);
I have made changes as suggested and it works! But, there is still an issue how to send Server's ior to server interceptor to identify the instance of the server instance or maybe it is included in server interceptor's methods arguments (ServerRequestInfo)?
Interceptors are created and registered on ORB construction. You would have to design your application to account for this.
The code I uploaded is based on example you provided few months through jacorb-dev-list forum but they don't work. Can you adopt the code I uploaded to include server IOR in props too? Kujtim