Has anyone else attemtpted the following. I figure it is easiser to let BOF do file management (locate and download correct version) rather than me rolling my own code...
http://donr7n.wordpress.com/2008/11/24/configuring-a-deployed-bof-module
I am using 6.6 Developer Edition
I have tried various options and settings but have not been able to get the property file to download or to be accessable by my BOF module.
The file is being created and versioned in the repository (by Composer) but is not downloaded and available to my module.
Looking at BOF content.xml, there is no record of this file. There also does not appear to be a supporting XML field for this? So was this feature ever implemented?
Module Record in BOF cache content.xml
|
---|
<Entry ObjectId="0bde75d18000217a" ObjectName="SimplifyPublishing"> <ImplClass>com.SimplifyPublishing</ImplClass> <VersionStamp>41</VersionStamp> <BofVersion>1.0</BofVersion> <ObjectType/> <Files> <File FilePath="C:\Documentum\cache\6.6.0.039\bof\documentum\09de75d180003931.jar" IsArchive="true" IsSandboxed="true"/> </Files> <Interfaces> <Interface>com.documentum.fc.client.IDfModule</Interface> <Interface>com.documentum.fc.methodserver.IDfMethod</Interface> </Interfaces> <Dependencies/> <Privileged>false</Privileged> <PrivilegeRoles/> <MinDFCVersion/> <ClassLoadingFilters/> </Entry> |
Code to load properties file from CLASSPATH.
|
---|
Properties ret = null; InputStream in = null; // Properties pps = null;
// first try loading the specified file explicitly File f = new File(propertiesFile); if (f.exists()) { in = new FileInputStream(f); }
// then try loading it as a class resource file if (in == null) { in = getClass().getResourceAsStream(propertiesFile); }
// finally, try loading it as a class loader resource file (on the // classpath) if (in == null) { Class c = getClass(); in = c.getClassLoader().getResourceAsStream(propertiesFile); }
if (in != null) { ret = new Properties(); ret.load(in); |