File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ranch Office and the fly likes Contribution to the Code Barn Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "Contribution to the Code Barn" Watch "Contribution to the Code Barn" New topic

Contribution to the Code Barn

Stephen More

Joined: Feb 01, 2007
Posts: 5
I have made some small improvements to the JUnit JNDI DataSource helper package:

How can I contribute it back to the CodeBarn ?

Updates include:
- Built using maven2
- Opens the properties file using classpath
- Works with environment naming context ( see below example )

// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context)initCtx.lookup("java:comp/env");

// Look up our data source
DataSource ds = (DataSource)envCtx.lookup("jdbc/EmployeeDB");
paul wheaton

Joined: Dec 14, 1998
Posts: 20802

Sorry for my delay in getting back to you on this. I've been sick.

In looking just at the name of this, it appears to be something to help a person test JRun? There's a name I have not heard in a long time. Without me opening it up, can you tell me more about it? Do we have a web page about it somewhere?

permaculture Wood Burning Stoves 2.0 - 4-DVD set
Stephen More

Joined: Feb 01, 2007
Posts: 5
The title is: "JUnit JNDI DataSource helper package"

The description is: can be used to Simulate JNDI lookups for Database Connections.

and can be found here:

It allows me to run tests against my code without deploying it to a servlet container. Perhaps there is something else that already does this, but I found this and made it work. It does exactly what I need it to do.
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9056
Maybe we should rename the zip file using CamelCase to

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
I agree. Here's the link:
subject: Contribution to the Code Barn