This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<to uri="smtps://{{smtp.username}}@{{smtp.server}}?password={{smtp.password}}"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Map<node,result> execute(Command command) throws Exception { | |
if (command == null) { | |
throw new Exception("Command store not found"); | |
} else { | |
//store the command to correlate it with the result. | |
commandStore.getPending().put(command.getId(), command); | |
//I create a timeout task and schedule it | |
TimeoutTask timeoutTask = new TimeoutTask(command, commandStore); | |
ScheduledFuture timeoutFuture = timeoutScheduler.schedule(timeoutTask, command.getTimeout(), TimeUnit.MILLISECONDS); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
features:addurl mvn:net.cellar/assembly/1.0/xml/features | |
features:install spring-dm | |
features:install cellar | |
cluster:list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean class="com.hazelcast.core.Hazelcast" destroy-method="shutdown" factory-method="newHazelcastInstance" id="hazelcast"> | |
<constructor-arg ref="config"/> | |
</bean> | |
<bean class="com.hazelcast.config.Config" id="config"> | |
<property name="groupConfig" ref="groupConfig"/> | |
</bean> | |
<bean class="com.hazelcast.config.GroupConfig" id="groupConfig"> | |
<property name="name">karaf</property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osgi:install -s mvn:com.hazelcast/hazelcast/1.9.3 | |
osgi:install -s war:mvn:com.hazelcast/hazelcast-monitoring/1.9.3/war |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<reference id="instance" interface="com.hazelcast.core.HazelcastInstance"> | |
<bean factory-method="getTopic" factory-ref="instance" id="echoTopic"> | |
<argument value="ECHO"/> | |
</bean> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EchoListener implements MessageListener<string> { | |
private ITopic topic; | |
public void onMessage(String message) { | |
System.out.println(message); | |
} | |
public ITopic getTopic() { | |
return topic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<reference id="instance" interface="com.hazelcast.core.HazelcastInstance"/> | |
<bean factory-method="getTopic" factory-ref="instance" id="echoTopic"> | |
<argument value="ECHO"/> | |
</bean> | |
<bean class="net.iocanel.karaf.hazelcast.shell.EchoListener" id="listener"> | |
<property name="topic" ref="echoTopic"/> | |
</bean> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Command(scope = "hazelcast", name = "echo", description = "Echos a message to all cluster nodes") | |
public class EchoCommand extends HazelcastCommandSupport { | |
@Argument(index=0,name="message", description = "The message to echo", required = true, multiValued = false) | |
private String message; | |
private ITopic topic; | |
@Override | |
protected Object doExecute() throws Exception { | |
if(topic != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE users ( | |
username varchar(255) NOT NULL, | |
password varchar(255) NOT NULL, | |
PRIMARY KEY (username) | |
); | |
CREATE TABLE roles ( | |
username varchar(255) NOT NULL, | |
role varchar(255) NOT NULL, | |
PRIMARY KEY (username,role) | |
) |