[Jpackage-commits] dist/jboss-serialization/devel .cvsignore, 1.1, 1.2 jboss-serialization-MockHibernateSession.patch, NONE, 1.1 jboss-serialization-ProxySerializationTestCase.patch, NONE, 1.1 jboss-serialization-build_xml.patch, NONE, 1.1 jboss-serialization.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 20:51:35 CEST 2008


Update of /home/projects/jpackage/cvs/dist/jboss-serialization/devel
In directory ryu.zarb.org:/tmp/cvs-serv14841/devel

Modified Files:
	.cvsignore sources 
Added Files:
	jboss-serialization-MockHibernateSession.patch 
	jboss-serialization-ProxySerializationTestCase.patch 
	jboss-serialization-build_xml.patch jboss-serialization.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jboss-serialization/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 18:50:26 -0000	1.1
--- .cvsignore	28 May 2008 18:51:33 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ jboss-serialization-1.0.0.GA-src.tar.gz

--- NEW FILE: jboss-serialization-build_xml.patch ---
--- build.xml.sav	2006-05-23 18:11:15.000000000 -0400
+++ build.xml	2006-06-12 08:48:34.000000000 -0400
@@ -43,21 +43,38 @@
 	</target>
 
 	<target name="compile-15"  if="HAVE_JDK_1.5">
-		<javac srcdir="${src-jdk15}"  destdir="${build.classesdir}" classpathref="build.classpath" compiler="modern" debug="on" optimize="true" target="1.4" source="1.4"/>
-		<javac srcdir="${tests-src-jdk15}"  destdir="${build.testsdir}" classpathref="build.classpath" compiler="modern" debug="on" optimize="true" target="1.5" source="1.5"/>
+		<antcall target="compile-15-main"/>
+		<antcall target="compile-15-tests"/>
 	</target>
 
 	<target name="compile" description="Compile all java files" depends="init">
+		<antcall target="compile-main"/>
+		<antcall target="compile-tests"/>
+		<antcall target="compile-15"/>
+	</target>
+
+	<target name="compile-main" description="Compile main java files" depends="init">
 		<javac srcdir="${src}"  destdir="${build.classesdir}" classpathref="build.classpath" compiler="modern" debug="on" optimize="true" target="1.4" source="1.4"/>
+		<antcall target="compile-15-main"/>
+	</target>
+
+	<target name="compile-tests" description="Compile test java files" depends="init">
 		<javac srcdir="${tests-src}"  destdir="${build.testsdir}" classpathref="build.classpath" compiler="modern" debug="on" optimize="true" target="1.4" source="1.4"/>
-		<antcall target="compile-15"/>
+	</target>
+
+	<target name="compile-15-main" description="Compile JDK15 main java files" depends="init">
+		<javac srcdir="${src-jdk15}"  destdir="${build.classesdir}" classpathref="build.classpath" compiler="modern" debug="on" optimize="true" target="1.4" source="1.4"/>
+	</target>
+
+	<target name="compile-15-tests" description="Compile JDK15 test java files" depends="init">
+		<javac srcdir="${tests-src-jdk15}"  destdir="${build.testsdir}" classpathref="build.classpath" compiler="modern" debug="on" optimize="true" target="1.5" source="1.5"/>
 	</target>
 
 	<target name="clean" description="Remove all the output files">
 		<delete dir="${build}" />
 	</target>
 
-	<target name="jar" depends="compile" description="Generates Serialization Package">
+	<target name="jar" depends="compile-main" description="Generates Serialization Package">
 		<mkdir dir="${assemble.jar}" />
 		<jar jarfile="${jar}">
 			<zipfileset dir="${build.classesdir}" />
@@ -167,6 +184,7 @@
         </receiver>
 
         <junit printsummary="true">
+            <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
             <classpath refid="build.classpath">
             </classpath>
             <!-- <jvmarg value="-XrunjbossInspector:c:/temp/tst,wakeupOnStartup=true"/> -->
