[
https://issues.apache.org/jira/browse/FELIX-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ted stockwell updated FELIX-1120:
---------------------------------
Attachment: patch.txt
A patch file for the customization.
After thinking about how to customize the system bundle cache, with a eye on
not making the base code bigger, it struck me that the simplest thing to do
would be to pass a BundleCache implementation in the configuration map that is
passed to the Felix construction, as is done for system activators.
So for now I have added this code to the FelixConstants class...
public static final String SYSTEMBUNDLE_BUNDLE_CACHE
= "felix.systembundle.bundle.cache";
and I added this code to the Felix.init method...
// Create the bundle cache, if necessary, so that we can reload any installed
bundles.
m_cache= (BundleCache)
m_configMutableMap.get(FelixConstants.SYSTEMBUNDLE_BUNDLE_CACHE);
if (m_cache == null)
{
try
{
m_cache = new BundleCache(m_logger, m_configMap);
}
catch (Exception ex)
{
m_logger.log(Logger.LOG_ERROR, "Error creating bundle cache.", ex);
throw new BundleException("Error creating bundle cache.", ex);
}
}
then in my code I do this....
configMap.put(FelixConstants.SYSTEMBUNDLE_BUNDLE_CACHE, new
Felix4GAEBundleCache());
Felix framework= new Felix(configMap);
I have attached a patch file if you are inclined to apply these changes.
> Enable BundleCache customization
> --------------------------------
>
> Key: FELIX-1120
> URL: https://issues.apache.org/jira/browse/FELIX-1120
> Project: Felix
> Issue Type: Improvement
> Components: Framework
> Reporter: ted stockwell
> Attachments: patch.txt
>
>
> Make is possible to configure Feliz with a custom BundleCache
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.