[openjpa] - switch to java-headless (build)requires (rhbz#1068461) - remove websphere references
gil
gil at fedoraproject.org
Thu Feb 27 23:01:25 UTC 2014
commit 7face8d02f67d93e460ae28aad0dbbe0b340f40c
Author: gil <puntogil at libero.it>
Date: Fri Feb 28 00:01:56 2014 +0100
- switch to java-headless (build)requires (rhbz#1068461)
- remove websphere references
...pa-2.2.0-remove-WASRegistryManagedRuntime.patch | 59 ++++++++++++++++++++
openjpa.spec | 15 +++--
2 files changed, 69 insertions(+), 5 deletions(-)
---
diff --git a/openjpa-2.2.0-remove-WASRegistryManagedRuntime.patch b/openjpa-2.2.0-remove-WASRegistryManagedRuntime.patch
new file mode 100644
index 0000000..2381b12
--- /dev/null
+++ b/openjpa-2.2.0-remove-WASRegistryManagedRuntime.patch
@@ -0,0 +1,59 @@
+diff -Naur apache-openjpa-2.2.2-source/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java apache-openjpa-2.2.2-source.patch/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java
+--- apache-openjpa-2.2.2-source/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java 2013-04-16 17:04:10.000000000 -0500
++++ apache-openjpa-2.2.2-source.patch/openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java 2014-02-27 11:12:07.702000000 -0600
+@@ -78,7 +78,6 @@
+ private static final WLSManagedRuntime WLS;
+ private static final SunOneManagedRuntime SUNONE;
+ private static final WASManagedRuntime WAS;
+- private static final WASRegistryManagedRuntime WAS_REG;
+
+ private static Localizer _loc = Localizer.forPackage
+ (AutomaticManagedRuntime.class);
+@@ -117,26 +116,6 @@
+ } catch (Throwable t) {
+ }
+ WAS = (WASManagedRuntime) mr;
+-
+- mr = null;
+- try {
+- // In a WebSphere environment the thread's current classloader might
+- // not have access to the WebSphere APIs. However the "runtime"
+- // classloader will have access to them.
+-
+- // Should not need a doPriv getting this class' classloader
+- ClassLoader cl = AutomaticManagedRuntime.class.getClassLoader();
+-
+- Class<WASRegistryManagedRuntime> mrClass =
+- (Class<WASRegistryManagedRuntime>) J2DoPrivHelper
+- .getForNameAction(
+- WASRegistryManagedRuntime.class.getName(),
+- true, cl).run();
+- mr = J2DoPrivHelper.newInstanceAction(mrClass).run();
+- } catch (Throwable t) {
+- // safe to ignore
+- }
+- WAS_REG = (WASRegistryManagedRuntime) mr;
+ }
+
+ private Configuration _conf = null;
+@@ -150,20 +129,6 @@
+ List<Throwable> errors = new LinkedList<Throwable>();
+ TransactionManager tm = null;
+
+- // Try the registry extensions first so that any applicable vendor
+- // specific extensions are used.
+- if (WAS_REG != null) {
+- try {
+- tm = WAS_REG.getTransactionManager();
+- } catch (Throwable t) {
+- errors.add(t);
+- }
+- if (tm != null) {
+- _runtime = WAS_REG;
+- return tm;
+- }
+- }
+-
+ // Then try the registry, which is the official way to obtain
+ // transaction synchronication in JTA 1.1
+ if (REGISTRY != null) {
diff --git a/openjpa.spec b/openjpa.spec
index e0f85c2..e02ef89 100644
--- a/openjpa.spec
+++ b/openjpa.spec
@@ -3,15 +3,16 @@
Name: openjpa
Version: 2.2.2
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Java Persistence 2.0 API
-Group: Development/Libraries
# For a breakdown of the licensing, see NOTICE file
License: ASL 2.0 and CDDL
Url: http://openjpa.apache.org/
Source0: http://www.apache.org/dist/openjpa/%{version}/apache-%{name}-%{version}-source.zip
# fix test failure
Patch0: %{name}-2.2.0-persistence-jdbc-DynamicEnhancementSuite.patch
+# Thanks to Robert Rati
+Patch1: %{name}-2.2.0-remove-WASRegistryManagedRuntime.patch
BuildRequires: java-devel
@@ -99,6 +100,7 @@ find . -name "*.class" -delete
find . -name "*.jar" -delete
# openjpa-kernel/internal-repository/com/ibm/websphere/websphere_uow_api/0.0.1/websphere_uow_api-0.0.1.jar
%patch0 -p0
+%patch1 -p1
%pom_remove_plugin :docbkx-maven-plugin
%pom_remove_plugin :maven-checkstyle-plugin
@@ -130,10 +132,9 @@ find . -name "*.jar" -delete
<version>0.5</version>
</dependency>"
-%pom_remove_dep com.ibm.websphere:websphere_uow_api %{name}-kernel
+%pom_remove_dep com.ibm.websphere:websphere_uow_api openjpa-kernel
# require non free com.ibm.websphere websphere_uow_api 0.0.1
-rm %{name}-kernel/src/main/java/org/apache/openjpa/ee/WASRegistryManagedRuntime.java
-rm %{name}-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java
+rm openjpa-kernel/src/main/java/org/apache/openjpa/ee/WASRegistryManagedRuntime.java
for p in kernel persistence; do
%pom_remove_dep org.osgi:org.osgi.core %{name}-${p}
@@ -263,6 +264,10 @@ install -p -m 644 %{name}-ant %{buildroot}%{_sysconfdir}/ant.d/%{name}
%doc LICENSE NOTICE
%changelog
+* Thu Feb 27 2014 gil cattaneo <puntogil at libero.it> 2.2.2-7
+- switch to java-headless (build)requires (rhbz#1068461)
+- remove websphere references
+
* Mon Nov 18 2013 gil cattaneo <puntogil at libero.it> 2.2.2-6
- use objectweb-asm3
More information about the scm-commits
mailing list