Uses JNDI InitialContext to lookup a DataSource with the provided name.
This solution is mostly intended for use with Java EE Applications, or desktop
applications running in an evironment support JNDI. This class makes use
of the global GeoTools.getDefaultHints() in order to aquire the the corrent
InitialContext. The out of the box implementation makes use of the JRE's
JNDI configuration (which is probably already set up by your application server).
Parameters: dataSourceName - Name to lookup in InitialContext. throws: NamingException - If there is nothing located in the indicated location throws: ClassCastException - If the name does not refer to a DataSource |