/
GettingStarted.txt
55 lines (36 loc) · 2.54 KB
/
GettingStarted.txt
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
These examples assume that you have installed a minimum of Java SE 7 and Apache ant.
There are existing .bat files for Windows platforms. The scripts are typically only one or two lines, so for other platforms just invoke the commands directly.
Java SE 7 is available for download at http://java.sun.com/javase/downloads/index.jsp.
Apache ant is available for download at http://ant.apache.org.
1. Download and and unzip the example zip file to a directory. We refer to that directory as <EXAMPLES_HOME>.
2. Edit <EXAMPLES_HOME>/config/setenv.bat to point to your JDK 1.7 and ant 1.7.1 installation
directories if JAVA_HOME and ANT_HOME have not been set in your environment.
3. Download and install Glassfish V4 from http://glassfish.dev.java.net.
We recommend installing the smaller Glassfish V4 Web Profile.
4. Edit <EXAMPLES_HOME>/config/common.properties and set the following properties:
EXAMPLES_HOME - the folder in which the examples were unzipped
SERVER_HOME - the folder in which Glassfish was installed
NOTE: Make sure you use a forward slash separator ('/') not a backward slash ('\')
5. Start Glassfish and the Derby database by invoking the startservers.bat script
in <EXAMPLES_HOME>/bin.
6. Open <EXAMPLES_HOME>/examples/examplesHome.html to get started.
For each server-based example:
1. Run deploy.bat before running the example
2. Run undeploy.bat when finished with the example
The client-based examples have a run.bat script. They assume the database is
already runnning, as in step 5.
Notes:
A. The first time you start the Glassfish server it will appear to hang at the
Felix intro. It should be faster every time after that.
B. Derby seems to take a long time dropping non-existent tables, so the first time
deploying each of the tests it will take a little longer to execute the run_sql target.
You will also see the DROP TABLE commands fail. It's expected.
C. The sequencing example 12 in Ch 4 will not run on Derby because Derby does not support
sequences.
D. A couple of the tests in Ch 5 might not run correctly due to obscure Map support bugs in
EclipseLink. Installing a later version of EclipseLink into Glassfish might be necessary
to get past these.
E. If you plan on taking the demos and changing them for fun, you need only make changes to
the java source files and when you redeploy they will be recompiled and deployed. If you
get an exception that an entity class is an "unknown entity type", you may need to bounce
(stop and restart) the server.