Customer Portal

Integrating cloverETL into spring application

Comments 1

  • Avatar
    mvarecha
    0
    Comment actions Permalink
    Hello,

    I wouldn't use Clover with Spring in the way you described. It's not good idea to mix instances of GraphElement managed by Spring and instances managed by Clover in the same graph.
    TransformationGraph makes compact unit with its elements.
    Basically your problem is to use DB connection, which is not specified in graph XML, but in Spring configuration.

    I would solve it like this:
    At the moment of initialization or just before execution of graph:
    - Create instance of DBConnection with parameters (url, user, pass, etc.) taken from your Spring configuration. Use ID, which is used in graph XML as reference to the DB connection.
    - Create instance of graph from XML
    - Inject instance of DBconnection into graph instance: transformationGraph.addConnection(IConnection connection) This has to be done before graph init.
    - init graph
    - now you have instance of transformation graph, which may be used by Spring bean

    Regards,
    Martin Varecha

Please sign in to leave a comment.