Package com.sun.appserv.management.config

Examples of com.sun.appserv.management.config.ResourceConfig


                    createJndiResource(handlerCtx);
                    return;
                }
                String jndiName = (String) handlerCtx.getInputValue("jndiName");
                String type = (String) handlerCtx.getInputValue("type");
                ResourceConfig resource = null;
                if (type.equals("custom")){
                    CustomResourceConfig custom;
                    resource = custom = AMXUtil.getDomainConfig().getCustomResourceConfigMap().get(jndiName);
                    if (resource == null){
                        GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchResource"));
                        return;
                    }
                    custom.setResType((String)handlerCtx.getInputValue("resType"));
                    custom.setFactoryClass((String)handlerCtx.getInputValue("factoryClass"));
                }else{
                    JNDIResourceConfig jndi = null;
                    resource = jndi = AMXUtil.getDomainConfig().getJNDIResourceConfigMap().get(jndiName);
                    if (resource == null){
                        GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchResource"));
                        return;
                    }
                    jndi.setJNDILookupName((String)handlerCtx.getInputValue("jndiLookupName"));
                    jndi.setResType((String)handlerCtx.getInputValue("resType"));
                    jndi.setFactoryClass((String)handlerCtx.getInputValue("factoryClass"));
                }
                resource.setDescription((String)handlerCtx.getInputValue("description"));
                AMXUtil.editProperties(handlerCtx, resource);
                if(! AMXUtil.isEE()){
                    Boolean enabled = (Boolean) handlerCtx.getInputValue("enabled");
                    TargetUtil.setResourceEnabled(resource, "server", enabled);
                }
View Full Code Here


        try{
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            String type = (String) handlerCtx.getInputValue("type");
            String resType = (String) handlerCtx.getInputValue("resType");
            String factoryClass = (String) handlerCtx.getInputValue("factoryClass");
            ResourceConfig resource = null;
            Map optionalMap = AMXUtil.convertToPropertiesOptionMap((Map)handlerCtx.getInputValue("AddProps"), null);
            if (type.equals("custom")){
                resource = AMXUtil.getDomainConfig().createCustomResourceConfig(jndiName, resType, factoryClass, optionalMap);
            }else{
                resource = AMXUtil.getDomainConfig().createJNDIResourceConfig(jndiName, (String)handlerCtx.getInputValue("jndiLookupName"), resType, factoryClass, optionalMap);
            }
            JavaMailHandlers.createNewTargets(handlerCtx, jndiName);
            resource.setDescription((String)handlerCtx.getInputValue("description"));
        }catch (Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
       
    }
View Full Code Here

        boolean hasOrig = false;
      
        List result = new ArrayList();
        if (iter != null){
            while(iter.hasNext()){
                ResourceConfig resConfig = (ResourceConfig) iter.next();
                HashMap oneRow = new HashMap();
                String name=resConfig.getJNDIName();
                oneRow.put("name", name);
                oneRow.put("enabled", TargetUtil.getEnabledStatus(resConfig, false));
                oneRow.put("selected", (hasOrig)? isSelected(name, selectedList): false);
                oneRow.put("description", checkEmpty(resConfig.getDescription()));
                if(isJdbc){
                    oneRow.put("pool", ((JDBCResourceConfig)resConfig).getPoolName());
                }else
                if(isConnector){
                    oneRow.put("pool", ((ConnectorResourceConfig)resConfig).getPoolName());
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.ResourceConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.