Top Banner
For Help Contact Information: Harinath Reddy Phone: +91-9502542081(IND) (Whats App, Viber) phone: +1-2089086040 (US) Email: [email protected] Enterprise Computing: A case with CE game and movie rental system 1 | Page
50

Se276 enterprise computingassignment

Aug 18, 2015

Download

Education

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Se276 enterprise computingassignment

For Help Contact Information:

Harinath Reddy

Phone: +91-9502542081(IND) (Whats App, Viber)

phone: +1-2089086040 (US)

Email:  [email protected]

Enterprise Computing: A case with CE

game and movie rental system

1 | P a g e

Page 2: Se276 enterprise computingassignment

Table of Contents

1. Introduction.........................................................................................................................................3

2. Design of Entities.................................................................................................................................4

2.1 Class diagram...............................................................................................................................4

2.2 Activity diagram...........................................................................................................................5

3. Design of JSF’s.....................................................................................................................................6

3.1 Customer JSF...................................................................................................................................6

3.2 Game JSF....................................................................................................................................10

3.3 Movie JSF...................................................................................................................................13

3.4 Rental JSF...................................................................................................................................16

4. Design of EJB’s...................................................................................................................................22

4.1 SQL used to create the tables........................................................................................................35

5. Test instructions................................................................................................................................38

2 | P a g e

Page 3: Se276 enterprise computingassignment

1. Introduction

Enterprise computing is the main issue being frequently followed over the latest computing

techniques, where the role of programming languages is crucial and had direct impact over the

entire business flow of the application. In general an enterprise application can be explained at

various levels like application or business logic level, presentation level and database or

integration level. When the Java programming language is considered, there were many

enhancements in terms of development framework and to support the respective enterprise

computing, where the latest developments include Java Persistence API (JPA) (Smith, 2002).

JPA is discussed over the current research by considering the case of Century Entertainment

(CE), which is a game and movie rental store and a typical enterprise application and computing

system, Rental Information Management System (RIMS). Entire application is divided into three

important tiers over the enterprise computing as listed below

Persistence tier, which holds the computing logic in terms of creating the basic entities of

the application. Typical java classes or objects related to the application like product

Movie or Game, Customers, Super classes, sub classes, Rental and other database related

classes are created over the persistence tier. Respective properties of the objects are also

3 | P a g e

Page 4: Se276 enterprise computingassignment

created like ID, Movie ID, Game ID and Customer ID over the persistence layer using

the JPA (Java Persistence API).

Derby database is used for the current application and persistence level API and the

required connections are established using the corresponding API. Attributes related to

Movies, Games, Customers and Rental information are created as tables and they are

explained in the later sections.

JSF’s are used for the presentation layer and the Maven framework is used over creating

the enterprise application.

Detailed explanation to the respective design of the application is given in the below section.

2. Design of Entities

In general Enterprise applications and computing include design of entities and these include

database entities, java entities like properties, objects and classes, hierarchy and the

corresponding relationships are explained over the current section. Below are some of the

important entities discussed over the current design section

Customer is one of the important entity used over the design and had the key attributes

like customer id, customer name, address, contact number and email address.

Product is the super class of the sub classes like movie and game, where these classes

inherit the main properties of the parent class. Each of the sub class have their own

properties like Movie id, movie name, director name, duration, game id, game name,

game vendor and platform and the respective attributes are shown in the class diagram.

Rental information is maintained using the attributes like Rental ID, Customer ID, and

issue date, due date and rental amount.

4 | P a g e

Page 5: Se276 enterprise computingassignment

A single customer can hire one or more game or movie and thus a typical one-to-many

relationship is established in this context. Relation among these key entities and the hierarchy is

shown in the below sequence diagram and class diagram.

2.1 Class diagram

There are five important objects and the corresponding classes designed over the current

enterprise application and they are customer, product, games, movies and rental information.

Attributes of these classes and the respective relationship among these entities are shown in the

below class diagram

Fig 2.1.1: Class diagram of CE Enterprise application (Ribbers, 2000)

2.2 Activity diagram

A typical diagram includes the main activities of the application and the respective relationship

and hierarchy and is given below

5 | P a g e

Page 6: Se276 enterprise computingassignment

Fig 2.2.1: Activity diagram of CE enterprise application

3. Design of JSF’s

JSF’s are used to represent the presentation logic and the required JSF’s are created and executed

