🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.object.corba
Article #59

Printing default policies associated with POA

#59
From: Ashwani Kalra
Date: Thu, 04 Oct 2001 05:53
23 lines
1601 bytes
Hi,
I want to print the default policy values associated with any POA . 
Say for example for ID_ASSIGNMENT_POLICY policy I want to check if its
SYSTEM_ID or USER_ID
Following code snippet I am writing but I am getting nullpointer
exception. on the first line.
assuming poa is created before.

switch(poa._get_policy(ID_ASSIGNMENT_POLICY_ID.value).policy_type())
{
 case org.omg.PortableServer.IdAssignmentPolicyValue._SYSTEM_ID :
        str="SYSTEM_ID";
        break;
 case org.omg.PortableServer.IdAssignmentPolicyValue._USER_ID  :
	str="USER_ID";
	break;
}
System.out.println("IDAssignmentPolicy :"+str);

Environment :visibroker 4.5 for java,win2k

TIA
Ashwani
Technical Details
Message-ID: <e33c2814.0110032153.56ab6758@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f753e,1e4abcada2ac7ba0,start
X-Google-Attributes: gidf753e,public
X-Google-Thread: 109156,1e4abcada2ac7ba0,start
X-Google-Attributes: gid109156,public
X-Google-ArrivalTime: 2001-10-03 22:53:22 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: ashwani_kalra@yahoo.com (Ashwani Kalra)
Newsgroups: comp.object.corba,borland.public.visibroker
Subject: Printing default policies associated with POA
Date: 3 Oct 2001 22:53:21 -0700
Organization: http://groups.google.com/
Lines: 23
Message-ID: <e33c2814.0110032153.56ab6758@posting.google.com>
NNTP-Posting-Host: 203.122.29.68
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1002174802 15638 127.0.0.1 (4 Oct 2001 05:53:22 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 4 Oct 2001 05:53:22 GMT