The following instructions assume that you have already downloaded and installed Project Avatar as indicated here.

GlassFish 4.0 logo-gf

Instructions for deploying Project Avatar applications on GlassFish Server 4.0

You can deploy any example application using the following command:

asadmin deploy $AVATAR_HOME/Project-Avatar-examples/<example-dir-name>

Once deployed the example should be available on the GlassFish Server at http://localhost:8080/<example-dir-name>

Example Descriptions

The commands shown in the Deployment column assume that the command is issued from $AVATAR_HOME/Project-Avatar-examples directory.

Sample Name Deployment Description
Project Avatar Model Store Examples
inventory asadmin deploy inventory The example shows the Model Store APIs being used in Avatar services. The services initialize and create model stores that connect to the default Derby database.
Project Avatar Service Examples
clock asadmin deploy clock This is the example application from the Tutorial document. It displays the time retrieved from the server and shows some of the most fundamental concepts of Project Avatar including services and models.
rest asadmin deploy rest The rest application can store and retrieve key/value pairs using REST operations.
tickers asadmin deploy tickers The Stock Tickers application uses HTML5 and Server Sent Events (SSE) to push data from the server to the client asynchronously.
chat asadmin deploy chat The Chat application uses HTML5 and Web Sockets (WS) to handle asynchronous bidirectional data.
Deploy the application and open two browsers (on the same or different machines) and access the application. Use your name for login.
Java Service Examples
rest-java asadmin deploy rest-java
asadmin deploy java/webstore.war
This is similar to the rest example above but it uses a Java service on the server instead of a Project Avatar service.
tickers-java asadmin deploy tickers-java
asadmin deploy java/stocks.war
This is similar to the tickers example above but it uses a Java service on the server instead of a Project Avatar service.
chat-java asadmin deploy chat-java
asadmin deploy java/chatservice.war
This is similar to the chat example above but it uses a Java service on the server instead of a Project Avatar service.
Project Avatar Client Examples
hello asadmin deploy hello Simple hello world example using Project Avatar local model.
addsub asadmin deploy addsub Page navigation and more advanced use of EL expressions and data binding with local models..
table asadmin deploy table An application demonstrating the use of the Project Avatar table widget. The example shows how to use a bindModel. The jQuery version of the widget uses the tablesorter jQuery plugin to sort the table.
hangman asadmin deploy hangman The implementation of the Hangman guessing game in Project Avatar. It shows the binding between action buttons and Project Avatar local models.
jquery-charts asadmin deploy jquery-charts An application using the jqPlot plugin in a Project Avatar application.
todo asadmin deploy todo A list of todos. It shows the use of a local model and the Project Avatar collection widget to implement the todoMVC application in Project Avatar.
Project Avatar Features
notes asadmin deploy notes A notes application bound to a Project Avatar local model with the ability to store data using localStorage. The application also shows how to create your own widget.
input asadmin deploy input An application using HTML input widgets bound to a local model.
button asadmin deploy button Dojo Dijit button implementations.
layout asadmin deploy layout Project Avatar application using the layout widget. The jQuery version uses the UI Layout jQuery plugin to render the border layout.
tabs asadmin deploy tabs A tabs implementation with the option to change the themes of the tabs. The themes (for jQuery or Dojo) can be changed from the theme property in the avatar.properties file.
slider asadmin deploy slider A Project Avatar application using the Dojo Dijit Slider widget. The example shows how to define widgets in Project Avatar.
tree asadmin deploy tree An application demonstrating the Project Avatar tree widget. The jQuery version uses the dynatree jQuery plugin. The Dijit version uses the Dojo Dijit tree widget.
simple-java asadmin deploy simple-java A simple Project Avatar application that uses a compiled Java class. The application also shows the usage of other Java classes in an Avatar service. The accompanied README.txt file for the examples has the information on compiling the Java classes

Troubleshooting

If there are issues with deployment of some of the Java services: make sure you have un-deployed the examples application.

asadmin undeploy examples

Back to top