Tabnine Logo
DeploymentFileData
Code IndexAdd Tabnine to your IDE (free)

How to use
DeploymentFileData
in
org.apache.axis2.deployment.repository.util

Best Java code snippets using org.apache.axis2.deployment.repository.util.DeploymentFileData (Showing top 20 results out of 315)

origin: org.wso2.carbon.event-processing/org.wso2.carbon.event.processor.core

/**
 * Reads the query-plan.siddhiql and deploys it.
 *
 * @param deploymentFileData information about query plan
 * @throws org.apache.axis2.deployment.DeploymentException
 */
public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {
  try {
    String path = deploymentFileData.getAbsolutePath();
    if (!deployedExecutionPlanFilePaths.contains(path)) {
      try {
        processDeploy(deploymentFileData);
      } catch (ExecutionPlanConfigurationException e) {
        throw new DeploymentException("Execution plan not deployed properly.", e);
      }
    } else {
      log.debug("Execution plan file is already deployed :" + path);
      deployedExecutionPlanFilePaths.remove(path);
    }
  } catch (Throwable t) {
    log.error("Can't deploy the execution plan: " + deploymentFileData.getName(), t);
    throw new DeploymentException("Can't deploy the execution plan: " + deploymentFileData.getName(), t);
  }
}
origin: org.wso2.carbon.business-process/org.wso2.carbon.humantask.deployer

public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {
  log.info("Deploying HumanTask archive [ " + deploymentFileData.getName() + " ]");
  try {
    humanTaskStore.deploy(deploymentFileData.getFile());
  } catch (Exception e) {
    String errorMessage = "Error deploying HumanTask package : " + deploymentFileData.getName();
    log.error(errorMessage, e);
    throw new DeploymentException(errorMessage, e);
  }
}
origin: org.wso2.carbon.event-processing/org.wso2.carbon.event.processor.core

public void executeManualDeployment(String filePath) throws DeploymentException, ExecutionPlanConfigurationException {
  processDeploy(new DeploymentFileData(new File(filePath)));
}
origin: apache/axis2-java

public void deployModule(String moduleFileName) throws DeploymentException {
  File moduleFile = new File(moduleFileName);
  if (!moduleFile.exists()) {
    throw new DeploymentException("Module archive '" + moduleFileName + "' doesn't exist");
  }
  DeploymentFileData dfd = new DeploymentFileData(moduleFile, new ModuleDeployer(this));
  dfd.deploy();
}
origin: org.apache.axis2/axis2-kernel

