This commit is contained in:
@@ -106,6 +106,9 @@ public abstract class WebSocketServlet extends HttpServlet implements Resourcabl
|
|||||||
@Resource(name = "$")
|
@Resource(name = "$")
|
||||||
protected WebSocketNode node;
|
protected WebSocketNode node;
|
||||||
|
|
||||||
|
@Resource(name = "SERVER_RESFACTORY")
|
||||||
|
protected ResourceFactory resourceFactory;
|
||||||
|
|
||||||
protected WebSocketServlet() {
|
protected WebSocketServlet() {
|
||||||
Type msgtype = String.class;
|
Type msgtype = String.class;
|
||||||
try {
|
try {
|
||||||
@@ -145,6 +148,7 @@ public abstract class WebSocketServlet extends HttpServlet implements Resourcabl
|
|||||||
if (cryptorClass != null && !cryptorClass.isEmpty()) {
|
if (cryptorClass != null && !cryptorClass.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
this.cryptor = (Cryptor) Thread.currentThread().getContextClassLoader().loadClass(cryptorClass).getDeclaredConstructor().newInstance();
|
this.cryptor = (Cryptor) Thread.currentThread().getContextClassLoader().loadClass(cryptorClass).getDeclaredConstructor().newInstance();
|
||||||
|
if (resourceFactory != null && this.cryptor != null) resourceFactory.inject(this.cryptor);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user