• 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

setting and using connection pools in serverside jdbc codes..please help

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i am using mssqlserver4 driver to connect to database..
i have set the properties in weblogic.properties file..
i have also set
weblogic.jdbc.datasource.myDatasource=SQLPOOL..
where SQLPool is my connection pool name..
1.now tell me.."mydatasource" becomes the JNDI name
which has to be connected as
javax.sql.Datasorce ds=(javax.sql.datasource) ctx.lookup("mydatasource");
i have followed these steps but when i run the code..
it just prints
"mydatasource"
and stops...why so?
Does the Jndi name has to be given according to the directory structure or..so
like
weblogic.jdbc.datasource.weblogic.jdbc.jts.SQLPool=SQLPool..
i am confused...
is mssqlserver a txdadatasource or just datasource..
please help me
santhosh
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Santosh
please use the following as the parameter to the context.loolUp
java:comp/env/jdbc/myDataSource
instead of simply using myDataSource.
reply
    Bookmark Topic Watch Topic
  • New Topic