Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Calling classes of spring from javascript

  1. #1
    Join Date
    Mar 2007
    Posts
    26

    Default Calling classes of spring from javascript

    I am working on an application that uses Spring as well as hibernate technologies.....for the data loading and generation part i am using kettle.....i need to call some classes (in Spring which inturn call classes in Hibernate) of my application through the Java Script option in Kettle......please suggest a way how i can do that.....what is the best approach to do this??

  2. #2
    Join Date
    Apr 2007
    Posts
    16

    Default

    I don't know what's the best way, but I can tell you how I do it and hopefully that'll help you.
    I have Kettle running in the context of my application by executing my jobs/transformations from the API.
    I have my Spring managed beans accessible through a singleton. Then I access it this way:

    Code:
    var scriptBean;
    if (scriptBean== null)
    {
        scriptBean= Packages.org.acme.SpringBeans.getInstance().getEtlBean().getMyScriptBean(_step_, "param1", "param2");
    }
    var val = scriptBean.processRow(row);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.