Scripting - Groovy

Integration with Groovy

Categories

Categories

Groovy Languages
GroupId

GroupId

com.seovic.coherence
ArtifactId

ArtifactId

scripting-groovy
Last Version

Last Version

0.6
Release Date

Release Date

Type

Type

jar
Description

Description

Scripting - Groovy
Integration with Groovy

Download scripting-groovy

How to add to project

<!-- https://jarcasting.com/artifacts/com.seovic.coherence/scripting-groovy/ -->
<dependency>
    <groupId>com.seovic.coherence</groupId>
    <artifactId>scripting-groovy</artifactId>
    <version>0.6</version>
</dependency>
// https://jarcasting.com/artifacts/com.seovic.coherence/scripting-groovy/
implementation 'com.seovic.coherence:scripting-groovy:0.6'
// https://jarcasting.com/artifacts/com.seovic.coherence/scripting-groovy/
implementation ("com.seovic.coherence:scripting-groovy:0.6")
'com.seovic.coherence:scripting-groovy:jar:0.6'
<dependency org="com.seovic.coherence" name="scripting-groovy" rev="0.6">
  <artifact name="scripting-groovy" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.seovic.coherence', module='scripting-groovy', version='0.6')
)
libraryDependencies += "com.seovic.coherence" % "scripting-groovy" % "0.6"
[com.seovic.coherence/scripting-groovy "0.6"]

Dependencies

compile (3)

Group / Artifact Type Version
com.seovic.coherence : core jar 0.6
org.codehaus.groovy : groovy jar 2.1.8
org.slf4j : slf4j-api jar 1.6.6

provided (1)

Group / Artifact Type Version
com.oracle.coherence » coherence jar 12.1.2-0-0

test (6)

Group / Artifact Type Version
com.seovic.coherence : core test-jar 0.6
commons-io : commons-io jar 2.4
junit : junit jar 4.8.2
org.slf4j : jcl-over-slf4j jar 1.6.6
org.slf4j : log4j-over-slf4j jar 1.6.6
org.slf4j : slf4j-simple jar 1.6.6

Project Modules

There are no modules declared in this project.

Coherence Tools

Coherence Tools project is a collection of tools and extensions for Oracle Coherence in-memory data grid.

Modules

The project consists of several modules:

Core

Contains core interfaces and classes that most of the other projects depend on, such as:

  • Expression abstraction, which defines a common API and provides implementations for various expression languages (MVEL, SpEL, OGNL, Groovy, and Java Scripting)

  • Extractor interface and many useful implementations, including ExpressionExtractor, which can be used anywhere Coherence ValueExtractor is expected.

  • Factory interface and a number of implementations, which can be very useful in certain situations. For example, when distributing work across the cluster, your tasks might depend on some non-serializable objects (database connection, for example). You can use serializable DriverManagerDataSourceFactory in this case, which will allow you to create properly configure DataSource instances within the cluster.

  • ClusteredExecutorService, which allows you to distribute Callable or Runnable tasks across the cluster and execute them using Invocation Service.

  • Useful collection implementations, including Remote Collections, which use entry processors to manipulate collections within partitioned cache without moving the whole collection across the wire.

  • Number of base classes and useful implementations of Coherence entry processors, filters, aggregators, cache stores, etc.

POF

Provides several tools and extensions that make Portable Object Format (POF) much easier to work with, including:

  • PofXjcPlugin, which implements PortableObject interface within classes generated from the XML schema by the XJC compiler.

  • PortableTypeGenerator, which uses bytecode instrumentation to implement POF serialization code based on class and field annotations and provides full support for schema evolution within class hierarchy.

Identity

Provides support for sequential identifier generation (autoincrement) within Coherence cluster.

Loader

Provides framework for bulk data loading and a number of useful Source and Target implementations, including Coherence caches, databases, CSV and XML files, Cobol copybooks, etc.

Scheduler

Provides support for Quartz-based job scheduling within Coherence cluster.

Batch

Provides support for complex batch job execution within the cluster.

Integration

Contains a number of smaller sub-modules that provide integration between Coherence and other systems:

Building from Source

Coherence Tools uses Apache Maven as a build system, so for the most part building the project is as simple as:

$ mvn clean install

However, the fact that the project depends on a commercial product which is not available in Maven Central means that your first build will likely fail because of the missing dependency on coherence.jar.

In order to solve that problem you will need to install coherence.jar manually into your local repository or your organization's repository manager, such as Nexus, using appropriate groupId and artifactId.

To install coherence.jar into a local repository change to $COHERENCE_HOME/lib directory and run the following command:

$ mvn install:install-file  \
      -DgroupId=com.oracle.coherence  \
      -DartifactId=coherence  \
      -Dversion=3.7.1  \
      -Dfile=coherence.jar  \
      -Dpackaging=jar \
      -DgeneratePom=true

Of course, this assumes that you are installing Coherence 3.7.1 JAR file. If you want to install one of the more recent releases, change the version number in the command above accordingly (POM file is already configured to use the most recent version >= 3.7.1 that exists in your repository, so you don't need to change anything there).

Once the coherence.jar is properly installed into your Maven repository, you should be able to build all the modules except for integrations.

Building Integrations

By their very nature integrations depend on third party products. For example, in order to build and test Riak integration you will need to have Riak server running.

Because of this, we have excluded integration projects from the main build. You will have to build them separately, once you have satisfied their external dependencies (check individual projects for build prerequisites).

The easiest way to do that is to run mvn clean install within each project's directory, but you can also build them all by running mvn clean install within parent integration project.

Supported Coherence Versions

While most of the code will work just fine with older Coherence releases without any modification, in order to build the project yourself you will need Coherence 3.7.1 or a more recent release.

The main reason for that is that we decided to use dependencies that are already embedded into coherence.jar, such as ASM and MVEL, instead of introducing additional direct dependencies. In order to compile Coherence Tools against Coherence 3.6, you will have to modify coherence.version property in the POM, add direct dependencies on ASM and MVEL, and modify package names within classes that fail to compile to point to direct dependencies instead of the ones that are embedded into Coherence 3.7.1 or higher.

Coherence versions older than 3.6 are not officially supported.

License

Coherence Tools is licensed under the terms of the Apache License, Version 2.0

Versions

Version
0.6