2011/8/19 Steve Ratay <steve.ra...@yahoo.com>: > I have a custom realm that is quite complex and uses a variety of third party > libraries, including Spring. In Tomcat 5.5, I placed the Realm and all of > the JARs it depended upon in the server/lib directory. This kept these > classes in the Catalina class loader, which was not visible to any web > applications. This was the perfect solution since I do not want to > automatically include all of these JARs in the classloading hierarchy of my > web applications. > > > > Now I am trying to migrate to Tomcat 7, and having a hard time figuring out a > way to create the same configuration. I see that there is no longer a > Catalina classloader or any classloader that won't be visible to the web > applications.
It is possible to reenable classloader hierarchy of Tomcat 5.5 by editing Tomcat 7's catalina.properties file, but I heard that there is a catch that usually you cannot just place your files into server classloader - there is some dependency between components and some jars have to be moved into this classloader as well. YMMV. > Is that accurate or is there some way to isolate certain JAR files and >prevent them from being visible to my web applications? Just random thought - maybe you can create your own instance of UrlClassLoader (it is easy) and load your classes through it? Though I do not know why the same wouldn't go with the server classloader discussed above. > Also, I'm thinking that another option could be to have a separate web >application for authentication. Would I be able to do this and still >integrate with the Realm concept in Tomcat? Web applications are not guaranteed to start in any certain order. A Web application can be restarted at any time (and its classloader is stopped and disposed when a web application stops). Web applications are isolated and do not see each other's ckassloaders. Those are main problems if you want to deploy a shared component as a "web application". > > As a side note, I'm working in a portal environment so I use the SSO valve > and basically want a single point of authentication for all web applications > (i.e. portlets) deployed in the servlet container. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org