Stephen More

Greenhorn
+ Follow
since Feb 01, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Stephen More

In this situation, can you force the classloader to try again ?

I have tried the following without much success:

try
{
the.native.method()
}
catch( java.lang.UnsatisfiedLinkError e )
{
dll = download from web and put it in the path
java.lang.ClassLoader cl = Thread.currentThread().getContextClassLoader();
cl.loadClass( "the.native" );
}
17 years ago
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.
17 years ago
The closest thing I have ever found to cpan is Java-Source.

But currently there is no JSR168 portlet category. Do you think this would be a good place to start... create a listing where portlets can be downloaded from ?
17 years ago
I have searched High and Low looking for that 1 place to download JSR-168 portlets. I can't find it. If I need a perl module there is one and only 1 place to go cpan.org. It has any and every perl module one could ever need.

We need a similar site for portlets. If you need a portlet there should be 1 site that should be your first and only stop.

Here is what I have found:
  • GEMS - Last Announcement 1/28/05
  • Yahoo Group JSR-168 - Dozen portlets
  • Portlet Repository - Dozen portlets
  • POST ( Portlet Open Source Trading Site )




  • None of these can even come close to what cpan has to offer. Is there a good repository out there that I just can't find, or is it up to us as a community to build one and make it the best that it can be ?
    17 years ago
    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");
    17 years ago