[ 
https://issues.apache.org/jira/browse/DERBY-6253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen updated DERBY-6253:
--------------------------------------

    Attachment: derby-6253-01-a.diff

The attached patch, derby-6253-01-a.diff, moves functionality from 
SQLExceptionFactory40 to SQLExceptionFactory in the embedded driver, and 
removes SQLExceptionFactory40.

It also changes the way the exception factory is loaded and accessed. The 
exception factory is not loaded via the Monitor class and modules.properties, 
which is the normal way to load a module. Presumably, this is because the 
exception factory may be needed even though the engine hasn't been booted yet 
(for example if booting the engine fails). Instead, it is loaded and accessed 
via the Util class, which lives in org.apache.derby.impl.jdbc. Since it's an 
impl class, and the exception factory is needed in iapi classes as well, this 
causes some unfortunate compile-time dependencies that make it difficult to 
tell which build target will be used to compile the class (DERBY-4845). The 
patch removes these dependencies from iapi to impl by moving the exception 
factory loading logic from the Util class to 
org.apache.derby.iapi.jdbc.ExceptionFactory, which was converted from an 
interface to an abstract class in the process.

All the regression tests ran cleanly with the patch.
                
> Collapse SQLException factories
> -------------------------------
>
>                 Key: DERBY-6253
>                 URL: https://issues.apache.org/jira/browse/DERBY-6253
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-6253-01-a.diff
>
>
> Both the client driver and the embedded driver have factories that produce 
> SQLExceptions of the correct sub-type. We don't need the factories that 
> produce JDBC 3.0 exceptions now that the base level is JDBC 4.0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to