Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 1017 - Server request interceptor doesn't works
Summary: Server request interceptor doesn't works
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: other (show other bugs)
Version: 3.4
Hardware: PC Windows NT
: P5 enhancement
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2015-08-23 08:32 UTC by Kujtim Hyseni
Modified: 2015-08-27 10:59 UTC (History)
1 user (show)

See Also:


Attachments
Client, server and server request interceptor code for given server (19.45 KB, application/rar)
2015-08-23 08:32 UTC, Kujtim Hyseni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kujtim Hyseni 2015-08-23 08:32:06 UTC
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.
Comment 1 Nick Cross 2015-08-24 04:50:27 UTC
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 ).
Comment 2 Kujtim Hyseni 2015-08-27 09:42:21 UTC
(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
Comment 3 Nick Cross 2015-08-27 09:54:02 UTC

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);
Comment 4 Kujtim Hyseni 2015-08-27 09:57:34 UTC
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)?
Comment 5 Nick Cross 2015-08-27 10:42:03 UTC
Interceptors are created and registered on ORB construction. You would have to design your application to account for this.
Comment 6 Kujtim Hyseni 2015-08-27 10:59:30 UTC
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