Closed GoogleCodeExporter closed 9 years ago
Thanks for the patch!
description: I will add that.
For all the other properties: I think it would be very confusing, because H2 is
not a
client/server database like Oracle.
databaseName: what if there is no name (unnamed in-memory databases)?
networkProtocol: mem: is not a network protocol. zip: is not one. Also, I don't
want
to duplicate source code.
portNumber and serverName: what would it mean for embedded or in-memory
databases?
Original comment by thomas.t...@gmail.com
on 8 Mar 2010 at 5:43
I encourage you to look at JdbcDataSource.makeURL()
> databaseName: what if there is no name (unnamed in-memory databases)?
The code makes the assumption that only in-memory databases are allowed to be
unnamed.
> networkProtocol: mem: is not a network protocol. zip: is not one. Also, I
don't want
to duplicate source code.
I generalized this property as "access protocol". Granted, only 'tcp', 'ssl',
and possibly 'gae' could be
considered true network protocols.
> portNumber and serverName: what would it mean for embedded or in-memory
databases?
Obviously serverName and PortNumber mean nothing in those circumstances. I
could throw
IllegalStateException (or IllegalArgumentException) in that case.
The goal of the enhancement was to allow the product to work better with
administrative tools,
SpringFramework bean properties, and such. It doesn't preclude the
administrator from knowing what they
are doing.
Although our product will ship with H2, it will allow the customer to store the
data in their own corporate
datbase (typically Oracle or SQL Server). The part I am working on simply gets
a DataSource object - it
doesn't know if it is a H2, Oracle, or SQL Server implementation. I was hoping
to get a bit more commonality
in the interfaces.
Original comment by Brett.Mi...@gmail.com
on 8 Mar 2010 at 6:40
One problem is that makeURL doesn't support the pluggable file system. It
duplicates
logic that belongs elsewhere. gae is a file system prefix, not a network
protocol
(but I know what you mean).
> work better with administrative tools
> more commonality in the interfaces.
I understand. What about:
'networkProtocol': ssl, tcp, or null (meaning not networked)
'serverName': only if ssl or tcp (in this case not optional)
'portNumber': only if ssl or tcp (optional)
'databaseName': could be the file system url (gae:, mem:, file:,...)
Original comment by thomas.t...@gmail.com
on 8 Mar 2010 at 7:22
I am actually thinking this might be more appropriate as an Adapter that wraps
JdbcDataSource on my side.
My goal with putting it in JdbcDataSource was to apply a "standards properties
view" over the information
needed by JdbcDataSource when opening a connection. However, the code is not
that elegant and the
impedance mis-match seems too high.
I recommend implementing the description property, the only property I really
needed for my implementation
(logging the jdbc configuration). I liked my implementation that called
toString() if the description had not
been set externally, as the URL and username are just the type of info I would
want in the logs.
Original comment by Brett.Mi...@gmail.com
on 8 Mar 2010 at 5:54
> I recommend implementing the description property
Sure, I will do that.
> Although our product will ship with H2
Could you tell me what this product is?
Original comment by thomas.t...@gmail.com
on 8 Mar 2010 at 6:10
Implemented in version 1.2.132.
Original comment by thomas.t...@gmail.com
on 21 Mar 2010 at 3:12
Original issue reported on code.google.com by
Brett.Mi...@gmail.com
on 7 Mar 2010 at 11:14