2 Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 package com.mysql.clusterj.openjpa;
20 import com.mysql.clusterj.SessionFactory;
21 import com.mysql.clusterj.core.store.Dictionary;
23 import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
24 import org.apache.openjpa.jdbc.meta.ClassMapping;
27 * Configuration that defines the properties necessary to configure
28 * runtime and connect to an Ndb Cluster.
31 public interface NdbOpenJPAConfiguration
32 extends JDBCConfiguration {
35 * Name of the logger for SQL execution messages:
36 * <code>openjpa.jdbc.SQL</code>.
38 public static final String LOG_NDB_SQL = "openjpa.ndb.SQL";
41 * Name of the logger for JDBC-related messages:
42 * <code>openjpa.jdbc.JDBC</code>.
44 public static final String LOG_NDB_JDBC = "openjpa.ndb.JDBC";
46 //com.mysql.clusterj.connectstring=localhost:9311
47 //com.mysql.clusterj.connect.retries=4
48 //com.mysql.clusterj.connect.delay=5
49 //com.mysql.clusterj.connect.verbose=1
50 //com.mysql.clusterj.connect.timeout.before=30
51 //com.mysql.clusterj.connect.timeout.after=20
52 //com.mysql.clusterj.username=
53 //com.mysql.clusterj.password=
54 //com.mysql.clusterj.database=test
55 //com.mysql.clusterj.max.transactions=1024
57 public String getConnectString();
58 public void setConnectString(String value);
60 public int getConnectRetries();
61 public void setConnectRetries(int value);
63 public int getConnectDelay();
64 public void setConnectDelay(int value);
66 public int getConnectVerbose();
67 public void setConnectVerbose(int value);
69 public int getConnectTimeoutBefore();
70 public void setConnectTimeoutBefore(int value);
72 public int getConnectTimeoutAfter();
73 public void setConnectTimeoutAfter(int value);
75 public String getUsername();
76 public void setUsername(String value);
78 public String getPassword();
79 public void setPassword(String value);
81 public String getDatabase();
82 public void setDatabase(String value);
84 public int getMaxTransactions();
85 public void setMaxTransactions(int value);
87 public SessionFactory getSessionFactory();
88 public void setSessionFactory(SessionFactory value);
90 public boolean getFailOnJDBCPath();
91 public void setFailOnJDBCPath(boolean value);
93 public NdbOpenJPADomainTypeHandlerImpl<?> getDomainTypeHandler(ClassMapping cmd, Dictionary dictionary);