problem about DSI

"Anil Pandge" <[email protected]> Mon, 12 Dec 2005 06:57:39 -0800
Newsgroups gmane.comp.corba.orbacus
Message-ID <06E55CB647E479429AEE0BC221DE3DDE01951DF4@NA-PA-VBE01.na.tibco.com>
Hi sir,

 

         I am new to ORBACUS as well CORBA also. I want to know some
information about DSI creation.

         I created one server with DSI, by setting policies NON_RETAIN
and USE_DEFAULT_SERVANT, it is running fine.

         But I am not able to transport IOR of DSI servant to client.

         I tried it with Create_referance call but it is giving me large
errors while runtime, when I am calling that function from client.

 

            My main problem is how to capture initial object reference
and pass it to client.

 

            Code is as follows: (server side)

 

                        org.omg.PortableServer.POA rootPOA = 

 
org.omg.PortableServer.POAHelper.narrow(

 
orb.resolve_initial_references("RootPOA"));

                        org.omg.PortableServer.POAManager manager =
rootPOA.the_POAManager(); 

 

                        //          Create the account POA with the
right policies

 

                        org.omg.CORBA.Policy[] accountPolicies = {

 
rootPOA.create_servant_retention_policy(

 
ServantRetentionPolicyValue.NON_RETAIN),

 
rootPOA.create_request_processing_policy(

 
RequestProcessingPolicyValue.USE_DEFAULT_SERVANT),

                        };

 

                        POA accountPOA =
rootPOA.create_POA("bank_account_poa",

                                                manager,
accountPolicies);

                        

                        AccountImpl accountServant = new
AccountImpl(orb);

                        accountPOA.set_servant(accountServant);

 

                        org.omg.CORBA.Object obj =
accountPOA.create_reference("IDL:Bank/Account:1.0"); 

                        

                        try{

                                    String fname = "accout.ior";

                                    PrintWriter out = new
PrintWriter(new FileWriter(fname));

 
out.println(orb.object_to_string(obj));

                                    out.flush();

                                    out.close();

                        }

                        catch(IOException ex){

                                    ex.printStackTrace();

                        }

                        manager.activate();

 

 

            Can you please help me? Can you tell me any good document
which will tell about DSI?

 

            Thanks.

-Anil Pandge.

_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html