Package com.sun.enterprise.resource

Examples of com.sun.enterprise.resource.Resource


    public void deleteResourceReference(List<Resource> res, List<String> targetNames) throws Exception {
        //System.out.println("Dlete resource refs in refs");
        int size = res.size();
        //@todo: modify this to simplify the loop logic
        for (int i = (size -1); i >= 0 ; i--) {
            Resource resource = res.get(i);
            try{
                deleteAResourceRef(resource, targetNames);
            }catch(Exception ex){
                String s = localStrings.getString("unable.delete.resource.ref", resource.toString());
                sLogger.log(Level.WARNING, s);
            }
        }
    }
View Full Code Here


     */
    public void deleteResource(List<Resource> res) throws Exception{
        //Delete Resource and ResourceRefs in the reverse order.
        int size = res.size();
        for (int i = (size -1); i >= 0 ; i--) {
            Resource resource = res.get(i);
            //Security map deletion is not required
            //They will be deleted automatically when connector connection pool is deleted
            if(resource.getType().equals(CONNECTOR_SECURITY_MAP))
                continue;
            try{
                deleteAResource(resource);
            }catch(Exception ex){
                String s = localStrings.getString("unable.delete.resource", resource.toString());
                sLogger.log(Level.WARNING, s);
            }
        }
    }
View Full Code Here

        List<Resource> resources = resourcesParser.getResourcesList();
        //First add all non connector resources.
        ;
        Iterator<Resource> nonConnectorResources = ResourcesXMLParser.getNonConnectorResourcesList(resources,false).iterator();
        while (nonConnectorResources.hasNext()) {
            Resource resource = (Resource) nonConnectorResources.next();
            String s = "";
            try {
                s = createAResource(resource, tgtName, true);
            } catch (Exception e) {
                s = e.getMessage();
            }
            results.add(s);
        }

        //Now add all connector resources
        Iterator connectorResources = ResourcesXMLParser.getConnectorResourcesList(resources, false).iterator();
        while (connectorResources.hasNext()) {
            Resource resource = (Resource) connectorResources.next();
            String s = "";
            try {
                s = createAResource(resource, tgtName, true);
            } catch (Exception e) {
                s = e.getMessage();
View Full Code Here

            Boolean isEnabledthrows Exception {
        //@todo: handle isEnabled. This should override the enabled flag specified
        //in the individual Resources.
        Iterator<Resource> resources = res.iterator();
        while (resources.hasNext()) {
            Resource resource = (Resource) resources.next();
            createAResource(resource, null, false);
        }
    }
View Full Code Here

    public void createResourceAndResourceReference(
                    List<Resource> resources, List<String> targetNameList,
                    Boolean enabled) throws Exception {
        Iterator<Resource> resourceList = resources.iterator();
        while (resourceList.hasNext()) {
            Resource resource = (Resource) resourceList.next();
            for (String target : targetNameList) {
                createAResource(resource, target, false);
                createAResourceReference(resource, target, enabled);   
            }
           
View Full Code Here

                    List<Resource> resources,
                    List<String> targetNameList) throws Exception{
        //Delete Resource and ResourceRefs in the reverse order.
        int size = resources.size();
        for (int i = (size -1); i >= 0 ; i--) {
            Resource resource = (Resource)resources.get(i);
            //Security map deletion is not required
            //They will be deleted automatically when connector connection pool is deleted
            if(resource.getType().equals(CONNECTOR_SECURITY_MAP))
                continue;
            try{
                deleteAResourceRef(resource, targetNameList);
            }catch(Exception ex){
                String s = localStrings.getString("unable.delete.resource.ref", resource.toString());
                sLogger.log(Level.WARNING, s);
                continue;
            }
            try{
                deleteAResource(resource);
            }catch(Exception ex){
                String s = localStrings.getString("unable.delete.resource", resource.toString());
                sLogger.log(Level.WARNING, s);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.resource.Resource

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.