use of akka.event.LoggingAdapter in project webofneeds by researchstudio-sat.
the class MatcherSolrAppConfiguration method actorSystem.
/**
* Actor system singleton for this application.
*/
@Bean
public ActorSystem actorSystem() {
// load the Akka configuration
String seedNodes = "[";
for (String seed : clusterConfig.getSeedNodes()) {
seedNodes += "\"akka.tcp://" + clusterConfig.getName() + "@" + seed.trim() + "\",";
}
seedNodes += "]";
final Config applicationConf = ConfigFactory.load();
final Config config = ConfigFactory.parseString("akka.cluster.seed-nodes=" + seedNodes).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.bind-port=" + clusterConfig.getLocalPort())).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.hostname=" + clusterConfig.getNodeHost())).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.port=" + clusterConfig.getLocalPort())).withFallback(ConfigFactory.parseString("akka.cluster.roles=[matcher]")).withFallback(ConfigFactory.load(applicationConf));
ActorSystem system = ActorSystem.create(clusterConfig.getName(), config);
LoggingAdapter log = Logging.getLogger(system, this);
log.info("Using Akka system settings: " + system.settings().toString());
// initialize the application context in the Akka Spring Extension
SpringExtension.SpringExtProvider.get(system).initialize(applicationContext);
return system;
}
use of akka.event.LoggingAdapter in project webofneeds by researchstudio-sat.
the class MatcherRescalAppConfiguration method actorSystem.
/**
* Actor system singleton for this application.
*/
@Bean
public ActorSystem actorSystem() {
// load the Akka configuration
String seedNodes = "[";
for (String seed : clusterConfig.getSeedNodes()) {
seedNodes += "\"akka.tcp://" + clusterConfig.getName() + "@" + seed.trim() + "\",";
}
seedNodes += "]";
final Config applicationConf = ConfigFactory.load();
final Config config = ConfigFactory.parseString("akka.cluster.seed-nodes=" + seedNodes).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.bind-port=" + clusterConfig.getLocalPort())).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.hostname=" + clusterConfig.getNodeHost())).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.port=" + clusterConfig.getLocalPort())).withFallback(ConfigFactory.parseString("akka.cluster.roles=[matcher]")).withFallback(ConfigFactory.load(applicationConf));
ActorSystem system = ActorSystem.create(clusterConfig.getName(), config);
LoggingAdapter log = Logging.getLogger(system, this);
log.info("Using Akka system settings: " + system.settings().toString());
// initialize the application context in the Akka Spring Extension
SpringExtension.SpringExtProvider.get(system).initialize(applicationContext);
return system;
}
use of akka.event.LoggingAdapter in project webofneeds by researchstudio-sat.
the class MatcherServiceAppConfiguration method actorSystem.
/**
* Actor system singleton for this application.
*/
@Bean
public ActorSystem actorSystem() {
// load the Akka configuration
String seedNodes = "[";
for (String seed : clusterConfig.getSeedNodes()) {
seedNodes += "\"akka.tcp://" + clusterConfig.getName() + "@" + seed.trim() + "\",";
}
seedNodes += "]";
final Config applicationConf = ConfigFactory.load();
final Config config = ConfigFactory.parseString("akka.cluster.seed-nodes=" + seedNodes).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.bind-port=" + clusterConfig.getLocalPort())).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.hostname=" + clusterConfig.getNodeHost())).withFallback(ConfigFactory.parseString("akka.remote.netty.tcp.port=" + clusterConfig.getLocalPort())).withFallback(ConfigFactory.parseString("akka.cluster.roles=[core]")).withFallback(ConfigFactory.load(applicationConf));
ActorSystem system = ActorSystem.create(clusterConfig.getName(), config);
LoggingAdapter log = Logging.getLogger(system, this);
log.info("Using Akka system settings: " + system.settings().toString());
// initialize the application context in the Akka Spring Extension
SpringExtension.SpringExtProvider.get(system).initialize(applicationContext);
return system;
}
Aggregations