Carsten Ziegeler skrev:
Alexander Klimetschek wrote:
The optimal solution would be the OSGi support (!?), but this is too
much work and won't be part of cocoon 2.2. My patch is a lot simpler,
just fixing the BootstrapClassLoaderManager and the blocks-fw (where I
just implemented the not-yet implemented methods of those servlet
interfaces). Then it is just a simple configuration of the block servlet
using the ShieldingServlet. Here is the xml snippet, the full config can
be found in the jira issue:
...
So can this made be simpler? Having standard paths in the block
directory for the shielded libs and some config option to enable
shielding, which could be integrated directly in the BlockServlet?
Hmm, yes, what about directly adding the support to the BlockServlet
(where imho it belongs):
<bean id="my-block" class="org.apache.cocoon.blocks.BlockServlet">
<property name="mountPath" value="/my-block" />
<property name="blockContextURL"
value="blockcontext:/mindquarry-solr-block/" />
<property name="properties">
<map>
<entry key="classpath-file"
value="/paranoid-classpath.txt" />
<entry key="classloader-debug" value="true" />
<entry key="classloader-factory"
value="org.apache.cocoon.classloader.DefaultClassLoaderFactory"
</map>
</property>
</bean>
And yes, I think this should support some default paths, like
{blockdir}/config/libs and {blockdir}/config/classes.
Seem like a good solution to me. I would prefer putting this
functionality in a ShieldingBlockServlet that extends the BlockServlet
though. If we put to much extras in the BlockServlet it will be hard for
people to understand what it does and to contribute to make it stable.
/Daniel