Hi all,

The CarbonTomcatSessionPersistenceManager
<https://github.com/wso2/carbon-deployment/blob/v4.7.0/components/webapp-mgt/org.wso2.carbon.webapp.mgt/src/main/java/org/wso2/carbon/webapp/mgt/CarbonTomcatSessionPersistentManager.java>
[1]
is extending the PersistentManagerBase
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.geronimo.ext.tomcat/catalina/7.0.39.2/org/apache/catalina/session/PersistentManagerBase.java#PersistentManagerBase.findSession%28java.lang.String%29>
[2]
which writes the session objects to the mysql database using the JDBCStore
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.geronimo.ext.tomcat/catalina/7.0.39.2/org/apache/catalina/session/JDBCStore.java>
[3].
AFAIK in the JDBCStore, save(Session)
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.geronimo.ext.tomcat/catalina/7.0.39.2/org/apache/catalina/session/JDBCStore.java#JDBCStore.save%28org.apache.catalina.Session%29>
saves
the session after writing it to an OutputStream. Respectively in
load(String)
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.geronimo.ext.tomcat/catalina/7.0.39.2/org/apache/catalina/session/JDBCStore.java#JDBCStore.load%28java.lang.String%29>
it
is loaded by an InputStream. But the session object has the UserRegistry
object with the key "WSO2RegistryRoot", which has unserializable objects in
the tree.

When I tried to do the same with a custom session manager, it fails giving
the following error.

*ERROR - RegistryAdminServiceClient Error occurred while checking registry
mode*
*org.apache.axis2.AxisFault: The input stream for an incoming message is
null.*
* at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:93)*
* at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:68)*
* at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:348)*
* at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445)*
* at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)*
* at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)*

Basically, in the custom implementation, it doesn't have the UserRegistry
in the session received by  RegistryAdminServiceClient. But when I try with
CarbonTomcatSessionPersistenceManager it has the UserRegistry in the
session. The question is, how is it added to the session object. Any idea
how it works?


[1]
https://github.com/wso2/carbon-deployment/blob/v4.7.0/components/webapp-mgt/org.wso2.carbon.webapp.mgt/src/main/java/org/wso2/carbon/webapp/mgt/CarbonTomcatSessionPersistentManager.java

[2]
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.geronimo.ext.tomcat/catalina/7.0.39.2/org/apache/catalina/session/PersistentManagerBase.java

[3]
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.geronimo.ext.tomcat/catalina/7.0.39.2/org/apache/catalina/session/JDBCStore.java

Thanks & Regards
-- 
-- 
Hareendra Chamara (BSc.Eng(Hons))
Sysco acceleration,
SyscoLabs(Pvt) Ltd
Mobile : +94 (0) 767 184161 <94767184161> | +65 (9) 425 2874 <6594252874>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to