This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Spring and the fly likes Error trying to save some data to a data base, using an spring manager class from a listening class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Error trying to save some data to a data base, using an spring manager class from a listening class" Watch "Error trying to save some data to a data base, using an spring manager class from a listening class" New topic
Author

Error trying to save some data to a data base, using an spring manager class from a listening class

Juan Acv
Greenhorn

Joined: Apr 02, 2010
Posts: 18
Hello everybody.

I'm trying to save some data related to an user in a database when login, using a spring-hibernate manager. I am using a class that implements HttpSessionAttributeListener, to add the data, and to increment a users connected counter:


The method returns an error:



Even the program never reach the method getClientData() in the UserDataManager (it isn't appear in the log)

What i am doing wrong? May be, it's not possible to access to a spring-hibernate manager from a Listener?

thank you.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Moving to Spring, as this has nothing to do with Struts.
Juan Acv
Greenhorn

Joined: Apr 02, 2010
Posts: 18
Thanks

I found an example about what I wanted to do:

http://www.mkyong.com/spring/spring-how-to-do-dependency-injection-in-your-session-listener/

Greetings.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Error trying to save some data to a data base, using an spring manager class from a listening class
 
Similar Threads
Timestamping in Hibernate
The method setValue(String, Object) in the type TagSupport is not applicable for the arguments (Obje
XStream + variable as an attribute to another variable which is tag.
The method setValue(String, Object) in the type TagSupport is not applicable for the arguments (Obje
Can write data but can't read data from database