From hibernate-commits at lists.jboss.org Wed Aug 11 16:37:49 2010
Content-Type: multipart/mixed; boundary="===============0073282113604329810=="
MIME-Version: 1.0
From: hibernate-commits at lists.jboss.org
To: hibernate-commits at lists.jboss.org
Subject: [hibernate-commits] Hibernate SVN: r20134 - in
core/trunk/documentation/devguide/src/main/docbook/en-US: content and 1 other
directory.
Date: Wed, 11 Aug 2010 16:37:49 -0400
Message-ID: <201008112037.o7BKbn4G009336@svn01.web.mwc.hst.phx2.redhat.com>
--===============0073282113604329810==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: steve.ebersole(a)jboss.com
Date: 2010-08-11 16:37:49 -0400 (Wed, 11 Aug 2010)
New Revision: 20134
Added:
core/trunk/documentation/devguide/src/main/docbook/en-US/content/databas=
e.xml
Modified:
core/trunk/documentation/devguide/src/main/docbook/en-US/Hibernate_Devel=
oper_Guide.xml
Log:
HHH-5468 - Write a chapter about setting up database access
Modified: core/trunk/documentation/devguide/src/main/docbook/en-US/Hibernat=
e_Developer_Guide.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- core/trunk/documentation/devguide/src/main/docbook/en-US/Hibernate_Deve=
loper_Guide.xml 2010-08-11 19:18:05 UTC (rev 20133)
+++ core/trunk/documentation/devguide/src/main/docbook/en-US/Hibernate_Deve=
loper_Guide.xml 2010-08-11 20:37:49 UTC (rev 20134)
@@ -10,5 +10,6 @@
-->
=
+
=
\ No newline at end of file
Added: core/trunk/documentation/devguide/src/main/docbook/en-US/content/dat=
abase.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- core/trunk/documentation/devguide/src/main/docbook/en-US/content/databa=
se.xml (rev 0)
+++ core/trunk/documentation/devguide/src/main/docbook/en-US/content/databa=
se.xml 2010-08-11 20:37:49 UTC (rev 20134)
@@ -0,0 +1,119 @@
+
+
+
+
+ Database Access
+
+
+ JDBC Connections
+
+ Hibernate understands how to connect to a database through an =
interface
+ org.hibernate.connection.ConnectionProvider. While
+ org.hibernate.connection.ConnectionProvider is considered an extension SPI,
+ Hibernate comes with a number of built-in providers.
+
+
+
+ Using connection pooling
+
+
+ The built-in connection pooling based providers all requir=
e the following settings
+
+
+
+ hibernate.connection.driver_class
+
+
+ Names the java.sql.Driver implementation class from your JDBC
+ provider.
+
+
+
+
+ hibernate.connection.url
+
+
+ The JDBC connection url. See your JDBC provid=
er's documentation for details and examples.
+
+
+
+
+ hibernate.connection.username
+
+
+ The name of the user to use when opening a JDB=
C java.sql.Connection.
+
+
+
+
+ hibernate.connection.password
+
+
+ The password associated with the provided user=
name.
+
+
+
+
+
+
+ Using Hibernate's built-in connection pooling
+
+
+
+ The built-in Hibernate connection pool is not inte=
nded for production use. It lacks several
+ features found on any decent connection pool. How=
ever, it can be quite useful to get started
+ and in unit testing.
+
+
+
+
+ The only additional supported setting for the built-in=
pooling is the
+ hibernate.connection.pool_size se=
tting which tells the pool how many
+ connections maximum it can keep in the pool.
+
+
+
+
+ Using c3p0 for connection pooling
+
+
+
+ Using proxool for connection pooling
+
+
+
+
+
+ Using javax.sql.DataSource
+
+
+ Hibernate can also use a javax.sql.DataSour=
ce to obtain
+ connections. To do so, Hibernate expects to be able to lo=
cate the
+ javax.sql.DataSource in JNDI. The
+ hibernate.connection.datasource setti=
ng tells Hibernate the JNDI
+ namespace at which it can find the the java=
x.sql.DataSource.
+
+
+
+ Generally speaking a javax.sql.DataSource=
interfacename> is configured to connect to
+ the database using a single set of credentials (username/p=
assword). Sometimes, however, the
+ javax.sql.DataSource is set=
up so that the credentials have to be
+ used to obtain a java.sql.Connection from it. In these cases
+ applications would specify the credentials via the hibernate.connection.username
+ and hibernate.connection.password set=
tings, which Hibernate would pass along to the
+ javax.sql.DataSource when o=
btaining a
+ java.sql.Connection from it.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--===============0073282113604329810==--