// choose the storage you want to use
//StorageProviderRegistry providerRegistry = new JcrStorageProviderRegistry();
StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();
final AccountManagement accountManagement = (AccountManagement) providerRegistry
.retrieve(AccountManagement.class);
Entity user1 = EntityImpl.parse("user1@vysper.org");
if (!accountManagement.verifyAccountExists(user1)) {
accountManagement.addUser(user1, "password1");
}
Entity user2 = EntityImpl.parse("user2@vysper.org");
if (!accountManagement.verifyAccountExists(user2)) {
accountManagement.addUser(user2, "password1");
}
Entity user3 = EntityImpl.parse("user3@vysper.org");
if (!accountManagement.verifyAccountExists(user3)) {
accountManagement.addUser(user3, "password1");
}
XMPPServer server = new XMPPServer("vysper.org");
server.addEndpoint(new TCPEndpoint());
//server.addEndpoint(new StanzaSessionFactory());