Beispiel #1
0
 /**
  * Create an unauthenticated session
  *
  * @param userName
  * @param app
  * @param vdb
  * @return
  */
 public static SessionMetadata createTemporarySession(
     String userName, String app, VDBMetaData vdb) {
   long creationTime = System.currentTimeMillis();
   SessionMetadata newSession = new SessionMetadata();
   newSession.setSessionToken(new SessionToken(userName));
   newSession.setSessionId(newSession.getSessionToken().getSessionID());
   newSession.setUserName(userName);
   newSession.setCreatedTime(creationTime);
   newSession.setApplicationName(app);
   newSession.setVDBName(vdb.getName());
   newSession.setVDBVersion(vdb.getVersion());
   newSession.setVdb(vdb);
   newSession.setEmbedded(true);
   return newSession;
 }