Development

Eclipse Project in Git

The eclipse project for the dvdstore is under Git version control, see Code repositories

Change functionality

In the following table you will find some information about important functionality (that have been changed compared to the original dvdstore).

File

Interface-Class

Bean-Class

Functionality

 

Authenticator.java

AuthenticatorAction.java

Login

 

FullTextSearch.java

FullTextSearchAction.java

Search, Performance problem implementations

 

IndexerAction.java

IndexerAction.java

This indexing Action is necessary if you want to
create completely new database with an import
script. Normally you should keep it removed from
the startup process. If you have a lot of data in
the database this will take unbelievable much
time and fail.

 

PerformanceSettings.java

PerformanceSettingsBean.java

In this bean-class the state of all performance
problems is saved and can be checked. This is
the bean which connects the performance-
settings webpage to the application logic. All
performance-problem implementations are
checking their state with this bean through
context and dependency injection.

pages.xml,
web.xml

 

 

configuration have been changed to avoid HTTP
redirects which lead to "duplicate" HTTP requests
that are recoreded by inspectIT

Database

The database contains about 40,000 DVD products. The DVDs are connected to actors and categories in thedatabase. For each product you will have additionally an entry in the inventory table. This means that you have at least four database entries for each product. Keep this in mind if you are searching for some products and this will need a lot of time.

Database and load tests

If you are using load tests many times, it's possible that the amount of inventory products can reach 0. If there are not enough elements in the inventory there will occur some exceptions. You can find an error message in the result view in JMeter. If the value is 0 you can update it or you replace the database

Creating a completely new database

Possibly outdated information, TODO: check

If you want to create a completely new database, you can copy in the root directory of the “ear content” folder of the dvdstore22-ear project, the import.sql file which is stored one folder-level above. Deploy the application. This will delete all entries in the database and enter only about 450 elements into it. To increase the number of elements you can use the RandomDataGenerator.

If you want to create a completely new Database you have to think about a few things:

First remove the indexing files from the deployment directory (“jboss-5.1.0.GA/server/default/deploy/dvdstore22-ear.ear”) of the application server. There is an import script which create a basic database structure (you can read more about it in the “application server Information” section) and include some useful data for the load tests.

If you have created the new database you can increase the number by using the RandomDataGenerator. The RandomDataGenerator is completely prepared in the PerformanceSettingsBean. You have to call the createElements() method. You can include 10.000 elements with one Transaction. Don't increase the number. There were some error's while trying this.

It's important not to use an import-script to increase the number of elements because the have to be indexed. This will cost extremely much time. If you are using the RandomDataGenerator the indexing action will be really fast. The indexingis done while inserting.

IMPORTANT: If you have created the new Database and filled it with the RandomDataGenerator – stop the application server and copy the new created search index files from the deployment directory (“ jboss-5.1.0.GA/server/default/deploy/dvdstore22-ear.ear”) to the ear-content directory in the ear project (com.jboss.dvd.seam.Actor, com.jboss.dvd.seam.Category, com.jboss.dvd.seam.Product). Otherwise a new deployment will overwrite the new indexes with the old ones.