public J2EEKeyManager(X509KeyManager mgr, String alias) {
this.mgr = mgr;
this.alias = alias;
if (mgr instanceof UnifiedX509KeyManager) {
UnifiedX509KeyManager umgr = (UnifiedX509KeyManager)mgr;
X509KeyManager[] mgrs = umgr.getX509KeyManagers();
String[] tokenNames = umgr.getTokenNames();
tokenName2MgrMap = new HashMap<String, X509KeyManager>();
for (int i = 0; i < mgrs.length; i++) {
if (tokenNames[i] != null) {
tokenName2MgrMap.put(tokenNames[i], mgrs[i]);