Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 4 of 6
/**
* Gets the reference for the library.
*
* @returns the reference
*
*/
public
Reference
getReference() {
Reference reference = null;
try {
// Store the properties as an array of bytes.
ByteArrayOutputStream bytearrayoutputstream = new
ByteArrayOutputStream();
m_properties.store(bytearrayoutputstream, null);
// Create a reference to the library.
reference = new Reference(
JNDILibrary.class.getName(),
new BinaryRefAddr("properties", bytearrayoutputstream.toByteArray()),
JNDILibraryFactory.class.getName(),
null
);
}
catch (Exception exception) {
exception.printStackTrace();
}
return reference;
}
The JNDILibraryFactory class is used on the client-side to create an instance of the JNDILibrary class when a JNDI library is looked up in a directory service. JNDILibraryFactory's primary operation: transform the stored
binary property-file information into live property information. This transformation allows the new instance to function identically
to the version that was stored: