169 NamingContext theNewContext = 170 NamingContextHelper.narrow( 171 nsPOA.create_reference_with_id( newKey.getBytes( ), 172 NamingContextHelper.id( )) ); 173 return theNewContext; 174 } 175 catch( org.omg.CORBA.SystemException e ) 176 { 177 throw e; 178 } 179 catch( java.lang.Exception e ) 180 { 181 //throw e; 182 } 183 return null; 184 } 185 186 /** 187 * getObjectReferenceFromKey returns the Object reference from the objectkey using POA.create_reference_with_id method 188 * @param Object Key as String 189 * @returns reference an CORBA.Object. 190 */ 191 org.omg.CORBA.Object getObjectReferenceFromKey( String key ) 192 { 193 org.omg.CORBA.Object theObject = null; 194 try 195 { 196 theObject = nsPOA.create_reference_with_id( key.getBytes( ), NamingContextHelper.id( ) ); 197 } 198 catch (Exception e ) 199 { 200 theObject = null; 201 } 202 return theObject; 203 } 204 205 /** 206 * getObjectKey gets the Object Key from the reference using POA.reference_to_id method 207 * @param reference an CORBA.Object. 208 * @returns Object Key as String 209 */ 210 String getObjectKey( org.omg.CORBA.Object reference ) 211 { 212 byte theId[]; 213 try 214 { 215 theId = nsPOA.reference_to_id( reference ); 216 } 217 catch( org.omg.PortableServer.POAPackage.WrongAdapter e ) 218 { 219 return null; 220 } 221 catch( org.omg.PortableServer.POAPackage.WrongPolicy e ) 222 { 223 return null; 224 } 225 catch( Exception e ) 226 { 227 return null; 228 } | 169 NamingContext theNewContext = 170 NamingContextHelper.narrow( 171 nsPOA.create_reference_with_id( newKey.getBytes( ), 172 NamingContextHelper.id( )) ); 173 return theNewContext; 174 } 175 catch( org.omg.CORBA.SystemException e ) 176 { 177 throw e; 178 } 179 catch( java.lang.Exception e ) 180 { 181 //throw e; 182 } 183 return null; 184 } 185 186 /** 187 * getObjectReferenceFromKey returns the Object reference from the objectkey using POA.create_reference_with_id method 188 * @param Object Key as String 189 * @return a CORBA.Object reference. 190 */ 191 org.omg.CORBA.Object getObjectReferenceFromKey( String key ) 192 { 193 org.omg.CORBA.Object theObject = null; 194 try 195 { 196 theObject = nsPOA.create_reference_with_id( key.getBytes( ), NamingContextHelper.id( ) ); 197 } 198 catch (Exception e ) 199 { 200 theObject = null; 201 } 202 return theObject; 203 } 204 205 /** 206 * getObjectKey gets the Object Key from the reference using POA.reference_to_id method 207 * @param reference an CORBA.Object. 208 * @return Object Key as String 209 */ 210 String getObjectKey( org.omg.CORBA.Object reference ) 211 { 212 byte theId[]; 213 try 214 { 215 theId = nsPOA.reference_to_id( reference ); 216 } 217 catch( org.omg.PortableServer.POAPackage.WrongAdapter e ) 218 { 219 return null; 220 } 221 catch( org.omg.PortableServer.POAPackage.WrongPolicy e ) 222 { 223 return null; 224 } 225 catch( Exception e ) 226 { 227 return null; 228 } |