[ 
https://issues.apache.org/jira/browse/SYNAPSE-745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237473#comment-13237473
 ] 

Udayanga Wickramasinghe commented on SYNAPSE-745:
-------------------------------------------------

I intended to give an intro on Synapse libraries but got delayed a bit than i 
anticipated...So Template libraries are a mechanism to group synapse templates 
and automatically expose it as a self contained set of function modules..You 
can consider a template library as a container consisting  a set of templates 
grouped in a particular order..Currently a synapse template library is shipped  
as a ".zip" file and should be deployed inside 
{$SYNAPSE_HOME}/repository/conf/synapse-libs . If installed successfully all 
templates within the library will be accessible to any synapse user..
Following is a sample skeleton structure of a template library..
.
|-- artifacts.xml
|-- com
|   `-- synapse
|       `-- sample
|           `-- SynapseLibTestMediator.class
|-- lib
|   `-- test-mediator-1.0.0.jar
|-- template_dir-1
|   |-- artifact.xml
|   |-- templ1_ns1.xml
|   `-- templ2_ns1.xml
`-- template_dir-2
    |-- artifact.xml
    |-- templ1_ns2.xml
    `-- templ2_ns2.xml


Following are these components at an overview...

a) artifacts.xml -- contains synapse library name , package name information 
and template groupings
<artifacts>
    <artifact name="synapse.lib.name" package="synapse.lib.package.name" >
        <dependency artifact="template.group.name" />*
        <description>sample synapse library</description>?
    </artifact>
</artifacts>

b) artifact.xml -- contains information about each individual template group.. 
ie: - names of the templates in the group , corresponding configuration file 
,etc
<artifact name="template.group.name" type="synapse/template" >
    <subArtifacts>
    <artifact name="template.name" >
            <file>template_file.xml</file>
            <description>a sample synapse library function </description>?
    </artifact>*
    </subArtifacts>
</artifact>

c) template_file.xml -- corresponds to each individual template configuration
d) ./lib --> any classes for class loading
  or can contain the .class files from the root level..

Also utilizing a a synapse library is a three step process..
a) create and deploy the library
b) importing the libary into synapse
    users should deploy a import_lib_name.xml into 
{$SYNAPSE_HOME}/repository/conf/synapse-config/imports
c) execute functions of a library using a template invoker
    ie:- <call-template target="synapse.lib.name.template_name">
                        <with-param name="..." value="..."/> *                  
     
          </call-template>

With Template libraries in place, idea is to group a identified set of EIP's 
that can be transported with synapse..So the first step should be to get 
familiarized with both templates and template libraries very well and on any 
areas that need improvement wrt the project scope.. I expect that you identify 
a set of useful EIPs and the function/module interfaces required for designing 
EIP's and the corresponding design methodology in terms of synapse 
configurations , templates and template libraries..
Regards,
udayanga 
    
                
> Implement a Collection of Integration Patterns for Synapse
> ----------------------------------------------------------
>
>                 Key: SYNAPSE-745
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-745
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Deployment
>         Environment: Any
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2012
>             Fix For: FUTURE
>
>
> Currently there's an ongoing effort to implement the concept of 
> functions/templates for the Synapse configuration language (SYNAPSE-738). 
> This provides a simple approach for implementing support for various 
> enterprise integration patterns (EIP) in Synapse. One could implement a 
> pattern as a function and then reuse it in various services and message flows 
> in Synapse. To make most out of this, following action items need to be 
> completed:
> 1. Make it possible to define any Synapse component (sequences, services, 
> endpoints, local entries) as a reusable function
> 2. Implement a library of built-in integration patterns for Synapse (Some of 
> the well known patterns are documented at http://www.eaipatterns.com - It 
> would be great to support most of these in Synapse out of the box)
> Goals
> 1. Implement a library of identified set of built-in integration patterns 
> using synapse templates and template libraries
> 2. Sample and Test integration into Synapse for eip pattern libararies 
> 3. Improve Documentation around the eip pattern libararies

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to