//check method called by iasadmin and adminGUI
public Result check(ConfigContextEvent ccce) {
Result result = new Result();
result.passed("Passed **");
ConfigContext context = ccce.getConfigContext();
Object value = ccce.getObject();
String choice = ccce.getChoice();
String beanName = ccce.getBeanName();
if(beanName!=null) {
String name = ccce.getName();
return testSave(name,(String)value);
}
JdbcConnectionPool pool = (JdbcConnectionPool)value;
String poolName = pool.getName();
// check if connction pool name is valid object name Bug : 4698687 : start
if(StaticTest.checkObjectName(poolName, result))
result.passed("Valid Object Name");
else {
result.failed("Connection Pool Name Invalid ");
return result;
}
// End Bug : 4698687
String datasourceClassname = pool.getDatasourceClassname();
// to be uncommented once warning is implemented
/*if(isInValidDataSource(result, datasourceClassname))
return result;*/
if (choice != null && choice.equals("DELETE")){
try{
// 8.0 XML Verifier
//Server server = (Server)context.getRootConfigBean();
//Resources resource = server.getResources();
Domain domain = (Domain)context.getRootConfigBean();
Resources resource = domain.getResources();
JdbcResource[] jdbcResource = resource.getJdbcResource();
if(jdbcResource.length == 0)
result.passed("Connect Pool not used by data source");
for(int i=0;i<jdbcResource.length;i++){