[
https://issues.apache.org/jira/browse/GEODE-3823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fred Krone updated GEODE-3823:
------------------------------
Description:
This is for a 'read through' to the DB scenario when the entry is not found in
a Region. This implementation should take a result set and convert to PDX for
the cache.
Make a SQL statement to query by the key provided. dbName must match the
Region name.
Check each ResultSet field for type and convert. Create a PDXInstance insert
values. Region can (should?) have its type set so we'll know what the type is.
AC:
If the value is not in the cache it should take configured JDBC credentials and
connect to DB
Should log any connection error and retry x amount of times
On connect should execute query using the provided key as UID
On successful query should create PDX object, map JDBC values to PDX object,
put PDX object in the cache, return value
Should only return one value -- multiple values should be logged and error
JDBC execution errors should be logged
was:
This is for a 'read through' to the DB scenario when the entry is not found in
a Region. This implementation should take a result set and convert to PDX for
the cache.
Make a SQL statement to query by the key provided. dbName must match the
Region name.
Check each ResultSet field for type and convert. Create a PDXInstance insert
values. Region can (should?) have its type set so we'll know what the type is.
AC:
1) Should take a JDBC ResultSet and convert it to a PDX object.
2) Should log any errors on PDX conversion.
3) If can't convert (on error) then nothing is put into the Region.
> Implement a CacheLoader for JDBC to PDX
> ---------------------------------------
>
> Key: GEODE-3823
> URL: https://issues.apache.org/jira/browse/GEODE-3823
> Project: Geode
> Issue Type: Sub-task
> Components: regions
> Reporter: Fred Krone
>
> This is for a 'read through' to the DB scenario when the entry is not found
> in a Region. This implementation should take a result set and convert to PDX
> for the cache.
> Make a SQL statement to query by the key provided. dbName must match the
> Region name.
> Check each ResultSet field for type and convert. Create a PDXInstance insert
> values. Region can (should?) have its type set so we'll know what the type
> is.
>
> AC:
> If the value is not in the cache it should take configured JDBC credentials
> and connect to DB
> Should log any connection error and retry x amount of times
> On connect should execute query using the provided key as UID
> On successful query should create PDX object, map JDBC values to PDX object,
> put PDX object in the cache, return value
> Should only return one value -- multiple values should be logged and error
> JDBC execution errors should be logged
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)