📄 misc.xtp
字号:
<s1 title="Miscellaneous"><summarylist/><s2 title='Resin Freezes'><p>Normally, this is not actually a Resin problem, but a deadlock inthe application code.</p><p>To get anywhere you need to produce a thread dump. Getting a thread dump is system dependent. On Unix, "kill -QUIT" for the Java process willproduce a thread dump.</p><p>On Solaris with JDK 1.2, you need to start Resin from a console, i.e. you need touse "httpd.sh" instead or "httpd.sh start". When you use "kill -QUIT", theJDK will ask you questions to get more detailed information.<p>On Windows, you need to start Resin from a command line, not fromhttp.exe. ctrl-\ will then give you the dump.<p>By looking at the thread dump you should be able to see whatlock is getting stuck.</s2><s2 title="Why so many processes on Linux?"><p>On Linux, each native thread is displayed as a separate processby 'ps -auxw'. Don't worry, those processes are extremelylightweight.</p></s2><s2 title="Can you recommend any JDBC drivers?"><p>Arun Jamwal writes:</p><p>I have used Weblogic's type 2 JDBC driver (formerly known as FastForward)on two big projects. Oracle's type 4 JDBC driver was crashing againsta big query...and type 2 couldn't be used with M$ VM. Weblogic bundlesthesedrivers with Tengah but you can ask them just for the JDBC drivers....<p>I had used Openlink's type 3 JDBC drivers too (about 2.5+ years ago) but Ididn'tlike them much.<p>PS: Check out these links for more info:<p><a href="http://www.beasys.com/products/weblogic/drivers.html">http://www.beasys.com/products/weblogic/drivers.html</a><br><a href="http://www.javasoft.com/products/jdbc/drivers.html">http://www.javasoft.com/products/jdbc/drivers.html</a></p></s2><s2 title="What value does caching add when I'm already using Apache?"><def>> What value does caching provide when Resin is behind another web server like> IIS. Do I want caching on? Presumably, most jsp pages and all servlets are> dynamic.</def><p>True, but many pages are only quasi-dynamic. For example, cnn.com'shome page isdynamically generated, but it changes only every 15 minutes or so. cnn.comprobably has a 15 minute cron job that updates a static file and you coulddevelop something like that yourself or spend time caching database results.Resin's caching just makes that easier. If cnn.com used Resin, it could do allthat very easily by adding:</p><example><%long now = System.currentTimeMillis();response.setDateHeader("Expires", now + 15 * 60000);%></example><p>Also, sophisticated sites have top pages that change for logged in users, butdynamic sub-pages that are common. Because a include() page is treated as aseparate request, you can cache just the subpage.<p>The database is often the bottleneck for latency and also for database licensesand hardware. If you can avoid 75% of your Oracle calls by setting a simpleheader, you can delay buying Sun's high-end enterprise servers for a couple ofmonths.</s2><s2 title="How do I prevent cached pages from the back button?"><p>This isn't actually a Resin question, but it's a common issue.<p>Jean-Francois Lamy replies:<p>We use the following, which does seem to force reload in case of a Back aswell.</p><example>response.setHeader("Cache-Control","no-cache"); //HTTP 1.1response.setHeader("Pragma","no-cache"); //HTTP 1.0response.setDateHeader ("Expires", 0); //prevents caching at the proxy server</example></s2></s1>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -