OT: where javax.sql.*
Hi, I don't know where I can get teh javax.sql.* package from. It is not part of servlet.jar. But where is it?? thanks, rainer
Re: where javax.sql.*
AFAIK, package javax.sql is part of JDK 1.4. Yes, you are right! JDK 1.4 but not JDK 1.3 thanks, rainer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: where javax.sql.*
Hi, A javax.sql.* implementation is commonly included in a JDBC driver package (i.e. classes12.zip, Oracle JDBC driver). not with my MySQL JDBC Driver 2.0.12 : ( R. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: where javax.sql.*
Hi, well, I am using the MySQL JDBC driver since a while But it does not include the packages javax.sql.* course I need the javax.sql.DataSource class. thanks, R. not with my MySQL JDBC Driver 2.0.12 : ( R. .sql classes are classes to get data from a JDBC driver, If U're searching a jdbc driver for mysql U have to download from www.mysql.org, there are some stable, once downloaded put then in your jre/lib/ext (hope it's the right path ...) and U get it Bye, Gianluca Gravina -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: where javax.sql.*
In Jdk1.3 it is a separate download for the jdbc extensions. Here is the link: thats the best solution! thanks rainer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
implicit object servlet
Hi, what is the equivalent object to servlet within a Taglib-class? I want to use the methode: servlet.findDataSource(null) in a Taglib-class thanks Rainer
implicit object servlet
Hi, what is the equivalent implicit object to servlet within a Taglib-class? I want to use the methode: servlet.findDataSource(null) in a Taglib-class thanks Rainer
data-sources configuration
Hi, we are using the pooling of Struts. I know there are better ones. But we think it should do before the new release(1.1) is out. I am having a question on two attributes within the data-source tag of the struts-config.xml file 1) There are two values to be set: maxCount=40 minCount=5 Is it right that minCount means the minimum number of pooled connections which are always provided and maxCount is the maximum number of connections? 2) How can I find out about the best configuration? Are there any values out of your experiance you can give? thanks Rainer
FileLogger Question
Hi, we would like to have a log directory for every virtual host running on our box. Therfore we where setting up the Logger/ tag within the server.xml File to the following values: Logger className=org.apache.catalina.logger.FileLogger directory=/home/wwa-m/public_html/docroot/WEB-INF/log/ prefix=wwa-m. sufix =.log timestamp=true/ And now the problem: the logs are not being writen to the configured directory, even though it exist!! any suggestions?? R.
server.xml question
Hi, I asked the same question some hours ago already but no one responded. Is my question so difficult or can no one understand it ??? We would like to have a log directory for every virtual host running on our box. Therfore we were setting up the Logger/ tag within the server.xml file to the following attributes: Logger className=org.apache.catalina.logger.FileLogger directory=/home/wwa-m/public_html/docroot/WEB-INF/log/ prefix=wwa-m. sufix =.log timestamp=true/ And now the problem: the logs are not being writen to the configured directory, even though the directory exist!! any suggestions?? R.
Re: server.xml question
thanks Roger, well the misspelling was happend only in the email. In the server.xml it is spelled correctly... rainer jünger Is it as simple as you misspelled suffix? Roger Whitcomb Computer Associates Senior Software Engineer Development Phone: +1 408 965 8653 FAX: +1 408 965 8805 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -Original Message- From: rainer jünger [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 9:48 AM To: Tomcat Users List Subject: server.xml question Hi, I asked the same question some hours ago already but no one responded. Is my question so difficult or can no one understand it ??? We would like to have a log directory for every virtual host running on our box. Therfore we were setting up the Logger/ tag within the server.xml file to the following attributes: Logger className=org.apache.catalina.logger.FileLogger directory=/home/wwa-m/public_html/docroot/WEB-INF/log/ prefix=wwa-m. sufix =.log timestamp=true/ And now the problem: the logs are not being writen to the configured directory, even though the directory exist!! any suggestions?? R. -- 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: server.xml question
Hi, Actually suggestion number two reminds me: isn't it true that tomcat by default only allows itself to write files underneath TOMCAT_HOME? maybe this doesn't apply to log files. I had a problem a while back as far as trying to write uploaded files to a different directory -- I had two choices: mess with the security manager or choose a path under TOMCAT_HOME. I chose the latter ; ) the following is written at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/logger.html directory: Absolute or relative pathname of a directory in which log files created by this logger will be placed. If a relative path is specified, it is interpreted as relative to $CATALINA_HOME. If no directory attribute is specified, the default value is logs (relative to $CATALINA_HOME). so it should definately be possible to write logs somewhere else ?! rainer jünger -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: server.xml question
Hi Roger, - Are the permissions set correctly for your directory? that was the reason (stupid me!) chmod 777 ... solved the problem is it normal that there are only very view infos being writen in?? I thougt it is also the access log and the error log? Sofar there are only infos concerning starting and stopping the container (of course that doesn't proove weather errors are logged or not!) thanks, rainer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
default forward/
Hi, I would like to forward to a certain path when all the other options (like action/action or ohter forwards/) within the action.xml were past without maching. Has this someone realized so far? thanks, Rainer
sorry, wrong list!! default forward/
Hi, I would like to forward to a certain path when all the other options (like action/action or ohter forwards/) within the action.xml were past without maching. Has this someone realized so far? thanks, Rainer
Confusion about ConnectionPooling with Tomcat 4
Hi, I am getting a little confused about the topic weather Tomcat 4.x ist having a Connection Pooling implementet or not. I was following the discussions the last few days and the answers have been a little contradicting. Therfore my question loud and clear ; ) Is there a Connection Pooling using JNDI with Tomcat 4.x or not? Below some postings concerning this topic from the last few days... Thanks Rainer past postings Tomcat: As far as I'm concerned, JNDI support is a now and forever more feature of Tomcat 4 and later. It's the standard access mechanism for J2EE app servers as well. Recommendation: If you can, you should use JNDI based access to data sources. This is both portable across containers, and portable across Struts versus non-Struts applications. In addition, it can be used from directly from within a JavaBean implementing your business logic, without requiring a reference to ActionServlet or the servlet context (or the web layer at all). In the javabean. import javax.naming.NamingException; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; class mybean() { java.sql.Connection conn get getPooledDatabaseConnection() { Context ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(jdbc/dbpool); conn = ds.getConnection(); } ... } Yep ... that is exactly the pattern you can use. Nice, isn't it? Soefara. Craig ### Unfortunately by using the Tomcat (4.0.x) default JNDI datasource factory (aka Tyrex) you not only do not have a pool manager interface but you don't have a pool. The Tyrex factory only sets up one physical connection and one pool instance AFAIK. In order to create a pool you either can use the jakarta-commons DBCP factory or write your own implementation. Craig McClanahan recently posted this DBCP implementation which works with TC 4.0.x. Craig's post It should be possible to use the DBCP based pool even with Tomcat 4.0.x by overriding the default JNDI factory for javax.sql.DataSource objects (I haven't tested this, but in theory it should all work). This requires the following steps: * Download recent nightly builds of the Collections, Pool, and DBCP packages from Jakarta Commons (http://jakarta.apache.org/builds/jakarta-commons/nightly/) and put the JAR files into $CATALINA_HOME/common/lib along with your JDBC driver. * Configure the factory parameter in the ResourceParams element to set the JNDI ObjectFactory class for this resource: ResourceParams name=jdbc/EmployeeDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter ... other configuration parameters ... /ResourceParams * Configure the other parameter values of the ResourceParams element from the list of supported properties below: - driverClassName - Fully qualified Java class name of the JDBC driver - maxActive - Maximum number of active connections at one time - maxIdle - Maximum number of idle connections at one time (if more are returned to the pool, they will be closed to release database resources) - maxWait - Number of milliseconds the pool will wait when there are no available connections before causing getConnection() to throw an exception - password- Database password - url - Connection URL (also accepts driverName for backwards compatibility) - user- Database username - validationQuery - Optional SQL SELECT statement used to validate a connection before returning it to the application (must return at least one row). This is helpful in catching stale connections because of timeouts or recycling of the database without stopping Tomcat. Alternatively, you can use any other connection pool you like, if you create your own javax.naming.spi.ObjectFactory implementation class (the JNDI object factory interface) and registering its name with the factory parameter. Documentation is in the JNDI Specification and the corresponding Service Provider Interface document, at: http://java.sun.com/products/jndi/docs.html As I said this implementation works fine for TC 4.0.x. and as Craig mentions the DBCP BasicDataSourceFactory class is a good model for writing your own implementation. HTH Steven ## Yes, I have been able to get pooling data sources to work with mySql using the mm drivers.
compatibility Tomact 3.3.1 and 4.x
Hi, We are running applications on Tomcat 3.3.1 but want to update to 4.x to use new featrues for future projects. 1) What are the incompatibilities and how is your experiance by doing this? 2) Can someone run 3.3.1 and 4.x on _ONE_ box parallel? thanks, rainer juenger
Re: Tomcat 4.x and Database Connection Pooling
Hi Ric, Struts provides a basic Connection Pool, but user comments suggest that this is not suitable for large-scale, high-traffic applications, and also that it will soon be removed from Struts in favour of a container-managed connection pool So what will Tomcat Users do? Will Tomcat get a container manages connection pool? What is the reason for removing it form Struts? R. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.x and Database Connection Pooling
Hi Craig, So what will Tomcat Users do? Will Tomcat get a container manages connection pool? http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html What is the reason for removing it form Struts? That was a hypothetical example of a possible future situation that would cause the need to change your code. Sorry somehow I don't understand your answer. Did you wont to give me a hint that I can avoid to change the code in future by using JNDI? Still, what will happen to the Connection Pooling in future in Struts or in Tomcat? thanks, rainer juenger -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.x and Database Connection Pooling
Hi Jim, If you are looking for connection pooling which will work with any database check out DbConnectionBroker at http://www.javaexchange.com/ DbConnectionBroker is only providing as the developer calls it a 2 Tier model. So there is not actually a Connection Pool that manages the connection independently and the application is only taking and giving back connections. rainer juenger -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.x and Database Connection Pooling
Hi Craig, Sorry somehow I don't understand your answer. Struts is ***NOT*** going to remove its own connection pool :-). Thanks thats an answer even I can understand ; ). However, the internal implementation is changing in Struts 1.1 to use the commons-dbcp implementation underneath. this might answer the primar question form Ric as well. Recommendation: If you can, you should use JNDI thanks I 'll consider it! Craig Your answer helped me now a lot. Rainer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]