Not being an expert on JMX and MBeans, I am looking for a guide that will
show me how to upgrade the custom realm that I have coded for version
4.0.6. When I run it in 4.1.18 it complains about not being an mbean.
I have used MBEans in JBoss, but that has been a while. I am looking for
something that will show me how to updgrade this class and get it
configured for 4.1.18
thanks
package com.twt.security.action.login;
import org.apache.catalina.*;
import org.apache.catalina.realm.RealmBase;
public final class NewRealm extends RealmBase{
Container container = null;
private final String REALM_NAME = "Realm";
private final String REALM_VERSION = "1.0";
private Vector propertyChangeListeners = new Vector();
private UserManageable loginUser(String userName, String password) {
// GUts of the security check
return user;
}
public void addPropertyChangeListener(PropertyChangeListener
propertyChangeListener) {
propertyChangeListeners.add(propertyChangeListener);
}
public Principal authenticate(String userName, String password) {
return this.loginUser(userName, password);
}
public Principal authenticate(String s, String s1, String s2, String
s3, String s4, String s5, String s6, String s7) {
return null;
}
public Principal authenticate(String userName, byte[] password) {
return this.loginUser(userName, password.toString());
}
public Principal authenticate(X509Certificate[] x509Certificates) {
return null;
}
public Container getContainer() {
return this.getContainer();
}
public String getInfo() {
return this.REALM_NAME + "/" + this.REALM_VERSION;
}
public boolean hasRole(Principal principal, String role) {
UserManageable user = null;
if (principal instanceof UserManageable) {
user = (UserManageable) principal;
if (user.hasRole(role)) {
return true;
}
}
return false;
}
public void removePropertyChangeListener(PropertyChangeListener
propertyChangeListener) {
if (propertyChangeListeners.contains(propertyChangeListener)) {
propertyChangeListeners.remove(propertyChangeListener);
}
}
protected String getName() {
return null;
}
protected String getPassword(String s) {
return null;
}
protected Principal getPrincipal(String s) {
return null;
}
public void setContainer(Container container) {
this.container = container;
}
}
kmd
Phone (608)273-8933 x2084
Cell (608)358-2037
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>