Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

javax.sql.DataSource query?

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am using following code to creating connection pool.



Now i want to know that when i am using the same code in a simple class and compile it in jdk 1.3 version. i am getting compiler error.While when usingthe same code in a jsp page and executing that page in a web serveror application server it is working fine.

So can anybody please explain me what is happening??

Thanks,
Jignesh
[ August 07, 2006: Message edited by: Bear Bibeault ]
 
Author
Posts: 531
Mac OS X Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you get some error regarding to your classpath .
can you pleas post the compiler error here ? after people here see the compiler error they can help you more effectively.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
INITIAL_CONTEXT_FACTORY=weblogic.jndi.WLInitialContextFactory
PROVIDER_URL=t3://" + "IP:PORT

put these properties in a text file let say dsproperteis.properties
now use the following code to lookup your datasource

Properties p=new Properties();
try {
p.load(new FileInputStream("dsproperteis.properties"));
System.setProperties(p);
// lookup your datasource here
}
catch (Exception e)
{
e.printStackTrace();
}

take care while providing the properties file.
put it in the same location where your class contianing main method is placed.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic