From: Wang, T. <Ton...@ar...> - 2009-10-07 23:04:29
|
Hi All, I am using OpenORB 1.4 to develop a CORBA application. I would like to limit the number of servants, say 10K, in memory. How do I do it with OpenORB? Here are two options I have thought of. One is: 1. Implement a concrete class MyActivator from ServantActivator and register that class into POA. public void set_servant_manager( ServantManager imgr ) 2. Then inside MyActivator's public Servant incarnate(byte[] oid, POA adapter) method I recreate the servant from DB and populate it into adapter. The other one is: 3. Implement a concrete class MyInterceptor from ServerRequestInterceptor. 4. The inside the overridden public void receive_request_service_contexts(ServerRequestInfo ri) method I look up the object_id from ri from AOM and recreate the servant and populate into AOM. Do you have any advice on how to activate/deactivate servant into/from memory in general? Thanks, Tony |