Book - Beginning Java EE 6 with Glassfish
Antonio Goncalves
--
Section 1 - Introduction
Chapter 1 - Java EE 6 Environment
Section 2 - Building a domain model
Chapter 2 - Java Persistence
Chapter 3 - Object-Relational Mapping
Chapter 4 - Querying Objects
Chapter 5 - Callbacks and Listeners
Section 3 - Implementing business logic
Chapter 6 - Enterprise Java Beans
Chapter 7 - Session Beans & Timer Service
Chapter 8 - Callback & Interceptors
Chapter 9 - Transactions and security
Section 4 - Adding a user interface
Chapter 10 - Java Server Faces
Chapter 11 - Pages and components
Chapter 12 - Navigation
Section 5 - Interoperability
Chapter 13 - JMS & MDB
Chapter 14 - Web Services
Chapter 15 - RESTful Service
--
The test clases of this chapter, by default, use the Embedded mode of Derby (JavaDB). That means that the persistence.xml file defines a persistent unit with the folowing JDBC Driver
<property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="eclipselink.jdbc.url" value="jdbc:derby:chapter05DB;create=true"/>
Embedded mode is good for testing, but it means that no database is really created, so you can't browse its structure with a tool. If you can to be able to browse the database structure, you need to change the embedded mode to a client/server implementation that uses the Derby Network Server. For that, you'll have to do the following steps :
1. Install Derby. You must download the distribution and extract the package (http://db.apache.org) into DERBY_HOME directory. Add %DERBY_HOME%\bin to your PATH and run the sysinfo command line to display information about your Java environment and your version of Derby.
2. Start Derby server with the following command : java -jar %DERBY_HOME%\lib\derbyrun.jar server start (or startNetworkServer.bat)
3. Change the JDBC driver and url in your persistence.xml file :
<property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
<property name="eclipselink.jdbc.url" value="jdbc:derby://localhost:1527/chapter05DB;create=true"/>
4. Run the test with Maven : mvn clean test
5. Once finished, shutdown the database with : java -jar %DERBY_HOME%\lib\derbyrun.jar server shutdown (or stopNetworkServer.bat)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Beginning Java™ EE 6 Platform with GlassFish™ 3: From Novice to Professional (330个子文件)
book.gif 7KB
default.htm 164B
newBook.html 672B
chapter12.iml 5KB
chapter11.iml 5KB
chapter10.iml 4KB
chapter15-resource.iml 4KB
chapters.iml 3KB
chapter14-service.iml 3KB
chapter07.iml 3KB
chapter14-consumer.iml 2KB
chapter03.iml 2KB
chapter06.iml 2KB
chapter04.iml 2KB
chapter02.iml 2KB
chapter05.iml 2KB
chapter09.iml 1KB
chapter08.iml 1KB
chapter13-MDB.iml 1KB
chapter13.iml 1KB
Java EE 6 - Chapters.ipr 54KB
Java EE 6 - Chapters.iws 29KB
images.jar 14KB
JPQLTest.java 15KB
ManipulatingTest.java 7KB
BookResource.java 5KB
ManipulatingTest.java 4KB
Customer02.java 4KB
BookResourceTest.java 3KB
Book.java 3KB
Book03.java 3KB
Book02.java 3KB
Book02Auto.java 3KB
Book.java 3KB
Book.java 3KB
Book.java 3KB
Book.java 3KB
Book.java 3KB
Book.java 3KB
Book.java 3KB
Book.java 3KB
Book.java 3KB
Item.java 3KB
Book01.java 3KB
Customer04.java 3KB
Book.java 3KB
BookTagged.java 3KB
OrderTest.java 3KB
Customer03.java 3KB
Address.java 3KB
Customer.java 3KB
CD.java 3KB
CD.java 3KB
CD.java 3KB
CD.java 3KB
CD.java 3KB
CD.java 3KB
BillingMDB.java 3KB
Address13.java 3KB
Book.java 3KB
BookCustomized.java 3KB
BookController.java 3KB
Book.java 3KB
CustomerTest.java 3KB
Address12.java 2KB
Book.java 2KB
LifecycleTest.java 2KB
LifecycleTest.java 2KB
BookXML.java 2KB
Customer01.java 2KB
ItemEJB.java 2KB
Address16.java 2KB
HelloWorldResourceTest.java 2KB
BookTest.java 2KB
AddressEmbed01.java 2KB
CustomerTest.java 2KB
CustomerEmbed01.java 2KB
ItemController.java 2KB
Person01.java 2KB
OrderDTO.java 2KB
OrderDTO.java 2KB
ShoppingCartEJB.java 2KB
CustomerAccess.java 2KB
CD04.java 2KB
CD.java 2KB
BookController.java 2KB
BookTest.java 2KB
ArtistTest.java 2KB
NewsTest.java 2KB
CustomerTest.java 2KB
LifecycleTest.java 2KB
LifecycleTest.java 2KB
Customer12.java 2KB
Book04.java 2KB
CD15.java 2KB
Customer13.java 2KB
AddressTest.java 2KB
BookTest.java 2KB
Book05.java 2KB
BookEJBTest.java 2KB
共 330 条
- 1
- 2
- 3
- 4
资源评论
- Wildnature2012-03-05如果是电子书就好了,可惜是源代码,不过还是谢谢了!
zhaozhhtiger
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功