1 23 24 package com.sun.enterprise.connectors; 25 26 import java.util.*; 27 import com.sun.enterprise.connectors.authentication.*; 28 import com.sun.enterprise.connectors.util.*; 29 import com.sun.enterprise.deployment.*; 30 import com.sun.enterprise.config.serverbeans.*; 31 32 37 38 39 public class ConnectorSecurityAdminServiceImpl extends 40 ConnectorServiceImpl implements ConnectorAdminService { 41 42 45 46 public ConnectorSecurityAdminServiceImpl() { 47 super(); 48 } 49 50 51 58 59 public AuthenticationService getAuthenticationService(String rarName, 60 String poolName) { 61 62 ConnectorDescriptor cd = _registry.getDescriptor(rarName); 63 OutboundResourceAdapter obra = cd.getOutboundResourceAdapter(); 64 Set authMechs = obra.getAuthMechanisms(); 65 Iterator it = authMechs.iterator(); 66 while(it.hasNext()) { 67 AuthMechanism authMechanism = (AuthMechanism)it.next(); 68 String mech = authMechanism.getAuthMechType(); 69 if(mech.equals("BasicPassword")) { 70 return new BasicPasswordAuthenticationService(rarName,poolName); 71 } 72 } 73 return null; 74 } 75 } 76 | Popular Tags |