Hello friends,

I am working on online book store project using Java and Servlets. I am struck at desgining part. The scenario is simple anyone can come and search books but only registered customers can buy them.

1. Is it good to create multiple database connections or single connection? If possible, guide me how to make a single connection per user.
2. Where should i include 'Search' functionality. as a seperate class containing different search methods like search transaction, search memeber, search book and so on...
<I am having customer, transaction, bookdetails classes>
3. Since it's based on Servlets and Java, guide me for better way of making connections please....


Thank you guys.

Recommended Answers

All 2 Replies

please help me out!!

1. and 3. Connection Pools, see the documentation for the web container you'll be using.

2. A class that provides the user interface and an interface (java interface) and every "object" that should be searchable should implement this interface.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.