*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
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://aspose.com/file-tools
 
subject: Error trying to save some data to a data base, using an spring manager class from a listening class