一个Hibernate的开发指南
sp;fetch size: 50
2003-12-26 15:10:39 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: Use outer join fetching: true
2003-12-26 15:10:39 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
信息: Using Hibernate built-in connection pool (not for production use!)
2003-12-26 15:10:39 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
信息: Hibernate connection pool size: 20
2003-12-26 15:10:39 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
信息: using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:hdorc
2003-12-26 15:10:39 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
信息: connection properties: {user=hd, password=abc, pool.size=1}
2003-12-26 15:10:39 net.sf.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
信息: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
2003-12-26 15:10:45 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: Use scrollable result sets: true
2003-12-26 15:10:45 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: JDBC 2 max batch size: 30
2003-12-26 15:10:45 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: echoing all SQL to stdout
2003-12-26 15:10:45 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: Query language substitutions: {}
2003-12-26 15:10:45 net.sf.hibernate.cfg.SettingsFactory buildSettings
信息: cache provider: net.sf.ehcache.hibernate.Provider
2003-12-26 15:10:45 net.sf.hibernate.cfg.Configuration configureCaches
信息: instantiating and configuring caches
2003-12-26 15:10:46 net.sf.hibernate.impl.SessionFactoryImpl
信息: building session factory
2003-12-26 15:10:47 net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
信息: no JNDI name configured
Hibernate: insert into SYSUSER (username, userpasword, lastlogin, userid) values (?, ?, ?, ?)
在最后我们可以看到Hibernate生成的数据库操作语句。走到这里可以说你已经成功的运行了许多东西。让我们再列出来,请你一一考虑一下它们是如何被你运行和部署起来的,它们有什么:
Eclipse
MyEclipse
Tomcat
Oracle/Oracle JDBC Driver
Hibernate
Struts(其实到现在我们还没有使用到它的功能)
查看表中的数据是否更新
在Database Access View中可以很方便的查看数据表中的数据:
这样就在Database Data View中看到了SYSUSER表中的数据:
留在最后的话
本文只是简单的给大家介绍了开发基于Java的Web应用的基础环境,同时介绍了一系列的开发工具和组件。 这些工具还有更多的功能,这里就不再一一介绍了,请大家多参考Eclipse、MyEclipse的说明文档,它们还有许多丰富的功能。 对于Struts和Hibernate这两个强大的组件最在后续的文章中再慢慢说明。
如果你对本文有什么意见和建议请 联系我 ,告诉我你的想法,另外也可以到 技术天空BBS的Java版 中讨论与Java相关的各种技术。
你可以从 这里 下载到完整的Eclipse Project包。
另外本文中的所有代码在以下环境中由作者实际测试完全没有问题:
Eclipse 2.1.2
Struts 1.1
Hibernate 2.1.1
Tomcat 4.1.29/Jetty 4.2.15
com.tanghan.plugin_0.1.0.12.21
JDK 1.4.2_02 For Windows/FreeBSD 4.8/FreeBSD 4.9
FreeBSD 4.8/FreeBSD 4.9/Windows 2000/Windows XP
Oracle 9.2.0.1.0
上一页 [1] [2] [3] [4]
进入问吧