Skip to content

Commit e59df22

Browse files
committedJun 25, 2024·
Enable WebSockets by default
+ See comments on xh/hoist-react#3702
1 parent d196009 commit e59df22

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed
 

‎CHANGELOG.md

+17-11
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,29 @@
22

33
## 21.0-SNAPSHOT - unreleased
44

5+
### ⚙️ Technical
6+
7+
* Websockets are now enabled by default. To disable, add `hoist.enableWebSockets = false` to your
8+
project's `application.groovy` file (note the lowercase "a" to ensure you have the correct one).
9+
510
## 20.1.0 - 2024-06-21
611

712
### 🎁 New Features
813

9-
* LdapService `searchOne` and `searchMany` methods have been made public.
10-
* LdapPerson class now includes `displayName`, `givenname`, and `sn` fields.
14+
* `LdapService.searchOne` and `searchMany` methods have been made public.
15+
* `LdapPerson` class now includes `displayName`, `givenname`, and `sn` fields.
1116

1217
### 🐞 Bug Fixes
1318

14-
* LdapPerson class `email` key changed to `mail` to match LDAP attribute.
19+
* `LdapPerson` class `email` field changed to `mail` to match LDAP attribute.
1520

1621
## 20.0.2 - 2024-06-05
1722

1823
### 🐞 Bug Fixes
1924

20-
* BaseProxyService now correctly handles responses without content.
21-
* BaseProxyService now properly supports caching the underlying HttpClient between
22-
requests. This defaults to `false` to reflect current behavior, but may be
23-
overridden to `true`.
25+
* `BaseProxyService` now correctly handles responses without content.
26+
* `BaseProxyService` now properly supports caching the underlying `HttpClient` between requests.
27+
This defaults to `false` to reflect current behavior, but may be overridden to enable.
2428

2529
### ⚙️ Technical
2630

@@ -46,8 +50,8 @@ See the new `ClusterService.groovy` service, which provides the clustering imple
4650
API entry point for accessing the cluster.
4751

4852
Many apps will *not* need to implement significant changes to run with multiple instances. Hoist
49-
will setup the cluster, elect a primary instance, provide cluster-aware Hibernate caching and logging,
50-
and ensure cross-server consistency for its own APIs.
53+
will setup the cluster, elect a primary instance, provide cluster-aware Hibernate caching and
54+
logging, and ensure cross-server consistency for its own APIs.
5155

5256
However, complex applications -- notably those that maintain significant server-side state or use
5357
their server to interact within external systems -- should take care to ensure the app is safe to
@@ -65,7 +69,7 @@ Please contact XH to review your app's readiness for multi-instance operation!
6569
monitors to track core app health metrics. Extend this new superclass in your
6670
app's `MonitorDefinitionService` to enable support for these new monitors.
6771
* Includes new support for dynamic configuration of client-side authentication libraries. See new
68-
method `Authentication.getClientConfig()`.
72+
method `Authentication.getClientConfig()`.
6973

7074
### 💥 Breaking Changes (upgrade difficulty: 🟠 MEDIUM / 🟢 LOW for apps with minimal custom server-side functionality)
7175

@@ -97,7 +101,7 @@ Please contact XH to review your app's readiness for multi-instance operation!
97101
most applications.
98102
* `Utils.dataSource` now returns a reference to the actual `javax.sql.DataSource.DataSource`.
99103
Use `Utils.dataSourceConfig` to access the previous return of this method (DS config, as a map).
100-
* Apps must replace the `buildProperties.doLast` block at the bottom of their `build.gradle` file with
104+
* Apps must replace the `buildProperties.doLast` block at the bottom of their `build.gradle` with:
101105
```groovy
102106
tasks.war.doFirst {
103107
File infoFile = layout.buildDirectory.file('resources/main/META-INF/grails.build.info').get().asFile
@@ -122,6 +126,7 @@ Please contact XH to review your app's readiness for multi-instance operation!
122126
Please ensure you review and update your `gradle.properties` and `gradle-wrapper.properties` files.
123127
124128
In `gradle.properties` (partial contents of this file, with updated libraries only):
129+
125130
```properties
126131
groovyVersion=3.0.21
127132
grailsVersion=6.2.0
@@ -133,6 +138,7 @@ hazelcast.version=5.3.7
133138
134139
In `/gradle/wrapper/gradle-wrapper.properties` (note your app might have an internal artifact repo
135140
in place of services.gradle.org - leave that as-is, updating the version only to 7.6.4):
141+
136142
```properties
137143
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
138144
```

‎src/main/groovy/io/xh/hoist/configuration/ApplicationConfig.groovy

+5-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ class ApplicationConfig {
2020
static void defaultConfig(Script script) {
2121
withDelegate(script) {
2222

23+
// Read by WebSocketService to determine if WS support should generally be enabled.
2324
hoist {
24-
enableWebSockets = false
25+
enableWebSockets = true
2526
}
2627

2728
spring {
@@ -97,7 +98,8 @@ class ApplicationConfig {
9798
}
9899
client.statistics.enabled = true
99100
}
100-
hibernate {
101+
102+
hibernate {
101103
javax {
102104
cache {
103105
provider = 'com.hazelcast.cache.impl.HazelcastServerCachingProvider'
@@ -115,7 +117,7 @@ class ApplicationConfig {
115117
use_query_cache = true
116118
generate_statistics = true
117119
region {
118-
factory_class = 'org.hibernate.cache.jcache.JCacheRegionFactory'
120+
factory_class = 'org.hibernate.cache.jcache.JCacheRegionFactory'
119121
}
120122
}
121123
show_sql = false

0 commit comments

Comments
 (0)
Please sign in to comment.