2 Copyright 2010 Sun Microsystems, Inc.
3 All rights reserved. Use is subject to license terms.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 package com.mysql.clusterj;
23 /** This interface defines the service to create a SessionFactory
24 * from a Map<String, String> of properties.
26 public interface SessionFactoryService {
28 /** Create or get a session factory. If a session factory with the
29 * same value for PROPERTY_CLUSTER_CONNECTSTRING has already been created
30 * in the VM, the existing factory is returned, regardless of whether
31 * other properties of the factory are the same as specified in the Map.
32 * @param props the properties for the session factory, in which the
33 * keys are defined in Constants and the values describe the environment
35 * @return the session factory
37 SessionFactory getSessionFactory(Map<String, String> props);