You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2015/02/27 18:03:16 UTC
[1/2] olingo-odata2 git commit: [OLINGO-580] Support JTA based
transactions in JPA processor
Repository: olingo-odata2
Updated Branches:
refs/heads/master 676aad45d -> c6e0a1a7e
[OLINGO-580] Support JTA based transactions in JPA processor
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/dee84cf6
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/dee84cf6
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/dee84cf6
Branch: refs/heads/master
Commit: dee84cf65981671ebdd09b2f6d932edbc463d772
Parents: 676aad4
Author: Michael Bolz <mi...@sap.com>
Authored: Fri Feb 27 10:02:44 2015 +0100
Committer: Michael Bolz <mi...@sap.com>
Committed: Fri Feb 27 10:02:44 2015 +0100
----------------------------------------------------------------------
.../jpa/processor/api/ODataJPAContext.java | 8 ++-
.../processor/api/ODataJPAServiceFactory.java | 29 ++++++++++-
.../jpa/processor/api/ODataJPATransaction.java | 48 +++++++++++++++++
.../jpa/processor/core/ODataJPAContextImpl.java | 6 +++
.../core/ODataJPAProcessorDefault.java | 7 +--
.../jpa/processor/core/access/data/JPALink.java | 9 ++--
.../core/access/data/JPAProcessorImpl.java | 14 ++---
.../core/ODataJPAProcessorDefaultTest.java | 12 +++++
.../core/access/data/JPAProcessorImplTest.java | 15 ++++++
.../ODataJPATransactionLocalDefault.java | 54 ++++++++++++++++++++
.../ref/web/JPAReferenceServiceFactory.java | 9 ++--
11 files changed, 191 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAContext.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAContext.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAContext.java
index 9a57bf3..0ec7ca7 100644
--- a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAContext.java
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAContext.java
@@ -218,7 +218,7 @@ public interface ODataJPAContext {
/**
* The method sets the server side paging object
- * @param an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.access.JPAPaging}
+ * @param paging an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.access.JPAPaging}
*/
public void setPaging(JPAPaging paging);
@@ -227,4 +227,10 @@ public interface ODataJPAContext {
* @return an instance of type {@link org.apache.olingo.odata2.jpa.processor.api.access.JPAPaging}
*/
public JPAPaging getPaging();
+
+ /**
+ * The transaction context
+ * @return transaction context
+ */
+ public ODataJPATransaction getODataJpaTransaction();
}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAServiceFactory.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAServiceFactory.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAServiceFactory.java
index 709a048..ba1248e 100644
--- a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAServiceFactory.java
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPAServiceFactory.java
@@ -81,6 +81,7 @@ public abstract class ODataJPAServiceFactory extends ODataServiceFactory {
private ODataContext oDataContext;
private boolean setDetailErrors = false;
private OnJPAWriteContent onJPAWriteContent = null;
+ private ODataJPATransaction oDataJPATransaction = null;
/**
* Creates an OData Service based on the values set in
@@ -201,7 +202,33 @@ public abstract class ODataJPAServiceFactory extends ODataServiceFactory {
return (T) onJPAWriteContent;
}
}
- return null;
+
+ if (oDataJPATransaction != null) {
+ if (callbackInterface.isAssignableFrom(ODataJPATransaction.class)) {
+ return (T) oDataJPATransaction;
+ }
+ }
+
+
+ return null;
}
+ /**
+ * The methods sets the context with a callback implementation for JPA transaction specific content.
+ * For details refer to {@link ODataJPATransaction}
+ * @param oDataJPATransaction is an instance of type
+ * {@link org.apache.olingo.odata2.jpa.processor.api.ODataJPATransaction}
+ */
+ protected void setODataJPATransaction(final ODataJPATransaction oDataJPATransaction) {
+ this.oDataJPATransaction = oDataJPATransaction;
+ }
+
+ /**
+ * Simple method to retrieve the current ODataJPATransactionContext optimized for fast access
+ *
+ * @return the current ODataJPATransaction
+ */
+ public ODataJPATransaction getDataJPATransaction() {
+ return oDataJPATransaction;
+ }
}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATransaction.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATransaction.java b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATransaction.java
new file mode 100644
index 0000000..605e5d7
--- /dev/null
+++ b/odata2-jpa-processor/jpa-api/src/main/java/org/apache/olingo/odata2/jpa/processor/api/ODataJPATransaction.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * 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.olingo.odata2.jpa.processor.api;
+
+import org.apache.olingo.odata2.api.ODataCallback;
+
+/**
+ * Interface for JPA-Transaction abstraction. Default implementation is Resource local, while additional
+ * an override may used to insert JTA compatible transactions as well.
+ *
+ */
+public interface ODataJPATransaction extends ODataCallback {
+ /**
+ * implement the start of the transaction
+ */
+ public void begin();
+
+ /**
+ * implement the commit of the transaction
+ */
+ public void commit();
+
+ /**
+ * implement the rollback of the transaction
+ */
+ public void rollback();
+
+ /**
+ * implement status of the transaction context
+ */
+ public boolean isActive();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAContextImpl.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAContextImpl.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAContextImpl.java
index 43f1850..66d0ff0 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAContextImpl.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAContextImpl.java
@@ -25,6 +25,7 @@ import org.apache.olingo.odata2.api.edm.provider.EdmProvider;
import org.apache.olingo.odata2.api.processor.ODataContext;
import org.apache.olingo.odata2.api.processor.ODataProcessor;
import org.apache.olingo.odata2.jpa.processor.api.ODataJPAContext;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATransaction;
import org.apache.olingo.odata2.jpa.processor.api.access.JPAPaging;
import org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmExtension;
@@ -166,4 +167,9 @@ public class ODataJPAContextImpl implements ODataJPAContext {
public JPAPaging getPaging() {
return jpaPaging;
}
+
+ @Override
+ public ODataJPATransaction getODataJpaTransaction() {
+ return odataContext.getServiceFactory().getCallback(ODataJPATransaction.class);
+ }
}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefault.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefault.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefault.java
index 6b1f40b..2d4e37e 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefault.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefault.java
@@ -264,21 +264,22 @@ public class ODataJPAProcessorDefault extends ODataJPAProcessor {
throws ODataException {
List<ODataResponse> responses = new ArrayList<ODataResponse>();
try {
- oDataJPAContext.getEntityManager().getTransaction().begin();
+ oDataJPAContext.getODataJpaTransaction().begin();
for (ODataRequest request : requests) {
oDataJPAContext.setODataContext(getContext());
ODataResponse response = handler.handleRequest(request);
if (response.getStatus().getStatusCode() >= HttpStatusCodes.BAD_REQUEST.getStatusCode()) {
// Rollback
- oDataJPAContext.getEntityManager().getTransaction().rollback();
+ oDataJPAContext.getODataJpaTransaction().rollback();
List<ODataResponse> errorResponses = new ArrayList<ODataResponse>(1);
errorResponses.add(response);
return BatchResponsePart.responses(errorResponses).changeSet(false).build();
}
responses.add(response);
}
- oDataJPAContext.getEntityManager().getTransaction().commit();
+ oDataJPAContext.getODataJpaTransaction().commit();
+
return BatchResponsePart.responses(responses).changeSet(true).build();
} catch (Exception e) {
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPALink.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPALink.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPALink.java
index 64bf56c..7e3ae73 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPALink.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPALink.java
@@ -27,7 +27,6 @@ import java.util.HashMap;
import java.util.List;
import javax.persistence.EntityManager;
-import javax.persistence.EntityTransaction;
import org.apache.olingo.odata2.api.edm.EdmEntitySet;
import org.apache.olingo.odata2.api.edm.EdmException;
@@ -44,6 +43,7 @@ import org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo;
import org.apache.olingo.odata2.api.uri.info.PostUriInfo;
import org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo;
import org.apache.olingo.odata2.jpa.processor.api.ODataJPAContext;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATransaction;
import org.apache.olingo.odata2.jpa.processor.api.access.JPAProcessor;
import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAModelException;
import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException;
@@ -149,10 +149,9 @@ public class JPALink {
public void save() {
EntityManager em = context.getEntityManager();
- EntityTransaction tx = em.getTransaction();
-
+ ODataJPATransaction tx = context.getODataJpaTransaction();
if (!tx.isActive()) {
- em.getTransaction().begin();
+ tx.begin();
if (sourceJPAEntity != null) {
em.persist(sourceJPAEntity);
}
@@ -160,7 +159,7 @@ public class JPALink {
em.persist(targetJPAEntity);
em.flush();
}
- em.getTransaction().commit();
+ tx.commit();
}
}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java
index d926daf..ef4d9dc 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImpl.java
@@ -26,7 +26,6 @@ import java.util.List;
import java.util.Map;
import javax.persistence.EntityManager;
-import javax.persistence.EntityTransaction;
import javax.persistence.Query;
import org.apache.olingo.odata2.api.commons.InlineCount;
@@ -50,6 +49,7 @@ import org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo;
import org.apache.olingo.odata2.jpa.processor.api.ODataJPAContext;
import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneContext;
import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneEntityListener;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATransaction;
import org.apache.olingo.odata2.jpa.processor.api.access.JPAFunction;
import org.apache.olingo.odata2.jpa.processor.api.access.JPAMethodContext;
import org.apache.olingo.odata2.jpa.processor.api.access.JPAProcessor;
@@ -355,7 +355,7 @@ public class JPAProcessorImpl implements JPAProcessor {
em.remove(selectedObject);
em.flush();
if (isLocalTransaction) {
- em.getTransaction().commit();
+ oDataJPAContext.getODataJpaTransaction().commit();
}
} catch (Exception e) {
@@ -456,7 +456,7 @@ public class JPAProcessorImpl implements JPAProcessor {
em.persist(jpaEntity);
if (em.contains(jpaEntity)) {
if (isLocalTransaction) {
- em.getTransaction().commit();
+ oDataJPAContext.getODataJpaTransaction().commit();
}
return jpaEntity;
}
@@ -507,7 +507,7 @@ public class JPAProcessorImpl implements JPAProcessor {
}
em.flush();
if (isLocalTransaction) {
- em.getTransaction().commit();
+ oDataJPAContext.getODataJpaTransaction().commit();
}
} catch (Exception e) {
throw ODataJPARuntimeException.throwException(
@@ -572,9 +572,9 @@ public class JPAProcessorImpl implements JPAProcessor {
}
private boolean setTransaction() {
- final EntityTransaction transaction = em.getTransaction();
- if (!transaction.isActive()) {
- em.getTransaction().begin();
+ ODataJPATransaction transactionContext = oDataJPAContext.getODataJpaTransaction();
+ if (!transactionContext.isActive()) {
+ transactionContext.begin();
return true;
}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefaultTest.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefaultTest.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefaultTest.java
index 8733181..195559e 100644
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefaultTest.java
+++ b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAProcessorDefaultTest.java
@@ -67,6 +67,7 @@ import org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo;
import org.apache.olingo.odata2.api.uri.info.PostUriInfo;
import org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo;
import org.apache.olingo.odata2.jpa.processor.api.ODataJPAContext;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATransaction;
import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAModelException;
import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException;
import org.apache.olingo.odata2.jpa.processor.core.common.ODataJPATestConstants;
@@ -320,6 +321,7 @@ public class ODataJPAProcessorDefaultTest extends JPAEdmTestModelView {
ODataJPAContext odataJPAContext = EasyMock.createMock(ODataJPAContext.class);
EasyMock.expect(odataJPAContext.getPersistenceUnitName()).andStubReturn("salesorderprocessing");
EasyMock.expect(odataJPAContext.getEntityManagerFactory()).andStubReturn(mockEntityManagerFactory());
+ EasyMock.expect(odataJPAContext.getODataJpaTransaction()).andStubReturn(getLocalJpaTransaction());
EasyMock.expect(odataJPAContext.getODataContext()).andStubReturn(getLocalODataContext());
odataJPAContext.setODataContext((ODataContext) EasyMock.anyObject());
EasyMock.expectLastCall().anyTimes();
@@ -328,6 +330,16 @@ public class ODataJPAProcessorDefaultTest extends JPAEdmTestModelView {
return odataJPAContext;
}
+ private ODataJPATransaction getLocalJpaTransaction() {
+ ODataJPATransaction tx = EasyMock.createMock(ODataJPATransaction.class);
+ tx.begin(); // testing void method
+ tx.commit();// testing void method
+ tx.rollback();// testing void method
+ EasyMock.expect(tx.isActive()).andReturn(false);
+ EasyMock.replay(tx);
+ return tx;
+ }
+
private EntityManagerFactory mockEntityManagerFactory() {
EntityManagerFactory emf = EasyMock.createMock(EntityManagerFactory.class);
EasyMock.expect(emf.getMetamodel()).andStubReturn(mockMetaModel());
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImplTest.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImplTest.java b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImplTest.java
index f370c26..05afa5f 100644
--- a/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImplTest.java
+++ b/odata2-jpa-processor/jpa-core/src/test/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAProcessorImplTest.java
@@ -67,6 +67,7 @@ import org.apache.olingo.odata2.api.uri.info.GetEntityCountUriInfo;
import org.apache.olingo.odata2.api.uri.info.GetEntitySetCountUriInfo;
import org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo;
import org.apache.olingo.odata2.jpa.processor.api.ODataJPAContext;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATransaction;
import org.apache.olingo.odata2.jpa.processor.api.access.JPAPaging;
import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAModelException;
import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException;
@@ -285,6 +286,7 @@ public class JPAProcessorImplTest {
ODataJPAContext odataJPAContext = EasyMock.createMock(ODataJPAContext.class);
EasyMock.expect(odataJPAContext.getPersistenceUnitName()).andStubReturn("salesorderprocessing");
EasyMock.expect(odataJPAContext.getEntityManagerFactory()).andStubReturn(mockEntityManagerFactory());
+ EasyMock.expect(odataJPAContext.getODataJpaTransaction()).andStubReturn(getLocalJpaTransaction());
EasyMock.expect(odataJPAContext.getODataContext()).andStubReturn(getLocalODataContext());
EasyMock.expect(odataJPAContext.getEntityManager()).andStubReturn(getLocalEntityManager());
EasyMock.expect(odataJPAContext.getPageSize()).andReturn(10).anyTimes();
@@ -294,6 +296,19 @@ public class JPAProcessorImplTest {
return odataJPAContext;
}
+ private ODataJPATransaction getLocalJpaTransaction() {
+ ODataJPATransaction tx = EasyMock.createMock(ODataJPATransaction.class);
+ EasyMock.expect(tx.isActive()).andReturn(false);
+ tx.begin(); // testing void method
+ tx.commit();// testing void method
+ EasyMock.expect(tx.isActive()).andReturn(false);
+ tx.begin(); // testing void method
+ tx.commit();// testing void method
+ EasyMock.replay(tx);
+ return tx;
+ }
+
+
private EntityManagerFactory mockEntityManagerFactory() {
EntityManagerFactory emf = EasyMock.createMock(EntityManagerFactory.class);
EasyMock.expect(emf.getMetamodel()).andStubReturn(mockMetaModel());
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/extension/ODataJPATransactionLocalDefault.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/extension/ODataJPATransactionLocalDefault.java b/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/extension/ODataJPATransactionLocalDefault.java
new file mode 100644
index 0000000..9291962
--- /dev/null
+++ b/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/extension/ODataJPATransactionLocalDefault.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.olingo.odata2.jpa.processor.ref.extension;
+
+
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATransaction;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
+
+public class ODataJPATransactionLocalDefault implements ODataJPATransaction {
+
+ private EntityTransaction tx = null;
+
+ public ODataJPATransactionLocalDefault(EntityManager em) {
+ this.tx = em.getTransaction();
+ }
+
+ @Override
+ public void begin() {
+ tx.begin();
+ }
+
+ @Override
+ public void commit() {
+ tx.commit();
+ }
+
+ @Override
+ public void rollback() {
+ tx.rollback();
+ }
+
+ @Override
+ public boolean isActive() {
+ return tx.isActive();
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/dee84cf6/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/web/JPAReferenceServiceFactory.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/web/JPAReferenceServiceFactory.java b/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/web/JPAReferenceServiceFactory.java
index 256ffdd..9452535 100644
--- a/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/web/JPAReferenceServiceFactory.java
+++ b/odata2-jpa-processor/jpa-web/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/web/JPAReferenceServiceFactory.java
@@ -25,6 +25,7 @@ import org.apache.olingo.odata2.jpa.processor.api.ODataJPAServiceFactory;
import org.apache.olingo.odata2.jpa.processor.api.OnJPAWriteContent;
import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException;
import org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmExtension;
+import org.apache.olingo.odata2.jpa.processor.ref.extension.ODataJPATransactionLocalDefault;
import org.apache.olingo.odata2.jpa.processor.ref.extension.OnDBWriteContent;
import org.apache.olingo.odata2.jpa.processor.ref.extension.SalesOrderProcessingExtension;
import org.apache.olingo.odata2.jpa.processor.ref.factory.JPAEntityManagerFactory;
@@ -44,19 +45,21 @@ public class JPAReferenceServiceFactory extends ODataJPAServiceFactory {
oDataJPAContext.setEntityManagerFactory(JPAEntityManagerFactory.getEntityManagerFactory(PUNIT_NAME));
oDataJPAContext.setPersistenceUnitName(PUNIT_NAME);
oDataJPAContext.setJPAEdmMappingModel(MAPPING_MODEL);
- oDataJPAContext
- .setJPAEdmExtension((JPAEdmExtension) new SalesOrderProcessingExtension());
+ oDataJPAContext.setJPAEdmExtension(new SalesOrderProcessingExtension());
oDataJPAContext.setPageSize(PAGE_SIZE);
oDataJPAContext.setDefaultNaming(false);
setErrorLevel();
setOnWriteJPAContent(onDBWriteContent);
+ if(getDataJPATransaction() == null) {
+ setODataJPATransaction(new ODataJPATransactionLocalDefault(getODataJPAContext().getEntityManager()));
+ }
return oDataJPAContext;
}
private void setErrorLevel() {
ResourceBundle config = ResourceBundle.getBundle(CONFIG);
- boolean error = Boolean.parseBoolean((String) config.getObject(SHOW_DETAIL_ERROR));
+ boolean error = Boolean.parseBoolean(config.getString(SHOW_DETAIL_ERROR));
setDetailErrors(error);
}
}
[2/2] olingo-odata2 git commit: [OLINGO-588] Set version to 2.0.3-RC01
Posted by mi...@apache.org.
[OLINGO-588] Set version to 2.0.3-RC01
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/c6e0a1a7
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/c6e0a1a7
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/c6e0a1a7
Branch: refs/heads/master
Commit: c6e0a1a7e93e1aba4a5e51e6693d49f1479e888c
Parents: dee84cf
Author: Michael Bolz <mi...@sap.com>
Authored: Fri Feb 27 10:55:53 2015 +0100
Committer: Michael Bolz <mi...@sap.com>
Committed: Fri Feb 27 17:59:21 2015 +0100
----------------------------------------------------------------------
odata2-annotation-processor/annotation-processor-api/pom.xml | 2 +-
odata2-annotation-processor/annotation-processor-core/pom.xml | 2 +-
odata2-annotation-processor/annotation-processor-ref/pom.xml | 2 +-
odata2-annotation-processor/annotation-processor-web/pom.xml | 2 +-
odata2-annotation-processor/pom.xml | 2 +-
odata2-dist/janos/pom.xml | 2 +-
odata2-dist/javadoc/pom.xml | 2 +-
odata2-dist/jpa/pom.xml | 2 +-
odata2-dist/lib/pom.xml | 2 +-
odata2-dist/pom.xml | 2 +-
odata2-dist/ref/pom.xml | 2 +-
odata2-jpa-processor/jpa-api/pom.xml | 2 +-
odata2-jpa-processor/jpa-core/pom.xml | 2 +-
odata2-jpa-processor/jpa-ref/pom.xml | 2 +-
odata2-jpa-processor/jpa-web/pom.xml | 2 +-
odata2-jpa-processor/pom.xml | 2 +-
odata2-lib/odata-annotation/pom.xml | 2 +-
odata2-lib/odata-api/pom.xml | 2 +-
odata2-lib/odata-core/pom.xml | 2 +-
odata2-lib/odata-fit/pom.xml | 2 +-
odata2-lib/odata-ref/pom.xml | 2 +-
odata2-lib/odata-testutil/pom.xml | 2 +-
odata2-lib/odata-web/pom.xml | 2 +-
odata2-lib/pom.xml | 2 +-
odata2-sample/cars-annotation-archetype/pom.xml | 4 ++--
.../src/main/resources/archetype-resources/pom.xml | 2 +-
odata2-sample/cars-jpa-archetype/pom.xml | 2 +-
.../src/main/resources/archetype-resources/pom.xml | 2 +-
odata2-sample/cars-service-archetype/pom.xml | 4 ++--
.../src/main/resources/archetype-resources/pom.xml | 2 +-
odata2-sample/pom.xml | 2 +-
odata2-spring/pom.xml | 2 +-
pom.xml | 2 +-
33 files changed, 35 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-annotation-processor/annotation-processor-api/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-api/pom.xml b/odata2-annotation-processor/annotation-processor-api/pom.xml
index 58ff88e..9985354 100644
--- a/odata2-annotation-processor/annotation-processor-api/pom.xml
+++ b/odata2-annotation-processor/annotation-processor-api/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-annotation-processor</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-annotation-processor/annotation-processor-core/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-core/pom.xml b/odata2-annotation-processor/annotation-processor-core/pom.xml
index 6358623..23ccd05 100644
--- a/odata2-annotation-processor/annotation-processor-core/pom.xml
+++ b/odata2-annotation-processor/annotation-processor-core/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-annotation-processor</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-annotation-processor/annotation-processor-ref/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-ref/pom.xml b/odata2-annotation-processor/annotation-processor-ref/pom.xml
index f9185cd..0cfd169 100644
--- a/odata2-annotation-processor/annotation-processor-ref/pom.xml
+++ b/odata2-annotation-processor/annotation-processor-ref/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-annotation-processor</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-annotation-processor/annotation-processor-web/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-web/pom.xml b/odata2-annotation-processor/annotation-processor-web/pom.xml
index e2db3e1..468cf59 100644
--- a/odata2-annotation-processor/annotation-processor-web/pom.xml
+++ b/odata2-annotation-processor/annotation-processor-web/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-annotation-processor</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-annotation-processor/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/pom.xml b/odata2-annotation-processor/pom.xml
index dd83a77..ac4ed1f 100644
--- a/odata2-annotation-processor/pom.xml
+++ b/odata2-annotation-processor/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-dist/janos/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-dist/janos/pom.xml b/odata2-dist/janos/pom.xml
index 2eb1d6c..d197ce0 100644
--- a/odata2-dist/janos/pom.xml
+++ b/odata2-dist/janos/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-dist</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-dist/javadoc/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-dist/javadoc/pom.xml b/odata2-dist/javadoc/pom.xml
index f880571..a1a229f 100644
--- a/odata2-dist/javadoc/pom.xml
+++ b/odata2-dist/javadoc/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-dist</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-dist/jpa/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-dist/jpa/pom.xml b/odata2-dist/jpa/pom.xml
index ed8a769..b3e6278 100644
--- a/odata2-dist/jpa/pom.xml
+++ b/odata2-dist/jpa/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-dist</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-dist/lib/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-dist/lib/pom.xml b/odata2-dist/lib/pom.xml
index ba3abec..ebf0646 100644
--- a/odata2-dist/lib/pom.xml
+++ b/odata2-dist/lib/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-dist</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-dist/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-dist/pom.xml b/odata2-dist/pom.xml
index 198a671..4719db7 100644
--- a/odata2-dist/pom.xml
+++ b/odata2-dist/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-dist/ref/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-dist/ref/pom.xml b/odata2-dist/ref/pom.xml
index b5e93d9..2a01b52 100644
--- a/odata2-dist/ref/pom.xml
+++ b/odata2-dist/ref/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-dist</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-jpa-processor/jpa-api/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-api/pom.xml b/odata2-jpa-processor/jpa-api/pom.xml
index d29fde7..b8366ea 100644
--- a/odata2-jpa-processor/jpa-api/pom.xml
+++ b/odata2-jpa-processor/jpa-api/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-jpa-processor</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-jpa-processor/jpa-core/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-core/pom.xml b/odata2-jpa-processor/jpa-core/pom.xml
index dde7df3..4fa7352 100644
--- a/odata2-jpa-processor/jpa-core/pom.xml
+++ b/odata2-jpa-processor/jpa-core/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-jpa-processor</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-jpa-processor/jpa-ref/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/pom.xml b/odata2-jpa-processor/jpa-ref/pom.xml
index 9f2f706..f755955 100644
--- a/odata2-jpa-processor/jpa-ref/pom.xml
+++ b/odata2-jpa-processor/jpa-ref/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-jpa-processor</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-jpa-processor/jpa-web/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-web/pom.xml b/odata2-jpa-processor/jpa-web/pom.xml
index 0e4cea0..6bc7081 100644
--- a/odata2-jpa-processor/jpa-web/pom.xml
+++ b/odata2-jpa-processor/jpa-web/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-jpa-processor</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-jpa-processor/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/pom.xml b/odata2-jpa-processor/pom.xml
index c490798..c4a520d 100644
--- a/odata2-jpa-processor/pom.xml
+++ b/odata2-jpa-processor/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-lib/odata-annotation/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-annotation/pom.xml b/odata2-lib/odata-annotation/pom.xml
index 353d291..c437fc6 100644
--- a/odata2-lib/odata-annotation/pom.xml
+++ b/odata2-lib/odata-annotation/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-lib</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-lib/odata-api/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-api/pom.xml b/odata2-lib/odata-api/pom.xml
index 23b01cd..685479b 100644
--- a/odata2-lib/odata-api/pom.xml
+++ b/odata2-lib/odata-api/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-lib</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-lib/odata-core/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-core/pom.xml b/odata2-lib/odata-core/pom.xml
index 63fbf95..b809753 100644
--- a/odata2-lib/odata-core/pom.xml
+++ b/odata2-lib/odata-core/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-lib</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-lib/odata-fit/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-fit/pom.xml b/odata2-lib/odata-fit/pom.xml
index c6f88a7..6a1e6a1 100644
--- a/odata2-lib/odata-fit/pom.xml
+++ b/odata2-lib/odata-fit/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-lib</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-lib/odata-ref/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-ref/pom.xml b/odata2-lib/odata-ref/pom.xml
index 1c2b5f3..4ae612f 100644
--- a/odata2-lib/odata-ref/pom.xml
+++ b/odata2-lib/odata-ref/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-lib</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-lib/odata-testutil/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-testutil/pom.xml b/odata2-lib/odata-testutil/pom.xml
index 23013b4..fe880e3 100644
--- a/odata2-lib/odata-testutil/pom.xml
+++ b/odata2-lib/odata-testutil/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-lib</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-lib/odata-web/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-web/pom.xml b/odata2-lib/odata-web/pom.xml
index 34c0448..d307b6a 100644
--- a/odata2-lib/odata-web/pom.xml
+++ b/odata2-lib/odata-web/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-lib</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-lib/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/pom.xml b/odata2-lib/pom.xml
index e2fa1b0..91994eb 100644
--- a/odata2-lib/pom.xml
+++ b/odata2-lib/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-sample/cars-annotation-archetype/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-sample/cars-annotation-archetype/pom.xml b/odata2-sample/cars-annotation-archetype/pom.xml
index 9819d48..993b913 100644
--- a/odata2-sample/cars-annotation-archetype/pom.xml
+++ b/odata2-sample/cars-annotation-archetype/pom.xml
@@ -16,13 +16,13 @@
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-sample-cars-annotation-archetype</artifactId>
<name>${project.artifactId}</name>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<packaging>maven-archetype</packaging>
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-sample</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-sample/cars-annotation-archetype/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-sample/cars-annotation-archetype/src/main/resources/archetype-resources/pom.xml b/odata2-sample/cars-annotation-archetype/src/main/resources/archetype-resources/pom.xml
index 3a02eb3..dc58e63 100644
--- a/odata2-sample/cars-annotation-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/odata2-sample/cars-annotation-archetype/src/main/resources/archetype-resources/pom.xml
@@ -32,7 +32,7 @@
<version.servlet-api>2.5</version.servlet-api>
<version.jaxrs-api>2.0-m10</version.jaxrs-api>
<version.slf4j>1.7.1</version.slf4j>
- <version.olingo>2.0.3-SNAPSHOT</version.olingo>
+ <version.olingo>2.0.3-RC01</version.olingo>
</properties>
<build>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-sample/cars-jpa-archetype/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-sample/cars-jpa-archetype/pom.xml b/odata2-sample/cars-jpa-archetype/pom.xml
index b3a0085..9059c2f 100644
--- a/odata2-sample/cars-jpa-archetype/pom.xml
+++ b/odata2-sample/cars-jpa-archetype/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-sample</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-sample/cars-jpa-archetype/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-sample/cars-jpa-archetype/src/main/resources/archetype-resources/pom.xml b/odata2-sample/cars-jpa-archetype/src/main/resources/archetype-resources/pom.xml
index ae916f3..e3b3139 100644
--- a/odata2-sample/cars-jpa-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/odata2-sample/cars-jpa-archetype/src/main/resources/archetype-resources/pom.xml
@@ -22,7 +22,7 @@
<version.cxf>2.7.6</version.cxf>
<version.eclipselink>2.5.1</version.eclipselink>
<version.javax.persistence>2.0.5</version.javax.persistence>
- <version.olingo>2.0.3-SNAPSHOT</version.olingo>
+ <version.olingo>2.0.3-RC01</version.olingo>
</properties>
<dependencies>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-sample/cars-service-archetype/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-sample/cars-service-archetype/pom.xml b/odata2-sample/cars-service-archetype/pom.xml
index de48638..17c04c9 100644
--- a/odata2-sample/cars-service-archetype/pom.xml
+++ b/odata2-sample/cars-service-archetype/pom.xml
@@ -24,14 +24,14 @@
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-sample-cars-service-archetype</artifactId>
<name>${project.artifactId}</name>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<packaging>maven-archetype</packaging>
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-sample</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-sample/cars-service-archetype/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-sample/cars-service-archetype/src/main/resources/archetype-resources/pom.xml b/odata2-sample/cars-service-archetype/src/main/resources/archetype-resources/pom.xml
index c93c2d4..3659cc6 100644
--- a/odata2-sample/cars-service-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/odata2-sample/cars-service-archetype/src/main/resources/archetype-resources/pom.xml
@@ -20,7 +20,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.cxf>2.7.6</version.cxf>
<version.slf4j>1.7.1</version.slf4j>
- <version.olingo>2.0.3-SNAPSHOT</version.olingo>
+ <version.olingo>2.0.3-RC01</version.olingo>
</properties>
<build>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-sample/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-sample/pom.xml b/odata2-sample/pom.xml
index d9829a3..08d4e0f 100644
--- a/odata2-sample/pom.xml
+++ b/odata2-sample/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<relativePath>..</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/odata2-spring/pom.xml
----------------------------------------------------------------------
diff --git a/odata2-spring/pom.xml b/odata2-spring/pom.xml
index 7f5dbcf..ceb268d 100755
--- a/odata2-spring/pom.xml
+++ b/odata2-spring/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
</parent>
<dependencies>
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/c6e0a1a7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index bd6819d..7bc3db6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3-RC01</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>