User: jung
Date: 00/12/04 04:35:55
Modified: src/de/infor/ce/util/test ThreadPool.java test.dfPackage
Log:
adopted to latest jboss container,
added decimal and date
removed some problems due to forward-referencing in meta-data
added serialisation policy
Revision Changes Path
1.2 +159 -155 zoap/src/de/infor/ce/util/test/ThreadPool.java
Index: ThreadPool.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/util/test/ThreadPool.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ThreadPool.java 2000/08/10 21:06:50 1.1
+++ ThreadPool.java 2000/12/04 12:35:54 1.2
@@ -1,158 +1,168 @@
-/*
- * $Id: ThreadPool.java,v 1.1 2000/08/10 21:06:50 jung Exp $
- * Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
- * D-66299 Friedrichsthal, Germany. All Rights Reserved.
- *
- * License Statement
- *
- * Redistribution and use of this software and associated documentation
("Software"), with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain copyright statements and
notices.
- * Redistributions must also contain a copy of this document.
- *
- * 2. Redistributions in binary form must reproduce the attached copyright
notice, this list of
- * conditions and the following disclaimer in the documentation and/or
other materials provided
- * with the distribution.
- *
- * 3. The end-user documentation included with the redistribution, if any,
must include the following
- * acknowledgment: "This product includes software developed by infor:
business solutions AG
- * (http://www.infor.de/)." Alternately, this acknowledgment may appear
in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The name "infor" must not be used to endorse or promote products
derived from this
- * Software without prior written permission of infor: business solutions
AG.
- * For written permission, please contact [EMAIL PROTECTED]
- *
- * 5. Products derived from this Software may not be called "infor" nor may
"infor" appear
- * in their names without prior written permission of infor: business
solutions AG. infor
- * is a registered trademark of infor:business solutions AG.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS
IS" AND ANY
- * EXPRESSED 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 INFOR: BUSINESS SOLUTIONS AG OR ITS 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.
- */
-
-package de.infor.ce.util.test;
-
-/**
- * A unit test for checking low-level features of the threadpool
- * @see <related>
- * @author $Author: jung $
- * @version $Revision: 1.1 $
- */
-
-public class ThreadPool extends junit.framework.TestCase {
-
- public ThreadPool(String name) {
- super(name);
- }
-
- public static void main(String[] args) {
-
- junit.textui.TestRunner runner=new junit.textui.TestRunner();
-
- try{
- runner.run(suite());
- } catch (Exception e) {
- }
- }
-
- public static junit.framework.Test suite() {
- return new junit.framework.TestSuite(ThreadPool.class);
- }
-
- de.infor.ce.util.ThreadPool threadPool;
-
- public void setUp() {
- threadPool=new de.infor.ce.util.ThreadPool(32,
- false,"pool",false);
- running=true;
- }
-
- public boolean running;
-
- class BadTask implements Runnable {
- public void run() {
-
- try{
- while(running) {
- synchronized(ThreadPool.this) {
- try{
- ThreadPool.this.wait(1000);
- } catch(InterruptedException e) {
- }
- }
- }
- } catch(Exception e) {
- fail("unknown exception thrown in BadTask.run()");
- }
- }
- }
-
-
- class GoodTask implements Runnable {
- public void run() {
- }
- }
-
- public void testThreadPoolBad() {
-
- for(int count=0; count<64; count++)
- threadPool.run(new BadTask());
-
- threadPool.run(new BadTask());
-
- threadPool.finalize();
-
- running=false;
-
- } // testHttp
-
- public void testThreadPoolGood() {
-
- for(int count=0; count<64; count++)
- threadPool.run(new GoodTask());
-
- threadPool.run(new GoodTask());
-
- threadPool.finalize();
-
- running=false;
-
- } // testHttp
-
- public void tearDown() {
- threadPool.finalize();
- running=false;
- }
-
-} // ThreadPool
-
-/*
+/*
+ * $Id: ThreadPool.java,v 1.2 2000/12/04 12:35:54 jung Exp $
+ * Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
+ * D-66299 Friedrichsthal, Germany. All Rights Reserved.
+ *
+ * License Statement
+ *
+ * Redistribution and use of this software and associated documentation
("Software"), with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain copyright statements and
notices.
+ * Redistributions must also contain a copy of this document.
+ *
+ * 2. Redistributions in binary form must reproduce the attached copyright
notice, this list of
+ * conditions and the following disclaimer in the documentation and/or
other materials provided
+ * with the distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if any,
must include the following
+ * acknowledgment: "This product includes software developed by infor:
business solutions AG
+ * (http://www.infor.de/)." Alternately, this acknowledgment may appear
in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The name "infor" must not be used to endorse or promote products
derived from this
+ * Software without prior written permission of infor: business solutions
AG.
+ * For written permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this Software may not be called "infor" nor may
"infor" appear
+ * in their names without prior written permission of infor: business
solutions AG. infor
+ * is a registered trademark of infor:business solutions AG.
+ *
+ * Disclaimer
+ *
+ * THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS
IS" AND ANY
+ * EXPRESSED 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 INFOR: BUSINESS SOLUTIONS AG OR ITS 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.
+ */
+
+package de.infor.ce.util.test;
+
+/**
+ * A unit test for checking low-level features of the threadpool
+ * @see <related>
+ * @author $Author: jung $
+ * @version $Revision: 1.2 $
+ */
+
+public class ThreadPool extends junit.framework.TestCase {
+
+ public ThreadPool(String name) {
+ super(name);
+ }
+
+ public static void main(String[] args) {
+
+ junit.textui.TestRunner runner=new junit.textui.TestRunner();
+
+ try{
+ runner.run(suite());
+ } catch (Exception e) {
+ }
+ }
+
+ public static junit.framework.Test suite() {
+ return new junit.framework.TestSuite(ThreadPool.class);
+ }
+
+ de.infor.ce.util.ThreadPool threadPool;
+
+ public void setUp() {
+ threadPool=new de.infor.ce.util.ThreadPool(32,
+ false,"pool",false);
+ running=true;
+ }
+
+ public boolean running;
+
+ class BadTask implements Runnable {
+ public void run() {
+
+ try{
+ while(running) {
+ synchronized(ThreadPool.this) {
+ try{
+ ThreadPool.this.wait(1000);
+ } catch(InterruptedException e) {
+ }
+ }
+ }
+ } catch(Exception e) {
+ fail("unknown exception thrown in BadTask.run()");
+ }
+ }
+ }
+
+
+ class GoodTask implements Runnable {
+ public void run() {
+ }
+ }
+
+ public void testThreadPoolBad() {
+
+ for(int count=0; count<64; count++)
+ threadPool.run(new BadTask());
+
+ threadPool.run(new BadTask());
+
+ threadPool.finalize();
+
+ running=false;
+
+ } // testHttp
+
+ public void testThreadPoolGood() {
+
+ for(int count=0; count<64; count++)
+ threadPool.run(new GoodTask());
+
+ threadPool.run(new GoodTask());
+
+ threadPool.finalize();
+
+ running=false;
+
+ } // testHttp
+
+ public void tearDown() {
+ threadPool.finalize();
+ running=false;
+ }
+
+} // ThreadPool
+
+/*
* $Log: ThreadPool.java,v $
- * Revision 1.1 2000/08/10 21:06:50 jung
- * Initial revision
- *
- * Revision 1.1.2.1 2000/07/13 12:48:16 jung
- * added unit test directory for utils.
- *
- * added unit test for threadpool
- *
- * Revision 1.1.1.1 2000/07/06 14:11:27 jung
- * Import of a pre beta version of ZOAP source with a new directory structure,
- * ant-based make, apache-kind of license, etc.
- *
- * jars are coming later because of cvs-history reasons.
- *
- */
-
+ * Revision 1.2 2000/12/04 12:35:54 jung
+ * adopted to latest jboss container,
+ *
+ * added decimal and date
+ *
+ * removed some problems due to forward-referencing in meta-data
+ *
+ * added serialisation policy
+ *
+ * Revision 1.1.1.1 2000/08/10 21:06:50 jung
+ * Initial import.
+ *
+ *
+ * Revision 1.1.2.1 2000/07/13 12:48:16 jung
+ * added unit test directory for utils.
+ *
+ * added unit test for threadpool
+ *
+ * Revision 1.1.1.1 2000/07/06 14:11:27 jung
+ * Import of a pre beta version of ZOAP source with a new directory structure,
+ * ant-based make, apache-kind of license, etc.
+ *
+ * jars are coming later because of cvs-history reasons.
+ *
+ */
+
1.2 +27 -27 zoap/src/de/infor/ce/util/test/test.dfPackage
Index: test.dfPackage
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/de/infor/ce/util/test/test.dfPackage,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- test.dfPackage 2000/08/10 21:06:49 1.1
+++ test.dfPackage 2000/12/04 12:35:54 1.2
@@ -1,27 +1,27 @@
-package id2p4gtcamcwfvycamcygzi;
-
-/**
-@version 2.0
-@physicalPackage
-@__modelType diagram
-*/
-class diagram {
-/**
-@__ref <oiref:java#Class#de.infor.ce.util.test.ThreadPool:oiref><oihard>
-@__modelType reference
-*/
-class reference {
-}}/**
-@__tags
-@shapeType ClassDiagram
-*/
-class __tags {
-}/**
-@__options
-*/
-class __options {
-}/**
-@__positions
-*/
-class __positions {
-}
\ No newline at end of file
+package id2p4gtcamcwfvycamcygzi;
+
+/**
+@version 2.0
+@physicalPackage
+@__modelType diagram
+*/
+class diagram {
+/**
+@__ref <oiref:java#Class#de.infor.ce.util.test.ThreadPool:oiref><oihard>
+@__modelType reference
+*/
+class reference {
+}}/**
+@__tags
+@shapeType ClassDiagram
+*/
+class __tags {
+}/**
+@__options
+*/
+class __options {
+}/**
+@__positions
+*/
+class __positions {
+}