1.å¦ä½å®è£
resin
å¦ä½å®è£ resin
1.Resin å¯ä»¥å¨ /download/index.xtp å è´¹ä¸è½½å使ç¨ã使ç¨Resinå¼åæè å¦ä¹ æ¯å è´¹çï¼ä½æ¯å¦ææResinä½ä¸ºæ¶è´¹äº§ååå¸æ¯éè¦ä»è´¹çãç®åççæ¬æ¯2..
ä¸è½½Resin æ¶éæ©Archive Versions ä¸ç windows.zipçæ®éå®è£ å resin-2.1.0.zip.
æ该zipå 解åå°ä»»ä½ç®å½ä¸é¢ï¼å¦dï¼ esin.以ä¸ä»ç»é½å设Resinå®è£ å¨dï¼ esinä¸ãè¿å ¥dï¼ esininï¼
é®å ¥.caucho.sql.*;å»æé¿å å²çª.
DBPoolç±»èä¾:
package com.netease.mm;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
public class DBPool
{
private Connection conn = null;
public static DBPool getPool(String poolName)
{
try
{
Context env = (Context) new InitialContext().lookup("java:comp/env");
DataSource source = (DataSource) env.lookup("jdbc/"+poolName);
DBPool pool = new DBPool();
pool.conn = source.getConnection();
return pool;
}
catch(Exception e)
{
return null;
}
}
public Connection getConnection()
{
return conn;
}
}
é ç½®stderr,码解武汉麻将app源码stdoutçlogé®é¢. Resin3é»è®¤å¹¶ä¸ä¼å°ç¨åºåºéçä¿¡æ¯æå°åºæ¥.éè¦èªå·±è®¾ç½®.
å¨<resin>ç»ç¹ä¹ä¸æ·»å å¦ä¸é ç½®:
<log name='' level='all' path='stderr:' timestamp="[%H:%M:%S.%s]"
format=" ${ log.level} ${ log.loggerName} ${ log.message}"/>
é ç½®ä¸æ æ³è§£å³çé®é¢: å¨resin2.0.xä¸.å¯ä»¥è®¾ç½®error-page,å½resinå¯å¨é误ææªå¯å¨æ¶,访é®ä¸»é¡µå°èªå¨è½¬åå°æ设置çerror-page, å¨resin3ä¸,è½ç¶ä¸»é¡µå¸®å©éé¢æå°è¿ä¸ªè®¾ç½®
ä¾:<error-page exception-type='connection' location='/errpage.html'/>, ä½ç»è¿æµè¯.æ 论å°æ¤è®¾ç½®æ¾å¨åªä¸å±ç»ç¹(resin,server,host,web-app)ä¹ä¸.é½æ æ³èµ·å°è½¬åçä½ç¨. è¿å°±å¼åä¸ä¸ªä¸¥éçé®é¢,å½resin3æªå¯å¨èapacheè¿è¡æ¶.访é®jsp页é¢,å°ç´æ¥æ¾ç¤ºåºæºç .该é®é¢å¨resin3è³ä»åå¸ççæ¬é½åå¨,ç®åæ¾ä¸å°ææ便æ·ç解å³æ¹æ³.
2024-12-25 23:57
2024-12-25 23:53
2024-12-25 23:20
2024-12-25 23:14
2024-12-25 22:57
2024-12-25 22:19
2024-12-25 22:09
2024-12-25 22:07