1 2 24 25 package com.lutris.appserver.server.sessionEnhydra.persistent; 26 27 import java.util.Enumeration ; 28 29 import com.lutris.appserver.server.session.SessionException; 30 import com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable; 31 import com.lutris.appserver.server.user.User; 32 import com.lutris.util.Config; 33 import com.lutris.util.ConfigException; 34 35 42 public class PersistentSessionUserTable implements StandardSessionUserTable { 43 44 String dbName = null; 45 46 50 public PersistentSessionUserTable(Config config) throws ConfigException { 51 dbName = PersistentSessionHome.getDatabaseName(config); 53 } 54 55 63 public void add(String sessionKey, User user) { 64 } 66 67 74 public void remove(String sessionKey, User user) { 75 } 77 78 85 public void remove(String sessionKey) { 86 } 88 89 97 public int numSessions(User user) throws SessionException { 98 try { 99 UserNumSessionsQuery q = new UserNumSessionsQuery(user); 100 Integer num = (Integer )DBUtil.dbQuery(q, dbName); 101 return num.intValue(); 102 } catch (Exception e) { 103 throw new SessionException(e); 104 } 105 } 106 107 115 public Enumeration getSessionKeys(User user) throws SessionException { 116 try { 117 UserSessionsQuery q = new UserSessionsQuery(user); 118 return (Enumeration )DBUtil.dbQuery(q, dbName); 119 } catch (Exception e) { 120 throw new SessionException(e); 121 } 122 } 123 124 128 public void shutdown() { 129 } 131 132 } 133 | Popular Tags |