On 1/20/2011 8:20 PM, Martin Grotzke wrote:
On Thu, Jan 20, 2011 at 2:24 PM, Reinwald Warapen<reinwal...@directi.com>wrote:
@Martin :Actually I was trying to write my own Session Manager since i
wanted to store the session into mysql. The issue was when deserializing
Tomcat could not find the classes since the objects stored in the sessions
are related to my web-app.
Reading the docs I found another solution which worked in my case
http://wiki.apache.org/tomcat/HowTo#How_do_I_add_JARs_or_classes_to_the_common_classloader_without_adding_them_to_.24CATALINA_HOME.2BAC8-common.2BAC8-lib.3F

Another option would be to extend PersistentManager to satisfy your
requirements, as it provides much of what you want. IIRC the main "issue"
for you was that swapOut/swapIn is done in the background thread right now.
If you extend PersistentManager you could reuse JDBCStore (and friends) -
this would also be a nice contribution to the tomcat community :-)

Cheers,
Martin
Will give it a thought. Will let you know how it goes :)



@ All : Also wanted to mentioned that the memcached-session-manager which
Martin has created is an awesome idea if you want to back up sessions to
memcache.


Christopher Schultz-2 wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

On 1/19/2011 2:27 PM, Reinwald Warapen wrote:

On 1/20/2011 12:47 AM, Mark Thomas wrote:

On 19/01/2011 19:17, Reinwald Warapen wrote:

I am writing a serializer/deserializer functionality (used in my
custom
session manager that extends ManagerBase). When deserializing I get
loads of java.lang.ClassNotFoundException: exceptions. All the classes
for which the exceptions are thrown can be found in my
webapp/WEB-INF/classes. How do I configure it such that the
webapp/WEB-INF/classes are visible to the libs placed in Tomcat/lib.?

http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

I did go through this before posting here. Its mentioned "All unpacked
classes and resources in |$CATALINA_HOME/lib|, as well as classes and
resources in JAR files are made visible through this class loader". But
theres no mention about the visibility of the webapp/WEB-INF/classes to
the classes in |$CATALINA_HOME/lib.So is there no way to configure the
same?

Pretty much no.

Tomcat can deserialize your webapp's sessions after a redeploy because
it uses the webapp's ClassLoader to resolve everything. In your case,
you have no way to get to the webapp's ClassLoader so you are pretty
much stuck.

What kind of serialization/deserialization are you writing? Why is this
running at the Tomcat level instead of within your webapp?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk03a0wACgkQ9CaO5/Lv0PBikgCfYuyPaY/XyqkiPJP7MtqVsSCW
PkYAmgP7lRbxvV7ilDeKTV4BJwQKEmui
=dkUe
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to