How we use connectionpool facility of weblogic server..

hello friends,In my JSP pages i use connection pool which is written like a one JSP page..But i want to use WLS's connection pool facility for my every page..Can any one help me in this..That how we use that con. pool Thanx
[252 byte] By [himanshu1979] at [2007-9-26 1:15:51]
# 1

Hi himanshu1979,

Here iam giving you two alternative solution for connection pooling while using jsp

Here you can do this way:

1)

weblogic.allow.execute.weblogic.servlet.classes=everyone

#

# Servlet reload properties

# weblogic.httpd.servlet.classpath=/freetaxprep/classes

weblogic.httpd.servlet.reloadCheckSecs=-1

#

# File servlet registration

weblogic.httpd.register.file=weblogic.servlet.FileServlet

weblogic.httpd.initArgs.file=defaultFilename=index.html

#

# ServerSideInclude servlet registration

weblogic.httpd.register.*.shtml=weblogic.servlet.ServerSideIncludeServlet

#

# Default servlet registration

weblogic.httpd.defaultServlet=file

#

weblogic.system.listenPort=1080

weblogic.security.ssl.enable=false

#weblogic.system.SSLListenPort=6643

weblogic.httpd.documentRoot=/freetaxprep/products/

#

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# WEBLOGIC JSP PROPERTIES

weblogic.httpd.register.*.jsp=\

weblogic.servlet.JSPServlet

weblogic.httpd.initArgs.*.jsp=\

pageCheckSeconds=1,\

compileCommand=/opt/Solaris_JDK_1.2.2_05a/bin/javac,\

workingDir=/weblogic/ftp/compiled_jsp,\

verbose=true,\

keepgenerated=true

#

weblogic.jdbc.connectionPool.oraclePool=\

url=jdbc:weblogic:oracle,\

driver=weblogic.jdbc.oci.Driver,\

loginDelaySecs=0,\

initialCapacity=10,\

maxCapacity=100,\

capacityIncrement=5,\

allowShrinking=true,\

shrinkPeriodMins=10,\

refreshMinutes=10,\

props=user=TAX2000;password=xxxxxxxx;server=TAX

# Set up ACLs for this connection pool with the following:

weblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=everyone

weblogic.allow.reset.weblogic.jdbc.connectionPool.oraclePool=everyone

weblogic.allow.shrink.weblogic.jdbc.connectionPool.oraclePool=everyone

2)While using the DBConnectionBroker, it will work

http://www.javaexchange.com

I hope this will help you out.

Regards,

Tirumalarao

Developer TechnicalSupport,

Sun MicroSystem,India.

rao_indts at 2007-6-29 0:42:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

1) If you are using SQLServer you have to install a driver(type IV) is available from weblogic itself. Give the .jar files of driver in weblogic classpath. Or you can use jdbc:odbc bridge itself.

2) In the weblogic properties file, create a connection pool. Something like this

weblogic.jdbc.connectionPool.SQLPool=\

url=jdbc:weblogic:mssqlserver4:myDB@server-name:1433,\

driver=weblogic.jdbc.mssqlserver4.Driver,\

loginDelaySecs=1,\

initialCapacity=1,\

maxCapacity=2,\

capacityIncrement=1,props=user=xxx;password=yyy

weblogic.allow.reserve.weblogic.jdbc.connectionPool.SQLPool=everyone

weblogic.allow.reset.weblogic.jdbc.connectionPool.SQLPool=everyone

weblogic.allow.shrink.weblogic.jdbc.connectionPool.SQLPool=everyone

for oracle the you have to do differently, and it is available in weblogic document with nice example.Again if you are using oracle, driver is coming along with the weblogic.

3)In your code, where you need connection, there are two ways...Use this one...

Driver myDriver = (Driver) Class.forName("weblogic.jdbc.pool.Driver").newInstance();

con = myDriver.connect("jdbc:weblogic:pool:SQLPool", null);

Hope this works..Cheers !

malu4ram at 2007-6-29 0:42:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thanx dear..I will try to apply ur suggestion and they see the result..himanshurshah17@yahoo.com
himanshu1979 at 2007-6-29 0:42:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Thanx dear,I will try to apply ur suggestion..and then seen the result..himanshurshah17@yahoo.com
himanshu1979 at 2007-6-29 0:42:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...