667514 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 7 Messages: 7 Messages: 7 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

EAC4J: Apache Commons Configuration via JNDI

Posted by: Frank Martinez on August 24, 2008 DIGG
With EAC4J (External Application Configuration For Java) you can externalize your application’s configuration with Apache Commons Configuration and get a Configuration Object via simple JNDI lookup. The isolated classloader decouples all needed classes and dependencies from your application except by one interface.

This is a simple Wrapper over Apache Commons Configuration, so you get all the power of it but decoupled from any additional dependency jar. And additionally you can easily reload the configuration without restart the server.

This was initially developed for Glassfish V2 and has been tested on it only, but I think it would be easy to port to any other.

See the article: http://www.ibstaff.net/fmartinez/?p=52

Threaded replies

·  EAC4J: Apache Commons Configuration via JNDI by Frank Martinez on Sun Aug 24 22:28:26 EDT 2008
  ·  Re: EAC4J: Apache Commons Configuration via JNDI by arjan tijms on Mon Aug 25 18:11:40 EDT 2008
  ·  Re: EAC4J: Apache Commons Configuration via JNDI by greg matthews on Mon Aug 25 19:23:49 EDT 2008
    ·  Re: EAC4J: Apache Commons Configuration via JNDI by Frank Martinez on Mon Aug 25 22:14:00 EDT 2008
    ·  Re: EAC4J: Apache Commons Configuration via JNDI by arjan tijms on Tue Aug 26 15:55:53 EDT 2008
      ·  Re: EAC4J: Apache Commons Configuration via JNDI by greg matthews on Tue Aug 26 23:20:24 EDT 2008
        ·  Re: EAC4J: Apache Commons Configuration via JNDI by arjan tijms on Wed Aug 27 09:32:17 EDT 2008
          ·  Re: EAC4J: Apache Commons Configuration via JNDI by greg matthews on Wed Aug 27 20:48:56 EDT 2008
  Message #267370 Post reply Post reply Post reply Go to top Go to top Go to top

Re: EAC4J: Apache Commons Configuration via JNDI

Posted by: arjan tijms on August 25, 2008 in response to Message #267298
Sound interesting. I'll definitely give this at try.

  Message #267377 Post reply Post reply Post reply Go to top Go to top Go to top

Re: EAC4J: Apache Commons Configuration via JNDI

Posted by: greg matthews on August 25, 2008 in response to Message #267298
I'll take a look, but I just typically deploy a JMX module (a .sar) in JBoss in each environment (DEV, UAT, PROD) with all the config properties.

That way, the .war deployed is *almost* config-less, except for c3p0 settings, since I don't trust JBoss connection pooling.

  Message #267379 Post reply Post reply Post reply Go to top Go to top Go to top

Re: EAC4J: Apache Commons Configuration via JNDI

Posted by: Frank Martinez on August 25, 2008 in response to Message #267377
Nice approach. I will explore JMX in glassfish ...

  Message #267411 Post reply Post reply Post reply Go to top Go to top Go to top

Re: EAC4J: Apache Commons Configuration via JNDI

Posted by: arjan tijms on August 26, 2008 in response to Message #267377
except for c3p0 settings, since I don't trust JBoss connection pooling.


Slightly off topic, but why don't you trust Jboss connection pooling?

  Message #267426 Post reply Post reply Post reply Go to top Go to top Go to top

Re: EAC4J: Apache Commons Configuration via JNDI

Posted by: greg matthews on August 26, 2008 in response to Message #267411
except for c3p0 settings, since I don't trust JBoss connection pooling.


Slightly off topic, but why don't you trust Jboss connection pooling?


1. Since moving to c3p0 my app is solid, and doesn't crash with out of connection messages.

2. The comments in the JBoss connection pool code scare me.

  Message #267438 Post reply Post reply Post reply Go to top Go to top Go to top

Re: EAC4J: Apache Commons Configuration via JNDI

Posted by: arjan tijms on August 27, 2008 in response to Message #267426
except for c3p0 settings, since I don't trust JBoss connection pooling.


Slightly off topic, but why don't you trust Jboss connection pooling?


1. Since moving to c3p0 my app is solid, and doesn't crash with out of connection messages.

2. The comments in the JBoss connection pool code scare me.


I see, any pointer to one of these comments?

  Message #267534 Post reply Post reply Post reply Go to top Go to top Go to top

Re: EAC4J: Apache Commons Configuration via JNDI

Posted by: greg matthews on August 27, 2008 in response to Message #267438
I see, any pointer to one of these comments?


http://fisheye.jboss.org/browse/JBossAS/trunk/connector/src/main/org/jboss/resource/connectionmanager/JBossManagedConnectionPool.java

Try Googling for JBoss connection pool leak. I think JBoss is great, I just time have time to faff about with their dodgy connection pool in a production system.

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Auto-Scaling Your Existing Web Application

In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources. (May 19, Tech Talk)

Free Book: Jakarta-Struts Live

Download the entire book of Jakarta-Struts Live and learn about Struts MVC, Tiles, the Validator, DynaActionForms, plug-ins, internationalization, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map