锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产精品久久人人爱蜜臀,日本中文字幕一区二区有限公司,水莓100国产免费av在线播放http://www.aygfsteel.com/wufalong/category/25523.html鎬濇兂鏈夊榪滐紝鎴戜滑灝辮兘璧板榪滐紒zh-cnMon, 10 Sep 2007 01:42:15 GMTMon, 10 Sep 2007 01:42:15 GMT60鏂囩珷緋葷粺.Hibernate鐨勪竴瀵瑰,澶氬涓鏄犲皠http://www.aygfsteel.com/wufalong/articles/143329.htmlcrazycrazyFri, 07 Sep 2007 02:09:00 GMThttp://www.aygfsteel.com/wufalong/articles/143329.htmlhttp://www.aygfsteel.com/wufalong/comments/143329.htmlhttp://www.aygfsteel.com/wufalong/articles/143329.html#Feedback0http://www.aygfsteel.com/wufalong/comments/commentRss/143329.htmlhttp://www.aygfsteel.com/wufalong/services/trackbacks/143329.html鏂囩珷鍒嗕負涓夌駭鐩綍,bigSortID,secondSordID,smallSortID
聽聽1<?xml聽version="1.0"?>
聽聽2<!DOCTYPE聽hibernate-mapping
聽聽3PUBLIC聽"-//Hibernate/Hibernate聽Mapping聽DTD//EN"
聽聽4"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
聽聽5<hibernate-mapping>
聽聽6<class聽name="news.entity.ArticleSort"聽dynamic-insert="true"聽dynamic-update="true"聽聽table="art_sort">
聽聽7聽聽聽聽<id聽name="id"聽type="java.lang.Integer"聽unsaved-value="null">
聽聽8聽聽聽聽聽聽聽聽<column聽name="id"聽not-null="true"/>
聽聽9聽聽聽聽聽聽聽聽<generator聽class="native"/>
聽10聽聽聽聽</id>
聽11聽聽聽聽<property聽name="sortName"/>
聽12聽聽聽聽<property聽name="parentID"/>
聽13聽聽聽聽<property聽name="createDate"/>
聽14聽聽聽聽<property聽name="editDate"/>
聽15聽聽聽聽<property聽name="orderBy"/>
聽16聽聽聽聽<property聽name="descript"/>
聽17聽聽聽聽<property聽name="editUser"/>
聽18聽聽聽聽<property聽name="sortType"/>
聽19聽聽聽聽<property聽name="isOpen"/>
聽20聽聽聽聽
聽21聽聽聽聽<!--聽灝忕被瀵瑰簲鐨勬枃绔犅?/span>-->
聽22聽聽聽聽<set聽name="article"聽inverse="false"聽lazy聽="true"聽order-by="聽id聽"聽cascade="none">
聽23聽聽聽聽聽聽聽<key聽column="smallSortID"/>
聽24聽聽聽聽聽聽聽<one-to-many聽class="news.entity.Article"聽聽/>
聽25聽聽聽聽</set>
聽26聽聽聽聽
聽27聽聽聽聽<!--聽灝忕被瀵瑰簲鐨勫ぇ綾宦?/span>-->
聽28聽聽聽聽<many-to-one聽聽insert="false"聽update="false"聽name="parentBigSort"
聽29聽聽聽聽聽聽聽聽聽聽聽聽class聽=聽"news.entity.ArticleSort"
聽30聽聽聽聽聽聽聽聽聽聽聽聽column聽=聽"parentID"/>
聽31聽聽聽聽聽聽聽聽聽聽聽聽
聽32聽聽聽聽聽<!--聽澶х被瀵瑰簲灝忕被聽-->
聽33聽聽聽聽聽<set聽name="smallSortSet"聽inverse="false"聽lazy聽="true"聽order-by="聽id聽"聽cascade="none">
聽34聽聽聽聽聽聽聽<key聽column="parentID"/>
聽35聽聽聽聽聽聽聽<one-to-many聽class="news.entity.ArticleSort"聽聽/>
聽36聽聽聽聽</set>
聽37</class>
聽38</hibernate-mapping>
聽39
聽40
聽41<?xml聽version="1.0"?>
聽42<!DOCTYPE聽hibernate-mapping
聽43PUBLIC聽"-//Hibernate/Hibernate聽Mapping聽DTD//EN"
聽44"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
聽45<hibernate-mapping>
聽46<class聽name="news.entity.Article"聽dynamic-insert="true"聽dynamic-update="true"聽lazy="false"聽table="art_news">
聽47聽聽聽聽<id聽name="id"聽type="java.lang.Integer"聽unsaved-value="null">
聽48聽聽聽聽聽聽聽聽<column聽name="id"聽not-null="true"/>
聽49聽聽聽聽聽聽聽聽<generator聽class="native"/>
聽50聽聽聽聽</id>
聽51聽聽聽聽<property聽name="title"/>
聽52聽聽聽聽<property聽name="subTitle"/>
聽53聽聽聽聽<property聽name="author"/>
聽54聽聽聽聽<property聽name="source"/>
聽55聽聽聽聽<property聽name="url"/>
聽56聽聽聽聽<property聽name="picUrl"/>
聽57聽聽聽聽<property聽name="bigSortID"/>
聽58聽聽聽聽<property聽name="secondSortID"/>
聽59聽聽聽聽<property聽name="smallSortID"/>
聽60聽聽聽聽<property聽name="content"/>
聽61聽聽聽聽<property聽name="hitCount"/>
聽62聽聽聽聽<property聽name="isPublish"/>
聽63聽聽聽聽<property聽name="isTop"/>
聽64聽聽聽聽<property聽name="createDate"/>
聽65聽聽聽聽<property聽name="publishDate"/>
聽66聽聽聽聽<property聽name="editDate"/>
聽67聽聽聽聽<property聽name="editUser"/>
聽68聽聽聽聽<property聽name="addUser"/>
聽69聽聽聽聽<!--聽鏂囩珷綾誨埆聽-->
聽70聽聽聽聽<many-to-one聽name="articleSort"聽insert="false"聽update="false"
聽71聽聽聽聽聽聽聽聽class聽=聽"news.entity.ArticleSort"聽聽column聽=聽"secondSortID"/>
聽72</class>
聽73</hibernate-mapping>
聽74
聽75
聽76<?xml聽version="1.0"?>
聽77<!DOCTYPE聽hibernate-mapping
聽78PUBLIC聽"-//Hibernate/Hibernate聽Mapping聽DTD//EN"
聽79"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
聽80<hibernate-mapping>
聽81<class聽name="news.entity.ArticleRemark"聽dynamic-insert="true"聽dynamic-update="true"聽lazy="false"聽table="art_remark">
聽82聽聽聽聽<id聽name="id"聽type="java.lang.Integer"聽unsaved-value="null">
聽83聽聽聽聽聽聽聽聽<column聽name="id"聽not-null="true"/>
聽84聽聽聽聽聽聽聽聽<generator聽class="native"/>
聽85聽聽聽聽</id>
聽86聽聽聽聽<property聽name="newsId"/>
聽87聽聽聽聽<property聽name="userName"/>
聽88聽聽聽聽<property聽name="title"/>
聽89聽聽聽聽<property聽name="contact"/>
聽90聽聽聽聽<property聽name="checkFlag"/>
聽91聽聽聽聽<property聽name="replyFlag"/>
聽92聽聽聽聽<property聽name="creDate"/>
聽93聽聽聽聽<property聽name="checkDate"/>
聽94聽聽聽聽<property聽name="userIp"/>
聽95聽聽聽聽<property聽name="checkUserId"/>
聽96聽聽聽聽<many-to-one聽name="article"聽聽insert="false"聽update="false"聽outer-join="false"
聽97聽聽聽聽聽聽聽聽聽聽聽聽class聽=聽"news.entity.Article"
聽98聽聽聽聽聽聽聽聽聽聽聽聽column聽=聽"newsId"/>
聽99聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
100聽聽聽聽<set聽name="remarkReply"聽inverse="true"聽lazy聽="true"聽order-by="replyTime聽desc"聽where="聽flag=0聽"聽table="art_remark_reply"聽聽cascade="all">
101聽聽聽聽聽聽聽<key聽column="remarkId"/>
102聽聽聽聽聽聽聽<one-to-many聽class="news.entity.ArticleRemarkReply"聽聽/>
103聽聽聽聽</set>
104聽聽聽聽
105</class>
106</hibernate-mapping>
107
108
109<?xml聽version="1.0"?>
110<!DOCTYPE聽hibernate-mapping
111PUBLIC聽"-//Hibernate/Hibernate聽Mapping聽DTD//EN"
112"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
113<hibernate-mapping>
114<class聽name="news.entity.ArticleRemarkReply"聽dynamic-insert="true"聽dynamic-update="true"聽lazy="false"聽table="art_remark_reply">
115聽聽聽聽<id聽name="id"聽type="java.lang.Integer"聽unsaved-value="null">
116聽聽聽聽聽聽聽聽<column聽name="id"聽not-null="true"/>
117聽聽聽聽聽聽聽聽<generator聽class="native"/>
118聽聽聽聽</id>
119聽聽聽聽<property聽name="remarkId"/>
120聽聽聽聽<property聽name="content"/>
121聽聽聽聽<property聽name="flag"/>
122聽聽聽聽<property聽name="replyDate"/>
123聽聽聽聽<property聽name="userName"/>
124聽聽聽聽<property聽name="userID"/>
125</class>
126</hibernate-mapping>


crazy 2007-09-07 10:09 鍙戣〃璇勮
]]>
tomcat鏁版嵁婧愮殑閰嶇疆http://www.aygfsteel.com/wufalong/articles/142220.htmlcrazycrazyMon, 03 Sep 2007 02:40:00 GMThttp://www.aygfsteel.com/wufalong/articles/142220.htmlhttp://www.aygfsteel.com/wufalong/comments/142220.htmlhttp://www.aygfsteel.com/wufalong/articles/142220.html#Feedback0http://www.aygfsteel.com/wufalong/comments/commentRss/142220.htmlhttp://www.aygfsteel.com/wufalong/services/trackbacks/142220.html 聽1 < Resource
聽2 聽聽聽聽聽聽聽聽 name ="jdbc/test"
聽3 聽聽聽聽聽聽聽聽type ="javax.sql.DataSource"
聽4 聽聽聽聽聽聽聽聽password ="123"
聽5 聽聽聽聽聽聽聽聽driverClassName ="com.mysql.jdbc.Driver"
聽6 聽聽聽聽聽聽聽聽maxIdle ="200"
聽7 聽聽聽聽聽聽聽聽maxWait ="5000"
聽8 聽聽聽聽聽聽聽聽username ="root"
聽9 聽聽聽聽聽聽聽聽url ="jdbc:mysql://192.168.1.11/test?zeroDateTimeBehavior=convertToNull"
10 聽聽聽聽聽聽聽聽maxActive ="400" />
11
12 < Context聽 path ="/spring" 聽docBase ="E:\eclipse\readme\springtest\web"
13 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽debug ="5" 聽reloadable ="false" 聽crossContext ="true" >
14 聽聽聽聽聽聽聽聽聽聽聽聽 < ResourceLink聽 global ="jdbc/test" 聽name ="jdbc/test" 聽type ="javax.sql.DataSource" /> 聽聽聽聽
15 聽聽聽聽聽聽聽聽聽聽聽聽 </ Context >

