scriptella.driver.jexl

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Natural Language Processing
51.Net
52.Parser
53.PDF
54.Portal
55.Profiler
56.Project Management
57.Report
58.RSS RDF
59.Rule Engine
60.Science
61.Scripting
62.Search Engine
63.Security
64.Sevlet Container
65.Source Control
66.Swing Library
67.Template Engine
68.Test Coverage
69.Testing
70.UML
71.Web Crawler
72.Web Framework
73.Web Mail
74.Web Server
75.Web Services
76.Web Services apache cxf 2.2.6
77.Web Services AXIS2
78.Wiki Engine
79.Workflow Engines
80.XML
81.XML UI
Java Source Code / Java Documentation  » Scripting » scriptella » scriptella.driver.jexl 
scriptella.driver.jexl

JEXL Driver for Scriptella.

Allows usage of JEXL scripts in ETL <query> and <script> elements.

The driver uses commons-jexl library which is a part of Scriptella Core. JEXL scripts are interpreted at runtime and generally work slower than compiled scripts (e.g. Janino), nevertheless JEXL scripts are easier to write and maintain especially for non-Java developers.

General information

Driver class:scriptella.driver.jexl.Driver
Runtime dependencies:None

Query and Script Syntax

Standard JEXL scripts syntax is used inside ETL elements.

Bind variables from parent elements are accessible as simple variables. Assignment operator v="value" makes variable v available for nested ETL elements.

Implicit variable query is available in <query> elements. This variable should be used to produce a result set:

    <query>
        i=0; while(i lt 10) {
            i=i+1;
            query.next(); // Causes child script to be executed
        }
        <script>......</script>
    </query>
See ParametersCallbackMap class Javadoc for more details.

Examples

<connection id="jexl" driver="jexl"/>
<connection id="out" driver="oracle" url="jdbc:oracle:thin:@localhost:1521:DB"/>

<query connection-id="jexl">
    i=0;while (i lt 10) {
        i=i+1;
        login='login'+i;
        query.next();
    }
    <script connection-id="out">
        INSERT INTO Table(ID, Login) VALUES (?i, ?login);
    </script>
</query>

The query executes a child script 10 times. As the result of execution 10 records are inserted in a database table.
Java Source File NameTypeComment
Driver.javaClass Driver for JEXL.
JexlConnection.javaClass Scriptella connection adapter for JEXL.
JexlConnectionPerfTest.javaClass
JexlConnectionTest.javaClass Tests for JexlConnection .
JexlContextMap.javaClass Mutable org.apache.commons.jexl.JexlContext implementation for integration into Scriptella execution environment.
JexlDriverITest.javaClass Integration test for scriptella.driver.jexl.Driver JEXL Driver .
JexlProviderException.javaClass Thrown to indicate a problem with JEXL script.
ww_w___._j_ava_2_s._c___om___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.