using the Glassfish server and the corresponding presentation tier and logic based JSF’s are

shown below

3.1Customer JSF

Customer JSF is created to gather the customer related information over the rental system used

by CE and holds the inputs fields like customer id, customer name, address, contact number and

email id and is shown in the below snapshot

6 | P a g e

Page 7: Se276 enterprise computingassignment

Fig 3.1.1 Customer JSF

Below code is used to design the customer JSF

<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"

xmlns:h="http://java.sun.com/jsf/html"

xmlns:f="http://java.sun.com/jsf/core"

xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>

<h:body>

<br/>

<h:form id="passortid">

<p:panel closable="false" toggleable="true" header="C" >

<table id="passporttable" style="margin: 0px auto">

<tr>

<td valign="top">CustomerId:</td>

<td><h:inputText value="#{user.fname}" required="true" requiredMessage="first name is

required" id="fname" validatorMessage="please enter valid name in alphanumeric">

<f:validateRegex pattern="[0-9a-zA-Z' ']{5,30}"></f:validateRegex>

7 | P a g e

Page 8: Se276 enterprise computingassignment

</h:inputText></td>

<td><p:tooltip for="fname" value="please enter firstname"/></td>

<td><h:message for="fname" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">FirstName</td>

<td><h:inputText id="lname" value="#{user.lname}" required="true"

requiredMessage="lastname is required" validatorMessage="Last name is alphanumeric with

min 5 characters ">

<f:validateLength maximum="40"/>

<f:validateRegex pattern="[0-9a-zA-Z' ']{5,}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="lname" value="please enter Lastname"/></td>

<td><h:message for="lname" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">LastName:</td>

<td><h:inputText value="#{user.nationality}" id="nat" required="true"

requiredMessage="nationality is required" validatorMessage="please enter valid nationality

alphabets only ">

<f:validateRegex pattern="[a-zA-Z' ']{3,}" />

</h:inputText></td>

<td><p:tooltip for="nat" value="please enter Nationality"/></td>

<td><h:message for="nat" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">Gender:</td>

<td><h:inputText value="#{user.gender}" id="gen" required="true" requiredMessage="gender

is required" validatorMessage="enter valid gender">

8 | P a g e

Page 9: Se276 enterprise computingassignment

<f:validateRegex pattern="[a-zA-Z]{4,5}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="gen" value="please enter Gender"/></td>

<td><h:message for="gen" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">Address:</td>

<td><h:inputText value="#{user.passporttype}" id="ppty" required="true"

requiredMessage="passporttype is required" validatorMessage="enter valid passport type">

<f:validateRegex pattern="[a-zA-Z]{4,}" />

</h:inputText></td>

<td><p:tooltip for="ppty" value="please enter PassportType"/></td>

<td><h:message for="ppty" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">ContactNo:</td>

<td><h:inputText value="#{user.passportno}" id="ppno" required="true"

requiredMessage="passport no is Required" validatorMessage="please enter alphanumeric valid

passport">

<f:validateRegex pattern="[0-9a-zA-Z]{8,10}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="ppno" value="please enter PassportNo"/></td>

<td><h:message for="ppno" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">EmailId:</td>

<td><h:inputText value="#{user.countrycode}" id="cc" required="true"

requiredMessage="country code is needed" validatorMessage="please enter valid code " >

<f:validateRegex pattern="[a-zA-Z]{4,10}"></f:validateRegex>

9 | P a g e

Page 10: Se276 enterprise computingassignment

</h:inputText></td>

<td><p:tooltip for="cc" value="please enter CountryCode"/></td>

<td><h:message for="cc" style="color: red;" /></td>

</tr>

<tr>

<td>

<h:commandButton value="Submit" action="#{user.save}" ></h:commandButton>

</td>

</tr>

</table>

</p:panel>

</h:form>

</h:body>

</html>

3.2 Game JSF

Game JSF is used to take the input related to game like the game id, game name, vendor and

platform and the corresponding snapshot is shown as below

10 | P a g e

Page 11: Se276 enterprise computingassignment

Fig 3.2.1: Game JSF

Below code is used to develop the Game JSF

<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"

xmlns:h="http://java.sun.com/jsf/html"

xmlns:f="http://java.sun.com/jsf/core"

xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>

<h:body>

<br/>

<h:form id="passortid">

<p:panel closable="false" toggleable="true" header="Game" >

