resin 入門筆記

1、首先下載相關工具:resin-4.0.16.tar和jar1.6(1.7會有不兼容的問題)



在MyEclipse中配置resin

2、resin可以理解爲tomcat一樣的服務器佈置起來也比較簡單,

在MyEclipse屬性中找到MyEclipse-Servers-Resin,然後如圖設置resin地址


然後在服務器中就會看到resin啓動



在resin中配置項目

3、找到resin目錄conf 的resin.xml中,找到 這個標籤<web-app id="/" root-directory="E:\java\Workspaces\MyEclipse10_5\eagle.product2\eagle\src\main\webapp"/>


將後邊root-directory改成類似於這樣的地址。


4、<database>
                               <jndi-name>jdbc/ucenterMysqlDataSourceReadonly</jndi-name>
                               <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
                                 <url>jdbc:mysql://db.db.me:3306/database?useUnicode=true&amp;characterEncoding=gbk&amp;zeroDateTimeBehavior=convertToNull&amp;autoReconnect=true</url>
                                                <user>deployment</user>
                                                <password>123456</password>
                                </driver>
                                <!-- configures how many prepared statements Resin should cache for each connection -->
                                <prepared-statement-cache-size>8</prepared-statement-cache-size>
                                <max-connections>20</max-connections>
                                <max-idle-time>30s</max-idle-time>
                                <connection-wait-time>30s</connection-wait-time>
                                <transaction-timeout>30s</transaction-timeout>
                                <ping>ture</ping>
                                <ping-table>jeehe_comment</ping-table>
                                <ping-interval>1s</ping-interval>
                              </database>



在resin中寫入數據庫的東西。


這樣啓動resin就可以指定到某個項目和數據庫。resin自帶自動編譯功能,但是有點慢


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章