• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Contribution to the Code Barn

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have made some small improvements to the JUnit JNDI DataSource helper package: http://www.javaranch.com/CodeBarn/jrunittesthelper.zip

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");
 
Trailboss
Posts: 23780
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Stephen More
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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: http://www.javaranch.com/codebarn.jsp


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.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe we should rename the zip file using CamelCase to jrUnitTestHelper.zip
 
reply
    Bookmark Topic Watch Topic
  • New Topic