On Monday, January 10, 2011, Jared Bunting wrote: > I'm only just starting to learn about OSGI and I don't know anything about > Eclipse RAP so I may be way off the mark here. It looks like shiro is > getting loaded twice - once by your webapp (or whatever does the filtering) > and once by your RAP application. Seems like both of them (assuming they > are both bundles?) should do an Import-Package on shiro (and have a shiro > bundle) or one should Export-Package on shiro and the other should import > it. From what I've read (ie. take it with a grain of salt), I would think > this would allow your original code to work.
Import or export declarations are not the problem here. OSGi uses special class loaders and the OSGi class loader is definitely another one than the class loader of the web container (tomcat) that executes the initial authentication with Shiro. So what's needed is a way to transfer the state of the subject (and possibly the security manager) to a (probably new) subject that got created with the correct class loader. Lothar