<table id="passporttable" style="margin: 0px auto">

<tr>

<td valign="top">Gameid:</td>

<td><h:inputText value="#{user.fname}" required="true" requiredMessage="first name is

required" id="fname" validatorMessage="please enter valid name in alphanumeric">

<f:validateRegex pattern="[0-9a-zA-Z' ']{5,30}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="fname" value="please enter firstname"/></td>

<td><h:message for="fname" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">Gamename</td>

<td><h:inputText id="lname" value="#{user.lname}" required="true"

requiredMessage="lastname is required" validatorMessage="Last name is alphanumeric with

11 | P a g e

Page 12: Se276 enterprise computingassignment

min 5 characters ">

<f:validateLength maximum="40"/>

<f:validateRegex pattern="[0-9a-zA-Z' ']{5,}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="lname" value="please enter Lastname"/></td>

<td><h:message for="lname" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">Developer Studio’s name</td>

<td><h:inputText value="#{user.nationality}" id="nat" required="true"

requiredMessage="nationality is required" validatorMessage="please enter valid nationality

alphabets only ">

<f:validateRegex pattern="[a-zA-Z' ']{3,}" />

</h:inputText></td>

<td><p:tooltip for="nat" value="please enter Nationality"/></td>

<td><h:message for="nat" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">platform</td>

<td><h:inputText value="#{user.gender}" id="gen" required="true" requiredMessage="gender

is required" validatorMessage="enter valid gender">

<f:validateRegex pattern="[a-zA-Z]{4,5}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="gen" value="please enter Gender"/></td>

<td><h:message for="gen" style="color: red;" /></td>

</tr>

<tr>

<td>

<h:commandButton value="Submit" action="#{user.save}" ></h:commandButton>

12 | P a g e

Page 13: Se276 enterprise computingassignment

</td>

</tr>

</table>

</p:panel>

</h:form>

</h:body>

</html>

3.3 Movie JSF

Movie JSF is used to input the movie related information like movie id, movie name, director

name and duration and the corresponding snapshot is shown below

Fig 3.3.1: Movie JSF

Below code is used to create the movie JSF

<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"

xmlns:h="http://java.sun.com/jsf/html"

xmlns:f="http://java.sun.com/jsf/core"

13 | P a g e

Page 14: Se276 enterprise computingassignment

xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>

<h:body>

<br/>

<h:form id="passortid">

<p:panel closable="false" toggleable="true" header="Movie" >

<table id="passporttable" style="margin: 0px auto">

<tr>

<td valign="top">Movieid</td>

<td><h:inputText value="#{user.fname}" required="true" requiredMessage="first name is

required" id="fname" validatorMessage="please enter valid name in alphanumeric">

<f:validateRegex pattern="[0-9a-zA-Z' ']{5,30}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="fname" value="please enter firstname"/></td>

<td><h:message for="fname" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">moviename</td>

<td><h:inputText id="lname" value="#{user.lname}" required="true"

requiredMessage="lastname is required" validatorMessage="Last name is alphanumeric with

min 5 characters ">

<f:validateLength maximum="40"/>

<f:validateRegex pattern="[0-9a-zA-Z' ']{5,}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="lname" value="please enter Lastname"/></td>

<td><h:message for="lname" style="color: red;" /></td>

</tr>

<tr>

14 | P a g e

Page 15: Se276 enterprise computingassignment

<td valign="top">Directorname</td>

<td><h:inputText value="#{user.nationality}" id="nat" required="true"

requiredMessage="nationality is required" validatorMessage="please enter valid nationality

alphabets only ">

<f:validateRegex pattern="[a-zA-Z' ']{3,}" />

</h:inputText></td>

<td><p:tooltip for="nat" value="please enter Nationality"/></td>

<td><h:message for="nat" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">Duration in min</td>

<td><h:inputText value="#{user.gender}" id="gen" required="true" requiredMessage="gender

is required" validatorMessage="enter valid gender">

<f:validateRegex pattern="[a-zA-Z]{4,5}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="gen" value="please enter Gender"/></td>

<td><h:message for="gen" style="color: red;" /></td>

</tr>

<tr>

<td>

<h:commandButton value="Submit" action="#{user.save}" ></h:commandButton>

</td>

</tr>

</table>

</p:panel>

</h:form>

</h:body>

</html>

15 | P a g e

Page 16: Se276 enterprise computingassignment

3.4 Rental JSF

Rental JSF is used to input the rental input information like rental id, customer id, product

details, issue date, due date and rent and the respective snapshot is as given below

Fig 3.4.1: Rental JSF

Fig 3.4.2 Rental JSF with date fields

Below code is used to create the rental JSF

16 | P a g e

Page 17: Se276 enterprise computingassignment

<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"

xmlns:h="http://java.sun.com/jsf/html"

xmlns:f="http://java.sun.com/jsf/core"

xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>

<h:body>

<br/>

<h:form id="passortid">

<p:panel closable="false" toggleable="true" header="Rental" >

<table id="passporttable" style="margin: 0px auto">

<tr>

<td valign="top">CustomerId:</td>

<td><h:inputText value="#{user.fname}" required="true" requiredMessage="first name is

required" id="fname" validatorMessage="please enter valid name in alphanumeric">

<f:validateRegex pattern="[0-9a-zA-Z' ']{5,30}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="fname" value="please enter firstname"/></td>

<td><h:message for="fname" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">rentaltype</td>

<td><h:inputText id="lname" value="#{user.lname}" required="true"

requiredMessage="lastname is required" validatorMessage="Last name is alphanumeric with

min 5 characters ">

<f:validateLength maximum="40"/>

<f:validateRegex pattern="[0-9a-zA-Z' ']{5,}"></f:validateRegex>

</h:inputText></td>

17 | P a g e

Page 18: Se276 enterprise computingassignment

<td><p:tooltip for="lname" value="please enter Lastname"/></td>

<td><h:message for="lname" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">Productid:</td>

<td><h:inputText value="#{user.nationality}" id="nat" required="true"

requiredMessage="nationality is required" validatorMessage="please enter valid nationality

alphabets only ">

<f:validateRegex pattern="[a-zA-Z' ']{3,}" />

</h:inputText></td>

<td><p:tooltip for="nat" value="please enter Nationality"/></td>

<td><h:message for="nat" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">productname:</td>

<td><h:inputText value="#{user.gender}" id="gen" required="true" requiredMessage="gender

is required" validatorMessage="enter valid gender">

<f:validateRegex pattern="[a-zA-Z]{4,5}"></f:validateRegex>

</h:inputText></td>

<td><p:tooltip for="gen" value="please enter Gender"/></td>

<td><h:message for="gen" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">Issuedate</td>

<td><p:calendar value="#{user.dob}" id="dob" effect="explode" mode="popup"

required="true" requiredMessage="Date of birth is needed" >

<f:convertDateTime pattern="d/M/yyyy" />

</p:calendar></td>

<td><p:tooltip for="dob" value="please enter DateOfBirth like d/M/yyyy "/></td>

18 | P a g e

Page 19: Se276 enterprise computingassignment

<td><h:message for="dob" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">Duedate</td>

<td><p:calendar value="#{user.dob}" id="dob1" effect="explode" mode="popup"

required="true" requiredMessage="Date of birth is needed" >

<f:convertDateTime pattern="d/M/yyyy" />

</p:calendar></td>

<td><p:tooltip for="dob" value="please enter DateOfBirth like d/M/yyyy "/></td>

<td><h:message for="dob" style="color: red;" /></td>

</tr>

<tr>

<td valign="top">rent</td>

<td><h:inputText value="#{user.passporttype}" id="ppty" required="true"

requiredMessage="passporttype is required" validatorMessage="enter valid passport type">

<f:validateRegex pattern="[a-zA-Z]{4,}" />

</h:inputText></td>

<td><p:tooltip for="ppty" value="please enter PassportType"/></td>

<td><h:message for="ppty" style="color: red;" /></td>

</tr>

<tr>

<td>

<h:commandButton value="Submit" action="#{user.save}" ></h:commandButton>

</td>

</tr>

</table>

</p:panel>

</h:form>

</h:body>

19 | P a g e

Page 20: Se276 enterprise computingassignment

</html>

4. Design of EJB’s

Enterprise Java Beans (EJB’s) are widely used over the enterprise computing and application

development and in general holds getter and setter methods for a particular object. As there four

important objects like customers, movies, games and rental information, the corresponding EJB’s

are created and the sample code is as given below

Below code is used to create the required customer bean

20 | P a g e

Page 21: Se276 enterprise computingassignment

package com.demo.classes;

import java.io.Serializable;

import java.util.Iterator;

import java.util.List;

