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
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap; | @@ -23,6 +23,7 @@ import java.util.concurrent.ConcurrentHashMap; | ||
23 | import java.util.concurrent.ConcurrentMap; | 23 | import java.util.concurrent.ConcurrentMap; |
24 | 24 | ||
25 | import lombok.extern.slf4j.Slf4j; | 25 | import lombok.extern.slf4j.Slf4j; |
26 | +import org.springframework.beans.factory.BeanCreationNotAllowedException; | ||
26 | import org.springframework.context.annotation.Lazy; | 27 | import org.springframework.context.annotation.Lazy; |
27 | import org.springframework.web.bind.annotation.RequestMapping; | 28 | import org.springframework.web.bind.annotation.RequestMapping; |
28 | import org.springframework.web.bind.annotation.RestController; | 29 | import org.springframework.web.bind.annotation.RestController; |
@@ -57,10 +58,12 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug | @@ -57,10 +58,12 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug | ||
57 | private static final ConcurrentMap<String, SessionMetaData> internalSessionMap = new ConcurrentHashMap<>(); | 58 | private static final ConcurrentMap<String, SessionMetaData> internalSessionMap = new ConcurrentHashMap<>(); |
58 | private static final ConcurrentMap<String, String> externalSessionMap = new ConcurrentHashMap<>(); | 59 | private static final ConcurrentMap<String, String> externalSessionMap = new ConcurrentHashMap<>(); |
59 | 60 | ||
60 | - @Autowired @Lazy | 61 | + @Autowired |
62 | + @Lazy | ||
61 | private ActorService actorService; | 63 | private ActorService actorService; |
62 | 64 | ||
63 | - @Autowired @Lazy | 65 | + @Autowired |
66 | + @Lazy | ||
64 | private PluginService pluginService; | 67 | private PluginService pluginService; |
65 | 68 | ||
66 | @Override | 69 | @Override |
@@ -105,7 +108,7 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug | @@ -105,7 +108,7 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug | ||
105 | super.handleTransportError(session, tError); | 108 | super.handleTransportError(session, tError); |
106 | SessionMetaData sessionMd = internalSessionMap.get(session.getId()); | 109 | SessionMetaData sessionMd = internalSessionMap.get(session.getId()); |
107 | if (sessionMd != null) { | 110 | if (sessionMd != null) { |
108 | - actorService.process(new SessionEventPluginWebSocketMsg(sessionMd.sessionRef, SessionEvent.onError(tError))); | 111 | + processInActorService(new SessionEventPluginWebSocketMsg(sessionMd.sessionRef, SessionEvent.onError(tError))); |
109 | } else { | 112 | } else { |
110 | log.warn("[{}] Failed to find session", session.getId()); | 113 | log.warn("[{}] Failed to find session", session.getId()); |
111 | } | 114 | } |
@@ -118,11 +121,19 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug | @@ -118,11 +121,19 @@ public class PluginWebSocketHandler extends TextWebSocketHandler implements Plug | ||
118 | SessionMetaData sessionMd = internalSessionMap.remove(session.getId()); | 121 | SessionMetaData sessionMd = internalSessionMap.remove(session.getId()); |
119 | if (sessionMd != null) { | 122 | if (sessionMd != null) { |
120 | externalSessionMap.remove(sessionMd.sessionRef.getSessionId()); | 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 | log.info("[{}] Session is closed", session.getId()); | 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 | private PluginWebsocketSessionRef toRef(WebSocketSession session) throws IOException { | 137 | private PluginWebsocketSessionRef toRef(WebSocketSession session) throws IOException { |
127 | URI sessionUri = session.getUri(); | 138 | URI sessionUri = session.getUri(); |
128 | String path = sessionUri.getPath(); | 139 | String path = sessionUri.getPath(); |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>common</artifactId> | 24 | <artifactId>common</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.common</groupId> | 26 | <groupId>org.thingsboard.common</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>common</artifactId> | 24 | <artifactId>common</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.common</groupId> | 26 | <groupId>org.thingsboard.common</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>common</artifactId> | 24 | <artifactId>common</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.common</groupId> | 26 | <groupId>org.thingsboard.common</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -18,7 +18,7 @@ version: '2' | @@ -18,7 +18,7 @@ version: '2' | ||
18 | 18 | ||
19 | services: | 19 | services: |
20 | thingsboard: | 20 | thingsboard: |
21 | - image: "thingsboard/application:1.0.1" | 21 | + image: "thingsboard/application:1.1.0" |
22 | ports: | 22 | ports: |
23 | - "8080:8080" | 23 | - "8080:8080" |
24 | - "1883:1883" | 24 | - "1883:1883" |
@@ -27,7 +27,7 @@ services: | @@ -27,7 +27,7 @@ services: | ||
27 | - thingsboard.env | 27 | - thingsboard.env |
28 | entrypoint: ./run_thingsboard.sh | 28 | entrypoint: ./run_thingsboard.sh |
29 | thingsboard-db-schema: | 29 | thingsboard-db-schema: |
30 | - image: "thingsboard/thingsboard-db-schema:1.0.1" | 30 | + image: "thingsboard/thingsboard-db-schema:1.1.0" |
31 | env_file: | 31 | env_file: |
32 | - thingsboard-db-schema.env | 32 | - thingsboard-db-schema.env |
33 | entrypoint: ./install_schema.sh | 33 | entrypoint: ./install_schema.sh |
@@ -20,8 +20,9 @@ cp ../../dao/src/main/resources/schema.cql schema.cql | @@ -20,8 +20,9 @@ cp ../../dao/src/main/resources/schema.cql schema.cql | ||
20 | cp ../../dao/src/main/resources/demo-data.cql demo-data.cql | 20 | cp ../../dao/src/main/resources/demo-data.cql demo-data.cql |
21 | cp ../../dao/src/main/resources/system-data.cql system-data.cql | 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 | docker login | 25 | docker login |
26 | 26 | ||
27 | -docker push thingsboard/thingsboard-db-schema:1.0.1 | ||
27 | +docker push thingsboard/thingsboard-db-schema:1.1.0 | ||
28 | +docker push thingsboard/thingsboard-db-schema:latest |
@@ -18,8 +18,9 @@ | @@ -18,8 +18,9 @@ | ||
18 | 18 | ||
19 | cp ../../application/target/thingsboard.deb thingsboard.deb | 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 | docker login | 23 | docker login |
24 | 24 | ||
25 | -docker push thingsboard/application:1.0.1 | ||
25 | +docker push thingsboard/application:1.1.0 | ||
26 | +docker push thingsboard/application:latest |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | <modelVersion>4.0.0</modelVersion> | 22 | <modelVersion>4.0.0</modelVersion> |
23 | <parent> | 23 | <parent> |
24 | <groupId>org.thingsboard</groupId> | 24 | <groupId>org.thingsboard</groupId> |
25 | - <version>1.1.0-SNAPSHOT</version> | 25 | + <version>1.1.0</version> |
26 | <artifactId>extensions</artifactId> | 26 | <artifactId>extensions</artifactId> |
27 | </parent> | 27 | </parent> |
28 | <groupId>org.thingsboard.extensions</groupId> | 28 | <groupId>org.thingsboard.extensions</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>extensions</artifactId> | 24 | <artifactId>extensions</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.extensions</groupId> | 26 | <groupId>org.thingsboard.extensions</groupId> |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | <modelVersion>4.0.0</modelVersion> | 22 | <modelVersion>4.0.0</modelVersion> |
23 | <parent> | 23 | <parent> |
24 | <groupId>org.thingsboard</groupId> | 24 | <groupId>org.thingsboard</groupId> |
25 | - <version>1.1.0-SNAPSHOT</version> | 25 | + <version>1.1.0</version> |
26 | <artifactId>extensions</artifactId> | 26 | <artifactId>extensions</artifactId> |
27 | </parent> | 27 | </parent> |
28 | <groupId>org.thingsboard.extensions</groupId> | 28 | <groupId>org.thingsboard.extensions</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <groupId>org.thingsboard</groupId> | 21 | <groupId>org.thingsboard</groupId> |
22 | <artifactId>thingsboard</artifactId> | 22 | <artifactId>thingsboard</artifactId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <packaging>pom</packaging> | 24 | <packaging>pom</packaging> |
25 | 25 | ||
26 | <name>Thingsboard</name> | 26 | <name>Thingsboard</name> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>transport</artifactId> | 24 | <artifactId>transport</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.transport</groupId> | 26 | <groupId>org.thingsboard.transport</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>transport</artifactId> | 24 | <artifactId>transport</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.transport</groupId> | 26 | <groupId>org.thingsboard.transport</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>transport</artifactId> | 24 | <artifactId>transport</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.transport</groupId> | 26 | <groupId>org.thingsboard.transport</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>1.1.0-SNAPSHOT</version> | 23 | + <version>1.1.0</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |