4.3.1.20 Interface SessionFactory

4.3.1.20.1 Synopsis
4.3.1.20.2 close()
4.3.1.20.3 getSession()
4.3.1.20.4 getSession(Map)

SessionFactory represents a cluster.

4.3.1.20.1 Synopsis
 public interface SessionFactory {
// Public Methods  public void close();
  public Session getSession();
  public Session getSession(Map properties);
}
4.3.1.20.2 close()
public void close();

Close this session factory. Release all resources.

4.3.1.20.3 getSession()
public Session getSession();

Create a Session to use with the cluster, using all the properties of the SessionFactory.

Parameters

return

the session

4.3.1.20.4 getSession(Map)
public Session getSession(Map properties);

Create a session to use with the cluster, overriding some properties. Properties PROPERTY_CLUSTER_CONNECTSTRING, PROPERTY_CLUSTER_DATABASE, and PROPERTY_CLUSTER_MAX_TRANSACTIONS may not be overridden.

Parameters

properties

overriding some properties for this session

return

the session