
en.help.task-jdbcresourcenew.html Maven / Gradle / Ivy
Show all versions of console-jdbc-plugin Show documentation
To Create a JDBC Resource
A Java DataBase Connectivity (JDBC) resource (data source) provides applications with the means
of connecting to a database.
Before You Begin
To create a JDBC resource, you must first create a JDBC connection
pool. See To Create a JDBC Connection Pool.
- In the navigation tree, expand the Resources node.
- Under the Resources node, expand the JDBC node.
- Under the JDBC node, select the JDBC Resources node.
The JDBC Resources page opens.
- On the JDBC Resources page, click New.
The New JDBC Resource page opens.
- In the JNDI Name field, type a unique resource name.
The JNDI name organizes and locates components within a distributed computing environment similarly to
the way that card catalogs organize and represent locations of books in a
library. Consequently, the JNDI name becomes an important method of accessing the JDBC
resource. By convention, the name begins with the jdbc/ string, for example, jdbc/payrolldb. Don’t
forget the forward slash.
The name must contain only alphanumeric, underscore, dash, or dot characters.
- From the Pool Name drop-down list, select a connection pool to be associated
with the new JDBC resource.
- In the Description field, type a short description of the new JDBC resource.
- Select the Status Enabled checkbox to make the resource available at runtime.
This option is enabled by default.
- (Optional) In the Additional Properties section, specify additional properties.
The GlassFish Serverdoes not define any additional properties for JDBC resources.
To add a property, click the Add Property button. In the blank
row that appears, type the property name in the Name field, and type
the property value in the Value field.
- Select an Available Target to Add it or remove it from the
Selected Targets list.
- Click OK.
See Also
-
-
-
-
-
-
-
-
-
-
-
Copyright © 2005, 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices