This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Connection Pool

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
I'm trying to create connection pool to a oracle database using thin driver. After creating it when I start my server it doesn't give me any error. While I'm trying to check the pool using
java weblogic.Admin -url localhost:7001 -user
name system -password system123 EXISTS_POOL OraclePool
then it is saying OraclePool doesn't exist.
Can anyone will let me know how to create the Connection pool with an example.
Thanks and Regards
Reeti
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
You problably forgot to target the pool to your server, after you have created the pool you have to use the target tab on the admin console and choose the target server for that pool.
hope this helps.
 
Reeti Saha
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
Thanks a lot. I forgot to set the target name, now when I've set it then while starting the server it is giving lots of error. Some TNS resolution problem. Can u pls. give me an example of Driver Class name and other properties of the connection pool.
Thanks and Regards
Reeti
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think that the best way to check the connection is using a tool called utils.dbping that ships with weblogic, to do that open a console window and navigate to:
%WL_HOME%\config\%DOMAIN_NAME% and run the script setEnv , than you can use this notation:
Usage: java utils.dbping ORACLE USER PASS DBNAME
or java utils.dbping ORACLE_THIN USER PASS HOST:PORT:DBNAME
or java utils.dbping JCONNECT USER PASS HOST:PORT/DBNAME
or java utils.dbping INFORMIX4 USER PASS DBNAME@HOST:PORT
or java utils.dbping MSSQLSERVER4 USER PASS DBNAME@HOST:PORT

if everithing goes well it�s gonna show you the notation you can use to configure access the DB you choose.
regards.
[ March 07, 2002: Message edited by: Marcos Maia ]
 
Reeti Saha
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
Thanks for the help. Now it seems the connection pool is working but i've got some other problem. While I created the connection pool I also created a datasource and gave the JNDI name "JDBCOracle". This JNDI name I've used in the "weblogic-ejb-jar.xml" resource description section. While I'm trying to get the connection from the pool in my EJB then I've written:
icon = new InitialContext();
dSource = (javax.sql.DataSource) icon.lookup("java:comp/env/jdbc/JDBCOracle");
dSource.getConnection();
This is giving me exception:
javax.naming.NameNotFoundException: Unable to resolve comp/env/jdbc/JDBCOracle/ Resolved: 'comp/env/jdbc' Unresolved:'JDBCOracle' ; remaining
name ''
Can anyone help me?
Regards
Reeti
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Reeti Saha:
Hi:
Thanks for the help. Now it seems the connection pool is working but i've got some other problem. While I created the connection pool I also created a datasource and gave the JNDI name "JDBCOracle". This JNDI name I've used in the "weblogic-ejb-jar.xml" resource description section. While I'm trying to get the connection from the pool in my EJB then I've written:
icon = new InitialContext();
dSource = (javax.sql.DataSource) icon.lookup("java:comp/env/jdbc/JDBCOracle");
dSource.getConnection();
This is giving me exception:
javax.naming.NameNotFoundException: Unable to resolve comp/env/jdbc/JDBCOracle/ Resolved: 'comp/env/jdbc' Unresolved:'JDBCOracle' ; remaining
name ''
Can anyone help me?
Regards
Reeti


I think one of the two, given below must work properly.
icon = new InitialContext();
dSource = (javax.sql.DataSource) icon.lookup("JDBCOracle");
dSource.getConnection();

||

icon = new InitialContext();
dSource = (javax.sql.DataSource) icon.lookup("/jdbc/JDBCOracle");
dSource.getConnection();

try.... it!
 
gautam shah
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and also check log file to check whether that connection pool is being created or not at the time of server startup???
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Reeti,
Could you please let me know all the steps that needs to done to create a connection pool using Oracle thin driver in weblogc 6.1.

Thanks,
smita
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic