RE: Tomcat4.0.2 MySQL Connection Pools ClassLoader - bug ?

2002-02-19 Thread Jacquet, Frederic
Title: RE: Tomcat4.0.2  MySQL Connection Pools  ClassLoader -  bug ?






Dear all, 



I am not exactly sure of what I have found a bug or a JNDI context misunderstanding from me.


I have search since three days why, when I follow the JNDI howto, I cannot use JNDI datasource due to bind problems. 
The reason was that I use JBuilder : to compile I must include the required .jar. 
BUT when he generate the war, jbuilder include all the jar. 


Catalina find the jar in /WEB-INF/lib and seems to create another Context that can not access to java:comp used by common/lib

I have just remove the /WEB-INF/lib directory and everything is running ok.



Is it a know issue ?




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


RE: Datasources context ?

2002-02-16 Thread Jacquet, Frederic
Title: RE: Datasources context ?





In fact I just reading the JNDI Howto and try to set up the thing for the very first time for JDBC access


Someone (Mark) seems to have the same kind of problem with oracle ;( 
Where can I find a working test sample ?


-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 6:47 PM
To: Tomcat Users List
Subject: Re: Datasources context ?



 I have got this error
 Name java:comp is not bound in this Context

 When I try the following code :
 try {
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource) envCtx.lookup(jdbc/TestDb);
 Connection conn = ds.getConnection();

 Statement st = conn.createStatement();
 ResultSet rs = st.executeQuery(SELECT prenom,nom FROM
 annuaire;);
 while (rs.next()) {
 out.println(p + rs.getString(prenom));
 out.println(nbsp; + rs.getString(nom));
 }

 conn.close();
 } catch (Exception e) {
 out.print(e.getMessage());
 }


Well, the big questions are:
- where is that code fragment located ?
- are you modifying the context classloader ?


To end up with the right JNDI context, Catalina uses context classloader
associations. So if you get the error you're getting, it means that the CL
association is not the one it should be. There were a few bugs caused
because in some places, it wasn't set properly (for example, you can look at
bug 5330).


Remy



--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


Datasources context ?

2002-02-15 Thread Jacquet, Frederic
Title: Datasources context ?





I have got this error
 Name java:comp is not bound in this Context 


When I try the following code :
 try {
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource) envCtx.lookup(jdbc/TestDb);
 Connection conn = ds.getConnection();


 Statement st = conn.createStatement();
 ResultSet rs = st.executeQuery(SELECT prenom,nom FROM annuaire;);
 while (rs.next()) {
 out.println(p + rs.getString(prenom));
 out.println(nbsp; + rs.getString(nom));
 }


 conn.close();
 } catch (Exception e) {
 out.print(e.getMessage());
 }
And the declarations 
server.xml
  Resource name=jdbc/TestDb auth=CONTAINER
 type=javax.sql.DataSource/
 ResourceParams name=jdbc/TestDb
 parameternameuser/namevalueuser/value/parameter
 parameternamepassword/namevaluepasswd/value/parameter
 parameternamedriverClassName/name
 valueorg.gjt.mm.mysql.Driver/value/parameter
 parameternamedriverName/name
 valuejdbc:mysql://localhost/test/value/parameter
 /ResourceParams
web.xml
resource-ref
 descriptionTest database./description
 res-ref-namejdbc/TestDb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authCONTAINER/res-auth
/resource-ref



What is wrong ???


Regards / Cordialement


Frederic Jacquet




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


RE: Datasources context ?

2002-02-15 Thread Jacquet, Frederic
Title: RE: Datasources context ?






