Re: Setting scheme on catalina Requests
On 14/06/2010 01:23, Matthew Peterson wrote: Hi Mark, I cannot find another reference to the setScheme method by searching the tomcat-users archive (http://marc.info/?l=tomcat-userw=2r=1s=setSchemeq=b). Where else would I find some info on this topic? My bad. It was Request.setRemoteAddr(String) and Request.setRemoteHost(String) that was discussed with a side comment on setScheme() - all on the dev list. The short version is that these attributes were not intended to be editable when first implemented. That has evolved over time. Mark Cheers, Matt. -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Monday, 14 June 2010 9:58 AM To: Tomcat Users List Subject: Re: Setting scheme on catalina Requests On 13/06/2010 23:40, Matthew Peterson wrote: I still don't understand why the catalina.Request object doesn't implement the convenience method setScheme(String) for this... Try searching the archives. This has bee discussed previously. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: J2EE (Spring) + Flex + Tomcat 6.0.18 problem
Hi and thanks for all responses. It sounds like a timeout, rather than an empty response. Please remove all comments and any passwords from your server.xml and post it here. [code] Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server [/code] Well, it looks like timeout occured, because time of failing response was about 21 seconds. But why? 50Mb free isn't a meaningful number. More useful to know how much memory the JVM is currently using and what it's heap is configured to use. I used probe and it showed that memory was dropping from 40 megabytes till 5-10 and then it was going back to 40. If you think it's a bug in Tomcat, you could try using the latest release instead of an older one. I shall try. -- Regards, Kitikat -- View this message in context: http://old.nabble.com/J2EE-%28Spring%29-%2B-Flex-%2B-Tomcat-6.0.18-problem-tp28818290p28878122.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to bind jndi realm datasource so that my hibernate can find it can find it
Hello tomcats !! I learnt a lot since last discussion(problems at thejarbar.org) and am moving on... I now wish to configure the datasource used by the realm to also be used by hibernate Currently my server.xml looks as follows: ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=8005 shutdown=SHUTDOWN !--APR library loader. Documentation at /docs/apr.html -- Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener / !-- Prevent memory leaks due to use of particular java/javax APIs-- Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / !-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=jdbc/auth description=The Jar Bar user authentication type=javax.sql.DataSource auth=Container driverClassName=com.mysql.jdbc.Driver maxActive=30 maxIdle=10 maxWait=1 password=myPass url=jdbc:mysql://localhost:3306/yucca123_thejarbar validationQuery=/* ping */ SELECT 1 username=yucca123_tom/ /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container Note: A Service is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/service.html -- Service name=Catalina !--The connectors can use a shared executor, you can define one or more named thread pools-- !-- Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ -- !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / !-- A Connector using the shared thread pool-- !-- Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / -- !-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation -- !-- Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / !-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html -- !-- You should set jvmRoute to support load-balancing via AJP ie : Engine name=Catalina defaultHost=localhost jvmRoute=jvm1 -- Engine name=Catalina defaultHost=localhost !--For clustering, please take a look at
RE: J2EE (Spring) + Flex + Tomcat 6.0.18 problem
look at catalina.bat -X attributes (stack,minHeap and maxHeap) catalina will use parameters from JAVA_OPTS environment variable also..you could be experiencing some issues with permgen not being collected http://wiki.apache.org/tomcat/FAQ/Memory Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Mon, 14 Jun 2010 03:59:59 -0700 From: kitika...@gmail.com To: users@tomcat.apache.org Subject: Re: J2EE (Spring) + Flex + Tomcat 6.0.18 problem Hi and thanks for all responses. It sounds like a timeout, rather than an empty response. Please remove all comments and any passwords from your server.xml and post it here. [code] Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server [/code] Well, it looks like timeout occured, because time of failing response was about 21 seconds. But why? 50Mb free isn't a meaningful number. More useful to know how much memory the JVM is currently using and what it's heap is configured to use. I used probe and it showed that memory was dropping from 40 megabytes till 5-10 and then it was going back to 40. If you think it's a bug in Tomcat, you could try using the latest release instead of an older one. I shall try. -- Regards, Kitikat -- View this message in context: http://old.nabble.com/J2EE-%28Spring%29-%2B-Flex-%2B-Tomcat-6.0.18-problem-tp28818290p28878122.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
el-api jar versions for tomcat 5.5.23
Hi, I am trying to deply an application to tomcat 5.5 running on Java 1.6. I want to know what versions of el-api.jar and el-impl.jar work with tomcat 5.5.23? Thanks
Testing tomcat 6
Hi, I would like to run tomcat for testing, I am looking for test cases with aggressive workload. Could you please let me know whether there exists a testing/benchmarking suite for tomcat that I can use? Thanks, Best Regards, Ohad
Re: Testing tomcat 6
Ohad, What do you want to test? I think that you need to rephrase your question. If you are trying to test your application running under Tomcat, then the test suite has to be specific to your application. If you want to bechmark Tomcat against other servlet containers, then you need to use the same application and apply the same test suite. -Jorge On Mon, Jun 14, 2010 at 9:52 AM, Ohad Shacham ohad.shac...@gmail.comwrote: Hi, I would like to run tomcat for testing, I am looking for test cases with aggressive workload. Could you please let me know whether there exists a testing/benchmarking suite for tomcat that I can use? Thanks, Best Regards, Ohad
Re: Testing tomcat 6
On 6/14/2010 9:52 AM, Ohad Shacham wrote: Hi, I would like to run tomcat for testing, I am looking for test cases with aggressive workload. Could you please let me know whether there exists a testing/benchmarking suite for tomcat that I can use? Thanks, Best Regards, Ohad I use the Eclipse tptp (testing and performance tools) project for my testing stuff. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Testing tomcat 6
Thanks for the reply. I would like to dynamically test the correctness of ConcurrentHashMap in tomcat. Therefore, I am looking for test suites and applications that I'll be able to run under Tomcat in order to test Tomcat's behavior. Ohad On Mon, Jun 14, 2010 at 5:30 PM, Jorge Medina cerebrotecnolog...@gmail.comwrote: Ohad, What do you want to test? I think that you need to rephrase your question. If you are trying to test your application running under Tomcat, then the test suite has to be specific to your application. If you want to bechmark Tomcat against other servlet containers, then you need to use the same application and apply the same test suite. -Jorge On Mon, Jun 14, 2010 at 9:52 AM, Ohad Shacham ohad.shac...@gmail.com wrote: Hi, I would like to run tomcat for testing, I am looking for test cases with aggressive workload. Could you please let me know whether there exists a testing/benchmarking suite for tomcat that I can use? Thanks, Best Regards, Ohad
Re: Testing tomcat 6
ConcurrentHashMap is defined by Java, so I think you want to look for Java test suites. On Jun 14, 2010, at 10:36 AM, Ohad Shacham wrote: ConcurrentHashMap - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to calculate a memory tomcat
Am Sun, 13 Jun 2010 22:27:40 +0700 schrieb andy susanto ibsolut...@gmail.com: is there any tool that i can monitor my tomcat ?, because at peak hour You should ask your preferred search engine after JMX. JDK offers some applications like jconsole (old fashioned but usually sufficent) or jvisualvm (looks nicer, less stable) to monitor the JVM. Additional, more tomcat-specific data can be monitored by the tomcat-app lamdba-probe. Regards, Tobias. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Re: how to calculate a memory tomcat
Lambda Probe for Apache Tomcat ? http://www.lambdaprobe.org/d/index.htm 14.06.10, 19:54, Tobias Crefeld t...@cataneo.eu: Am Sun, 13 Jun 2010 22:27:40 +0700 schrieb andy susanto : is there any tool that i can monitor my tomcat ?, because at peak hour You should ask your preferred search engine after JMX. JDK offers some applications like jconsole (old fashioned but usually sufficent) or jvisualvm (looks nicer, less stable) to monitor the JVM. Additional, more tomcat-specific data can be monitored by the tomcat-app lamdba-probe. Regards, Tobias. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- /* ** */ Myk Bova Phone: +380447131381 Cell: +380983225480 ICQ: 157902492 Email: syste...@narod.ru Web: http://www.chantingwolf.narod.ru /* ** */ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: el-api jar versions for tomcat 5.5.23
On 14/06/2010 14:27, Richard Nduka wrote: Hi, I am trying to deply an application to tomcat 5.5 running on Java 1.6. I want to know what versions of el-api.jar and el-impl.jar work with tomcat 5.5.23? Tomcat 5.5.x supports JSP 2.0 / EL 2.0. All the necessary JARs for EL support are provided by the container. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to calculate a memory tomcat
Am Mon, 14 Jun 2010 20:06:42 +0400 schrieb Myk Bova syste...@narod.ru: Lambda Probe for Apache Tomcat ? http://www.lambdaprobe.org/d/index.htm Correct, sorry for the typo! Regards, Tobias. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
hibernate not finding global resource datasource defined by tomcat
Hello tomcats!! Please advise as to why hibernate us unable to find jndi datasource configured in tomcat? Trying 2 different setups here: 1) server.xml resource as follows: GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=jdbc/auth description=The Jar Bar user authentication type=javax.sql.DataSource auth=Container driverClassName=com.mysql.jdbc.Driver maxActive=30 maxIdle=10 maxWait=1 password=myPass url=jdbc:mysql://localhost:3306/yucca123_thejarbar validationQuery=/* ping */ SELECT 1 username=yucca123_tom/ /GlobalNamingResources throws: Jun 14, 2010 10:13:20 PM org.apache.catalina.core.ApplicationContext log Jun 14, 2010 10:13:20 PM org.apache.catalina.core.ApplicationContext log Jun 14, 2010 10:13:46 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Faces Servlet threw exception javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859) at org.bar.jar.util.HibernateUtil.clinit(HibernateUtil.java:24) at org.bar.jar.backing.TutorialIndexBacking.getAllUnflaggedComments(TutorialIndexBacking.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.el.BeanELResolver.getValue(BeanELResolver.java:62) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) at org.apache.el.parser.AstValue.getValue(AstValue.java:123) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101) at javax.faces.component.UIData.getValue(UIData.java:609) at javax.faces.component.UIData.getDataModel(UIData.java:1124) at javax.faces.component.UIData.setRowIndex(UIData.java:451) at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:77) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813) at javax.faces.component.UIData.encodeBegin(UIData.java:962) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266) at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at
virtual hosting different in Tomcat 5.5 and 6?
I have Tomcat 5.5.x installed and Pro Apache Tomcat 6. Do I define virtual hosts in server.xml in Tomcat 5.5 as well? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: virtual hosting different in Tomcat 5.5 and 6?
On 14/06/2010 22:07, MB wrote: I have Tomcat 5.5.x installed and Pro Apache Tomcat 6. Do I define virtual hosts in server.xml in Tomcat 5.5 as well? Are the docs really that hard to find? http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html And, although I'm fairly sure I am going to regret asking this question, what exactly is Pro Apache Tomcat 6? I see a book with that title but not any software. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: hibernate not finding global resource datasource defined by tomcat
Please read the following for a detailed description on how to configure Hibernate to use JNDI resources supplied by Tomcat. http://wiki.apache.org/tomcat/TomcatHibernate Then you will need a ResourceLink element in META-INF/context.xml to make the resource in GlobalNamingResources available to your application. The configuration for that information can be found here: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Resource%20Links Finally, unless you place Tomcat's manager and admin application's authentication and authorization information in your database, removing the UserDatabaseRealm from GlobalNamingResources will prevent you from using the manager and admin application. You can place more than one Resource element in the GlobalNamingResources element of your server.xml. I'm trying to finish up a document on DataSourceRealms. Hopefully that will get posted on Tomcat's Wiki today or tomorrow, depending on other time constraints. just my two cents . . . . . /mde/ --- On Mon, 6/14/10, yucca...@live.co.za yucca...@live.co.za wrote: Hello tomcats!! Please advise as to why hibernate us unable to find jndi datasource configured in tomcat? Trying 2 different setups here: 1) server.xml resource as follows: GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=jdbc/auth description=The Jar Bar user authentication type=javax.sql.DataSource auth=Container driverClassName=com.mysql.jdbc.Driver maxActive=30 maxIdle=10 maxWait=1 password=myPass url=jdbc:mysql://localhost:3306/yucca123_thejarbar validationQuery=/* ping */ SELECT 1 username=yucca123_tom/ /GlobalNamingResources with hibernate.cfg.xml: ?xml version='1.0' encoding='utf-8'? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD//EN http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd; hibernate-configuration session-factory property name=connection.urljdbc:mysql://localhost:3306/yucca123_thejarbar/property property name=hibernate.connection.datasourcejava:comp/env/jdbc/auth/property property name=connection.driver_classcom.mysql.jdbc.Driver/property property name=connection.usernameyucca123_tom/property property name=current_session_context_classthread/property property name=connection.passwordpookie123/property mapping resource=org/bar/jar/model/UserRolesEntity.hbm.xml/ mapping resource=org/bar/jar/model/UsercommentsEntity.hbm.xml/ mapping resource=org/bar/jar/model/UsersEntity.hbm.xml/ !-- DB schema will be updated if needed -- !-- property name=hbm2ddl.autoupdate/property -- /session-factory /hibernate-configuration so I try 2) moving resource and realm element to context.xml with adding localdatasource attribute to resource (true) and get same exception? What am I missing here? tomcat is latest 6.0.26 mysql 5 with global connector (inside common/lib) Ideally I want the global(server.xml) config for the resource as it WILL be shared among deployed applications, but because this is first application I am willing to use just contect configured resource. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: hibernate not finding global resource datasource defined by tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yuccal Nel, On 6/14/2010 4:26 PM, yucca...@live.co.za wrote: Please advise as to why hibernate us unable to find jndi datasource configured in tomcat? I'm not sure why Hibernate can't find your JNDI resource, but... property name=connection.urljdbc:mysql://localhost:3306/yucca123_thejarbar/property property name=connection.driver_classcom.mysql.jdbc.Driver/property property name=connection.usernameyucca123_tom/property property name=current_session_context_classthread/property property name=connection.passwordpookie123/property Why do you need these properties in your hibernate configuration? The DataSource already knows all these things and you're just confusing Hibernate (and yourself) by having them in here. 2) moving resource and realm element to context.xml with adding localdatasource attribute to resource (true) and get same exception? IIRC, localDataSource is a Realm option, and has nothing to do with the Resource or any Hibernate configuration. What am I missing here? Maybe you need a resource-ref element in your web.xml? tomcat is latest 6.0.26 mysql 5 with global connector (inside common/lib) Tomcat 6 doesn't have a common/lib by default. Did you add that? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwWpyYACgkQ9CaO5/Lv0PDoKwCgoVpt0TcF0EPX8yMhNH2JHivf ce8AoK6T283631l+J1hWmxUpFpIyMC8y =CZ3Y -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Setting scheme on catalina Requests
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, On 6/13/2010 6:03 PM, Matt Peterson wrote: I am trying to develop a valve to modify requests based on a HTTP request header as set by our SSL terminating load balancer. The valve is to watch out for a particular header and when found, call the setSecure(true), setScheme(https) and setServerPort(443) methods so that the receiving servlet is aware that the request is a secure one. Why set the server port? You may end up confusing code that performs redirects and things like that. Can you get away with simply setSecure()/setScheme()? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwWp88ACgkQ9CaO5/Lv0PCE6QCePtQgxZKDiDgB7GVjRK7HiM2k IA0An3Wnzw4RdIM1IMHw+q4WNFupseiv =EHI5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: hibernate not finding global resource datasource defined by tomcat
On 14/06/2010 22:45, Mark Eggers wrote: I'm trying to finish up a document on DataSourceRealms. Hopefully that will get posted on Tomcat's Wiki today or tomorrow, depending on other time constraints. I don't suppose you fancy providing a patch for the Tomcat docs as well... (or instead of) Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Setting scheme on catalina Requests
I have discovered that the RemoteIPValve which has been shipped with Tomcat since v6.0.24 also performs the tasks am trying to perform with my valve. I had overlooked it previously due to its name. We are using v6.0.26, so I'll give it a whirl! Cheers, Matt. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, 15 June 2010 8:06 AM To: Tomcat Users List Subject: Re: Setting scheme on catalina Requests -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, On 6/13/2010 6:03 PM, Matt Peterson wrote: I am trying to develop a valve to modify requests based on a HTTP request header as set by our SSL terminating load balancer. The valve is to watch out for a particular header and when found, call the setSecure(true), setScheme(https) and setServerPort(443) methods so that the receiving servlet is aware that the request is a secure one. Why set the server port? You may end up confusing code that performs redirects and things like that. Can you get away with simply setSecure()/setScheme()? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwWp88ACgkQ9CaO5/Lv0PCE6QCePtQgxZKDiDgB7GVjRK7HiM2k IA0An3Wnzw4RdIM1IMHw+q4WNFupseiv =EHI5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Re: how to calculate a memory tomcat
Lambda Probe is stale. It has been forked to Psi Probe which has regular activity: http://code.google.com/p/psi-probe/ -Original Message- From: Myk Bova [mailto:syste...@narod.ru] Sent: Tuesday, 15 June 2010 2:07 AM To: Tomcat Users List Subject: Re: Re: how to calculate a memory tomcat Lambda Probe for Apache Tomcat ? http://www.lambdaprobe.org/d/index.htm 14.06.10, 19:54, Tobias Crefeld t...@cataneo.eu: Am Sun, 13 Jun 2010 22:27:40 +0700 schrieb andy susanto : is there any tool that i can monitor my tomcat ?, because at peak hour You should ask your preferred search engine after JMX. JDK offers some applications like jconsole (old fashioned but usually sufficent) or jvisualvm (looks nicer, less stable) to monitor the JVM. Additional, more tomcat-specific data can be monitored by the tomcat-app lamdba-probe. Regards, Tobias. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- /* ** */ Myk Bova Phone: +380447131381 Cell: +380983225480 ICQ: 157902492 Email: syste...@narod.ru Web: http://www.chantingwolf.narod.ru /* ** */ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: hibernate not finding global resource datasource defined by tomcat
Sure, I can make an attempt at it. I'd like to finish the wiki entry first. What I'm writing though will have to be drastically shortened for the documentation page I think. I just ran into a bit of a puzzle though. I was trying to unravel what happens when you put everything into server.xml and use a CombinedRealm. Under Linux, I had to add a ResourceLink element to my context.xml in order to use the sub-Realm. I can understand that I need a ResourceLink when I put the Resource in GlobalNamingResources and the Realm in context.xml, but I was rather surprised that I needed the ResourceLink when both are in server.xml. I'll see if I can reproduce this on Windows/XP (make sure I've done everything in a reasonable order). If that is indeed the case, can someone explain: 1. Context.xml - everything no ResourceLink needed (obviously) 2. Context.xml - Realm, server.xml Resource in GlobalNamingResources ResourceLink needed (obviously) 3. Server.xml - CombinedRealm, Resource in GlobalNamingResources ResourceLink needed (??) thanks for clearing things up . . . . /mde/ --- On Mon, 6/14/10, Mark Thomas ma...@apache.org wrote: From: Mark Thomas ma...@apache.org Subject: Re: hibernate not finding global resource datasource defined by tomcat To: Tomcat Users List users@tomcat.apache.org Date: Monday, June 14, 2010, 2:59 PM On 14/06/2010 22:45, Mark Eggers wrote: I'm trying to finish up a document on DataSourceRealms. Hopefully that will get posted on Tomcat's Wiki today or tomorrow, depending on other time constraints. I don't suppose you fancy providing a patch for the Tomcat docs as well... (or instead of) Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
disabling non url match returns
Hi guys, new to tomcat and I'm trying to find the appropriate web.xml tweek to avoid trailing '/*' mapping to take place. For example lets say abc.com/current/ is a valid request. however abc.com/current/xyz should not be. my Tomcat server is always returning the abc.com/current/anything trailing just as though it was abc.com/current. How can I return a 404 page not found or similar error instead of the real xml. thanks alot! -- View this message in context: http://old.nabble.com/disabling-non-url-match-returns-tp28886572p28886572.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: disabling non url match returns
From: nejm [mailto:emedei...@mms.org] Subject: disabling non url match returns new to tomcat What exact version? and I'm trying to find the appropriate web.xml tweek to avoid trailing '/*' mapping to take place. You really, really don't want to preclude that, since it would disable delivery of all static content. For example lets say abc.com/current/ is a valid request. however abc.com/current/xyz should not be. my Tomcat server is always returning the abc.com/current/anything trailing just as though it was abc.com/current. No, Tomcat isn't, but *your* servlet is. Post the web.xml for your webapp so we can see what mappings you have specified. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Session clustering across different contexts
I am testing this on my laptop, windows 7 64bit, tomcat 6 If I use the same contexts, i.e. localhost:8181/r2 and localhost:8080/r2 the sessions are replicated across them no problem. If I use a different context, e.g. r3 but same web app deployed, the sessions are no replicated, and I get this warning: org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/r2 /AB On Thu, Jun 10, 2010 at 7:16 PM, Pid p...@pidster.com wrote: On 10/06/2010 06:13, Andrew Bruno wrote: Hello, I have managed to get session clustering working when using the same context. Tomcat, JVM, OS exact versions please. I need to get session replication working across different contexts. Does anyone know if this is possible? Depends what you mean. If it works for one, it'll work for all of them, assuming your cluster members are correctly configured. I get these warnings at the moment. 10/06/2010 3:08:20 PM org.apache.catalina.ha.session.ClusterSessionListener messageReceived WARNING: Context manager doesn't exist:localhost#/r2 Does that server have that application installed? p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: hibernate not finding global resource datasource defined by tomcat
-- From: Christopher Schultz ch...@christopherschultz.net Sent: Tuesday, June 15, 2010 12:03 AM To: Tomcat Users List users@tomcat.apache.org Subject: Re: hibernate not finding global resource datasource defined by tomcat -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yuccal Nel, On 6/14/2010 4:26 PM, yucca...@live.co.za wrote: Please advise as to why hibernate us unable to find jndi datasource configured in tomcat? I'm not sure why Hibernate can't find your JNDI resource, but... property name=connection.urljdbc:mysql://localhost:3306/yucca123_thejarbar/property property name=connection.driver_classcom.mysql.jdbc.Driver/property property name=connection.usernameyucca123_tom/property property name=current_session_context_classthread/property property name=connection.passwordpookie123/property Why do you need these properties in your hibernate configuration? The DataSource already knows all these things and you're just confusing Hibernate (and yourself) by having them in here. :) No I was just trying to hurry to get working copy up :) 2) moving resource and realm element to context.xml with adding localdatasource attribute to resource (true) and get same exception? IIRC, localDataSource is a Realm option, and has nothing to do with the Resource or any Hibernate configuration. What am I missing here? Maybe you need a resource-ref element in your web.xml? Can you explain? tomcat is latest 6.0.26 mysql 5 with global connector (inside common/lib) Tomcat 6 doesn't have a common/lib by default. Did you add that? No I was merely referring to the fact that I included driver in the lib directory of server - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwWpyYACgkQ9CaO5/Lv0PDoKwCgoVpt0TcF0EPX8yMhNH2JHivf ce8AoK6T283631l+J1hWmxUpFpIyMC8y =CZ3Y -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Support multiple apache contexts via one tomcat webapp context
I am trying to setup Apache with JkMount to tomcat to dynamically handle different contexts in Apache, but always use the same context in Tomcat. e.g. http://apachefrontenddomain.com.au/a/customer-1.com - jk ajp to - http://tomcatserver:8009/webapp http://apachefrontenddomain.com.au/a/customer-2.com - jk ajp to - http://tomcatserver:8009/webapp http://apachefrontenddomain.com.au/a/customer-3.com - jk ajp to - http://tomcatserver:8019/webapp2 http://apachefrontenddomain.com.au/a/customer-4.com - jk ajp to - http://tomcatserver:8039/webapp4 Doe anyone know how to do this? Do I need to use Aliasing or Rewriting? I am using Apache 2.2 and Tomcat 6 Cheers Andrew - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Re: how to calculate a memory tomcat
Also have a look at http://www.jmanage.org/wiki/index.php/Introduction_to_jManage On Tue, Jun 15, 2010 at 8:42 AM, Matthew Peterson matt.peter...@une.edu.au wrote: Lambda Probe is stale. It has been forked to Psi Probe which has regular activity: http://code.google.com/p/psi-probe/ -Original Message- From: Myk Bova [mailto:syste...@narod.ru] Sent: Tuesday, 15 June 2010 2:07 AM To: Tomcat Users List Subject: Re: Re: how to calculate a memory tomcat Lambda Probe for Apache Tomcat ? http://www.lambdaprobe.org/d/index.htm 14.06.10, 19:54, Tobias Crefeld t...@cataneo.eu: Am Sun, 13 Jun 2010 22:27:40 +0700 schrieb andy susanto : is there any tool that i can monitor my tomcat ?, because at peak hour You should ask your preferred search engine after JMX. JDK offers some applications like jconsole (old fashioned but usually sufficent) or jvisualvm (looks nicer, less stable) to monitor the JVM. Additional, more tomcat-specific data can be monitored by the tomcat-app lamdba-probe. Regards, Tobias. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- /* ** */ Myk Bova Phone: +380447131381 Cell: +380983225480 ICQ: 157902492 Email: syste...@narod.ru Web: http://www.chantingwolf.narod.ru /* ** */ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org