Hi, I'm learning Java/Jsp. I just started a project to learn and have some Practical knowledge. But I'm stuck and confused Kindly suggest me so that I can proceed further.-
The Project is a Knowledge System. It stores Lots of Questions their answers which is listed by Categories. There's 2 type of user one who can have read only access on 'Question' and 'Topic' table and 2nd 'Admin' level . Its a web based application with multiuser access.
(I Know its a bit long )
My Problems:

1.Should I use Connection Pooling? I read that they returned back to pool after use but Result set associated with this will be lost/clear is n't it? then the sql query's result returned will be lost as well?[no idea on it]. So do I need to save record for each user some where[suggest where].

2. If a user have made query visited some link on it but again like to go on same query do I need to execute the query again or any way to hold the result for that user utill he logout. (consider the above question as Result set unused get cleared or closed )
3.Do I need to use MultiThread? What if don't and I put a query in a servlet which execute query then return it to show result in HTML.
each user call this page for all sort of their query will there be any problem occur. if yes which part should be used for Multithreading.

4 How should I divide it to get the MVC Model confirmed .
any thing else you would like to say ....
Thanks.

> Should I use Connection Pooling?

Depends; all real life projects use pooling but if you have just started out, cutting down the complexity by not bothering about pooling wouldn't be that bad. There are some SQL mapping frameworks out there [iBatis] which handle all the pooling behind the scenes.

> any way to hold the result for that user utill he logout

Server side sessions; though putting in a lot of data might just slow down things. Caching at the DAO layer is yet another option. Again, frameworks like iBatis and Hibernate shine in this area with configurable caching options.

> Do I need to use MultiThread?

No, at least not when developing a web app since the servlet takes care of spawning a new thread for each request made.

> How should I divide it to get the MVC Model confirmed .

By using a framework which helps you enforce a clear separation of concerns. Spring MVC, Wicket, Struts 2, Tapestry are good contenders.

Thanks, I'll consider your Suggestions. As I'm still learning Hibernate, Spring etc are new to me so slowly I'll learn them :)
thanks

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.