Adam Bien's Weblog

JCache Based Configurator-JC2

jc2 is an apache licensed library (=a single class) which exposes a cache named configuration to an application by using the fully qualified field names as keys and makes them injectable.

Example:


package com.airhacks.jc2.boundary;

public class HelloResource {

    @Inject
    private String greeting;

}

A value for the key named: com.airhacks.jc2.boundary.HelloResource.greeting is resolved in the configuration and injected.

Installation:


<dependency>
  <groupId>com.airhacks</groupId>
  <artifactId>jc2</artifactId>
  <version>0.0.1</version>
</dependency>

headlands clusters with jc2 out-of-the-box and can be easily used for administration.

Checkout: github.com/AdamBien/jc2 for more details. A more flexible configuration is in the pipeline, read the JavaMagazine article for some inspiration.

We will discuss configuration in more depth at Java EE Workshops at Munich Airport, Terminal 2 and particularly at Java EE 7 Microservices.


NEW workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
Online Workshops
...the last 150 posts
...the last 10 comments
License