public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {
  File deploymentFile = deploymentFileData.getFile();
  if(deploymentFile == null){
  String serviceStatus = "";
  try {
    deploymentFileData.setClassLoader(isDirectory,
                     axisConfig.getServiceClassLoader(),
        (File)axisConfig.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
        axisConfig.isChildFirstClassLoading());
    OMElement serviceMetaData = archiveReader.buildServiceDescription(
        deploymentFileData.getAbsolutePath(), configCtx, isDirectory);
    deploymentFileData.setServiceMetaData(serviceMetaData);
    Map<String, AxisService> serviceMap = executeServiceBuilderExtensions(
       deploymentFileData, configCtx);        
    serviceGroup.setServiceGroupClassLoader(deploymentFileData.getClassLoader());
    ArrayList<AxisService> serviceList = archiveReader.processServiceGroup(
        serviceMetaData, deploymentFileData,
        serviceGroup, isDirectory, serviceMap,
        configCtx);
    URL location = deploymentFileData.getFile().toURI().toURL();
    de.printStackTrace();
    log.error(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE,
                   deploymentFileData.getName(),
                   de.getMessage()),
         de);
                   deploymentFileData.getName(),
origin: org.apache.axis2/axis2-kernel

String serviceHierarchy = Utils.getServiceHierarchy(deploymentFileData.getAbsolutePath(), 
    this.directory);
  String extension = DeploymentFileData.getFileExtension(deploymentFileData.getName());
  if ("class".equals(extension)) {
    File file = deploymentFileData.getFile();
    File parentFile = file.getParentFile();
    ClassLoader classLoader =
    log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_POJO,
        serviceHierarchy + className,
        deploymentFileData.getFile().getAbsolutePath()));
          createAxisServiceUsingAnnogen(className,
              classLoader,
              deploymentFileData.getFile().toURI().toURL());
    for (String className : classList) {
      ArrayList<URL> urls = new ArrayList<URL>();
      urls.add(deploymentFileData.getFile().toURI().toURL());
      urls.add(configCtx.getAxisConfiguration().getRepository());
      String webLocation = DeploymentEngine.getWebLocationString();
          deploymentFileData.getName());
      for (Object anAxisServiceList : axisServiceList) {
        AxisService axisService = (AxisService)anAxisServiceList;
    } else {
      String msg = "Error:\n No annotated classes found in the jar: " +
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

PrivilegedCarbonContext.getThreadLocalCarbonContext().setApplicationName(deploymentFileData.getName());
  this.axisConfig.removeFaultyService(deploymentFileData.getFile().getAbsolutePath());
    deploymentFileData.getAbsolutePath(), this.repoDir);
if (serviceHierarchy == null){
  serviceHierarchy = "";
      this.getServiceNameFromDSContents(deploymentFileData.getFile());
                  this.getServiceNameFromDSContents(deploymentFileData.getFile()) +
                  "\' data service.");
      deploymentFileData.getFile().toURI().toURL(), deploymentFileData,
      this.axisConfig);
        deploymentFileData.getName(), deploymentFileData.getAbsolutePath()));
  log.error(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE, deploymentFileData.getName()), e);
      deploymentFileData.getName()), e);
} catch (Throwable e) {
  errorMessage = DBUtils.getStacktraceFromException(e);
  log.error(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE, deploymentFileData.getName()), e);
  throw new DeploymentException(Messages.getMessage(
      DeploymentErrorMsgs.INVALID_SERVICE,
      deploymentFileData.getName()), e);
} finally {
  if (!successfullyDeployed)	{
origin: org.apache.synapse/synapse-core

log.info("Loading extensions from: " + deploymentFileData.getAbsolutePath());
  boolean isDirectory = deploymentFileData.getFile().isDirectory();
  deploymentFileData.setClassLoader(isDirectory, getClass().getClassLoader(),
      (File) cfgCtx.getAxisConfiguration().getParameterValue(
          Constants.Configuration.ARTIFACTS_TEMP_DIR),
    = (DeploymentClassLoader)deploymentFileData.getClassLoader();
  Thread.currentThread().setContextClassLoader(urlCl);
origin: org.wso2.carbon.mediation/org.wso2.carbon.event.sink

  inputStream = new BufferedInputStream(new FileInputStream(new File(deploymentFileData.getAbsolutePath())));
  XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(inputStream);
  StAXOMBuilder builder = new StAXOMBuilder(reader);
  OMElement eventSink = builder.getDocumentElement();
  String eventSinkName = FilenameUtils.getBaseName(deploymentFileData.getFile().getName());
  EventSinkStore.getInstance().addEventSink(EventSink.createEventSink(eventSink, eventSinkName));
  log.info("Deploying event sink: " + eventSinkName + " - file: " + deploymentFileData.getAbsolutePath());
} catch (FileNotFoundException e) {
  throw new DeploymentException(
      "Deployment artifact file \"" + deploymentFileData.getAbsolutePath() + "\" not found", e);
} catch (XMLStreamException e) {
  throw new DeploymentException(
      "Event sink XML in \"" + deploymentFileData.getAbsolutePath() + "\" is malformed", e);
} catch (EventSinkException e) {
  throw new DeploymentException(
      "Event sink configuration in \"" + deploymentFileData.getAbsolutePath() + "\" is invalid", e);
} finally {
  if (inputStream != null) {
    } catch (IOException e) {
      log.warn("Failed to close file input stream after deploying event sink from file "
           + deploymentFileData.getAbsolutePath());
origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

/**
 * Checks whether the service that is being deployed is already marked as a faulty service
 *
 * @param deploymentFileData    DeploymentFileData instance corresponding to the service being
 *                              deployed.
 * @return                      Boolean representing the existence of the service as a faulty
 *                              service
 */
private boolean isFaultyService(DeploymentFileData deploymentFileData) {
  String faultyServiceFilePath = deploymentFileData.getFile().getAbsolutePath();
  AxisService faultyService = CarbonUtils.getFaultyService(faultyServiceFilePath, this.configCtx);
  return faultyService != null;
}
origin: org.apache.axis2/axis2-kernel

public void deploy(DeploymentFileData deploymentFileData) {
  File deploymentFile = deploymentFileData.getFile();
  if (isDirectory && deploymentFileData.getName().startsWith(".")) {  // Ignore special meta directories starting with .
    return;
    deploymentFileData.setClassLoader(isDirectory,
                     axisConfig.getModuleClassLoader(),
        (File)axisConfig.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
        this.axisConfig.isChildFirstClassLoading());
    AxisModule metaData = new AxisModule();
    metaData.setModuleClassLoader(deploymentFileData.getClassLoader());
    metaData.setParent(axisConfig);
    archiveReader.readModuleArchive(deploymentFileData, metaData, isDirectory, axisConfig);
  } catch (DeploymentException e) {
    log.error(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE,
                   deploymentFileData.getName(),
                   e.getMessage()),
         e);
  } catch (AxisFault axisFault) {
    log.error(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE,
                   deploymentFileData.getName(),
                   axisFault.getMessage()),
         axisFault);
  } catch (MalformedURLException e) {
    log.error(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE,
                   deploymentFileData.getName(),
origin: org.apache.axis2/axis2-kernel

            .getParameterValue(
                Constants.Configuration.ARTIFACTS_TEMP_DIR));
DeploymentFileData filedata = new DeploymentFileData(
    inputFile);
filedata.setClassLoader(false,
        moduleClassLoader,
        (File)axisConfig.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
    axisConfig);
serviceGroup.setServiceGroupClassLoader(filedata
    .getClassLoader());
ArrayList serviceList = archiveReader.processServiceGroup(
    filedata.getAbsolutePath(), filedata, serviceGroup,
    false, wsdlservice, configCtx);
for (Object aServiceList : serviceList) {
origin: org.apache.axis2/axis2-kernel

public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {
  deploymentFileDataMap.put(deploymentFileData.getAbsolutePath(), deploymentFileData);
}
origin: org.apache.axis2/axis2-kernel

try {           
  List<String> classList = null;
  if(DeploymentFileData.isServiceArchiveFile(deploymentFileData.getAbsolutePath())){
    FileInputStream fin = new FileInputStream(deploymentFileData.getAbsolutePath());
    try {
      ZipInputStream zin = new ZipInputStream(fin);
    File directory = deploymentFileData.getFile();
    classList = new ArrayList<String>();
    for(Iterator<File> fileItr= FileUtils.iterateFiles(directory, new String[]{"class"}, true); fileItr.hasNext();){
origin: org.apache.axis2/axis2-kernel

public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {
  boolean isDirectory = deploymentFileData.getFile().isDirectory();
  ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
  try {
    deploymentFileData.setClassLoader(isDirectory,
        axisConfig.getModuleClassLoader(),
        (File) axisConfig.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
        axisConfig.isChildFirstClassLoading());
    ClassLoader loader = deploymentFileData.getClassLoader();
    Thread.currentThread().setContextClassLoader(loader);
    InputStream xmlStream = loader.getResourceAsStream("META-INF/transport.xml");
origin: org.apache.axis2/axis2-kernel

                       ArchiveReader archiveReader,
                       HashMap<String, AxisService> wsdlServices) throws AxisFault {
DeploymentFileData currentDeploymentFile = new DeploymentFileData(null, null);
currentDeploymentFile.setClassLoader(classLoader);
AxisServiceGroup serviceGroup = new AxisServiceGroup();
serviceGroup.setServiceGroupClassLoader(classLoader);
origin: org.apache.axis2/axis2-kernel

public void deoloyFromUrl(DeploymentFileData deploymentFileData) {
  URL fileUrl = deploymentFileData.getUrl();
  StringWriter errorWriter = new StringWriter();
  String moduleStatus = "";
    module.setModuleClassLoader(deploymentClassLoader);
    module.setParent(axisConfig);
    module.setArchiveName(DescriptionBuilder.getShortFileName(deploymentFileData.getName()));
    populateModule(module, fileUrl);
    module.setFileName(fileUrl);
    log.error(
        Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE,
            deploymentFileData.getName(), e.getMessage()), e);
    PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
    e.printStackTrace(error_ptintWriter);
    log.error(
        Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE,
            deploymentFileData.getName(), axisFault.getMessage()), axisFault);
    PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
    axisFault.printStackTrace(error_ptintWriter);
    log.error(
        Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE,
            deploymentFileData.getName(), t.getMessage()), t);
    PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
    t.printStackTrace(error_ptintWriter);
    if (moduleStatus.startsWith("Error:")) {
origin: org.apache.axis2/axis2-kernel

DeploymentFileData currentDeploymentFile = new DeploymentFileData(modulearchive,
    deployer);
axismodule = new AxisModule();
ArchiveReader archiveReader = new ArchiveReader();
currentDeploymentFile.setClassLoader(false, config.getModuleClassLoader(), null,
    config.isChildFirstClassLoading());
axismodule.setModuleClassLoader(currentDeploymentFile.getClassLoader());
archiveReader.readModuleArchive(currentDeploymentFile, axismodule,
    false, config);
origin: org.apache.axis2/axis2-kernel

String serviceName = DescriptionBuilder.getShortFileName(currentFile.getName());
if (serviceName != null) {
  axisService = wsdlServices.get(serviceName);
      DescriptionBuilder.getShortFileName(currentFile.getName()));
axisService.setClassLoader(currentFile.getClassLoader());
origin: org.apache.axis2/axis2-kernel

  if (entry.getName().equalsIgnoreCase(SERVICES_XML)) {
    axisServiceGroup.setServiceGroupName(
        DescriptionBuilder.getShortFileName(currentFile.getName()));
    return buildServiceGroup(zin, currentFile, axisServiceGroup, wsdlServices,
                 configCtx);
try {
  in = new FileInputStream(file);
  axisServiceGroup.setServiceGroupName(currentFile.getName());
  return buildServiceGroup(in, currentFile, axisServiceGroup, wsdlServices, configCtx);
} catch (FileNotFoundException e) {
org.apache.axis2.deployment.repository.utilDeploymentFileData

Javadoc

DeploymentFileData represents a "thing to deploy" in Axis2. It consists of a file, a deployment ClassLoader, and a Deployer.

Most used methods

  • getAbsolutePath
  • getFile
  • getName
    Get the name of the file.
  • <init>
  • getClassLoader
  • setClassLoader
  • deploy
  • getFileExtension
  • getServiceMetaData
  • getUrl
  • isModuleArchiveFile
  • isServiceArchiveFile
    Checks whether a given file is a jar or an aar file.
  • isModuleArchiveFile,
  • isServiceArchiveFile,
  • setServiceMetaData

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now