Fix order and TX

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4606 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2006-12-14 13:39:23 +00:00
parent e8faec44c8
commit 036e58985f

View File

@@ -214,15 +214,16 @@ public class NovellIChainsHTTPRequestAuthenticationFilter extends AbstractAuthen
// Set the authentication
authComponent.setCurrentUser(userName);
User user = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));
// Set up the user information
UserTransaction tx = transactionService.getUserTransaction();
NodeRef homeSpaceRef = null;
User user;
try
{
tx.begin();
user = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));
homeSpaceRef = (NodeRef) nodeService.getProperty(personService.getPerson(userName),
ContentModel.PROP_HOMEFOLDER);
user.setHomeSpaceId(homeSpaceRef.getId());