Professional Documents
Culture Documents
Topics
Introduction of POS
System Requirement
Server side
Operating System : Win NT 4.0 / Win2K
Web Server : IIS 4.0 / 5.0
Application Server : JRun 3.0.2
Database : MS SQL Server 7.0
Client side
Browser : IE4.0 or higher
Application Map
Index.jsp
Login.jsp
Authentication
Servlet
Products.jsp
Add/Edit/Delete
Shopping list
Checkout.jsp
Loginerror.jsp
Logout.jsp
Scheduler
Database Diagram
POS Components
Presentation Logic
HTML
JSP
Login.jsp, customers.jsp, customer_profile.jsp,
Interface Logic (Data Modeling)
Servlet
EditCustomer.class, DeleteCustomer.class,
AddShoppingList.class,
Business Logic
EJB
Customer EJB, ShoppingList EJB,
Presentation : JSP
Interface : Servlet
Business Logic : EJB
Benefits : Presentation logic doesnt implement
business logics at all. Every business data is updated
through EJB or Servlets. Especially Servlet is
reponsible for data modeling for business logic as
interface between presentation and business logic.
JSP
<>
Servlet
EJB
Container
DB
HTTP on LAN
JSP
<>
Engine
Servlet
Container
EJB
Container
JDBC
HTTP
HTTP Server(HTML)
JRun
DB
J2EE APIs
Servlets
Standard API extending and enhancing Web servers
Java Server Pages (JSP)
Standard API for creating dynamic content using static templates
Enterprise JavaBeans (EJB)
Standard server-side component model
Java Database Connectivity (JDBC)
JavaMail
Java Naming and Directory Interface (JNDI)
Java Message Service (JMS)
Java Transaction API (JTA)
*) POS system : Servlet / JSP / EJB / JNDI / JDBC
POS Application
Servlets 2.2
JSP 1.1
EJB 1.1
JNDI
JMS
JDBC
JTA/JTS
JavaMail
Servlet 2.2
JSP 1.1
EJB 1.1
JNDI
Entity Beans
Used to
Represent a business entity (like a row in a
database table)
Provide standard access and validation for
business entities
Persistent (live beyond server lifetime)
Usually represent data in a database
Examples
Customer, Product, Employee, ...
Entity Beans
Session Beans
Used to
Manage processes and tasks
Model the workflow of Entity beans
Retrieve and update data that can't be adequately captured
in an entity bean
No persistent state
Example
Order a product
Check out the shopping cart
Reservation
Session Beans
Home Interface
Defines methods to create (obtain), find, or remove
a Bean Instance on behalf of the client
Extends javax.ejb.EJBHome
Remote Interface
Defines the bean's business methods
Extends javax.ejb.EJBObject
Includes:
Bean class
Remote interface
Home Interface
Deployment descriptor
(ejb.xml)
ShoppingListHome.class
ShoppingList.class
ShoppingListEJB.class
ejb.xml
Deploy Tool
JNDI Server
InitialContext
EJB Server
create/find
EJB Home Stub
Home Interface
EJB Home
Home Interface
getList( )
EJB Object Stub
Remote Interface
EJB Object
Remote Interface
EJB Class
Developer
Home Interface
Remote Interface
EJB class
Support classes
Deployer (Deploy tool)
Packaging Interfaces, EJB class, and support classes
Deploy the packaged EJB (jar file)
Server
Implement EJB
EJB
Devloper
CustomerHome.class
Customer.class
CustomerEJB.class
ejb.xml
EJB Servers
Display
Index.jsp
DB
Add Remove
ShoppingCart
Table
AddShoppingList
RemoveShoppingList
Display all
shopping list
from EJB
Form action to
add / remove
shopping list
Capture the
Shopping list id
Call bean
method to be fit
with each action
Implement get,
add, remove
shipping list
methods
Select, update,
delete shopping
list from
ShoppingCart
table
Authentication*
Servlet
Loginerror.jsp
HTML
JSP
Servlet
EJB
Other Resources
POS Scheduler
<servlet>
<servlet-name>POSScheduler</servlet-name>
<servlet-class>allaire.jrun.scheduler.CronService</servlet-class>
<display-name>POSScheduler</display-name>
<description>Scheduler for POS System</description>
<init-param>
<param-name>schedfile</param-name>
<param-value>C:\JRun\3.0\servers\default\pos-app\schedule.ini</param-value>
</init-param>
<init-param>
<param-name>logfile</param-name>
<param-value>C:\JRun\3.0\servers\default\pos-app\scheduler-log\pos-scheduler.log</param-value>
</init-param>
<load-on-startup/>
</servlet>
Except those bold tags, developer can give any name or file
Schedule.ini Example
Supplementary Issues