import javax.faces.application.FacesMessage;

import javax.faces.bean.ManagedBean;

import javax.faces.bean.RequestScoped;

import javax.faces.bean.SessionScoped;

import javax.faces.context.FacesContext;

@ManagedBean(name="Customer")

@SessionScoped

public class CustomerBean implements Serializable

{

/**

*

*/

21 | P a g e

Page 22: Se276 enterprise computingassignment

private static final long serialVersionUID = 1L;

private int customerid;

private String FirstName;

private String LastName;

private String Gender;

private String address;

private String contactno;

private String emailid;

public int getCustomerid() {

return customerid;

}

22 | P a g e

Page 23: Se276 enterprise computingassignment

public void setCustomerid(int customerid) {

this.customerid = customerid;

}

public String getFirstName() {

return FirstName;

}

public void setFirstName(String firstName) {

FirstName = firstName;

}

23 | P a g e

Page 24: Se276 enterprise computingassignment

public String getLastName() {

return LastName;

}

public void setLastName(String lastName) {

LastName = lastName;

}

public String getGender() {

24 | P a g e

Page 25: Se276 enterprise computingassignment

return Gender;

}

public void setGender(String gender) {

Gender = gender;

}

public String getAddress() {

return address;

}

25 | P a g e

Page 26: Se276 enterprise computingassignment

public void setAddress(String address) {

this.address = address;

}

public String getContactno() {

return contactno;

}

public void setContactno(String contactno) {

this.contactno = contactno;

}

26 | P a g e

Page 27: Se276 enterprise computingassignment

public String getEmailid() {

return emailid;

}

public void setEmailid(String emailid) {

this.emailid = emailid;

}

}

Below code is used to develop the database access using the JPA framework

27 | P a g e

Page 28: Se276 enterprise computingassignment

package com.demo.classes;

import java.io.Serializable;

import java.util.List;

import org.hibernate.Session;

import org.hibernate.SessionFactory;

import org.hibernate.Transaction;

import org.hibernate.cfg.Configuration;

