• 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

Connection Pooling - is JNDI the only way?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've read a lot of articles and guides in JDBC connection pooling, and all of them involve the use of JNDI lookup to retrieve a DataSource.
I'm wondering if it is required to use JDNI in order to create a pooled connection? Or I can simply instantiate the driver class as follows:


The reason why I'm looking into alternatives that doesn't involve JNDI is due to a bug between WAS and the Oracle driver. I am unable to register OracleConnectionPoolDataSource into the WAS JNDI context correcty (the datasource got registered into the context but returned as "com.ibm.ejs.cm.JDBC1PhaseRF", a class that cannot be casted into sql.javax.DataSource).
[ August 12, 2002: Message edited by: Felix Kan ]
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there Felix,
Your proposed approach will work just fine! At least, I have been working like that for about a year now without problems.
On the other hand: if I were you I 'd try and get around the configuration issues. Creating the data source from scratch is just an ugly workaround, after all.
Good riding,
Rudy.
 
Felix Kan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rudy,
Yahoo! Thanks a lot for your quick reply! This is my first post on javaranch
The ClassCastException problem between WSAD (WebSphere Studio Application Developer... an Eclipse-based product) and Oracle still remains to be a mystery. I've spotted a few threads on the Websphere thread and there isn't a clear solution to it.
Yeah it's really bad to have all these ds settings hard-coded into the source code, but at least for now I can settle with the help of Ant build files.
Cheers,
Felix
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic