Code Monkey home page Code Monkey logo

arch-cdi-factory's Introduction

arch-cdi-factory

CDI Factory for EJB 3.x based application services. Release notes

This project implements a proof-of-concept CDI Factory for EJB based services, where:

  • A given service interface is implemented by multiple EJBs and service interface is used as local interface;

  • For each service interface, any EJB is either the "standard" implementation or a "custom implementation" valid in a given "enviroment" (production, test, specific customization and so on);

  • EJBs are "versioned" by applying a custom annotation (@ApplicationService) on the bean class;

  • For each service interface, there must be at least one EJB tagged with @ApplicationService(Version.BASE) to provide a default implementation;

  • We want loosely coupled dependencies among services: we want to use interfaces and let the container initialize the right implementation with respect to an enviroment variable we can set (for example) as Application Server's custom property. In other words, whenever we write:

    @Inject @ApplicationService MyServiceInterface actualImpl;

    we are actually injecting a specific implementation of MyServiceInterface, which one is choosen depends only upon an AppServer parameters.

  • We want injection mechanism to be "smart" : if a customized version for a service exists, then the corrisponding implementation is injected; otherwise, the standard implementation will be injected.


Requirements: JDK 1.8+

Tested on: JBoss WildFly 10.0 final (http://wildfly.org) Build with Eclipse Mars 2.0 (https://eclipse.org). To compile source code, please define a JDK 1.8 runtime and change JRE Library settings in each project property view on Eclipse accordingly.

arch-cdi-factory's People

Contributors

mclaudio76 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.