Reposted: Requests management in JacORB

Kujtim Hyseni <[email protected]>
Newsgroups gmane.comp.corba.jacorb.devel
Message-ID <[email protected]>
Hi again Phil,
 
I have modified the demo interceptor example, implemented the classes ServerInitializer and ServerForwardInterceptor and tried to use as:
 
        org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null);
        org.omg.PortableServer.POA poa =
            org.omg.PortableServer.POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
 
        poa.the_POAManager().activate();
 
        org.omg.CORBA.Object o = poa.servant_to_reference(new GridImpl());
 
        PrintWriter ps = new PrintWriter(new FileOutputStream(new File( args[0] )));
        String ior_id = orb.object_to_string( o );
        ps.println( ior_id );
        ps.close();
 
        java.util.Properties props = new java.util.Properties();
        props.put("org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit", "ServerInitializer");
 
        //BufferedReader reader = new BufferedReader(new FileReader(args[1]));
        props.put("ORBInitRef.Target2", ior_id);        
 
        if (args.length == 2)
        {
            File killFile = new File(args[1]);
            while(!killFile.exists())
            {
                Thread.sleep(1000);
            }
            orb.shutdown(true);
        }
        else
        {
            orb.run();
        }        
 
but it notified that only client request interceptor is running. I have to admit that ServerForwardInterceptor's class methods are empty. Can you figure out what I am doing wrong?
 
Regards,
Kujtim
 
> From: [email protected]
> Date: Wed, 16 Apr 2014 10:19:54 -0500
> To: [email protected]
> Subject: Re: [jacorb-developer] Requests management in JacORB
> 
> Hi Kujtim,
> 
> On Apr 16, 2014, at 8:08 AM, Kujtim Hyseni wrote:
> 
> > Phil, 
> > 
> > the demo in $JACORB_HOME/demo/interceptors is about client request interceptors and I need a server request interceptor or it is the same?
> > 
> 
> The principals are the same but the interfaces are a little different. Where the demo has a ClientForwardInterceptor that implements the ClientRequestInterceptor interface, you will implement the ServerRequestInterceptor interface.  The interfaces are provided in $JACORB_HOME/idl/omg/PortableInterceptor.idl. The orb initializer used to install the initializer is pretty much the same between client and server.
> 
>  Lots of good information can be found by googling "CORBA server request interceptor."
> 
> Good luck,
> Phil
> 
> --
> Phil Mesnier
> Principal Software Engineer and Partner,   http://www.ociweb.com
> Object Computing, Inc.                     +01.314.579.0066 x225
> 
> 
> 
> 
> _______________________________________________
> jacorb-developer maillist  -  [email protected]
> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
 		 	   		  
_______________________________________________
jacorb-developer maillist  -  [email protected]
https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer 		 	   		  
_______________________________________________
jacorb-developer maillist  -  [email protected]
https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.