[
http://jira.magnolia-cms.com/browse/MGNLDATA-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fabrizio Giustina reopened MGNLDATA-100:
----------------------------------------
no way, we can't use the the IsModuleInstalledOrRegistered way:
RegisterWorkspaceForCacheFlushingTask needs to be passed to the constructor so
it will fail with a noclassdeffound exception if the media module is not
available, far before the task can check if the module is registered (remember
the RegisterWorkspaceForCacheFlushingTask is the cache module).
Catching the exception is IMHO the safer way at this moment, other solutions
would be:
- using a task which is not in the cache module itself (better, since this only
adds a node in the config and there is no actual cache module dependency... but
we will have to move the task to core or duplicate it everywhere)
- adding a specific if block in the moduleVersionHandler, by triggering the
RegisterWorkspaceForCacheFlushingTask instantiations only when the cache module
is detected: pretty bad and unsafe (note that this will also mean that the
module version handler will crash in case on leftover jcr configuration for a
removed cache module)
so, rolling back to the catch() solution at the moment, it makes no sense that
lots of modules depends on the cache module just because they need to use a
task found in the cache module when the cache module is installed...
> Make dependency from the cache module optional
> ----------------------------------------------
>
> Key: MGNLDATA-100
> URL: http://jira.magnolia-cms.com/browse/MGNLDATA-100
> Project: Magnolia Data Module
> Issue Type: Improvement
> Affects Versions: 1.4.2
> Reporter: Fabrizio Giustina
> Assignee: Fabrizio Giustina
> Fix For: 1.x
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------