users@glassfish.java.net

Re: Glassfish Beginner Setup Question

From: krishna unni <unnisworld_at_yahoo.com>
Date: Wed, 7 Feb 2007 20:52:39 -0800 (PST)

The basic steps to use jdbc is

1. Create a connection pool
2. Create a datasource which uses this connection pool
3. use JNDI lookup to get connection

You must be able to setup all these from
administration console.
/unni.
--- glassfish_at_javadesktop.org wrote:

> I created this jdbc connection. I want to connect
> to it from my WAR. What does my web.xml need to
> contain so that I can access the resource pool?
>
> <jdbc-connection-pool
> allow-non-component-callers="false"
> associate-with-thread="false"
> connection-creation-retry-attempts="0"
> connection-creation-retry-interval-in-seconds="10"
> connection-leak-reclaim="false"
> connection-leak-timeout-in-seconds="0"
> connection-validation-method="auto-commit"
>
>
datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
>
> fail-all-connections="false"
> idle-timeout-in-seconds="300"
> is-connection-validation-required="false"
> is-isolation-level-guaranteed="false"
> lazy-connection-association="false"
> lazy-connection-enlistment="false"
> match-connections="false"
> max-connection-usage-count="0"
> max-pool-size="32"
> max-wait-time-in-millis="60000"
> name="myDB"
> non-transactional-connections="false"
> pool-resize-quantity="2"
> res-type="javax.sql.ConnectionPoolDataSource"
> statement-timeout-in-seconds="-1"
> steady-pool-size="8"
> validate-atmost-once-period-in-seconds="0"
> wrap-jdbc-objects="false">
>
> <description>My Database
> Description</description>
> <property name="user" value="username"/>
> <property name="password" value="password"/>
> <property name="databaseName"
> value="myDBName"/>
> </jdbc-connection-pool>
> [Message sent by forum member 'tmonteit' (tmonteit)]
>
>
http://forums.java.net/jive/thread.jspa?messageID=202567
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail:
> users-help_at_glassfish.dev.java.net
>
>


Unnikrishnan.K.V
Sun Microsystems, Bangalore.


 
____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL