FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaPerformanceTuning/StockCreateJPA/README at master · tmjee/JavaPerformanceTuning · GitHub
tmjee
/
JavaPerformanceTuning
Public
forked from
ScottOaks/JavaPerformanceTuning
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaPerformanceTuning
/
StockCreateJPA
/
README
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (38 loc) · 1.92 KB
Breadcrumbs
JavaPerformanceTuning
/
StockCreateJPA
/
README
Copy path
File metadata and controls
47 lines (38 loc) · 1.92 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
To build:
This is a standalone (Java SE) application for JPA.
In your environment, set
JAVAX_PERSISTENCE=path_to/javax.persistence.jar
The META-INF/persistence.xml file contains information that JPA will
use for the database connection. Edit it for the appropriate values for
your database. That file is based on the eclipselink JPA reference
implementation; it will need other changes for Hibernate or other
JPA implementations (chaging the provider class and eclipselink
property names).
Although the example doesn't use JDBC directly, you will need the
appropriate JDBC driver to compile the application (so that the
driver gets set into the classpath). In your environment, set
JDBC_JAR=/path_to/ojdbc6.jar
(or whichever driver you are using).
To run:
Use the schema file in StockCreateJDBC to create the necessary schema
in the database.
Running a Java SE program with JPA requires that the JPA classes be
"enhanced". Eclipselink does this at run time using the javaagent
argument. Other implementations may require that the jar file be
pre-processed; check your provider documentation to see if that is
required.
java <jvmargs> -javaagent:${ECLIPSELINK_JAR} -jar jars/StockCreateJPA.jar \
nThreads nStocks startDate endDate nTransactions reuseEM reuseTX
nThreads -- Number of threads to use for parallel insert
nStocks -- Number of stocks to insert
startDate -- Starting date of range
endDate -- Ending date of range
nTransactions -- Number of stocks per transaction
reuseEM -- If true, don't create a new EM for each transaction
reuseTX -- If true, don't create a new transaction
Notes on Examples:
Example 11-2:
java -javaagent:${ECLIPSELINK_JAR} -jar jars/StockCreateJPA.jar \
1 128 1/1/13 12/31/13 128 true true
To explore changes in statement caching and batch sizes, change the
values in persistence.xml
Back
|
FazBrowse Home
|
New Git URL