[
https://issues.jboss.org/browse/CDI-114?page=com.atlassian.jira.plugin.sy...
]
Vincent Massol commented on CDI-114:
------------------------------------
{quote}So you allow that your users upload some jar which you then dynamically add to you
Classpath?
Or how does the XWiki container become aware of that new functionality?
Does XWiki use OSGi (which would be suited for such a dynamic reload)?
Or do you roll your own ClassLoader system?{quote}
Yes admin users (or any user having the right permission) can install JAR extensions.
XWiki doesn't use OSGI. We asked ourselves the question initially but it was way too
compex and heavy so we decided that we wouldn't be able to have several versions of
the same class with different versions in XWiki. We have a simple custom Component system
to manage this (the main class is here if you're curious:
https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwi...).
We do have our own classloader (we have one per namespace - XWiki supports multiple wikis
and a namespace is for example one wiki, to provide isolation per wiki). When a JAR
extension is uninstalled, we recreate the classloader, removing the JAR URL. FYI:
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/x...
and and
https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-core/xwi...
(this later one is just there to overcome JDK bugs/limitations).
Allow registration of beans at runtime
--------------------------------------
Key: CDI-114
URL:
https://issues.jboss.org/browse/CDI-114
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Beans
Affects Versions: 1.0
Reporter: Vincent Massol
Fix For: TBD
I have use cases where I need to register a bean dynamically at runtime (see the forum
reference link for a detailed description of the use case).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)