|
Sun GlassFish Enterprise Server |
This sample demonstrates the use of Derived Identities and Maps.
The application is built and deployed as a WAR file.
The web module consists of:
A session bean that acts as a facade to operate on these entities. Methods createData and queryData demonstrates how to create and query data for entities using above mapping features
A servlet that facilitates calling into above session bean
The Test client consist of
A Java SE client with main(). The client calls into the servlet to create and query data.
Perform the following steps to build, deploy, and run the
application:
app_dir  is the sample application base
directory: samples_install_dir/javaee6/jpa/advancedMapping.Change directory to app_dir.
all
target.app_dir> ant
all
You can replace the ant all command with the
following set of
commands:
app_dir> ant
default compiles and packages the application
app_dir> ant
deploy deploys it to application server
app_dir> ant
run runs the test java client
app_dir> ant
clean
Perform the following steps to build, deploy, and run the application using NetBeans IDE:
samples_install_dir/javaee6/jpa/ directory, select advancedMapping, and click Open Project.advancedMapping and select Run to build, deploy, and run the project.If you have problems when running the application, refer the troubleshooting document.
Copyright © 2009 Sun Microsystems, Inc. All rights reserved.