aspose file tools*
The moose likes Websphere and the fly likes connection pooling in websphere 5.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "connection pooling in websphere 5.1" Watch "connection pooling in websphere 5.1" New topic
Author

connection pooling in websphere 5.1

Milan Jagatiya
Ranch Hand

Joined: Jan 01, 2007
Posts: 164
hi,
how to achieve connection pooling in websphere 5.1?
right days i am using tomcat web server and its connection pooling (dbcp). now i want to deploy my application in websphere 5.1.
what changes should i need in my application for that?...

thanks ,


Milan.<br />I can because I think I can...
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29237
    
139

Milan,
You just use a database driver that supports connection pooling when you set up your datasource.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Milan Jagatiya
Ranch Hand

Joined: Jan 01, 2007
Posts: 164
Yeah...I am using MS SQL Server 2000. what i need to set connection pooling. i am using type 4 driver. "sqljdbc.jar". is any other jar do i need??
Milan Jagatiya
Ranch Hand

Joined: Jan 01, 2007
Posts: 164
and another question is ...can we use apache commons-dbcp factory in websphere for connection pooling as third party....
William Janssen
Ranch Hand

Joined: Jan 02, 2007
Posts: 39
Creating JDBC connections using Microsoft SQL is explained in http://publib.boulder.ibm.com/infocenter/ad51help/index.jsp?topic=/com.ibm.etools.rsc.doc/tasks/tdbconn_sqlserver.htm

From that point, it is like in any other environment, eg:

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "corbaloc:iiop:myhost.mycompany.com:2809");
Context initialContext = new InitialContext(env);
DataSource specificDataSource = (DataSource) initialContext.lookup("java:comp/env/jdbc/myds");
Milan Jagatiya
Ranch Hand

Joined: Jan 01, 2007
Posts: 164
i am using ms sql server 2000. what steps should i follow to achieve connection pooling in websphere 5.1 ???

waiting for your replies...

thanks...
William Janssen
Ranch Hand

Joined: Jan 02, 2007
Posts: 39
- Define the JDBC provider (in the admin console, resources -> JDBC providers)
- Within this provider define a datasource pointing to youre database

Call this datasource from your code with the example provided before, that's it.
Milan Jagatiya
Ranch Hand

Joined: Jan 01, 2007
Posts: 164
thanks williams...
it was only a versioning problem...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connection pooling in websphere 5.1
 
Similar Threads
Connection Pooling
Connection pooling package
migrate from tomcat 5 to websphere 5.1
Connection Pooling in WSAD
Connection Pooling in WebSphere 6.0.0.1