Commit efb03e49546eef6f1b3c74b6e03bedd0ee008250
Committed by
GitHub
Merge pull request #48 from thingsboard/release-1.1
Release 1.1 to master branch
Showing
23 changed files
with
42 additions
and
29 deletions
... | ... | @@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap; |
23 | 23 | import java.util.concurrent.ConcurrentMap; |
24 | 24 | |
25 | 25 | import lombok.extern.slf4j.Slf4j; |
26 | +import org.springframework.beans.factory.BeanCreationNotAllowedException; | |
26 | 27 | import org.springframework.context.annotation.Lazy; |
27 | 28 | import org.springframework.web.bind.annotation.RequestMapping; |
28 | 29 | import org.springframework.web.bind.annotation.RestController; |
... | ... | @@ -57,10 +58,12 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug |
57 | 58 | private static final ConcurrentMap<String, SessionMetaData> internalSessionMap = new ConcurrentHashMap<>(); |
58 | 59 | private static final ConcurrentMap<String, String> externalSessionMap = new ConcurrentHashMap<>(); |
59 | 60 | |
60 | - @Autowired @Lazy | |
61 | + @Autowired | |
62 | + @Lazy | |
61 | 63 | private ActorService actorService; |
62 | 64 | |
63 | - @Autowired @Lazy | |
65 | + @Autowired | |
66 | + @Lazy | |
64 | 67 | private PluginService pluginService; |
65 | 68 | |
66 | 69 | @Override |
... | ... | @@ -105,7 +108,7 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug |
105 | 108 | super.handleTransportError(session, tError); |
106 | 109 | SessionMetaData sessionMd = internalSessionMap.get(session.getId()); |
107 | 110 | if (sessionMd != null) { |
108 | - actorService.process(new SessionEventPluginWebSocketMsg(sessionMd.sessionRef, SessionEvent.onError(tError))); | |
111 | + processInActorService(new SessionEventPluginWebSocketMsg(sessionMd.sessionRef, SessionEvent.onError(tError))); | |
109 | 112 | } else { |
110 | 113 | log.warn("[{}] Failed to find session", session.getId()); |
111 | 114 | } |
... | ... | @@ -118,11 +121,19 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug |
118 | 121 | SessionMetaData sessionMd = internalSessionMap.remove(session.getId()); |
119 | 122 | if (sessionMd != null) { |
120 | 123 | externalSessionMap.remove(sessionMd.sessionRef.getSessionId()); |
121 | - actorService.process(new SessionEventPluginWebSocketMsg(sessionMd.sessionRef, SessionEvent.onClosed())); | |
124 | + processInActorService(new SessionEventPluginWebSocketMsg(sessionMd.sessionRef, SessionEvent.onClosed())); | |
122 | 125 | } |
123 | 126 | log.info("[{}] Session is closed", session.getId()); |
124 | 127 | } |
125 | 128 | |
129 | + private void processInActorService(SessionEventPluginWebSocketMsg msg) { | |
130 | + try { | |
131 | + actorService.process(msg); | |
132 | + } catch (BeanCreationNotAllowedException e) { | |
133 | + log.warn("[{}] Failed to close session due to possible shutdown state", msg.getSessionRef().getSessionId()); | |
134 | + } | |
135 | + } | |
136 | + | |
126 | 137 | private PluginWebsocketSessionRef toRef(WebSocketSession session) throws IOException { |
127 | 138 | URI sessionUri = session.getUri(); |
128 | 139 | String path = sessionUri.getPath(); | ... | ... |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <modelVersion>4.0.0</modelVersion> |
21 | 21 | <parent> |
22 | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | |
23 | + <version>1.1.0</version> | |
24 | 24 | <artifactId>common</artifactId> |
25 | 25 | </parent> |
26 | 26 | <groupId>org.thingsboard.common</groupId> | ... | ... |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <modelVersion>4.0.0</modelVersion> |
21 | 21 | <parent> |
22 | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | |
23 | + <version>1.1.0</version> | |
24 | 24 | <artifactId>common</artifactId> |
25 | 25 | </parent> |
26 | 26 | <groupId>org.thingsboard.common</groupId> | ... | ... |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <modelVersion>4.0.0</modelVersion> |
21 | 21 | <parent> |
22 | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | |
23 | + <version>1.1.0</version> | |
24 | 24 | <artifactId>common</artifactId> |
25 | 25 | </parent> |
26 | 26 | <groupId>org.thingsboard.common</groupId> | ... | ... |
... | ... | @@ -18,7 +18,7 @@ version: '2' |
18 | 18 | |
19 | 19 | services: |
20 | 20 | thingsboard: |
21 | - image: "thingsboard/application:1.0.1" | |
21 | + image: "thingsboard/application:1.1.0" | |
22 | 22 | ports: |
23 | 23 | - "8080:8080" |
24 | 24 | - "1883:1883" |
... | ... | @@ -27,7 +27,7 @@ services: |
27 | 27 | - thingsboard.env |
28 | 28 | entrypoint: ./run_thingsboard.sh |
29 | 29 | thingsboard-db-schema: |
30 | - image: "thingsboard/thingsboard-db-schema:1.0.1" | |
30 | + image: "thingsboard/thingsboard-db-schema:1.1.0" | |
31 | 31 | env_file: |
32 | 32 | - thingsboard-db-schema.env |
33 | 33 | entrypoint: ./install_schema.sh | ... | ... |
... | ... | @@ -20,8 +20,9 @@ cp ../../dao/src/main/resources/schema.cql schema.cql |
20 | 20 | cp ../../dao/src/main/resources/demo-data.cql demo-data.cql |
21 | 21 | cp ../../dao/src/main/resources/system-data.cql system-data.cql |
22 | 22 | |
23 | -docker build -t thingsboard/thingsboard-db-schema:1.0.1 . | |
23 | +docker build -t thingsboard/thingsboard-db-schema:1.1.0 -t thingsboard/thingsboard-db-schema:latest . | |
24 | 24 | |
25 | 25 | docker login |
26 | 26 | |
27 | -docker push thingsboard/thingsboard-db-schema:1.0.1 | |
\ No newline at end of file | ||
27 | +docker push thingsboard/thingsboard-db-schema:1.1.0 | |
28 | +docker push thingsboard/thingsboard-db-schema:latest | |
\ No newline at end of file | ... | ... |
... | ... | @@ -18,8 +18,9 @@ |
18 | 18 | |
19 | 19 | cp ../../application/target/thingsboard.deb thingsboard.deb |
20 | 20 | |
21 | -docker build -t thingsboard/application:1.0.1 . | |
21 | +docker build -t thingsboard/application:1.1.0 -t thingsboard/application:latest . | |
22 | 22 | |
23 | 23 | docker login |
24 | 24 | |
25 | -docker push thingsboard/application:1.0.1 | |
\ No newline at end of file | ||
25 | +docker push thingsboard/application:1.1.0 | |
26 | +docker push thingsboard/application:latest | |
\ No newline at end of file | ... | ... |
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | <modelVersion>4.0.0</modelVersion> |
23 | 23 | <parent> |
24 | 24 | <groupId>org.thingsboard</groupId> |
25 | - <version>1.1.0-SNAPSHOT</version> | |
25 | + <version>1.1.0</version> | |
26 | 26 | <artifactId>extensions</artifactId> |
27 | 27 | </parent> |
28 | 28 | <groupId>org.thingsboard.extensions</groupId> | ... | ... |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <modelVersion>4.0.0</modelVersion> |
21 | 21 | <parent> |
22 | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | |
23 | + <version>1.1.0</version> | |
24 | 24 | <artifactId>extensions</artifactId> |
25 | 25 | </parent> |
26 | 26 | <groupId>org.thingsboard.extensions</groupId> | ... | ... |
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | <modelVersion>4.0.0</modelVersion> |
23 | 23 | <parent> |
24 | 24 | <groupId>org.thingsboard</groupId> |
25 | - <version>1.1.0-SNAPSHOT</version> | |
25 | + <version>1.1.0</version> | |
26 | 26 | <artifactId>extensions</artifactId> |
27 | 27 | </parent> |
28 | 28 | <groupId>org.thingsboard.extensions</groupId> | ... | ... |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <modelVersion>4.0.0</modelVersion> |
21 | 21 | <parent> |
22 | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | |
23 | + <version>1.1.0</version> | |
24 | 24 | <artifactId>transport</artifactId> |
25 | 25 | </parent> |
26 | 26 | <groupId>org.thingsboard.transport</groupId> | ... | ... |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <modelVersion>4.0.0</modelVersion> |
21 | 21 | <parent> |
22 | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | |
23 | + <version>1.1.0</version> | |
24 | 24 | <artifactId>transport</artifactId> |
25 | 25 | </parent> |
26 | 26 | <groupId>org.thingsboard.transport</groupId> | ... | ... |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <modelVersion>4.0.0</modelVersion> |
21 | 21 | <parent> |
22 | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | |
23 | + <version>1.1.0</version> | |
24 | 24 | <artifactId>transport</artifactId> |
25 | 25 | </parent> |
26 | 26 | <groupId>org.thingsboard.transport</groupId> | ... | ... |