$Id: README,v 1.3 2005/07/08 14:02:52 pasmith Exp $
==============
OLSTORE README
==============
As a pre-requisite, please deploy the olstore application.

To visit the Olstore Web Application visit:

	http://localhost:9000/olstore

If this is your first visit to the store a page will be displayed asking you to populate the database please follow these instructions. This message should only be displayed when the database is empty (ie when you use it the first time or after you have cleared the database).

If you have made changes in the Olstore application and wish to return it to its original state you will have to clear/drop the database and recreate it.


Clearing/Dropping the Database:
------------------------------
NOTE: there may be other application using this same database. Clearing/dropping the database will remove all information stored in it. Clear/drop this database at your own risk.

Here is an example of how you would clear/drop a database when using the PostgreSQL supplied with the Olstore (please adapt to the datasource you are using):

	Stop the jonas server: 	service jonas stop
	Drop the database: 	dropdb -p 5433 db_jonas
	Create the database: 	createdb -p 5433 db_jonas
	Start the server: 	service jonas start
	Deploy the app: 	jonas admin -a olstore.ear (or using the JonasAdmin Web Application)
	visit Olstore:		http://localhost:9000/olstore

Alternatively, tables in the database related to the olstore application are prefixed with 'olstore' in their names and they can be selectively dropped.  

==============================
HOW TO SETUP THE UDDI REGISTRY
==============================

One of the features that comes with the two web services endpoints for Olstore 
is the ability to register these endpoints to a UDDI registry.

JOnAS comes with a UDDI registry based on jUDDI from Apache. You will need to 
follow the instructions provided with jonas to get jUDDI up and running.

You can find them at this following URL:
http://jonas.objectweb.org/current/doc/howto/install_juddi.html


IMPORTANT: The datasource.name should be set to 'jUDDIDB' (without the quotes)
as that is the JNDI name specified in jUDDI's configuration files.

NOTE: You have to make sure that the user that you are going to be connecting
to the registry as is listed as one of the publishers. Do this by adding a new
row to the 'PUBLISHER' table.

Olstore registers its endpoints in the registry at the time it populates the 
database with all the product and user information. If the registry is not 
setup at that time Olstore skips and finishes populating product/user 
information anyway. If you need to register the endpoints again simply clean
the database to trigger the populate action of Olstore. Instructions for 
PostgreSQL are provided above.

You can modify defult properties in the juddi.properties file.

==========================
HOW TO SET UDDI PROPERTIES:
==========================

In the olstoreUDDI.properties (olstoreweb/WEB-INF) file the UDDI publish and discover URLs,
username and password, and endpoint URLs are defined.  
By default all URLs are directed at "localhost:9000" and uses the username/password
pair juddi/password. You can modify the defaults by editing the olstoreUDDI.properties file.

=================================
HOW TO USE THE ONLINE STORE DEMO:
=================================
The online store demo acts like almost any other online store, except it has the added feature that users can have friends associated with them. Users can buy products or mark products as interesting and these products will be displayed to their friends. This was done with the presumption that friends usually share the same interests and basic spending habits. How to use this demo should be intuitive to the user. Most actions can be performed by using a navigation bar on the left side of the screen. 

There are two classes of users: customers and administrators.

CUSTOMERS:
Customer users can perform the usual actions associated with an online store. They can browse and purchase products, mark products as interesting, checkout items, check the status of their orders, see which items they have bought, and update their user information. The usernames and passwords of some built in users are listed below. Some of these users already have friends associated with them and some have also purchased items. Also note that a new user can be created by clicking on the "register a new user" link on the login page.

Customer Usernames and Passwords:
	mwringe/qwerty
	aahmed/password
	SamOak/Oaktree
	bobbyv/bob47
	lucy666/meow666
	troll/troll9
	mfrost/elley
	icyMeg/74yci
	Sammy/MarG14
	user1/user1
	user2/user2
	user3/user3
	user4/user4

ADMINISTRATORS:
Another class of users is Administrator. These users can perform the same actions that customers can, but they also have special administrative actions they can perform. Administrators can: update the information about an item, create a new item, create a new type of item, and update orders. The usernames and passwords of the administrators are listed below. Please note that new administrators cannot be created by a user at this time.

Administrator Usernames and Passwords:
	admin/admin
	vivek/vivek
	jonas/jonas

=============
KNOWN ISSUES:
=============
Here are some known issues about the Online Store Demo:

1) Problems can occur if the user changes the location bar manually to
   a jsp page. Please use links or access the pages through the URLs you
   see in the location bar of your browser.
2) If the user's session times out or if the user removes their
   cookies, then if the user hits the logout page, they will have to
   login twice (once to validate themselves to logout)
3) If the user's session times out or if the user removes there cookies
   and the user is currently looking at the login page, when they try to
   log in they will get an error about an invalid reference to the
   login page. This is a side-effect of the paranoid approach that
   container managed security takes.
4) When the user changes any of their information and if there is an
   error in any of the text fields, any changes to the user's friends
   list will be lost.
5) If the user hits the login button twice rapidly, on some random occasions 
   it will take the user to an error page that says 'location was not found' 
   with a link to return to the store.


