Hi,

I have a manager that gets some data from another source (via notification).
Upon reception of an event this manager has to update user information.
Therefore I tried to instantiate the UserManagerImpl by using its
constructor, query for a user object (by getUserByUsername()) and save it
afterwards. However I always get a NullPointerException from
getUserByUsername(). it seems that the HibernateTemplate is not set yet.
I guess I should not instantiate the Usermanager like that, right?

Here's some code:

UserManager mgr = new UserManagerImpl();
UserDao dao = new UserDaoHibernate();
mgr.setUserDao(dao);
mgr.getUserByUsername(username);\\throws Nullpointer Exception

How do i get a reference to a correctly initialized UserManager? Can anybody
tell me a clean way how I can update the User objects from outside the
UserManagerImpl?

Cheers,

Johannes 
-- 
View this message in context: 
http://www.nabble.com/Update-User-from-another-Manager-tf4045113s2369.html#a11490416
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to