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=click
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to