1 16 17 package org.springframework.orm.toplink; 18 19 import oracle.toplink.exceptions.TopLinkException; 20 import oracle.toplink.sessions.Session; 21 import oracle.toplink.threetier.ServerSession; 22 23 40 public class ServerSessionFactory extends AbstractSessionFactory { 41 42 private final ServerSession serverSession; 43 44 45 49 public ServerSessionFactory(ServerSession serverSession) { 50 this.serverSession = serverSession; 51 } 52 53 54 57 protected Session getMasterSession() { 58 return this.serverSession; 59 } 60 61 65 protected Session createClientSession() throws TopLinkException { 66 return this.serverSession.acquireClientSession(); 67 } 68 69 70 75 public void close() { 76 this.serverSession.logout(); 77 this.serverSession.release(); 78 } 79 80 } 81 | Popular Tags |