java:comp/env is not universal - FYI: weblogic doesn't require it. An assumption that it was universal which was made by the apache cocoon developers caused us no end of problems till we tracked it down.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Desruisseaux Sent: Friday, November 25, 2005 11:01 PM To: simone giannecchini Cc: [email protected] Subject: [Geotools-devel] Re: HSQL and JNDI Hello Simone simone giannecchini a écrit : > I am not a J2EE expert but I have been trying to register such a data > source using tomcat JNDI emulation without success. I have no J2EE experience at all... I used javax.sql.DataSource because it is the recommanded replacement of java.sql.DriverManager in my understanding of Sun's documentation, and I tried to make it configurable through JNDI for J2EE users, but I never used JNDI myself. Actually, the current JNDI stuff is just a first draft and I was hopping that some real J2EE user would help me to make it right. Since you tried it with Tomcat, I suggest to try to make the changes needed in order to get it to work. > 1>Tomcat JNDI emulation puts resource under the java:comp/env context > and there is no wy can change that. At the same time the default > factory looks for a data source under the initial context without the > above mentioned name qualification. I am afraid that this won't ever > work on tomcat. is "java:comp/env" context something standard or Tomcat-specific? What are the other possible values? I though that the InitialContext can be specified in some properties file (not sure - I would have to read again the documentation). Is there any way for the user to make the InitialContext point to "java:comp/env" on its machine? > 2>The data source we are expecting to find in the JNDI is a sub > interface of javax.sql.DataSource but due to the connection pooling > mechanism that runs behind Tomcat we will never be able to retrieve > such an object. Is there anyway to not tell to Tomcat that the data source is a subclass of javax.sql.DataSource, just ask a javax.sql.DataSource and cast to the subclass at runtime? If this is not possible, is there anyway to put extra information in a standard javax.sql.DataSource? (e.g. user properties)? Martin. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
