This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP and have Lucian Maly on-line!
See this thread for details.
Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!

Andrew Kessel

Greenhorn
+ Follow
since Aug 16, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrew Kessel

Ok.
I have that structure of web-app: Servlet > Service Object > DAO > Database. Service object, DAO, Session Factory and DBCP connection pool - are Spring beans.
When user send request to servlet, Spring container create copy of Service Object bean, copy of DAO bean, copy of Session Factory bean and copy of DBCP pool? How I may be sure of that all request use one copy of Session Factory bean and DBCP pool&

beans.xml


Service Object - BookService.java


DAO - BookHome.java


Servlet - ViewAllBooks.java

There should be a business object in between the servlet object and the DAO. And there typically should be a delegate object between the servlet and business object.


Business object should contain CRUD methods that invokes DAO's CRUD methods? What methods must contain Business Delegate?
If you use JPA entities, you must mention your entity in "hibernate.cfg.xml" that way:
<hibernate-configuration>
<session-factory>
...
<mapping class="com.pnd.data.Market" />
</session-factory>
</hibernate-configuration>


Like JSP, that invoke servlet?
Hello!
I would like to create the web application that can work with ORM entities. Servlets, that, through DAO class, can CRUD entities. DAO formalize as Spring-bean and for each operation with entities, servlets must create an object of DAO class through Spring.
Is that right? What problems may result?