Examples of ManagementException


Examples of flex.management.ManagementException

        {
            return new ObjectInstance(server.createMBean(className, name));
        }
        catch (ReflectionException re)
        {
            ManagementException me = new ManagementException();
            me.setMessage(CREATE_ERR, new Object[] {name});
            me.setRootCause(re);
            throw me;
        }
        catch (InstanceAlreadyExistsException iaee)
        {
            ManagementException me = new ManagementException();
            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
            me.setRootCause(iaee);
            throw me;
        }
        catch (MBeanException mbe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(CREATE_ERR, new Object[] {name});
            me.setRootCause(mbe);
            throw me;
        }
        catch (NotCompliantMBeanException ncmbe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(NOT_COMPLIANT, new Object[] {className});
            me.setRootCause(ncmbe);
            throw me;
        }
    }
View Full Code Here

Examples of flex.management.ManagementException

        {
            return new ObjectInstance(server.createMBean(className, name, loader));
        }
        catch (ReflectionException re)
        {
            ManagementException me = new ManagementException();
            me.setMessage(CREATE_ERR, new Object[] {name});
            me.setRootCause(re);
            throw me;
        }
        catch (InstanceAlreadyExistsException iaee)
        {
            ManagementException me = new ManagementException();
            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
            me.setRootCause(iaee);
            throw me;
        }
        catch (MBeanException mbe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(CREATE_ERR, new Object[] {name});
            me.setRootCause(mbe);
            throw me;
        }
        catch (NotCompliantMBeanException ncmbe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(NOT_COMPLIANT, new Object[] {className});
            me.setRootCause(ncmbe);
            throw me;
        }
        catch (InstanceNotFoundException infe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
            me.setRootCause(infe);
            throw me;
        }
    }
View Full Code Here

Examples of flex.management.ManagementException

        {
            return new ObjectInstance(server.createMBean(className, name, params, signature));
        }
        catch (ReflectionException re)
        {
            ManagementException me = new ManagementException();
            me.setMessage(CREATE_ERR, new Object[] {name});
            me.setRootCause(re);
            throw me;
        }
        catch (InstanceAlreadyExistsException iaee)
        {
            ManagementException me = new ManagementException();
            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
            me.setRootCause(iaee);
            throw me;
        }
        catch (MBeanException mbe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(CREATE_ERR, new Object[] {name});
            me.setRootCause(mbe);
            throw me;
        }
        catch (NotCompliantMBeanException ncmbe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(NOT_COMPLIANT, new Object[] {className});
            me.setRootCause(ncmbe);
            throw me;
        }
    }
View Full Code Here

Examples of flex.management.ManagementException

        {
            return new ObjectInstance(server.createMBean(className, name, loader, params, signature));
        }
        catch (ReflectionException re)
        {
            ManagementException me = new ManagementException();
            me.setMessage(CREATE_ERR, new Object[] {name});
            me.setRootCause(re);
            throw me;
        }
        catch (InstanceAlreadyExistsException iaee)
        {
            ManagementException me = new ManagementException();
            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
            me.setRootCause(iaee);
            throw me;
        }
        catch (MBeanException mbe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(CREATE_ERR, new Object[] {name});
            me.setRootCause(mbe);
            throw me;
        }
        catch (NotCompliantMBeanException ncmbe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(NOT_COMPLIANT, new Object[] {className});
            me.setRootCause(ncmbe);
            throw me;
        }
        catch (InstanceNotFoundException infe)
        {
            ManagementException me = new ManagementException();
            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
            me.setRootCause(infe);
            throw me;
        }
    }
View Full Code Here

Examples of org.apache.aries.application.management.ManagementException

            }
            if (conversionExceptions.size() > 0) {
              for (ConversionException cx : conversionExceptions) {
                _logger.error("APPMANAGEMENT0004E", new Object[]{f.getName(), appName, cx});
              }
              throw new ManagementException (MessageUtil.getMessage("APPMANAGEMENT0005E", appName));
            }
            if (convertedBinary != null) {
              _logger.debug("File {} was successfully converted. Adding it to bundle list.", f.getName());
              modifiedBundles.put (f.getName(), convertedBinary);            
              extraBundlesInfo.add(convertedBinary.getBundleInfo());
            } else {
              _logger.debug("File {} was not converted.", f.getName());
            }
          } else {
            _logger.debug("File {} was ignored. It is not a valid bundle and DEPLOYMENT.MF is present", f.getName());
          }
        } else {
          _logger.debug("File {} was ignored. It has no manifest file.", f.getName());
        }
      }
      // if Application-Content header was not specified build it based on the bundles included by value
      if (applicationManifest.getMainAttributes().getValue(AppConstants.APPLICATION_CONTENT) == null) {
          String appContent = buildAppContent(extraBundlesInfo);
          applicationManifest.getMainAttributes().putValue(AppConstants.APPLICATION_CONTENT, appContent);
      }
     
      ManifestDefaultsInjector.updateManifest(applicationManifest, appName, ebaFile);
      applicationMetadata = _applicationMetadataFactory.createApplicationMetadata(applicationManifest);
     
      if (deploymentManifest != null) {
        deploymentMetadata = _deploymentMetadataFactory.parseDeploymentMetadata(deploymentManifest);
       
        // Validate: symbolic names must match
        String appSymbolicName = applicationMetadata.getApplicationSymbolicName();
        String depSymbolicName = deploymentMetadata.getApplicationSymbolicName();
        if (!appSymbolicName.equals(depSymbolicName)) {
          throw new ManagementException (MessageUtil.getMessage("APPMANAGEMENT0002E", appName, appSymbolicName, depSymbolicName));
        }
      }

      application = new AriesApplicationImpl (applicationMetadata, extraBundlesInfo, _localPlatform);
      application.setDeploymentMetadata(deploymentMetadata);
      // Store a reference to any modified bundles
      application.setModifiedBundles (modifiedBundles);
    } catch (IOException iox) {
      _logger.error ("APPMANAGEMENT0006E", new Object []{appPath, iox});
      throw new ManagementException(iox);
    }
    return application;
  }
View Full Code Here

Examples of org.apache.aries.application.management.ManagementException

      os = new FileOutputStream (tempFile);
      IOUtils.copy(is, os);
      IDirectory downloadedSource = FileSystem.getFSRoot(tempFile);
      app = createApplication (downloadedSource);
    } catch (IOException iox) {
      throw new ManagementException (iox);
    }
      finally {
      IOUtils.close(os);
    }
    return app;
View Full Code Here

Examples of org.apache.aries.application.management.ManagementException

            }
            // if application was successfully installed & started it
            // should have registered its ApplicationContext by now
            applicationContext = contextMap.get(key);
            if (applicationContext == null) {
                throw new ManagementException("No ApplicationContext");
            }
        }

        return applicationContext;
    }
View Full Code Here

Examples of org.apache.aries.application.management.ManagementException

                        // Step 3: Lookup bundle location using the resolver
                        bundleInfo = findBundleInfoUsingResolver(resolver, bundleSymbolicName, bundleVersion);
                    }
                   
                    if (bundleInfo == null) {
                        throw new ManagementException("Cound not find bundles: " + bundleSymbolicName + "_" + bundleVersion);
                    }
                       
                    contentBundle = bundleContext.installBundle(bundleInfo.getLocation());
                    applicationBundles.add(contentBundle);
View Full Code Here

Examples of org.apache.aries.application.management.ManagementException

        if (ref != null) {
            service = bundle.getBundleContext().getService(ref);
        }
       
        if (service == null) {
            throw new ManagementException(new ServiceException(type.getName(), ServiceException.UNREGISTERED));
        }
       
        return type.cast(service);
    }
View Full Code Here

Examples of org.apache.aries.application.management.ManagementException

    }
   
    public DeploymentMetadataFactory getDeploymentMetadataFactory() throws ManagementException {
        DeploymentMetadataFactory service = (DeploymentMetadataFactory) deploymentFactoryTracker.getService();
        if (service == null) {
            throw new ManagementException(new ServiceException(DeploymentMetadataFactory.class.getName(), ServiceException.UNREGISTERED));          
        }
        return service;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.