• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Struts2 Integrating Hibernate with Struts 2 Fraework

 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello All,

In HibernateSessionInterceptor , i cannot understand the target parameter provided by the plugin.

While configuring


What is this target here actually refering to .

According to the docs it is referring to the target - Target object in Action

Please can anybody tell me what is this actually ??
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that this interceptor is *not* part of Struts 2--questions about its use should be directed to its creator.

The documentation pretty much sums it up--the "target" property refers to the action property the interceptor will attempt to set with the Hibernate session. It probably would have been quicker to spend a minute or five with the source--it's open-source, and it's almost always quicker to just find out on your own than wait for someone else to answer.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:Note that this interceptor is *not* part of Struts 2--questions about its use should be directed to its creator.



Ya ,i was looking for an alternative than using Spring for this purpose.


The documentation pretty much sums it up--the "target" property refers to the action property the interceptor will attempt to set with the Hibernate session.



And Thanks a lot for this.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David can you please also tell this :

I want to call a Stateless Session Bean from my Action class , so i am thinking of two options :

1) Write a Helper class for JNDI lookup.

2) Write a custom Interceptor which will call a SessionBean .

What will be the best approach.

Please guide what are pros and cons .

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No clue; I never use EJBs.
 
Get out of my mind! Look! A tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic