public void populateReference ( final Reference reference , final Map properties , final Map defaults ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "populateReference" , new Object [ ] { reference , properties , defaults } ) ; } // Make sure no-one can pull the rug from beneath us. synchronized ( properties ) { // Convert the map of properties into an encoded form, where the // keys have the necessary prefix on the front, and the values are // all Strings. Map < String , String > encodedMap = getStringEncodedMap ( properties , defaults ) ; for ( Map . Entry < String , String > entry : encodedMap . entrySet ( ) ) { reference . add ( new StringRefAddr ( entry . getKey ( ) , entry . getValue ( ) ) ) ; } } //sync if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , "populateReference" ) ; } }
Dynamically populates the reference that it has been given using the properties currently stored in this ConnectionFactory . Note that this way of doing things automatically handles the adding of extra properties without the need to change this code .