diff --git a/conf/alfresco-global.properties b/conf/alfresco-global.properties index 22f17b2e3d18d1826d7082f65ed17409b9abf970..a108acc1db99b6d2dc4bb001c9f0cfb1e51fc1ef 100644 --- a/conf/alfresco-global.properties +++ b/conf/alfresco-global.properties @@ -111,6 +111,7 @@ parapheur.jobs.mq.consumer.connector=vm://localhost # WebSocket Port d'ecoute du service de notifications parapheur.notifications.websocketport=8081 +parapheur.notifications.websockethost= ## CDC Fast-Service fastService.repeatIntervalMinutes=30 diff --git a/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/notification/socket/SocketServer.java b/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/notification/socket/SocketServer.java index 4f3f475034290a600cd94c14ce3be561882ec982..50cbc032e845884ee692e99cd8c0ec84561c5384 100644 --- a/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/notification/socket/SocketServer.java +++ b/iparapheur-core/src/main/java/org/adullact/iparapheur/repo/notification/socket/SocketServer.java @@ -27,6 +27,7 @@ public class SocketServer extends AbstractLifecycleBean { private static Logger logger = Logger.getLogger(SocketServer.class); private String port; + private String host; @Override protected void onBootstrap(ApplicationEvent applicationEvent) { @@ -35,7 +36,7 @@ public class SocketServer extends AbstractLifecycleBean { Configuration config = new Configuration(); config.setPort(Integer.valueOf(port)); - config.setHostname("localhost"); + config.setHostname(host); server = new SocketIOServer(config); server.addListeners(new SocketListener()); @@ -105,4 +106,8 @@ public class SocketServer extends AbstractLifecycleBean { public void setPort(String port) { this.port = port; } + + public void setHost(String host) { + this.host = host; + } } diff --git a/iparapheur-core/src/main/resources/alfresco/module/parapheur/module-context.xml b/iparapheur-core/src/main/resources/alfresco/module/parapheur/module-context.xml index 93b59f52e6a25465b9b53b106d871bc2971d04ef..c8ed5c4ac234efb77f39fbb47ccd0f8046117476 100755 --- a/iparapheur-core/src/main/resources/alfresco/module/parapheur/module-context.xml +++ b/iparapheur-core/src/main/resources/alfresco/module/parapheur/module-context.xml @@ -1460,6 +1460,9 @@ <property name="port"> <value>${parapheur.notifications.websocketport}</value> </property> + <property name="host"> + <value>${parapheur.notifications.websockethost}</value> + </property> </bean> <bean id="schedulerService" class="org.adullact.iparapheur.repo.worker.SchedulerService">