Package org.rioproject.opstring

Examples of org.rioproject.opstring.OperationalStringException


                /* ignore */
            }
        }

        if(opStringManager==null)
            throw new OperationalStringException(String.format("Unmanaged OperationalString [%s]",name ), false);
        return(opStringManager);
    }
View Full Code Here


        if(isArtifact) {
            try {
                Resolver r = ResolverHelper.getResolver();
                opStringURL = r.getLocation(a, "oar");
                if(opStringURL==null)
                    throw new OperationalStringException(String.format("Artifact %s not resolvable", a));
            } catch (ResolverException e) {
                throw new OperationalStringException(e.getLocalizedMessage(), e);
            }
        }
        return opStringURL;
    }
View Full Code Here

        URL opStringURL = getArtifactURL(opStringLocation);
        if(opStringURL==null) {
            try {
                opStringURL = new URL(opStringLocation);
            } catch (MalformedURLException e) {
                throw new OperationalStringException(String.format("Failed to create URL from %s", opStringLocation), e);
            }
        }
        return deploy(opStringURL, listener);
    }
View Full Code Here

            }
            OperationalString[] opStrings = opStringLoader.parseOperationalString(opStringUrlToUse);
            if(opStrings != null && opStrings.length>0) {
                deploymentResult = deploy(opStrings[0], listener);
            } else {
                throw new OperationalStringException("After parsing "+opStringUrl.toExternalForm()+", " +
                                                     "there were no OperationalString returned");
            }
        } catch(Exception e) {
            logger.warn("Problem opening or deploying {}", opStringUrl.toExternalForm(), e);
            throw new OperationalStringException("Deploying OperationalString", e);
        }
        return deploymentResult;
    }
View Full Code Here

                deploymentResult = new DeploymentResult(manager, null);
            }
        } catch(Exception e) {
            logger.warn("Deploying OperationalString [{}]", opString.getName(), e);
            if(!(e instanceof OperationalStringException))
                throw new OperationalStringException(String.format("Deploying OperationalString [%s]", opString.getName()), e);
            throw (OperationalStringException)e;
        }
        return deploymentResult;
    }
View Full Code Here

            try {
                OAR oar = new OAR(artifactURL);
                OperationalString[] opstring = oar.loadOperationalStrings();
                opStringName = opstring[0].getName();
            } catch(Exception e) {
                throw new OperationalStringException(String.format("Unable to undeploy, cannot parse/load [%s]",
                                                                   opStringName));
            }
        }
        boolean undeployed = false;
        OpStringManager opMgr = opStringMangerController.getOpStringManager(opStringName);
        logger.trace("OpStringManager: {}", opMgr);
        if(opMgr == null || (!opMgr.isActive())) {
            try {
                DeployAdmin dAdmin = opStringMangerController.getPrimaryDeployAdmin(opStringName);
                if(dAdmin!=null) {
                    OperationalStringManager mgr = dAdmin.getOperationalStringManager(opStringName);
                    if(mgr.isManaging()) {
                        dAdmin.undeploy(name);
                        undeployed = true;
                    }
                }
            } catch(RemoteException e) {
                logger.debug("Communicating to peer during undeployment of [{}]", opStringName, e);
            } catch(OperationalStringException e) {
                /* ignore */
            }

        } else {
            opStringMangerController.undeploy(opMgr, terminate);
            undeployed = true;
        }
        if(!undeployed) {
            throw new OperationalStringException(String.format("No deployment for [%s] found", opStringName));
        }
        return true;
    }
View Full Code Here

TOP

Related Classes of org.rioproject.opstring.OperationalStringException

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.