InfoCenter Home > 5.7.6.1: Getting a reference to a Current objectThe Current class contains an implementation of the CORBA SecurityLevel2 Current object. The class provides access to security-level 2 function as defined in the Object Management Group (OMG) CORBA Security Service specification. A Current object allows you to obtain or manipulate the credentials that you want to use in your program. You can obtain a Current object in either the client or the server. However, you can only get a Current object if the Security Service run time has been installed and the ORB has been initialized. To obtain a Current object, using following steps:
Code sample: obtaining a Current object... // Get the current ORB instance. com.ibm.CORBA.iiop.ORB orb = com.ibm.ejs.oa.EJSORB.getORBInstance(); // Get the security Current object. if (orb != null) org.omg.SecurityLevel2.Current securityCurrent = (org.omg.SecurityLevel2.Current)orb.resolve_initial_references("SecurityCurrent"); if (securityCurrent == null) System.out.println("Security has not been initialized"); ... |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|