@@ -242,6 +260,23 @@
 
     </target>
 
+  <target name="javadocs">
+    <javadoc packagenames="org.jboss.serial.*"
+           sourcepath="src"
+           classpathref="build.classpath"
+           defaultexcludes="yes"
+           locale="en_US"
+           destdir="build/api"
+           author="true"
+           version="true"
+           use="true"
+           public="true"
+           nohelp="true"
+           windowtitle="JBoss Serialization">
+      <doctitle><![CDATA[<h1>JBoss Serialization</h1>]]></doctitle>
+      <bottom><![CDATA[<i>JBoss Serialization, a new approach to java-serialization.</i>]]></bottom>
+    </javadoc>
+  </target>
 
 
 </project>

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jboss-serialization/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 18:50:26 -0000	1.1
--- sources	28 May 2008 18:51:33 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 2a1c4c7bea3222c15067b81c1207864b  jboss-serialization-1.0.0.GA-src.tar.gz

--- NEW FILE: jboss-serialization.spec ---
# Copyright (c) 2000-2005, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# If you don't want to run the unit tests
# give rpmbuild option '--without tests'

%define with_tests %{!?_without_tests:1}%{?_without_tests:0}
%define without_tests %{?_without_tests:1}%{!?_without_tests:0}

%define section		free

Summary:	JBoss Serialization
URL:		http://labs.jboss.com/portal/index.html?ctrl:id=page.default.info&project=serialization
Source0:	jboss-serialization-1.0.0.GA-src.tar.gz
# cvs -d:pserver:anonymous at anoncvs.forge.jboss.com:/cvsroot/jboss export -r JBSER_1_0_0_GA jboss-serialization
Patch0:		jboss-serialization-build_xml.patch
Patch1:		jboss-serialization-ProxySerializationTestCase.patch
Patch2:		jboss-serialization-MockHibernateSession.patch


Name:		jboss-serialization
Version:	1.0.0
Release:	4jpp
Epoch:		0
License:	LGPL
Group:		Development/Java
Vendor:		JPackage Project
Distribution:	JPackage
BuildArch:	noarch
BuildRequires:	jpackage-utils >= 0:1.6
BuildRequires:	java-devel >= 0:1.5
BuildRequires:	ant >= 0:1.6
BuildRequires:	asm
BuildRequires:	cglib
BuildRequires:	concurrent
BuildRequires:	jakarta-commons-logging
BuildRequires:	javassist
BuildRequires:	jboss4-common
BuildRequires:	jboss-aop
BuildRequires:	jboss-jrunit
BuildRequires:	jboss-profiler
%if %{with_tests}
BuildRequires:	jboss4-j2ee
BuildRequires:	jboss4-client
BuildRequires:	jboss-remoting
BuildRequires:	hibernate3
%endif
BuildRequires:	jcommon
BuildRequires:	jfreechart
BuildRequires:	jgroups >= 0:2.2.9.2
BuildRequires:	joda-time
BuildRequires:	junit
BuildRequires:	log4j
BuildRequires:	gnu-trove

Requires:	jpackage-utils >= 0:1.6
Requires:	log4j
Requires:	gnu-trove
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
We (java developers) have accepted over the years 
java.io.ObjectInputStream and java.io.ObjectOutputStream 
being slow when dealing with writeObject operations.
We then started using Externalizable objects as a faster 
approach for serialization, but even that way was slow when 
using writeObject operations inside externalizable classes.
Recently we discovered that most of the problems in 
JavaSerialization are related to static synchronized caching, 
what causes CPU spikes and also diminishes scaling capabilities.
With JBossSerialization we have done internal benchmarks and we 
have realized at least 2 times faster serialization with this 
library. These benchmarks are commited into our CVS repository 
(as testcases) and they are publicly available.
The main feature in JBossSerialization besides performance, is 
Smart Cloning. Smart cloning is the capability of the reuse of 
final fields among different class loaders doing exactly what 
serialization does, without the need of convert every field into 
a byteArray. This approach is at least 10 times faster than using 
serialization over a byte array.


