- Timestamp:
- Feb 28, 2011, 6:04:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/dbnp/modules/ModuleCommunicationService.groovy
r1576 r1577 101 101 102 102 // put the session token to work 103 // This saving is done in a separate session, since that seems to be the only way to have grails/hibernate 104 // really save the object to the database. This is needed, since the module will start a new http request to GSCF 105 // and in that request the database object must exist. 106 // Using session.flush(), save(flush:true) or transaction.commit() don't do the trick. If you know 107 // a better way to perform this trick, feel free to change it :) 108 def hibernateSession = sessionFactory.openSession( sessionFactory.getCurrentSession().connection() ); 109 def transaction = hibernateSession.beginTransaction(); 110 111 if( transaction ) { 112 authenticationService.logInRemotely( consumer, sessionToken, authenticationService.getLoggedInUser() ) 113 transaction.commit(); 114 } 115 hibernateSession.flush(); 103 authenticationService.logInRemotely( consumer, sessionToken, authenticationService.getLoggedInUser() ) 116 104 117 105 // Append the sessionToken to the URL
Note: See TracChangeset
for help on using the changeset viewer.