public class CustomerDao implements Serializable{

/**

*

*/

private static final long serialVersionUID = 1L;

public List<?> checkUser(String username)

{

try{

Configuration config = new Configuration();

28 | P a g e

Page 29: Se276 enterprise computingassignment

config.configure("hibernate.cfg.xml");

SessionFactory sesfac = config.buildSessionFactory();

Session sess;

sesfac.openSession();

sess= sesfac.getCurrentSession();

Transaction tran = sess.beginTransaction();

// @SuppressWarnings("unused")

CustomerModel login =new CustomerModel();

List <?> users= sess.createQuery(" from CustomerModel where

FirstName='"+username+"'").list();

System.out.print(users);

sess.getTransaction().commit();

/*sess.flush();

sess.close();

*/return users;

}

catch (RuntimeException re) {

System.out.println("persist failed"+ re);

29 | P a g e

Page 30: Se276 enterprise computingassignment

throw re;

}

}

}

Below code is used to create the customer model

package com.demo.classes;

import java.io.Serializable;

public class CustomerModel implements Serializable {

/**

*

*/

private static final long serialVersionUID = 1L;

private int customerid;

30 | P a g e

Page 31: Se276 enterprise computingassignment

private String FirstName;

private String LastName;

private String Gender;

private String address;

private String contactno;

private String emailid;

public int getCustomerid() {

return customerid;

}

public void setCustomerid(int customerid) {

this.customerid = customerid;

}

public String getFirstName() {

return FirstName;

}

public void setFirstName(String firstName) {

FirstName = firstName;

}

public String getLastName() {

return LastName;

}

31 | P a g e

Page 32: Se276 enterprise computingassignment

public void setLastName(String lastName) {

LastName = lastName;

}

public String getGender() {

return Gender;

}

public void setGender(String gender) {

Gender = gender;

}

public String getAddress() {

return address;

}

public void setAddress(String address) {

this.address = address;

}

public String getContactno() {

return contactno;

}

public void setContactno(String contactno) {

this.contactno = contactno;

}

32 | P a g e

Page 33: Se276 enterprise computingassignment

public String getEmailid() {

return emailid;

}

public void setEmailid(String emailid) {

this.emailid = emailid;

}

}

Similar coding design is followed to create the rest of the EJB’s like movie, game and rental

information.

4.1SQL used to create the tables

Below SQL command is used to create the customer table

CREATE TABLE new_schema.customer(

33 | P a g e

Page 34: Se276 enterprise computingassignment

cid INT(11) NOT NULL,

FirstName VARCHAR(255) NOT NULL,

LastName VARCHAR(255) NOT NULL,

Gender VARCHAR(255) DEFAULT NULL,

address VARCHAR(255) DEFAULT NULL,

contactno VARCHAR(255) DEFAULT NULL,

emailid VARCHAR(255) DEFAULT NULL,

PRIMARY KEY (cid)

)

ENGINE = INNODB

CHARACTER SET latin1

COLLATE latin1_swedish_ci;

Below SQL command is used to create the movie table

CREATE TABLE vrs.movie(

MovieID VARCHAR(255) NOT NULL,

Moviename VARCHAR(255) NOT NULL,

Directorname VARCHAR(255) NOT NULL,

Duration TIME DEFAULT NULL,

PRIMARY KEY (MovieID)

34 | P a g e

Page 35: Se276 enterprise computingassignment

)

ENGINE = INNODB

CHARACTER SET latin1

COLLATE latin1_swedish_ci;

Below SQL command is used create the game table

CREATE TABLE vrs.game(

GameID VARCHAR(255) NOT NULL,

GameName VARCHAR(255) NOT NULL,

`Developer Studio’s name` VARCHAR(255) NOT NULL,

Platform VARCHAR(255) NOT NULL,

PRIMARY KEY (GameID)

)

ENGINE = INNODB

CHARACTER SET latin1

COLLATE latin1_swedish_ci;

Below SQL command is used to create the rental table

CREATE TABLE vrs.rental(

CustID VARCHAR(255) NOT NULL,

35 | P a g e

Page 36: Se276 enterprise computingassignment

RentalType VARCHAR(255) NOT NULL,

ProductID VARCHAR(255) NOT NULL,

Productname VARCHAR(255) NOT NULL,

Issuedate DATETIME NOT NULL,

Duedate DATETIME NOT NULL,

Rent VARCHAR(255) NOT NULL,

PRIMARY KEY (CustID)

)

ENGINE = INNODB

CHARACTER SET latin1

COLLATE latin1_swedish_ci;

5. Test instructions

To run the application, unzip the code attached over the project and start the maven using the

below command

mvn archetype:generate -DgroupId=com.CE.rentalsystem -DartifactId=VideoRentalSystem -

DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

Below snapshot demonstrates the commands to start the glassfish server

36 | P a g e

Page 37: Se276 enterprise computingassignment

Fig 5.1: Commands to start the glassfish server

Glassfish server is started by double clicking the asadmin option from the bin folder, where the

server was actually installed and the respective snapshot is as shown below

37 | P a g e

Page 38: Se276 enterprise computingassignment

Fig 5.2: Process to start the glassfish server

Below snapshots shows the procedure to start the glassfish server

Fig 5.3: Command to start the glassfish server

38 | P a g e

Page 39: Se276 enterprise computingassignment

Below command is used to stop the glassfish server

Fig 5.4: Command to stop the glassfish server

Many commands are used to control the enterprise application creation flow using the maven

framework and the respective snapshot is as shown below

39 | P a g e

Page 40: Se276 enterprise computingassignment

Fig 5.5: Few important commands used over Maven framework

40 | P a g e

Page 41: Se276 enterprise computingassignment

References

Smith, D, 2002, On the role of services in enterprise application integration, Software

Technology and Engineering Practice, 2002. STEP 2002. Proceedings. 10th

International Workshop on, Vol.112, no.32, p16-23.

Ribbers, P, 2000, Integrated value chains and their implications from a business and

technology standpoint, Decision Support Systems, Vol.29, no.4, p129-134.

#EnterpriseComputingAssignmentHelp

#SystemDesignAssignmentHelp

#NetworkDesignAssignmentHelp

#CyberSecurityAssignment

#AssignmentHelp

#MSPROJECTASSIGNMENTHELP

#ManagementAssignmentHelp

#AssignmentsHelp

#ProjectsHelp

#HomeworkHelp

#DissertationsHelp

#ThesisHelp

#AcademicAvenue

#AcademicsHelp

#FrustratedWithAssignments

#MarketingAssignmentHelp

#ResearchProposalHelp

41 | P a g e

Page 42: Se276 enterprise computingassignment

#CaseStudyHelp

42 | P a g e