-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
113 lines (67 loc) · 3.84 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
This project is a demonstration of how fast Batoo JPA compared to Hibernate on end to end context.
This project has been created using Knappsack Maven Archetypes. For more information on the archetypes
go to: http://www.andygibson.net/blog/tag/knappsack/
PREPERATION
===========
1) Install Eclipse IDE for Java EE Developers
2) Install M2Eclipse
3) Clone the repository
4) Download and install JBoss 7.1.1 Final
5) Create a JBoss Runtime & Server pointing to your JBoss directory in Eclipse
6) Add the project to server's deployments
7) Run the server.
8) Before running tests let the application initialize the database by navigating to http://localhost:8080/HelloJSF
9) Download and install JMeter.
BATOO JPA INSTALLATION
======================
Install Batoo JPA into your local repo as per instructions here https://github.com/BatooOrg/BatooJPA
When Batoo JPA 0.2 is released this step will be skipped.
INSTALLING Batoo JPA into JBoss 7.1.1
=====================================
1) Create the directory JBOSS_HOME/modules/org/batoo/main
2) The latest snapshot batoo-jar is included in jboss-module.
Since Batoo JPA is incubation, if you expreience any problems, you can replace the jar with the latest snapshot.
You can download the latest jar from Maven Repo: https://oss.sonatype.org/content/repositories/snapshots/org/batoo/jpa/batoo-jpa/
The latest snapshot available version as of writing is https://oss.sonatype.org/content/repositories/snapshots/org/batoo/jpa/batoo-jpa/0.1.7-SNAPSHOT/batoo-jpa-0.1.7-20121019.061838-11.jar
You need to preserve the name batoo-jpa-01.jar
3) Copy the contents of etc/jboss-module into the directory.
DEPLOYMENT
==========
This application can be deployed to JBoss container through the following methods
1) IDE Integration - Any Maven aware IDE (such as Netbeans or Eclipse)
should be able to deploy this application using methods provided by
the IDE.
2) Manually - If you run the Maven command :
mvn clean package
Maven will clean, build and package the application and you can then manually deploy
the HelloJSF.war file to your server.
3) You can deploy to JBoss if you have the JBOSS_HOME environment variable set up using:
mvn clean package jboss:hard-deploy
This will clean, build and package the application, and then copy the application to the
JBoss deploy directory for the JBoss installation defined by JBOSS_HOME.
RUNNING TESTS WITH HIBERNATE
============================
1) Rename /src/main/resources/META-INF/hibernate-persistence.xml to persistence.xml.
2) Deploy the WAR file.
3) Run JMeter with the jmeter.jmx file in the root of the project directory to warm JBoss up.
4) Reset the reports and run JMeter again and take note of "request per seconds".
RUNNING TESTS WITH BATOO
========================
1) Rename /src/main/resources/META-INF/batoo-persistence.xml to persistence.xml.
2) Deploy the WAR file.
3) Run JMeter with the jmeter.jmx file in the root of the project directory to warm JBoss up.
4) Reset the reports and run JMeter again and take note of "request per seconds".
RESULTS
=======
While for JPA stack Batoo JPA is 15+ times faster than Hibernate, this application consists of following layers:
* JSF
* JPA
* Database
So it should not be surprizing that switching to Batoo speeds up the test about 2 times. This is because while JPA
layer CPU consumption is brought close to 0 by Batoo JPA, there still is database and JSF layer which continue to
consume as much CPU.
CONCLUSION
==========
Using Batoo JPA, you can bring your operational, administrative, license, support costs dramatically.
In case you need support to run this test project or use Batoo JPA in your project, contact us for free support.
Thank you for checking out Batoo JPA.