mirror of https://github.com/apache/openjpa.git
Change property name prefix from 'slice.*' to 'openjpa.slice.*' + Apache License Header
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@619263 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd7eae6210
commit
c61d81ade6
|
@ -20,18 +20,13 @@ package org.apache.openjpa.slice;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.BlockingQueue;
|
|
||||||
import java.util.concurrent.Callable;
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.PriorityBlockingQueue;
|
import java.util.concurrent.PriorityBlockingQueue;
|
||||||
import java.util.concurrent.RejectedExecutionHandler;
|
|
||||||
import java.util.concurrent.ThreadFactory;
|
import java.util.concurrent.ThreadFactory;
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.openjpa.event.RemoteCommitEventManager;
|
|
||||||
import org.apache.openjpa.event.RemoteCommitProvider;
|
|
||||||
import org.apache.openjpa.lib.conf.Configuration;
|
import org.apache.openjpa.lib.conf.Configuration;
|
||||||
import org.apache.openjpa.lib.conf.Configurations;
|
import org.apache.openjpa.lib.conf.Configurations;
|
||||||
import org.apache.openjpa.lib.conf.PluginValue;
|
import org.apache.openjpa.lib.conf.PluginValue;
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ProductDerivation extends AbstractProductDerivation implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getConfigurationPrefix() {
|
public String getConfigurationPrefix() {
|
||||||
return "slice";
|
return "openjpa.slice";
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getType() {
|
public int getType() {
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
/*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.openjpa.slice;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
public class SliceVersion {
|
|
||||||
public static final String VERSION;
|
|
||||||
public static final String REVISION;
|
|
||||||
|
|
||||||
static {
|
|
||||||
Properties revisionProps = new Properties();
|
|
||||||
try {
|
|
||||||
InputStream in = SliceVersion.class.getResourceAsStream
|
|
||||||
("/META-INF/org.apache.openjpa.slice.revision.properties");
|
|
||||||
if (in != null) {
|
|
||||||
try {
|
|
||||||
revisionProps.load(in);
|
|
||||||
} finally {
|
|
||||||
in.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
|
|
||||||
VERSION = revisionProps.getProperty("slice.version", "0.0.0");
|
|
||||||
REVISION = revisionProps.getProperty("revision.number");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println(new SliceVersion());
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return "Slice Version " + VERSION + " [revision "+REVISION+"]";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,120 +0,0 @@
|
||||||
/*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.openjpa.slice.jdbc;
|
|
||||||
|
|
||||||
import org.apache.openjpa.kernel.StoreQuery;
|
|
||||||
import org.apache.openjpa.kernel.exps.QueryExpressions;
|
|
||||||
import org.apache.openjpa.kernel.exps.Value;
|
|
||||||
import org.apache.openjpa.lib.rop.ResultObjectProvider;
|
|
||||||
import org.apache.openjpa.util.InternalException;
|
|
||||||
|
|
||||||
public class AggregateResultObjectProvider implements ResultObjectProvider {
|
|
||||||
private final ResultObjectProvider[] _rops;
|
|
||||||
private final StoreQuery _query;
|
|
||||||
private final QueryExpressions[] _exps;
|
|
||||||
private Object _single;
|
|
||||||
private boolean _opened;
|
|
||||||
|
|
||||||
public AggregateResultObjectProvider(ResultObjectProvider[] rops,
|
|
||||||
StoreQuery q, QueryExpressions[] exps) {
|
|
||||||
_rops = rops;
|
|
||||||
_query = q;
|
|
||||||
_exps = exps;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean absolute(int pos) throws Exception {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void close() throws Exception {
|
|
||||||
_opened = false;
|
|
||||||
for (ResultObjectProvider rop:_rops)
|
|
||||||
rop.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object getResultObject() throws Exception {
|
|
||||||
if (!_opened)
|
|
||||||
throw new InternalException(this + " not-open");
|
|
||||||
return _single;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void handleCheckedException(Exception e) {
|
|
||||||
_rops[0].handleCheckedException(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean next() throws Exception {
|
|
||||||
if (!_opened) {
|
|
||||||
open();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_single != null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
Value[] values = _exps[0].projections;
|
|
||||||
Object[] single = new Object[values.length];
|
|
||||||
for (int i=0; i<values.length; i++) {
|
|
||||||
Value v = values[i];
|
|
||||||
boolean isAggregate = v.isAggregate();
|
|
||||||
int op = decideOperationType(v);
|
|
||||||
for (ResultObjectProvider rop:_rops) {
|
|
||||||
rop.next();
|
|
||||||
Object[] row = (Object[]) rop.getResultObject();
|
|
||||||
switch (op) {
|
|
||||||
case 2: single[i] = count(single[i],row[i]);
|
|
||||||
break;
|
|
||||||
default : single[i] = row[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_single = single;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int decideOperationType(Value v) {
|
|
||||||
String cls = v.getClass().getName();
|
|
||||||
if (cls.equals("org.apache.openjpa.jdbc.kernel.exps.Sum"))
|
|
||||||
return 1;
|
|
||||||
if (cls.equals("org.apache.openjpa.jdbc.kernel.exps.Count"))
|
|
||||||
return 2;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
long count(Object current, Object other) {
|
|
||||||
if (current == null)
|
|
||||||
return (Long) other;
|
|
||||||
return (Long)current + (Long)other;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void open() throws Exception {
|
|
||||||
for (ResultObjectProvider rop:_rops)
|
|
||||||
rop.open();
|
|
||||||
_opened = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reset() throws Exception {
|
|
||||||
}
|
|
||||||
|
|
||||||
public int size() throws Exception {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean supportsRandomAccess() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -27,7 +27,6 @@ import org.apache.openjpa.kernel.Bootstrap;
|
||||||
import org.apache.openjpa.kernel.StoreManager;
|
import org.apache.openjpa.kernel.StoreManager;
|
||||||
import org.apache.openjpa.lib.conf.ConfigurationProvider;
|
import org.apache.openjpa.lib.conf.ConfigurationProvider;
|
||||||
import org.apache.openjpa.lib.util.Localizer;
|
import org.apache.openjpa.lib.util.Localizer;
|
||||||
import org.apache.openjpa.slice.SliceVersion;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A factory for distributed JDBC datastores.
|
* A factory for distributed JDBC datastores.
|
||||||
|
@ -102,6 +101,6 @@ public class DistributedJDBCBrokerFactory extends JDBCBrokerFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Object getFactoryInitializationBanner() {
|
protected Object getFactoryInitializationBanner() {
|
||||||
return _loc.get("factory-init", new SliceVersion());
|
return _loc.get("factory-init", OpenJPAVersion.VERSION_NUMBER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ import org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl;
|
||||||
import org.apache.openjpa.jdbc.schema.DataSourceFactory;
|
import org.apache.openjpa.jdbc.schema.DataSourceFactory;
|
||||||
import org.apache.openjpa.lib.conf.BooleanValue;
|
import org.apache.openjpa.lib.conf.BooleanValue;
|
||||||
import org.apache.openjpa.lib.conf.ConfigurationProvider;
|
import org.apache.openjpa.lib.conf.ConfigurationProvider;
|
||||||
|
import org.apache.openjpa.lib.conf.Configurations;
|
||||||
import org.apache.openjpa.lib.conf.PluginValue;
|
import org.apache.openjpa.lib.conf.PluginValue;
|
||||||
import org.apache.openjpa.lib.conf.StringListValue;
|
import org.apache.openjpa.lib.conf.StringListValue;
|
||||||
import org.apache.openjpa.lib.conf.StringValue;
|
import org.apache.openjpa.lib.conf.StringValue;
|
||||||
|
@ -50,7 +51,6 @@ import org.apache.openjpa.slice.DistributedBrokerImpl;
|
||||||
import org.apache.openjpa.slice.DistributionPolicy;
|
import org.apache.openjpa.slice.DistributionPolicy;
|
||||||
import org.apache.openjpa.slice.ExecutorServiceValue;
|
import org.apache.openjpa.slice.ExecutorServiceValue;
|
||||||
import org.apache.openjpa.slice.Slice;
|
import org.apache.openjpa.slice.Slice;
|
||||||
import org.apache.openjpa.slice.SliceVersion;
|
|
||||||
import org.apache.openjpa.util.UserException;
|
import org.apache.openjpa.util.UserException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,10 +74,12 @@ public class DistributedJDBCConfigurationImpl extends JDBCConfigurationImpl
|
||||||
protected ExecutorServiceValue executorServicePlugin;
|
protected ExecutorServiceValue executorServicePlugin;
|
||||||
protected PluginValue distributionPolicyPlugin;
|
protected PluginValue distributionPolicyPlugin;
|
||||||
|
|
||||||
|
public static final String PREFIX_SLICE = "openjpa.slice.";
|
||||||
|
public static final String PREFIX_OPENJPA = "openjpa.";
|
||||||
|
public static final String REGEX_DOT = "\\.";
|
||||||
|
public static final String DOT = ".";
|
||||||
private static Localizer _loc =
|
private static Localizer _loc =
|
||||||
Localizer.forPackage(DistributedJDBCConfigurationImpl.class);
|
Localizer.forPackage(DistributedJDBCConfigurationImpl.class);
|
||||||
public static final String PREFIX_SLICE = "slice.";
|
|
||||||
public static final String PREFIX_OPENJPA = "openjpa.";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure itself as well as underlying slices.
|
* Configure itself as well as underlying slices.
|
||||||
|
@ -89,7 +91,6 @@ public class DistributedJDBCConfigurationImpl extends JDBCConfigurationImpl
|
||||||
String pUnit = getPersistenceUnitName(p);
|
String pUnit = getPersistenceUnitName(p);
|
||||||
setDiagnosticContext(pUnit);
|
setDiagnosticContext(pUnit);
|
||||||
Log log = getConfigurationLog();
|
Log log = getConfigurationLog();
|
||||||
log.info(_loc.get("config-init", SliceVersion.VERSION));
|
|
||||||
|
|
||||||
brokerPlugin.setString(DistributedBrokerImpl.class.getName());
|
brokerPlugin.setString(DistributedBrokerImpl.class.getName());
|
||||||
|
|
||||||
|
@ -188,6 +189,8 @@ public class DistributedJDBCConfigurationImpl extends JDBCConfigurationImpl
|
||||||
|
|
||||||
public DistributionPolicy getDistributionPolicyInstance() {
|
public DistributionPolicy getDistributionPolicyInstance() {
|
||||||
if (distributionPolicyPlugin.get() == null) {
|
if (distributionPolicyPlugin.get() == null) {
|
||||||
|
// Configurations.getProperty(distributionPolicyPlugin.getProperty(), m)
|
||||||
|
// distributionPolicyPlugin.setString(toProperties(false).get(key))
|
||||||
distributionPolicyPlugin.instantiate(DistributionPolicy.class,
|
distributionPolicyPlugin.instantiate(DistributionPolicy.class,
|
||||||
this, true);
|
this, true);
|
||||||
}
|
}
|
||||||
|
@ -366,9 +369,9 @@ public class DistributedJDBCConfigurationImpl extends JDBCConfigurationImpl
|
||||||
List<String> sliceNames = new ArrayList<String>();
|
List<String> sliceNames = new ArrayList<String>();
|
||||||
for (Object o : p.keySet()) {
|
for (Object o : p.keySet()) {
|
||||||
String key = o.toString();
|
String key = o.toString();
|
||||||
if (key.startsWith(PREFIX_SLICE) && key.split("\\.").length > 2) {
|
if (key.startsWith(PREFIX_SLICE) && getPartCount(key) > 3) {
|
||||||
String sliceName =
|
String sliceName =
|
||||||
chopTail(chopHead(o.toString(), PREFIX_SLICE), ".");
|
chopTail(chopHead(o.toString(), PREFIX_SLICE), DOT);
|
||||||
if (!sliceNames.contains(sliceName))
|
if (!sliceNames.contains(sliceName))
|
||||||
sliceNames.add(sliceName);
|
sliceNames.add(sliceName);
|
||||||
}
|
}
|
||||||
|
@ -376,6 +379,10 @@ public class DistributedJDBCConfigurationImpl extends JDBCConfigurationImpl
|
||||||
return sliceNames;
|
return sliceNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int getPartCount(String s) {
|
||||||
|
return (s == null) ? 0 : s.split(REGEX_DOT).length;
|
||||||
|
}
|
||||||
|
|
||||||
static String chopHead(String s, String head) {
|
static String chopHead(String s, String head) {
|
||||||
if (s.startsWith(head))
|
if (s.startsWith(head))
|
||||||
return s.substring(head.length());
|
return s.substring(head.length());
|
||||||
|
@ -407,7 +414,7 @@ public class DistributedJDBCConfigurationImpl extends JDBCConfigurationImpl
|
||||||
*/
|
*/
|
||||||
Map createSliceProperties(Map original, String slice) {
|
Map createSliceProperties(Map original, String slice) {
|
||||||
Map result = new Properties();
|
Map result = new Properties();
|
||||||
String prefix = PREFIX_SLICE + slice + ".";
|
String prefix = PREFIX_SLICE + slice + DOT;
|
||||||
for (Object o : original.keySet()) {
|
for (Object o : original.keySet()) {
|
||||||
String key = o.toString();
|
String key = o.toString();
|
||||||
if (key.startsWith(prefix)) {
|
if (key.startsWith(prefix)) {
|
||||||
|
@ -476,5 +483,4 @@ public class DistributedJDBCConfigurationImpl extends JDBCConfigurationImpl
|
||||||
}
|
}
|
||||||
return (ExecutorService) executorServicePlugin.get();
|
return (ExecutorService) executorServicePlugin.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
import org.apache.openjpa.jdbc.kernel.JDBCStore;
|
import org.apache.openjpa.jdbc.kernel.JDBCStore;
|
||||||
|
@ -137,8 +136,8 @@ class DistributedStoreQuery extends JDBCStoreQuery {
|
||||||
boolean isAscending = ascending.length > 0;
|
boolean isAscending = ascending.length > 0;
|
||||||
boolean isUnique = q.getContext().isUnique();
|
boolean isUnique = q.getContext().isUnique();
|
||||||
if (isUnique) {
|
if (isUnique) {
|
||||||
|
return new UniqueResultObjectProvider(tmp, q,
|
||||||
return new UniqueResultObjectProvider(tmp, q, getQueryExpressions());
|
getQueryExpressions());
|
||||||
}
|
}
|
||||||
if (isAscending) {
|
if (isAscending) {
|
||||||
return new OrderingMergedResultObjectProvider(tmp, ascending,
|
return new OrderingMergedResultObjectProvider(tmp, ascending,
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
package org.apache.openjpa.slice.jdbc;
|
package org.apache.openjpa.slice.jdbc;
|
||||||
|
|
||||||
import org.apache.openjpa.kernel.StoreQuery;
|
import org.apache.openjpa.kernel.StoreQuery;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
<HTML>
|
<HTML>
|
||||||
<BODY>
|
<BODY>
|
||||||
Implements Distributed version of JDBCStoreManager and JDBCStoreQuery.
|
Implements Distributed version of JDBCStoreManager and JDBCStoreQuery.
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
<HTML>
|
<HTML>
|
||||||
<BODY>
|
<BODY>
|
||||||
Extended OpenJPA Interfaces for distributed databases.
|
Extended OpenJPA Interfaces for distributed databases.
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
package org.apache.openjpa.slice.transaction;
|
package org.apache.openjpa.slice.transaction;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
package org.apache.openjpa.slice.transaction;
|
package org.apache.openjpa.slice.transaction;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
package org.apache.openjpa.slice.transaction;
|
package org.apache.openjpa.slice.transaction;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
<HTML>
|
<HTML>
|
||||||
<BODY>
|
<BODY>
|
||||||
Implements TransactionManager to manage transactions across the database
|
Implements TransactionManager to manage transactions across the database
|
||||||
|
|
|
@ -1,3 +1,20 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
slice-not-found: No slice named "{0}" can be found. Available slices are "{1}"
|
slice-not-found: No slice named "{0}" can be found. Available slices are "{1}"
|
||||||
slice-no-url: Slice "{0}" has no database URL. Specify a valid database URL \
|
slice-no-url: Slice "{0}" has no database URL. Specify a valid database URL \
|
||||||
as the value of "slice.{0}.ConnectionURL" property. ConnectionURL is the \
|
as the value of "slice.{0}.ConnectionURL" property. ConnectionURL is the \
|
||||||
|
@ -31,7 +48,7 @@ slice-xa-disabled: Not all active slices "{0}" is XA-complaint and hence store \
|
||||||
global transaction but otherwise the atomic nature of commit across all \
|
global transaction but otherwise the atomic nature of commit across all \
|
||||||
slices is not guaranteed.
|
slices is not guaranteed.
|
||||||
two-phase: "{3}".{0}"(xid=[{4}]] Connection={1} XAConnection={2}
|
two-phase: "{3}".{0}"(xid=[{4}]] Connection={1} XAConnection={2}
|
||||||
factory-init: Starting {0}
|
factory-init: Starting OpenJPA Slice {0}
|
||||||
config-init: Configuring Slice {0}
|
config-init: Configuring Slice {0}
|
||||||
no-slice-names: Slice identifiers are not listed in [slice.Names] property. \
|
no-slice-names: Slice identifiers are not listed in [slice.Names] property. \
|
||||||
The configuration will be scanned to determine slice identifiers.
|
The configuration will be scanned to determine slice identifiers.
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
bad-policy-slice:Distribution policy "{0}" has returned invalid slice \
|
bad-policy-slice:Distribution policy "{0}" has returned invalid slice \
|
||||||
"{1}" for "{2}". The valid slices are {3}. This error may happen \
|
"{1}" for "{2}". The valid slices are {3}. This error may happen \
|
||||||
when one or more of the originally configured slices are unavailable \
|
when one or more of the originally configured slices are unavailable \
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
no-txn-on-thread: No transaction is associated with current thread "{0}"
|
no-txn-on-thread: No transaction is associated with current thread "{0}"
|
||||||
prepare-failed: one or more XA-complaint resources have failed to prepare for \
|
prepare-failed: one or more XA-complaint resources have failed to prepare for \
|
||||||
commit during the first phase of a two-phase commit protocol.
|
commit during the first phase of a two-phase commit protocol.
|
Loading…
Reference in New Issue