Hove you tried to use the mm jdbc driver with JDBCRealm? I have been trying to get the JDBCRealm to work with this driver. I've settled for the jdbc:odbc driver for now, but would be very interested to see if/how anyone got the mm jdbc driver to work with JDBCRealm. Thanks. Dmitry Les Hughes <[EMAIL PROTECTED]> wrote: http://marc.theaimsgroup.com/?l=tomcat-user&m=102225547106556&w=2
:-) > -----Original Message----- > From: Marc Logemann [mailto:[EMAIL PROTECTED]] > Sent: 02 July 2002 13:35 > To: [EMAIL PROTECTED] > Subject: plain MySQL DataSource in Tomcat (i know, damn topic) > > > Hi, > > i am one of the guys trying to get a valid MysqlDataSource > reference via > JNDI. But i am getting crazy without knowing where the > problem is (perhaps > the reason is, i cant debug JNDI too good, cause i am no > expert in it..) > > i have the following: > > server.xml > ---------- > > > type="javax.sql.DataSource"/> > > > factory > > org.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory > > userroot > password > > driverClassNameorg.gjt.mm.mysql.jdbc2.opti > onal.MysqlDataSource > > driverNamejdbc:mysql://localhost/maxbahr> value> > > > > web.xml > ------- > > > DataSource MySQL > jdbc/TestDB > javax.sql.DataSource > Container > > > > i placed the mysql mm jar into commons/lib > > When i run a servlet with the standard lookup code: > try { > javax.naming.Context jndictx = new InitialContext(); > if (jndictx == null) throw new Exception("Boom - No > Context"); > > DataSource ds = > (DataSource) > jndictx.lookup("java:comp/env/jdbc/TestDB"); > if (ds != null) { > [..] > > i get no exception but i also dont get any reference returned > from lookup. > > I read tons of websites including the tomcat JNDI howto, > without beeing able to understand it > better (in fact it gets worse cause of thousands of > combinations in the web for server.xml and > web.xml) > > When i leave out factory in the server.xml, i get a tyrex > exception regarding loading a factory... > > I just thought that using a datasource is better than just > calling the DriverManager, but the > effort seems amazing... or i am too unclever... whatever... > > thx for help. > --- > greetings from > Marc Logemann > Homebase @ www.logemann.info > > > -- > To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------- Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free & unlimited access
