Changeset 1577 for trunk/grails-app/services/dbnp
- Timestamp:
- Feb 28, 2011, 6:04:45 PM (11 years ago)
- Location:
- trunk/grails-app/services/dbnp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/dbnp/authentication/AuthenticationService.groovy
r1455 r1577 44 44 */ 45 45 public boolean logInRemotely( String consumer, String token, SecUser user ) { 46 // Make sure there is no other logged in user anymore 46 // Remove expired users, otherwise they will be kept in the database forever 47 removeExpiredTokens() 48 49 // Make sure there is no other logged in user anymore 47 50 logOffRemotely( consumer, token ) 48 51 … … 68 71 */ 69 72 public boolean isRemotelyLoggedIn( String consumer, String token ) { 70 // Remove expired users, otherwise they will be kept in the database forever71 removeExpiredTokens()72 73 73 // Check whether a user exists 74 74 def user = getSessionAuthenticatedUser(consumer, token) … … 90 90 */ 91 91 public SecUser getRemotelyLoggedInUser( String consumer, String token ) { 92 // Remove expired users, otherwise they will be kept in the database forever93 removeExpiredTokens()94 95 92 // Check whether a user exists 96 93 def user = getSessionAuthenticatedUser(consumer, token) -
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 -
trunk/grails-app/services/dbnp/studycapturing/AssayService.groovy
r1559 r1577 19 19 class AssayService { 20 20 21 boolean transactional = true21 boolean transactional = false 22 22 def authenticationService 23 23 def moduleCommunicationService
Note: See TracChangeset
for help on using the changeset viewer.