FAQ for Java Pet Store 2.0 Reference Application, Early ...

looneyvillestaticSoftware and s/w Development

Aug 15, 2012 (5 years and 3 months ago)

655 views

1


FAQ for Java Pet Store 2.0 Reference Application, Early
Access


The Java Pet Store 2.0 Reference Application is a sample application brought to
you by the
Java BluePrints

program at
Sun Microsystems
. This application is
designed to illustrate how the Java EE 5 Platform can be used to develop an
AJAX
-
enabled Web 2.0 application. The application comes with full source
-
code
available under a


BSD
-
style licens
e, so you can experiment with it and use it in
your own applications. Also, see the
contact us

page for questions and
discussion.


Here is are some questions and answers for Java Petstore 2.0:


How can I create an installer like the one used for petstore?

How can I give feedback or talk t
o the engineers working on petstore?

How can I download and use the Pet Store Demo?

How can I use the

NetBeans IDE with Java Pet Store?

How can I get the source code for the Jave Pet Store?

How can I use
CVS to check out the petstore project code from the code
repository?

How do I get the source code for the AJAX JSF component libraries used in Pet
Store?

Do you have release notes for different versions of the Pet Store?

What server environment (application

server, web server etc) does Pet Store
run on?

Does Pet Store 2.0 use any EJBs(Enterprise Java Beans)?

Can Petstore 2.0 run on Tomcat?

Can Petstore 2.0 run on the project GlassFish Java EE 5 application server?

Does Petstore 2.0 run on all Java EE 5 application servers?

Does Petstore 2.0 Require Java SE 5?

How can I create an installer like the one used for petstore?

2


If you

would like to make an installer class for your own projects so users can
install your project by clicking it and having a license pop up, you can use what
we did in petstore. Here are some tips to use the same code as us to create an
installer. We use the

poor man's installer
, a project on java.net to generate a
simple Java installer, and it has documents to help you use it too. If you want to
see the specific ant files and commands we use to run the

poor man's


installer
for petstore, you can read the developer readme and browse the ant file of the
petstore project.

Note, we dont include the ant files used to create the installer
bundle of petstore, but the source code for it is on java.net in the pe
tstore
project with all of our source code so is available to anyone. You can browse the
code repository or do a cvs checkout of petstore from
https://petstore.dev.java.net/.

Here is the
DeveloperReadme

which includes
steps to build the petstore distribution bundle with the installer, and here is the

installer ant file
.

How can I give feedback or talk to the engineers working on petstore?

We are now using
forums

which you can use to give us
feedback or discuss

the
blueprints or ask questions.

How can I download and use the Pet Store Demo?

You can
download the Java Petstore Demo


and try out the features. You can
browse the catalog of pets for sale, sell your own pets on the store, s
earch for
pets by location using Google maps, view the RSS news bar for BluePrints news,
and more. All the source code is included.

How can I use the Java Pet Store in NetBeans?

The Java Pet Store 2.0 is NetBeans
-
ready! Just open the petstore as a project
in
Netbeans

and build and deploy it.


You can check out the
Java Pet Store page
for NetBeans

users for more detail.

How can I get the source cod
e for the Jave Pet Store?

3


The source code for the Java Pet Store is included in the
download
, so if you
downloaded the petstore then you already have the source code. Downloading
th
e petstore is the recommended way to get the source code. Another way to
get the source is to use
CVS
.

How can I use CVS to check out the petstore project code from the code reposit
ory?

The recommended way to get the source code is to just download the petstore.
Another way, which is for people who want a more raw view of the petstore
code, is to check out the code from the public code repository. All the
development of the BluePrint
s projects is done publicly on java.net. You can
check out the source code of a project such as petstore using any cvs client,
and the username "guest" and just hit return when prompted for the password,
then just do a cvs checkout petstore. The cvs reposi
tory is public and can be
checked out by anyone. For example, you can just first login with the guest
name with "cvs
-
d :pserver: guest@yourcvsserver:/cvs login" and just hit return
when prompted for password. Then, do a "cvs
-
d :pserver:
guest@yourcvsserv
er:/cvs checkout petstore".

How do I get the source code for the AJAX JSF component libraries used in Pet Store?

Some parts of the petstore are built using two AJAX
-
enabled JSF libraries.
These
libraries

are also built by the blueprints team and are available to others to use
and learn in their own applications. The source code for these libraries is not
currently bundled in the petstore, but the source code for the AJAX & JSF
component lib
raries is also publicly available from the Java BluePrints Solutions
Catalog project.

Since there are two libraries, you have to download two things,




For the source of the components in the Java EE5 library, download
https://blueprints.dev.java.net/file
s/documents/1713/36734/bpcatalog
-
ee5
-
ea
-
0.6
-
installer.jar



For the source of the components in the 1.4 library, download
https://blueprints.dev.java.net/files/documents/1713/39206/bpcatalog
-
14
-
ea
-
0.6
-
installer.jar

4


We plan to include the source code in the

future to make it easier for users and
to merge the two libraries into one. Sorry for the inconvenience!

Do you have release notes for different versions of the Pet Store?

Yes, we have
online release notes

which very briefly list some of the updates
and any known issues for each release.

What server environment (application server, web server etc) does Pet Store ru
n on?

The Pet Store should run on any Java EE 5 application server. Right now we
have only tested it on the
Java EE 5 SDK

and on the
Glassfish pr
oject

application server. If you get it running on another application server,
let us
know

so we can share the instructions with other developers.

Does Pet Store 2.0 use any EJBs(Enterprise Java

Beans)?

No, the Pet Store 2.0 does not use any EJBs. It is a pure web application and is
just a single war file. It uses the new Java Persistence APIs for its model tier. It
uses JTA (Java Transaction APIs) for its transaction management.

Can Petstore 2.0

run on Tomcat or other Java web container?

Petstore 2.0 is just a war file and does not use EJBs so could run on a web
container such as Tomcat, provided some extra libraries were added to support
technologies like a
JSF 1.2 library

and a
Java Persistence API library
, JTA for
basic transaction management, plus we use Java EE 5 annotations for


resource
injection so

would need to rewrite the code in Petstore to use JNDI instead of
resource injection annotations which should be easy since we have it centralized
in one class, the CatalogFacade.java. Check out the
contributions page

and the
help wanted page

if you get petstore running and let us know of your efforts
and contribute to the petstore project.

Can Petstore 2.0 run on the project G
lassFish Java EE 5 application server?

5


Yes the Petstore 2.0 can run on the Java EE 5 application server from
project
GlassFish
. Just download petstore and follow the instructions to deploy it on
GlassFish.

Does Petstore 2.0 run on all Java EE 5 application servers?

Petstore 2.0 is designed to be portable so should run on any Java EE 5
application server. We have only tested it on the Java EE 5 SDK and on
GlassFish. If you try to get it running on another app
lication server, share your
efforts with us and contribute to the petstore project. Check out the
contributions page

and the
help wanted page

if you get petstore running and let
us know of your efforts and contribute to the petstore project.

Does Petstore 2.0 Require Java SE 5?

Yes. We use feautures like generics and enhanced for loops etc so you would
need to have Java SE 5 or
above.


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.