Skip to content

Conversation

@oliemansm
Copy link
Member

I updated your subscription support branch by merging in all latest changes. Created an example in the spring-boot-starter project as well that works now (with the FallbackSubscriptionProtocolHandler, haven't tested the ApolloSubscriptionProtocolHandler yet). Increased the version number to 6.0.0 since there are a lot of breaking changes in the public API here. Would like to merge this one asap so people can start using it, so please review.

Will push the PR for the spring-boot-starter project in a minute as well.

apottere and others added 13 commits November 27, 2017 11:14
…n-support

# Conflicts:
#	build.gradle
#	gradle.properties
#	gradle/wrapper/gradle-wrapper.properties
#	src/main/java/graphql/servlet/GraphQLContext.java
#	src/main/java/graphql/servlet/GraphQLServlet.java
#	src/main/java/graphql/servlet/SimpleGraphQLServlet.java
…n-support

# Conflicts:
#	build.gradle
#	gradle.properties
#	gradle/wrapper/gradle-wrapper.properties
#	src/main/java/graphql/servlet/GraphQLContext.java
#	src/main/java/graphql/servlet/GraphQLServlet.java
#	src/main/java/graphql/servlet/SimpleGraphQLServlet.java
@apottere
Copy link
Contributor

apottere commented Jul 24, 2018

@oliemansm I pushed one commit to just finish up stuff I had forgotten to implement. I was able to test the apollo protocol, do you want to test the fallback one?

I was getting some strange errors in the logs after I shut down my test server and the client was trying to reconnect, for some reason when there were reconnections shutting down took about 10-15s.

I don't think it's a huge deal, so if everything looks good to you go ahead and merge it and I'll release this and the servlet.

@apottere
Copy link
Contributor

apottere commented Jul 24, 2018

Sample of the error:

2018-07-24 14:35:12.882 ERROR 55863 --- [ XNIO-2 task-16] io.undertow.request                      : UT005023: Exception handling request to /subscriptions

javax.servlet.ServletException: UT010051: Deployment spring-boot has stopped
	at io.undertow.servlet.core.ManagedServlet.forceInit(ManagedServlet.java:202) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletChain.forceInit(ServletChain.java:116) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:60) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) ~[undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) ~[undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) ~[undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) [undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]

2018-07-24 14:35:12.883 ERROR 55863 --- [ XNIO-2 task-16] io.undertow.request                      : UT005022: Exception generating error page /error

javax.servlet.ServletException: UT010051: Deployment spring-boot has stopped
	at io.undertow.servlet.core.ManagedServlet.forceInit(ManagedServlet.java:202) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletChain.forceInit(ServletChain.java:116) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:60) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:479) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:412) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:319) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) [undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-1.4.25.Final.jar:1.4.25.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]

@oliemansm
Copy link
Member Author

@apottere Great thanks, I'll take a look right away!

@oliemansm oliemansm merged commit bab4e0e into master Jul 24, 2018
@apottere apottere deleted the subscription-support branch July 24, 2018 18:49
@snowe2010
Copy link

Hi, we just recently updated past the version that this PR was merged into, and are immediately encountering an issue. Why was setSubject() removed from GraphQLContext in this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants