• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 Integrating Hibernate with Struts 2 Fraework

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • 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 ??
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No clue; I never use EJBs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic