Skip to content

Commit

Permalink
PAYARA-416 Fixes #395
Browse files Browse the repository at this point in the history
Also removes error in Grizzly boot due to incomplete HTTP2 support
  • Loading branch information
Steve Millidge committed Aug 22, 2015
1 parent 9fa898f commit c3c6202
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ protected void configureHttp2Support(final ServiceLocator locator,
final Http2 http2Element,
final FilterChainBuilder builder,
final boolean secure) {
if (http2Element == null || http2Element.getEnabled()) {
if (http2Element != null && http2Element.getEnabled()) {

// first try to lookup a service appropriate for the mode
// that has been configured.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface Http2 extends ConfigBeanProxy, PropertyBag {
final int MAX_CONCURRENT_STREAMS = 100;
final int INITIAL_WINDOW_SIZE_IN_BYTES = 64 * 1024 - 1;
int MAX_FRAME_PAYLOAD_SIZE_IN_BYTES = (1 << 24) - 1;
final boolean ENABLED = true;
final boolean ENABLED = false;

/**
* Enables HTTP2 support.
Expand Down
7 changes: 6 additions & 1 deletion nucleus/grizzly/nucleus-grizzly-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-server</artifactId>
<artifactId>grizzly-http2</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-npn-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.main.grizzly</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ public PayaraMicroRuntime bootStrap() throws BootstrapException {

if (alternateDomainXML != null) {
gfproperties.setConfigFileReadOnly(false);
gfproperties.setConfigFileURI("file://" + alternateDomainXML.getAbsolutePath());
gfproperties.setConfigFileURI("file:///" + alternateDomainXML.getAbsolutePath().replace('\\', '/'));
} else {
if (noCluster) {
gfproperties.setConfigFileURI(Thread.currentThread().getContextClassLoader().getResource("microdomain-nocluster.xml").toExternalForm());
Expand All @@ -667,7 +667,9 @@ public PayaraMicroRuntime bootStrap() throws BootstrapException {
if (!configFile.exists()) {
installFiles(gfproperties);
} else {
gfproperties.setConfigFileURI("file://" + rootDir.getAbsolutePath() + File.separator + "config" + File.separator + "domain.xml");
String absolutePath = rootDir.getAbsolutePath();
absolutePath = absolutePath.replace('\\', '/');
gfproperties.setConfigFileURI("file:///" + absolutePath + "/config/domain.xml");
gfproperties.setConfigFileReadOnly(false);
}

Expand Down Expand Up @@ -902,7 +904,7 @@ private void scanArgs(String[] args) {
+ "--domainConfig overrides the complete server configuration with an alternative domain.xml file\n"
+ "--minHttpThreads the minimum number of threads in the HTTP thread pool\n"
+ "--maxHttpThreads the maximum number of threads in the HTTP thread pool\n"
+ "--hzConfigFile the hazelcast-configuration file to use to override the in-built hazelcast cluster configuration"
+ "--hzConfigFile the hazelcast-configuration file to use to override the in-built hazelcast cluster configuration\n"
+ "--autoBindHttp sets autobinding of the http port to a non-bound port\n"
+ "--autoBindSsl sets autobinding of the https port to a non-bound port\n"
+ "--autoBindRange sets the maximum number of ports to look at for port autobinding\n"
Expand Down

0 comments on commit c3c6202

Please sign in to comment.