crazy 2007-09-03 10:40 鍙戣〃璇勮
]]>
hibernate.cfg.xml鐨勯厤緗?/title><link>http://www.aygfsteel.com/wufalong/articles/142213.html</link><dc:creator>crazy</dc:creator><author>crazy</author><pubDate>Mon, 03 Sep 2007 02:34:00 GMT</pubDate><guid>http://www.aygfsteel.com/wufalong/articles/142213.html</guid><wfw:comment>http://www.aygfsteel.com/wufalong/comments/142213.html</wfw:comment><comments>http://www.aygfsteel.com/wufalong/articles/142213.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wufalong/comments/commentRss/142213.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wufalong/services/trackbacks/142213.html</trackback:ping><description><![CDATA[ <p>聽</p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <span style="COLOR: #008080">聽1</span> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #0000ff"><?</span> <span style="COLOR: #ff00ff">xml聽version='1.0'聽encoding='utf-8'</span> <span style="COLOR: #0000ff">?></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">聽2</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"><!</span> <span style="COLOR: #ff00ff">DOCTYPE聽hibernate-configuration聽PUBLIC<br /></span> <span style="COLOR: #008080">聽3</span> <span style="COLOR: #ff00ff"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽"-//Hibernate/Hibernate聽Configuration聽DTD//EN"<br /></span> <span style="COLOR: #008080">聽4</span> <span style="COLOR: #ff00ff"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">聽<br /></span> <span style="COLOR: #008080">聽5</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #008080">聽6</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽聽聽聽<br /></span> <span style="COLOR: #008080">聽7</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">hibernate-configuration</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">聽8</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">聽9</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">session-factory</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">10</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">11</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">property聽</span> <span style="COLOR: #ff0000">name</span> <span style="COLOR: #0000ff">="connection.datasource"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">java:comp/env/jdbc/test</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">property</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">12</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">property聽</span> <span style="COLOR: #ff0000">name</span> <span style="COLOR: #0000ff">="show_sql"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">true</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">property</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">13</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">property聽</span> <span style="COLOR: #ff0000">name</span> <span style="COLOR: #0000ff">="dialect"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">org.hibernate.dialect.SQLServerDialect</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">property</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">14</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">property聽</span> <span style="COLOR: #ff0000">name</span> <span style="COLOR: #0000ff">="dialect"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">org.hibernate.dialect.MySQLDialect</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">property</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">15</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽<br /></span> <span style="COLOR: #008080">16</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">mapping聽</span> <span style="COLOR: #ff0000">resource</span> <span style="COLOR: #0000ff">="test/entity/AuthCode.hbm.xml"</span> <span style="COLOR: #0000ff">/></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">17</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />聽聽聽聽<br /></span> <span style="COLOR: #008080">18</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">session-factory</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">19</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">20</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">hibernate-configuration</span> <span style="COLOR: #0000ff">></span> </div> <img src ="http://www.aygfsteel.com/wufalong/aggbug/142213.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wufalong/" target="_blank">crazy</a> 2007-09-03 10:34 <a href="http://www.aygfsteel.com/wufalong/articles/142213.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>hibernate鐨凷essionManager http://www.aygfsteel.com/wufalong/articles/142186.htmlcrazycrazyMon, 03 Sep 2007 01:23:00 GMThttp://www.aygfsteel.com/wufalong/articles/142186.htmlhttp://www.aygfsteel.com/wufalong/comments/142186.htmlhttp://www.aygfsteel.com/wufalong/articles/142186.html#Feedback0http://www.aygfsteel.com/wufalong/comments/commentRss/142186.htmlhttp://www.aygfsteel.com/wufalong/services/trackbacks/142186.html

聽1 import 聽org.apache.commons.logging.Log;
聽2 import 聽org.apache.commons.logging.LogFactory;
聽3 import 聽org.hibernate.FlushMode;
聽4 import 聽org.hibernate.HibernateException;
聽5 import 聽org.hibernate.Session;
聽6 import 聽org.hibernate.SessionFactory;
聽7 import 聽org.hibernate.Transaction;
聽8 import 聽org.hibernate.cfg.Configuration;
聽9
10
11
12 public class 聽SessionManager聽 {
13 聽聽聽聽 private static 聽Log聽log聽 = 聽LogFactory.getLog(SessionManager. class );
14 聽聽聽聽 private static final 聽SessionFactory聽sessionFactory;
15 聽聽聽聽 /** 闈欐佸潡錛氬垱寤簊ession聽factory */
16 聽聽聽聽 static {
17 聽聽聽聽聽聽聽聽 try {
18 聽聽聽聽聽聽聽聽聽聽聽聽System.out.println( " 鏁版嵁鏄犲皠鍒濆鍖?img src="http://www.aygfsteel.com/images/dot.gif" />begin " );
19 聽聽聽聽聽聽聽聽聽聽聽聽Configuration聽configure聽 = new 聽Configuration().configure();
20 聽聽聽聽聽聽聽聽聽聽聽聽sessionFactory聽 = configure.buildSessionFactory();
21 聽聽聽聽聽聽聽聽聽聽聽聽 /* URL聽configFileURL聽=
22 聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽SessionManager.class.getResource("/hibernate.cfg.xml");
23 聽聽聽聽聽聽聽聽聽聽聽聽Configuration聽configure聽=聽(new聽Configuration()).configure(configFileURL); */

24 聽聽聽聽聽聽聽聽聽聽聽聽System.out.println( " 鏁版嵁鏄犲皠鍒濆鍖?img src="http://www.aygfsteel.com/images/dot.gif" />end " );
25 聽聽聽聽聽聽聽聽}
catch 聽(Throwable聽ex)聽 {
26 聽聽聽聽聽聽聽聽聽聽聽聽log.error( " Initial聽SessionFactory聽creation聽failed. " ,聽ex);
27 聽聽聽聽聽聽聽聽聽聽聽聽 throw new 聽ExceptionInInitializerError(ex);
28 聽聽聽聽聽聽聽聽}

29 聽聽聽聽}

30 聽聽聽聽 /** 鑾峰彇褰撳墠綰跨▼鐨剆ession瀵硅薄 */
31 聽聽聽聽 public static 聽Session聽currentSession()聽 throws 聽HibernateException聽 {
32 聽聽聽聽聽聽聽聽Session聽s聽 = 聽sessionFactory.openSession();
33 聽聽聽聽聽聽聽聽s.setFlushMode(FlushMode.NEVER);
34 聽聽聽聽聽聽聽聽 return 聽s;
35 聽聽聽聽}

36 聽聽聽聽 public static 聽Session聽currentSessionFlush()聽 throws 聽HibernateException聽 {
37 聽聽聽聽聽聽聽聽Session聽s聽 = 聽sessionFactory.openSession();
38 聽聽聽聽聽聽聽聽s.setFlushMode(FlushMode.AUTO);
39 聽聽聽聽聽聽聽聽 return 聽s;
40 聽聽聽聽}

41 聽聽聽聽 /** 鍏抽棴褰撳墠綰跨▼鎵鍦ㄧ殑session瀵硅薄 */
42 聽聽聽聽 public static void 聽closeSession(Session聽s)聽 throws 聽HibernateException聽 {
43 聽聽聽聽聽聽聽聽 if 聽(s聽 != null ) {
44 聽聽聽聽聽聽聽聽聽聽聽聽s.close();
45 聽聽聽聽聽聽聽聽}

46 聽聽聽聽}

47 聽聽聽聽 public static 聽SessionFactory聽getSessionFactory()聽 {
48 聽聽聽聽聽聽聽聽 if (sessionFactory != null ) {
49 聽聽聽聽聽聽聽聽聽聽聽聽 return 聽sessionFactory;
50 聽聽聽聽聽聽聽聽}

51 聽聽聽聽聽聽聽聽 else {
52 聽聽聽聽聽聽聽聽聽聽聽聽System.out.println( " 鏃犳晥鐨刦actiory " );
53 聽聽聽聽聽聽聽聽聽聽聽聽 return null ;
54 聽聽聽聽聽聽聽聽}

55 聽聽聽聽}

56 }

57


crazy 2007-09-03 09:23 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 柘城县| 修武县| 扶绥县| 高唐县| 辽源市| 井冈山市| 巨鹿县| 长葛市| 通州市| 眉山市| 灌南县| 开远市| 博客| 元氏县| 沈阳市| 廉江市| 上林县| 松滋市| 桐城市| 滕州市| 灵川县| 庆安县| 汨罗市| 永宁县| 灵武市| 若尔盖县| 深水埗区| 开封市| 竹山县| 南城县| 平潭县| 柞水县| 凤凰县| 寿宁县| 梧州市| 南昌市| 宜章县| 普洱| 青州市| 铜梁县| 合阳县|