Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for @Push-Annotion? #51

Closed
stenersen opened this issue May 27, 2014 · 19 comments
Closed

Support for @Push-Annotion? #51

stenersen opened this issue May 27, 2014 · 19 comments
Labels

Comments

@stenersen
Copy link

Will the @Push-Annotion be supported for UIs? Right now the sample application does not start when i enable Push-Support. In my application (running in Tomcat) the server starts but the scopes get messed up.

@peholmst
Copy link
Owner

Web-socket based Push is currently not supported, but will hopefully be in the future.

@peholmst
Copy link
Owner

The problem is also present for CDI: http://dev.vaadin.com/ticket/12464

@membersound
Copy link

Please support @Push in the future.
Event @Push(transport = Transport.LONG_POLLING) results in:

java.lang.IllegalStateException: Cannot suspend a response longer than the session timeout. Increase the value of session-timeout in web.xml

Is there any other workaround to get push+vaadin+spring atm?

@LukaszByczynski
Copy link
Contributor

Increase the value of session-timeout in web.xml. Push with Long Polling works with Vaadin and this Spring Addon.

@membersound
Copy link

So how long would the timeout have to be? The default (embedded) tomcat timeout is already 30mins. Why doesn't it work with it?

I don't have any web.xml as I simply extend SpringApplicationAwareServlet. How can I set the sessiontimeout in annotation based config for vaadin?

If it'd be in a http context, one could write:
HttpSession session = request.getSession();
session.setMaxInactiveInterval(10*60);

But how in vaadin?

@peholmst
Copy link
Owner

You can configure the session timeout by adding a server.sessionTimeout property to application.properties. As for why it does not work with the defaults, I have to investigate.

@peholmst
Copy link
Owner

Apparently, when using Vaadin in Spring Boot, the session timeout it set to -60 for some reason unless you set it explicitly in application.properties. I will try to find out why and make sure it is set to something more sensible. In the meantime, specify a timeout manually in application.properties.

@membersound
Copy link

Ok it really works using the property. Thanks for your support!
I can totally live with it, as I would later probably want to define the session timeout myself anyhow.

@peholmst peholmst added this to the 0.0.3 milestone Aug 25, 2014
@peholmst peholmst added the bug label Aug 26, 2014
@Alan47
Copy link

Alan47 commented Aug 26, 2014

Hi,

I'm trying to get Vaadin's server push running alongside Vaadin4Spring as well. Being unaware of this issue, I blindly added the dependency to vaadin-push to my gradle build today and added @Push to the UI. Here's the error I'm getting:

o.a.c.AtmosphereFramework [JDK14LoggerAdapter.java:588] SessionSupport error. Make sure you define org.atmosphere.cpr.SessionSupport as a listener in web.xml instead

... well that's pretty much all information I have available right now. I don't even have a web.xml at the moment (never needed one). Any help on this would be much appreciated. Currently I am using Vaadin 7.3.0 RC1.

Thanks,

Alan

@peholmst
Copy link
Owner

DId you try to add server.sessionTimeout to application.properties?

@Alan47
Copy link

Alan47 commented Aug 31, 2014

Hi,

sorry for the late response, was a busy week. Well, the thing is that we do not have such a file so far. Where would that file go? Any reasonable defaults for the server.sessionTimeout?

@peholmst
Copy link
Owner

I have plans to add a default to the next release (I actually don't know why it is set to -60 when using Spring Boot). In the meantime, add application.properties to the root of your classpath and specify the property manually.

@Alan47
Copy link

Alan47 commented Sep 1, 2014

Hello again,

thank you for your response. I've added an "application.properties" file in src/main/resources", just like in the example you've uploaded. In fact, I just copied your file entirely.

However, I still get the following warning from the atmosphere framework on spring startup:

SessionSupport error. Make sure you define org.atmosphere.cpr.SessionSupport as a listener in web.xml instead

It's only a warning, though. Is that normal, i.e. will it break the functionality of Vaadin Server Push?

@peholmst
Copy link
Owner

peholmst commented Sep 3, 2014

I'm not sure. I have to investigate.

@peholmst peholmst removed this from the 0.0.3 milestone Dec 5, 2014
@stenersen stenersen removed this from the 0.0.3 milestone Dec 5, 2014
@ghost
Copy link

ghost commented Jan 22, 2015

Just to be clear, is 'server.sessionTimeout' not the same as 'server.session-timeout' ? And what are the time units?

@peholmst
Copy link
Owner

server.sessionTimeout should be the same as server.session-timeout. And the time units is seconds.

@peholmst
Copy link
Owner

peholmst commented Feb 9, 2015

See #169

@peholmst
Copy link
Owner

See #209 #203

@peholmst
Copy link
Owner

peholmst commented Aug 4, 2015

Closing since this is no longer relevant to Vaadin4Spring. Any issues should be reported to the official Vaadin Spring add-on project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants