ThreadedEpsgFactory JNDI lookup fails badly under Glassfish
-----------------------------------------------------------

                 Key: GEOT-2923
                 URL: http://jira.codehaus.org/browse/GEOT-2923
             Project: GeoTools
          Issue Type: Bug
          Components: core referencing
    Affects Versions: 2.6.1
            Reporter: Andrea Aime
            Assignee: Andrea Aime
             Fix For: 2.6.2


This is happening for two reasons:
- first jdbc/EPSG is not a valid JNDI syntax according to Glassfish, resulting 
in GF throwing an invalid syntax name exception that break the whole factory 
loading (as opposed to a NameNotFoundException)
- even when the syntax is correct GF throws a generig NamingException that has 
a NameNotFoundException among its causes, as opposed to being a 
NameNotFoundException.

The logic in the lookup exception handling is actually expecting more than what 
the Javadoc promises: the context.lookup method only promises to throw a 
NamingException when an error occurs, it makes no promises to use the 
appropriate subclass. When the lookup fails the code should just go ahead and 
use the embedded database instead.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to