You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Michael Speer (JIRA)" <ji...@apache.org> on 2007/10/15 21:35:51 UTC
[jira] Created: (BEEHIVE-1208) Handlers class does not allow
alternate storagehandler to be loaded from beehive-netui-config.xml
Handlers class does not allow alternate storagehandler to be loaded from beehive-netui-config.xml
--------------------------------------------------------------------------------------------------
Key: BEEHIVE-1208
URL: https://issues.apache.org/jira/browse/BEEHIVE-1208
Project: Beehive
Issue Type: Bug
Components: NetUI
Affects Versions: 1.0.2
Environment: Solaris sparc 10 , bea 9.2 mp1
Reporter: Michael Speer
It should be possible to replace DeferredSessionStorageHandler in the beehive-netui-config.xml like
<pageflow-handlers>
<storage-handler>
<handler-class>
org.apache.beehive.netui.pageflow.internal.SimpleSessionStorageHandler
</handler-class>
</storage-handler>
</pageflow-handlers>
This will fail every time b/c
in Handlers.java
in the method CreateHandler()
Beehive was using the no argument constructor and this will fail b/c the StorageHandler needs the constructed with the current ServletContext to take effect.
I think this is a simple oversight as the SevletContext was passed into this method just was not used.
I simply added the following code and it works just fine.
Class[] paramTypes = {ServletContext.class};
Constructor constructor = handlerClass.getConstructor(paramTypes);
Object[] args = {servletContext};
Handler handler = ( Handler ) constructor.newInstance(args);
return handler;
Michael
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.