Welcome to the Distributed Online Auction System repository!
This project is a robust, modular, and scalable platform for conducting real-time online auctions, built with modern Java EE technologies and a distributed architecture.
It is designed to deliver a seamless, interactive, and transparent auction experience for both administrators and bidders.
The Distributed Online Auction System (DOAS) provides a virtual marketplace where users can register, view auction items, place bids in real time, and compete to win products. The system leverages a distributed, multi-module architecture to ensure scalability, responsiveness, and maintainability.
Key features include:
- Real-time bidding with live updates via WebSockets
- Admin panel for managing auction items and monitoring bids
- Secure user sessions and authentication
- Auction timers and automatic auction closure
- Modular architecture for easy extension and maintenance
The project is organized as a Maven multi-module application:
Distributed-Online-Auction-System/
├── core/
├── ejb/
├── web/
├── ear/
├── pom.xml
| Module | Description |
|---|---|
core |
Domain models (AuctionItem, Bid, User) and shared logic |
ejb |
Enterprise JavaBeans (EJB) for business logic, bid processing, session management, and broadcasting |
web |
Web frontend, servlets, JSPs, WebSocket endpoints, and static resources |
ear |
Enterprise Archive for deployment, aggregating all modules |
Defines the core business entities:
- AuctionItem: Represents an item available for auction, including name, description, starting price, and expiry time.
- Bid: Represents a bid placed by a user, including bidder details, bid amount, and the associated auction item.
- User: Represents a registered user (bidder), including name and email.
This module is shared by both EJB and web modules to ensure consistency across the application.[2]
Implements the core business processes using EJBs:
- AuctionManagerBean: Manages auction items and bids, provides methods to add items, retrieve items, and fetch bids.
- BidManagerBean: Handles bid validation and placement, ensuring that each bid is higher than the current highest and that the auction is active.
- BroadcasterBean: Sends bid updates to the messaging system (JMS), enabling real-time notifications.
- UserSessionManagerBean: Manages user sessions, mapping HTTP sessions to user objects for authentication and authorization.
Key Features:
- Thread-safe, singleton beans for shared state
- JMS integration for scalable, asynchronous bid broadcasting
- Robust exception handling for invalid bids[4]
Provides the user interface and real-time communication:
- Servlets:
HomeServlet: Displays auction items and live bids to usersLoginServlet/LogoutServlet: User authentication and session managementAdminServlet/AdminLoginServlet: Admin authentication and item managementPlaceBidServlet: Handles bid submissions
- WebSocket:
BidWebSocketEndpoint: Enables real-time bid and item updates to all connected clientsWebSocketBroadcaster: Broadcasts messages to active WebSocket sessions
- JSP Pages:
index.jsp,login.jsp,auction.jsp,admin.jsp, etc., for user and admin interfaces
- Static Assets:
- CSS, JS (including
auction.jsfor client-side WebSocket logic), fonts, and images
- CSS, JS (including
User Experience:
- Live auction and bid updates without page reloads
- Countdown timers for auction expiry
- Responsive, Bootstrap-based UI[1]
Packages all modules into a single deployable EAR (Enterprise Archive):
- Bundles the
core,ejb, andwebmodules - Provides deployment descriptors and configuration for application servers (e.g., Payara, GlassFish)
- Ensures seamless integration and deployment of all components[3]
Distributed-Online-Auction-System/
├── core/
│ └── src/main/java/io/github/chamikathereal/auction/core/model/
│ ├── AuctionItem.java
│ ├── Bid.java
│ └── User.java
├── ejb/
│ └── src/main/java/io/github/chamikathereal/auction/ejb/
│ ├── bean/
│ ├── exception/
│ └── remote/
├── web/
│ └── src/main/java/io/github/chamikathereal/auction/web/
│ ├── listener/
│ ├── servlet/
│ └── websocket/
│ └── src/main/webapp/
│ ├── assets/
│ ├── *.jsp
├── ear/
│ └── src/main/
└── pom.xml
- Domain Layer (
core): Defines entities and shared logic. - Business Layer (
ejb): Handles auction logic, bid processing, and session management. - Presentation Layer (
web): User/admin interfaces, real-time updates, and static content. - Deployment Layer (
ear): Aggregates and deploys all modules as a single application.
| Module | Key Classes / Files | Responsibilities |
|---|---|---|
core |
AuctionItem, Bid, User |
Domain models, serialization, and business rules |
ejb |
AuctionManagerBean, BidManagerBean, BroadcasterBean, UserSessionManagerBean, InvalidBidException |
Business logic, bid validation, messaging, user session management |
web |
HomeServlet, LoginServlet, PlaceBidServlet, AdminServlet, BidWebSocketEndpoint, WebSocketBroadcaster, JSPs, JS/CSS |
Web interface, real-time updates, REST endpoints, WebSocket communication, static resources |
ear |
application.xml, pom.xml |
Deployment descriptor, module aggregation, application server integration |
- Admin adds auction items via the admin panel.
- Users register/login and view live auction items.
- Users place bids; each bid is validated and processed by the EJB layer.
- Bids are broadcasted in real time to all connected clients via JMS and WebSockets.
- Auction timers control the start and end of each auction, automatically closing bidding when expired.
- All activities are logged for transparency and debugging.
- Java 11
- Jakarta EE (EJB, JMS, Servlet, WebSocket)
- JSP, HTML5, CSS3, Bootstrap 5
- JavaScript (for real-time updates)
- Maven (multi-module project)
- Payara/GlassFish (application server)
-
Clone the repository
git clone https://github.com/chamikathereal/Distributed-Online-Auction-System.git -
Build the project
mvn clean install -
Deploy the EAR file to your Java EE application server (e.g., Payara, GlassFish).
-
Access the application
- User:
http://localhost:8080/plexusbid/ - Admin:
http://localhost:8080/plexusbid/admin-login.jsp
- User:
- Real-time, distributed auctioning
- Modular, maintainable codebase
- Secure session and bid management
- Responsive and modern UI
- Extensible for new auction types or features
Chamika Gayashan
Undergraduate Software Engineer | Sri Lanka
Linkedin: @chamikathereal
Current date: Wednesday, June 11, 2025, 8:45 PM +0530
Thank you for checking out the Distributed Online Auction System! If you have any questions or suggestions, feel free to open an issue or reach out via LinkedIn.
