• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Contribution to the Code Barn

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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: 23036
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • 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
  • 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: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe we should rename the zip file using CamelCase to jrUnitTestHelper.zip
 
permaculture is largely about replacing oil with people. And one tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!