[This is in response to a private email to Achim; I'm going to continue the
conversation on the OPS4J general list. --sgp]

On Fri, Dec 7, 2012 at 11:07 AM, Achim Nierbeck <bcanh...@googlemail.com>wrote:

>
> Regarding the Singleton approach, I'm not quite sure we are inline here.
> Pax for Vaadin only registers a Servlet as a HttpService, Pax Web does the
> connection to the Jetty HTTPServer world. Your suggestion would imply any
> HTTPService implementation isn't multi-user capable, cause all are
> Singletons.
>

The problem is specific to the way Vaadin requires that a new instance of
the Application object has to be created for and stored with the session
that comes through the servlet engine. Otherwise you have the problem that
was described in PAXVAADIN-6, where you can load one of the samples, do
some stuff with it, and then move to another browser or computer and load
the sample and see the *exact* same application state!


> Afaik jetty had an issue to this and this was fixed in the past by pax-web.
>
> I did take a quick look at the code, and your suggestion in using the
> Original Vaadin Servlet
> https://github.com/sgp/org.ops4j.pax.vaadin/compare/master...PAXVAADIN-6#L1R62
> is surely gonna mess up with classloader issues. That's why the AppServlet
>
> https://github.com/ops4j/org.ops4j.pax.vaadin/blob/master/pax-vaadin-service/src/main/java/org/ops4j/pax/vaadin/internal/servlet/VaadinApplicationServlet.java#L106
> does the same as the Orginal Vaadin Servlet.
>

I didn't see any classloader issues, but then again, I haven't tried doing
anything fun like actually access something from another bundle within my
project yet. I'll revert those bits in my next commit and try to get to a
common ground.


> So I'm not sure about the current approach. We surely will need to discuss
> this :)
>

Neither was I. I felt that my approach was way to facile to be correct,
which is why I wanted to get in touch!

Scott
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to