Kim Haase wrote:
Lance J. Andersen wrote:
Kim,
I would leave out a reference to
An alternative to the DriverManager facility, a DataSource object is
the preferred means of getting a connection.
This is old crud that i did not get a cycle to remove based on when i
was allowed to do putbacks to the javadocs.
Wow, and it's still there ... 1.4, 1.5, 1.6 ... I guess once it's part
of the spec it takes a major rev to change it.
Changing Java SE javadocs is a long process and it can only be done
during a new rev due to localization of javadocs (and because it is part
of the JDBC spec, in some cases, unless it is trivial, it has to be
aligned with the JDBC spec).
So we are neutral on DriverManager vs. Datasource, and the Working
With Derby example is okay?
Yes DriverManager is *not* going away and is a perfectly acceptable,
especially now that u do not have to load the driver explicitly.
Ideally to use DataSources in a more portable way outside of an
environment which supports JNDI, it would require a Factory so that you
do not have to instantiate implementation classes.
Laura, should I add a comment to that effect to the JIRA? Or you can
when you post the next patch.
Kim
-lance
Kim Haase (JIRA) wrote:
[
https://issues.apache.org/jira/browse/DERBY-1934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485344
]
Kim Haase commented on DERBY-1934:
----------------------------------
Thanks, Laura -- These look excellent.
However, I have since gotten more feedback from Lance (between ===):
====
The page is not consistent as it should just describe what a
DataSource is to align with what it states for the other interfaces.
You can borrow from the spec or from the javadoc for DataSource.
The problem i have with the wording, is you can use a DataSource
without JNDI and it can (and typically is) looked up as a resource
via JNDI.
Also need to migrate to referring to Java EE vs J2EE as well.
===
The last bit can wait, but we may as well reword the description
based on the javadoc. Here is some text that can replace the first
two sentences. I think the last sentence ("This allows the calling
application to access the database by a name (as a data source)
instead of through a database connection URL.") can stay as is.
"A DataSource object is a factory for connections to the physical
data source that the DataSource object represents. An alternative to
the DriverManager facility, a DataSource object is the preferred
means of getting a connection. An object that implements the
DataSource interface will typically be registered with a naming
service based on the Java(TM) Naming and Directory (JNDI) API."
Interesting in view of the fact that our Working With Derby example
uses DriverManager; at some point perhaps it should be changed to
use DataSource, but that is yet another task.
BTW, did you also change the title of rrefjta16677.dita in the map
file?
Reference Manual updates - J2EE Compliance: Java Transaction API
and javax.sql Extensions
-----------------------------------------------------------------------------------------
Key: DERBY-1934
URL: https://issues.apache.org/jira/browse/DERBY-1934
Project: Derby
Issue Type: Bug
Components: Documentation
Affects Versions: 10.2.1.6
Reporter: Laura Stewart
Assigned To: Laura Stewart
Attachments: derby1934_1.diff, derby1934_2.diff,
derby1934_html2.zip, rrefjta18596.html
J2EE Compliance: Java Transaction API and javax.sql Extensions:
Section = javax.sql:JDBC Extensions File =
http://db.apache.org/derby/docs/dev/ref/rrefjta18596.html Update =
This URL no longer exists: (For more details about these
extensions, see
http://java.sun.com/products/jdbc/jdbc20.stdext.javadoc/javax/sql/package-summary.html).
The page that has this information, although you have to browse to
the section called JDBC 2.0 Optional Package API is
http://java.sun.com/products/jdbc/download.html