Connection pooling in java

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2006
Posts: 68
Reputation: rpjanaka is an unknown quantity at this point 
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

Connection pooling in java

 
0
  #1
Dec 22nd, 2006
hi i am tring to use connection pooling in java with postgresql database.

in given examples, i cant understand these file names that is given to create
InitialContext object, also that file names are different for each and every examples.

how can i get those files, and what are those..?



// Set up environment for creating initial context
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:c:\\JDBCDataSource");
Context ctx = new InitialContext(env);
// Register the data source to JNDI naming service
ctx.bind("jdbc/ConnectSparkyOracle", ds);
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Connection pooling in java

 
0
  #2
Dec 22nd, 2006
That's the JDBC driver for the database you're planning to talk to.
Read its documentation, it will tell you what to do.
The first is a classname (provided by the driver), the second looks to be the URI for the driver to talk to the actual database (in this case a simple directory on the local filesystem, not something you'd want for a production system).

Do read some basic JDBC tutorials and your driver documentation. It makes life so much easier.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 68
Reputation: rpjanaka is an unknown quantity at this point 
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

Re: Connection pooling in java

 
0
  #3
Dec 22nd, 2006
i am using postgre sql 8.1 database sever.. so what should i use at those plases insted of existing
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Connection pooling in java

 
0
  #4
Dec 22nd, 2006
I wouldn't know, but the documentation for the JDBC driver you need will know.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC