You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cs...@apache.org on 2018/12/03 14:56:18 UTC

[aries-jpa] branch master updated: ARIES-1869 - Warning in the example about issue in karaf 4.2.1

This is an automated email from the ASF dual-hosted git repository.

cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-jpa.git


The following commit(s) were added to refs/heads/master by this push:
     new c16e5d4  ARIES-1869 - Warning in the example about issue in karaf 4.2.1
c16e5d4 is described below

commit c16e5d48287b82eedb853a47abe9db0208ff534a
Author: Christian Schneider <cs...@adobe.com>
AuthorDate: Mon Dec 3 15:56:08 2018 +0100

    ARIES-1869 - Warning in the example about issue in karaf 4.2.1
---
 .gitignore                                              |  1 +
 examples/README.md                                      | 17 +++++++++++++----
 .../src/main/resources/OSGI-INF/blueprint/context.xml   |  6 +++---
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index 7117e06..24e82e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ target/
 .classpath
 .settings
 .project
+.DS_Store
diff --git a/examples/README.md b/examples/README.md
index 6d1a580..56e740a 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,6 +1,9 @@
 # Installation instructions for jpa-examples
 
-Install at least Karaf 4.2.1
+Install at least Karaf 4.1.2 or 4.2.2.
+
+The blueprint example does not work in karaf 4.2.0 and 4.2.1. They deploy blueprint core 1.9.0 which has a severe [bug regarding
+interceptors](https://issues.apache.org/jira/browse/ARIES-1793). 
 
 ## Copy DataSource config
 ```
@@ -9,30 +12,36 @@ cat https://raw.githubusercontent.com/apache/aries-jpa/master/examples/org.ops4j
 
 ## Install features
 ```
-feature:repo-add mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.3.1/xml/features
+feature:repo-add pax-jdbc 1.3.1
 feature:install scr transaction pax-jdbc-config pax-jdbc-h2 pax-jdbc-pool-dbcp2 http-whiteboard jpa hibernate
 ```
 
-# Closure based example. (Make sure to start karaf with JDK 8)
+### Closure based example. (Make sure to start karaf with JDK 8)
 ```
 install -s mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.model/2.7.0
 install -s mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.ds/2.7.0
 ```
 
-# Blueprint based example
+### Blueprint based example
 ```
 feature:install aries-blueprint
 install -s mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.model/2.7.0
 install -s mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.blueprint/2.7.0
 ```
 
+## Validate example
+
 After installing the examples you can check for the services.
 
+```
 service:list EntityManagerFactory
+```
 
 You should see a service for the persistence unit "tasklist".
 
+```
 service:list TaskService
+```
 
 You should see a service provided by either the tasklist.blueprint or tasklist.ds bundle depending on the example you installed.
 
diff --git a/examples/tasklist-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml b/examples/tasklist-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
index 76d4fcd..8c687ba 100644
--- a/examples/tasklist-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
+++ b/examples/tasklist-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
@@ -19,12 +19,12 @@
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
     xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0"
-    xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0"
+    xmlns:tx="http://aries.apache.org/xmlns/transactions/v2.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
 
     <jpa:enable />
-    <tx:enable-annotations />
+    <tx:enable />
 
     <service ref="taskService" interface="org.apache.aries.jpa.example.tasklist.model.TaskService"/>
     <bean id="taskService" class="org.apache.aries.jpa.example.tasklist.blueprint.impl.TaskServiceImpl"/>
@@ -38,4 +38,4 @@
             <entry key="alias" value="/tasklist" />
         </service-properties>
     </service>
-</blueprint>
\ No newline at end of file
+</blueprint>