I put in in my application context :
Context path=/test docBase=test debug=200
 reloadable=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_feedback. suffix=.log
   timestamp=true/
  Environment name=maxExemptions type=java.lang.Integer
 value=16/
 Parameter name=context.param.name value=context.param.value
 override=false/
 Resource name=jdbc/TestDb auth=CONTAINER
 type=javax.sql.DataSource/
 ResourceParams name=jdbc/TestDb
 parameternameuser/namevaluefred/value/parameter
 parameternamepassword/namevaluefred/value/parameter
 parameternamedriverClassName/name
 valueorg.gjt.mm.mysql.MysqlDataSource/value/parameter
 parameternamedriverName/name
 valuejdbc:mysql://localhost:3306/test/value/parameter
 /ResourceParams
 
 !-- JNDI Resource for sending email using SMTP --
  Resource name=mail/send auth=CONTAINER
  type=javax.mail.internet.MimePartDataSource/
  ResourceParams name=mail/send
  parameternamefactory/name
  valueorg.apache.naming.factory.SendMailFactory/value
  /parameter
  parameternamemail.smtp.host/name
  valuevers-mail.vers.eu.fciconnect.com/value
  /parameter
  parameternamemail.smtp.user/name
  valuefjacquet/value
  /parameter
  parameternamemail.from/name
  value[EMAIL PROTECTED]/value
  /parameter
  /ResourceParams


/Context


-Original Message-
From: Frederic Monclar [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 5:17 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Datasources context ?



May be you have defined at a wrong place your resource in your
server.xml file.
Fred.



 Jacquet, Frederic wrote:
 
 I have got this error
 Name java:comp is not bound in this Context
 
 When I try the following code :
 try {
 Context initCtx = new InitialContext();
 Context envCtx = (Context)
 initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource) envCtx.lookup(jdbc/TestDb);
 
 Connection conn = ds.getConnection();
 
 Statement st = conn.createStatement();
 ResultSet rs = st.executeQuery(SELECT prenom,nom FROM
 annuaire;);
 while (rs.next()) {
 out.println(p + rs.getString(prenom));
 out.println(nbsp; + rs.getString(nom));
 }
 
 conn.close();
 } catch (Exception e) {
 out.print(e.getMessage());
 }
 And the declarations
 server.xml
 Resource name=jdbc/TestDb auth=CONTAINER
 type=javax.sql.DataSource/
 ResourceParams name=jdbc/TestDb
 
 parameternameuser/namevalueuser/value/parameter
 
 parameternamepassword/namevaluepasswd/value/parameter
 parameternamedriverClassName/name
 valueorg.gjt.mm.mysql.Driver/value/parameter
 parameternamedriverName/name
 valuejdbc:mysql://localhost/test/value/parameter
 /ResourceParams
 web.xml
 resource-ref
 descriptionTest database./description
 res-ref-namejdbc/TestDb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authCONTAINER/res-auth
 /resource-ref
 
 What is wrong ???
 
 Regards / Cordialement
 
 Frederic Jacquet
 
 ---
 --
 To unsubscribe: mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


RE: Determining User Connection Speed

2002-02-15 Thread Jacquet, Frederic
Title: RE: Determining User Connection Speed





Check on IP : lan and dialup should be different !


-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 6:03 PM
To: Tomcat Users List
Subject: RE: Determining User Connection Speed



Our clients run our application on both the internet and intranet. The
users who use the application on the intranet are usually on a 100MB (LAN)
network directly attached to the application server. For these users the
application really hums. For those on the internet, using 33kb or 58kb
dialup connections, the application is very slow downloading data. We have
experimented with sending back the data compressed with mixed results. That
is, the dialup users see a significant drop in download time while the
intranet (100MB LAN) users actually see a slow down in performance do to the
additional time needed to compress and uncompress the data.


If we could tell when a user is on a dialup (slow) connection we could
compress the data and not compressing it for those on a LAN connection.


Jim


 -Original Message-
 From: Christopher K. St. John [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 15, 2002 11:39 AM
 To: Tomcat Users List
 Subject: Re: Determining User Connection Speed


 Jim Urban wrote:
 
  Is there a way to determine the speed a user is connected to the
  internet at from within a servlet?
 

 No.

 If you explain more about why you want to know, maybe
 someone could suggest something that would solve your
 problem without requiring the user's connection speed.


 --
 Christopher St. John [EMAIL PROTECTED]
 DistribuTopia http://www.distributopia.com

 --
 To unsubscribe: mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]





--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]