You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Thomas Kratz <ei...@googlemail.com> on 2010/04/20 11:11:55 UTC
[vysper] trouble after re-connect
Hi all (Bernd ?)
sadly I got no response up to now.
I really urgently need to fix this. Maybe I have to put in more information.
Please help me :)
I use a custem authorization implementation ( but I don't think this
is the trouble, at least I don't see it in the API)
that goes like
public class DatabaseUserAuthorization implements UserAuthorization,
AccountManagement {
private static final Logger log = Logger
.getLogger(DatabaseUserAuthorization.class);
private UserDAO userDAO;
public DatabaseUserAuthorization() {
userDAO = (UserDAO) ContextProvider.getContext().getBean("userDAO");
}
public void addUser(String username, String password) {
throw new UnsupportedOperationException();
}
public boolean verifyCredentials(Entity jid, String passwordCleartext,
Object credentials) {
return verify(jid.getFullQualifiedName(), passwordCleartext);
}
public boolean verifyCredentials(String username, String passwordCleartext,
Object credentials) {
return verify(username, passwordCleartext);
}
public boolean verifyAccountExists(Entity jid) {
return findUser(jid.getBareJID().getFullQualifiedName()) != null;
}
private boolean verify(String username, String passwordCleartext) {
User user = findUser(username);
return passwordCleartext.equals(user.getPasswd());
}
private User findUser(String username) {
int pos = username.indexOf('@');
String login = username.substring(0, pos);
if (log.isDebugEnabled()) {
log.debug("Searching for user :" + login);
}
User user = userDAO.findUser(login);
return user;
}
}
I connect with
public static XMPPConnection createConnection(String host) {
ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration(
host);
connectionConfiguration.setCompressionEnabled(false);
connectionConfiguration.setSelfSignedCertificateEnabled(true);
connectionConfiguration.setExpiredCertificatesCheckEnabled(false);
// connectionConfiguration.setDebuggerEnabled(true);
connectionConfiguration.setSASLAuthenticationEnabled(true);
connectionConfiguration
.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
XMPPConnection xmppCon = new XMPPConnection(connectionConfiguration);
return xmppCon;
}
and I disconnect with a plain disconnect();
This works after server startup for one single login. If I disconnect
and re-connect to the running server, I dont receive anything anymore.
My code worked painlessly with openfire (arg).
Regards Thomas
--
http://www.buchmanager.com
http://thomaskratz.blogspot.com
Re: [vysper] trouble after re-connect
Posted by Bernd Fondermann <bf...@brainlounge.de>.
Thomas Kratz wrote:
> Hi all (Bernd ?)
>
> sadly I got no response up to now.
I responded about 1h after your original post.
Please refer to the mailing list.
Bernd