3 Replies Latest reply: May 10, 2012 4:53 AM by Daniel Bevenius RSS

How to install third party jars in switchyard?

alex liu Newbie

I find it's hard to install third party jars  in switchyard.This problem is common in osgi environment.

Can you give me a thought about this?I think it's very important to make switchyard flexible and convenient.

Thanks.

  • 1. Re: How to install third party jars in switchyard?
    Keith Babo Master

    Agree on making SwitchYard flexible and convenient.  The honest answer here is that we haven't yet focused on making it easy for users to add additional modules.  It's possible, given the fact that we run on AS7 which is based on MSC, but I definitely wouldn't call it "drop and go" easy.  Dan tells me that the AS7 team has added a CLI command to create a module from a jar, so that will help.  We will definitely smooth out the common use cases, particularly around extending camel with additional components/capabilities, but it's just not there yet.

  • 2. Re: How to install third party jars in switchyard?
    alex liu Newbie

    keith,thanks a lot.

  • 3. Re: How to install third party jars in switchyard?
    Daniel Bevenius Master

    The CLI command looks like this:

     

    [standalone@localhost:9999 /] module --help
    SYNOPSIS
    
    
      To add a module
    
    
        module add --name=module_name [--slot=slot_name] --resources=list_of_jars
                   (--module-xml=file_path |
                   [--dependencies=list_of_module_names] [--properties=list_of_properties] [--main-class=fully_qualified_class_name]])
    
    
      To remove a module
    
    
        module remove --name=module_name [--slot=slot_name]
        
    
    
    DESCRIPTION
    
    
        The command is used to add and remove modules.
        
        When a module is added, the corresponding to the module name directory structure
        will be created in the AS7 module repository. The JAR files specified as resources
        will be copied to the module's directory. Unless module.xml file was specified
        as an argument, it will be automatically generated.
    
    
        When a module is removed, its module.xml and other resources will be removed
        from the module repository as well as its directory structure up to the point
        where other modules met.
    
    
        NOTE: the command can generate only simple module.xml files.
        More specifically, it supports:
        - resources-root elements that point to files;
        - modules dependencies as simple module names;
        - module's main-class;
        - module properties.
    
    
    
    
    ARGUMENTS
    
    
     --name          - (required) the name of the module to be added or removed.
                       NOTE: slot is not a part of the module name.
    
     --slot          - (optional) specifies a slot which should be created or removed.
                       If this argument is not specified, "main" slot is assumed.
    
     --resources     - (used with add, required) a list of filesystem paths (usually jar files)
                       separated by a filesystem-specific path separator, i.e. java.io.File.pathSeparatorChar.
                       The file specified will be copied to the created module's directory.
                       
     --module-xml    - (used with add, optional) filesystem path to the module.xml file
                       which should be used for the added module. The file will be copied
                       to the created module's directory. If this argument is not specified,
                       module.xml file will be generated in the new created module's directory.
                       
     --dependencies  - (used with add, optional) a comma-separated list of module names
                       the module being added depends on.
                       NOTE: this argument makes sense only when the module.xml file is generated,
                       i.e. when the --module-xml argument isn't specified
                       
     --properties    - (used with add, optional) a comma-separated list of property_name=property_value
                       pairs that will define module properties.
                       NOTE: this argument makes sense only when the module.xml file is generated,
                       i.e. when the --module-xml argument isn't specified
                       
     --main-class    - (used with add, optional) a fully qualified class name that declares
                       the modules main method.
                       NOTE: this argument makes sense only when the module.xml file is generated,
                       i.e. when the --module-xml argument isn't specified