%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation

%description javadoc
%{summary}

%prep
%setup -q -n %{name}-%{version}.GA-src
chmod -R go=u-w *
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done

%patch0 -b .sav
%patch1 -b .sav
%patch2 -b .sav

%build
pushd libs
#BUILD/jboss-serialization/libs/asm-attrs.jar.no
ln -sf $(build-classpath asm/asm-attrs) .
#BUILD/jboss-serialization/libs/asm.jar.no
ln -sf $(build-classpath asm/asm) .
#BUILD/jboss-serialization/libs/cglib-2.1_2jboss.jar.no
ln -sf $(build-classpath cglib) cglib-2.1_2jboss.jar
#BUILD/jboss-serialization/libs/commons-logging.jar.no
ln -sf $(build-classpath commons-logging) .
#BUILD/jboss-serialization/libs/concurrent.jar.no
ln -sf $(build-classpath concurrent) .
%if %{with_tests}
#BUILD/jboss-serialization/libs/hibernate3.jar.no
ln -sf $(build-classpath hibernate3) .
%endif
#BUILD/jboss-serialization/libs/javassist/lib/javassist.jar.no
pushd javassist/lib
ln -sf $(build-classpath javassist) .
popd
#BUILD/jboss-serialization/libs/jboss/aop/lib/common-softvaluehashmap.jar.no
#BUILD/jboss-serialization/libs/jboss/aop/lib/jboss-aop.jar.no
#BUILD/jboss-serialization/libs/jboss/aop/lib/jboss-aop-jdk50-client.jar.no
#BUILD/jboss-serialization/libs/jboss/aop/lib/jboss-aop-jdk50.jar.no
#BUILD/jboss-serialization/libs/jboss/aop/lib/jdk14-pluggable-instrumentor.jar.no
#BUILD/jboss-serialization/libs/jboss/aop/lib/jrockit-pluggable-instrumentor.jar.no
#BUILD/jboss-serialization/libs/jboss/aop/lib/pluggable-instrumentor.jar.no
pushd jboss/aop/lib
ln -sf $(build-classpath jboss-aop/jboss-aop) .
ln -sf $(build-classpath jboss-aop/jboss-aop-jdk50-client) .
ln -sf $(build-classpath jboss-aop/jboss-aop-jdk50) .
ln -sf $(build-classpath jboss-aop/jdk14-pluggable-instrumentor) .
ln -sf $(build-classpath jboss-aop/jrockit-pluggable-instrumentor) .
ln -sf $(build-classpath jboss-aop/pluggable-instrumentor) .
popd
#BUILD/jboss-serialization/libs/jboss-common.jar.no
ln -sf $(build-classpath jboss4/jboss-common) .
#BUILD/jboss-serialization/libs/jboss-profiler-jvmti.jar.no
ln -sf $(build-classpath jboss-profiler/jboss-profiler-jvmti) .
%if %{with_tests}
#BUILD/jboss-serialization/libs/jboss-client.jar.no
ln -sf $(build-classpath jboss4/jboss-client) .
#BUILD/jboss-serialization/libs/jboss-j2ee.jar.no
ln -sf $(build-classpath jboss4/jboss-j2ee) .
#BUILD/jboss-serialization/libs/jboss-remoting.jar.no
ln -sf $(build-classpath jboss-remoting) .
%endif
#BUILD/jboss-serialization/libs/jcommon-1.0.0-rc1.jar.no
ln -sf $(build-classpath jcommon) .
#BUILD/jboss-serialization/libs/jfreechart-1.0.0-rc1.jar.no
ln -sf $(build-classpath jfreechart) .
#BUILD/jboss-serialization/libs/jgroups.jar.no
ln -sf $(build-classpath jgroups) .
#BUILD/jboss-serialization/libs/joda-time-1.2.1.jar.no
ln -sf $(build-classpath joda-time) joda-time-1.2.1.jar
#BUILD/jboss-serialization/libs/jrunit.jar.no
ln -sf $(build-classpath jboss-jrunit) jrunit.jar
#BUILD/jboss-serialization/libs/junit.jar.no
ln -sf $(build-classpath junit) .
#BUILD/jboss-serialization/libs/log4j.jar.no
ln -sf $(build-classpath log4j) .
#BUILD/jboss-serialization/libs/profilerConsole.jar.no
ln -sf $(build-classpath jboss-profiler/profilerConsole) .
#BUILD/jboss-serialization/libs/trove.jar.no
ln -sf $(build-classpath gnu-trove) trove.jar
popd


%if %{with_tests}
export ANT_OPTS="-Djava.net.preferIPv4Stack=true"
export JAVA_HOME=/usr/lib/jvm/java-1.5.0
ant jar javadocs run-tests 
%else
ant jar javadocs
%endif


%install
rm -rf $RPM_BUILD_ROOT

# jar
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 0644 build/jar/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

# manual
install -d -m 0755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp docs/readme.txt   $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -sf %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
  rm -f %{_javadocdir}/%{name}
fi

%files
%defattr(-,root,root,-)
%{_javadir}/*
%doc %{_docdir}/%{name}-%{version}

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}

%changelog
* Thu Jul 13 2006 Ralph Apel <r.apel at r-apel.de> 0:1.0.0-4jpp
- Conditionalize libs for build with tests

* Wed Jul 12 2006 Ralph Apel <r.apel at r-apel.de> 0:1.0.0-3jpp
- Move jboss4-j2ee BR for build with tests

* Mon Jun 26 2006 Ralph Apel <r.apel at r-apel.de> 0:1.0.0-2jpp
- Fix (Build)Requires:

* Tue Jun 09 2006 Ralph Apel <r.apel at r-apel.de> 0:1.0.1-1jpp
- Upgrade to 1.0.0.GA

* Wed May 31 2006 Ralph Apel <r.apel at r-apel.de> 0:1.0.0-0.rc2.2jpp
- add -Djava.net.preferIPv4Stack=true on each JVM

* Wed May 03 2006 Ralph Apel <r.apel at r-apel.de> 0:1.0.0-0.rc2.1jpp
- First JPP-1.7 release

--- NEW FILE: jboss-serialization-ProxySerializationTestCase.patch ---
--- tests/org/jboss/serial/hibernatesession/ProxySerializationTestCase.java.sav	2006-06-09 09:00:17.000000000 +0200
+++ tests/org/jboss/serial/hibernatesession/ProxySerializationTestCase.java	2006-06-09 09:00:41.000000000 +0200
@@ -31,7 +31,7 @@
 
 import junit.framework.TestCase;
 
-import org.hibernate.proxy.CGLIBProxyFactory;
+import org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory;
 import org.hibernate.proxy.HibernateProxy;
 import org.hibernate.proxy.ProxyFactory;
 import org.jboss.serial.io.JBossObjectInputStream;

--- NEW FILE: jboss-serialization-MockHibernateSession.patch ---
--- tests/org/jboss/serial/hibernatesession/MockHibernateSession.java.sav	2006-02-24 21:33:11.000000000 +0100
+++ tests/org/jboss/serial/hibernatesession/MockHibernateSession.java	2006-06-09 09:09:40.000000000 +0200
@@ -249,6 +249,12 @@
 		return 0;
 	}
 
+        public int executeNativeUpdate(NativeSQLQuerySpecification specification, QueryParameters queryParameters)
+			throws HibernateException {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
 	public EntityMode getEntityMode() {
 		// TODO Auto-generated method stub
 		return null;
@@ -264,6 +270,11 @@
 
 	}
 
+	public boolean isClosed() {
+		// TODO Auto-generated method stub
+		return !isOpened;
+	}
+
 	public boolean isOpen() {
 		// TODO Auto-generated method stub
 		return isOpened;




More information about the JPackage-commits mailing list