• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Using STRUTS and Hibernate

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it a good idea or bad idea to use Hibernate or any O/R API with STRUTS?
If it is good practice, here is my question.
Can you map the STRUTS Form Bean object to the Hibernate Mapping or do you have to create seperate classes, one for STRUTS and one for Hibernate and transfer the data from one to the other?
Also, would my action class handle the actual .save() method from the Hibernate API or would I do it somewhere else?
I would really like it if someone had some information regarding integrating Hibernate with STRUTS.
Thanks.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After some more research I have found that most examples show using the Hibernate API within the Action Handler class of the Form.
Since this is where the Form Bean is instantiated and values are assigned, it makes sense.
However, should we not also want to seperate this a bit more. And somehow move the DB Access Logic outside of the Action Handler and have another Action called to handle the DB Transactions?
I don't know, I am just looking for ideas here. Any suggestions?
[ June 03, 2003: Message edited by: Gregg Bolinger ]
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you consider using JDO for data assess?
If I understand you right - you try to make application architecture without visible "model" layer. You data go between database and forms bypassing intermediate object layer. This is reasonable design, but you lose some degree of flexibility and loitering your controller layer with data assess logic.
Best,
Igor.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic