Giter Site home page Giter Site logo

jndie's Introduction

Purpose

JNDIe provides a (really!) lightweight JNDI environment/server to help software development, mostly for testing purposes.

Basic usage

  • Put a mock-jndi.xml configuration file on your classpath.
  • Add jndie.jar (and the other dependent libraries, like commons-digester and commons-beanutils) to your classpath. Or use maven: com.devx jndie 1.1 compile
  • Add "-Djava.naming.factory.initial=com.devx.naming.MockContextFactory" to JVM.
  • Have fun!

History

Origins and version 1.0

Work with EJB complexity and long development cycle times can be a pain, sometimes. Particularly if you need to do the code-deploy-try-fix cycle a lot of times.

That is what happened to me. On a specific task, I was spending more time on useless EJB aspects rather producing some useful code. On that task, I just needed to do a JNDI lookup to get a data source. No EJB specific thing was required. So, I made a context factory that could do lookups and return a data source. It was just a library, not a program that I need to run. I didn't have to deploy anything to do my tweaks and, for a time, I was happy.

It's codename was "JBoss Emulator Tabajara".

After a few days, I had to make that code be invoked by a session bean that I'd created, and I need to test that session bean. So, I had to return to the good and old code-deploy-try-fix cycle. So boring, slow and unproductive! I had to add some support to session beans to my library! And I did.

Some coworkers have liked, and asked me to add some other features, like:

  • Basic transaction support.
  • Check serialization on remote interfaces calls.
  • Better configuration file.

Now this baby can run most of our systems. For example, on my development machine, our site (http://www.guiamais.com.br) runs without JBoss: tomcat with the "Tabajara" in WEB-INF/lib is enough. Of course, staging, pre-production and production environments run JBoss and tomcat.

After a few months I was invited to give a lecture about it. So I created jndie (or simple JNDI and EJB container emulator).

Version 1.1

In the 1.1 version, I ripped off the EJB stuff, as nobody uses this sh*t anymore.

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.