[jboss-svn-commits] JBL Code SVN: r26108 - in labs/jbosstm/trunk/common: classes and 7 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Apr 17 08:28:15 EDT 2009
Author: jhalliday
Date: 2009-04-17 08:28:15 -0400 (Fri, 17 Apr 2009)
New Revision: 26108
Removed:
labs/jbosstm/trunk/common/Splash-screens/
labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/licence/
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/ClassPathParser.java
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/SharedTimer.java
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/VersionCheck.java
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/concurrency/Barrier.java
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/concurrency/Rendezvous.java
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/exceptions/PropertyManagerError.java
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/Environment.java
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/ListBundleNames.java
labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/NotSupportedException.java
labs/jbosstm/trunk/common/classes/org/
labs/jbosstm/trunk/common/lib/ext/mw-common.jar
labs/jbosstm/trunk/common/lib/ext/xercesImpl.jar
labs/jbosstm/trunk/common/lib/ext/xmlParserAPIs.jar
labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/util/concurrency/BarrierTest.java
labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/util/concurrency/RendezvousTest.java
Log:
Remove obsolete cruft from common module. JBTM-534
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/ClassPathParser.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/ClassPathParser.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/ClassPathParser.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,135 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
-* Copyright (C) 2001,
-*
-* Arjuna Solutions Limited,
-* Newcastle upon Tyne,
-* Tyne and Wear,
-* UK.
-*
-* $Id: ClassPathParser.java 2342 2006-03-30 13:06:17Z $
-*/
-
-package com.arjuna.common.util;
-
-import java.lang.StringIndexOutOfBoundsException;
-
-/**
- * This class parses the CLASSPATH and returns the directories used
- * within it.
- *
- * @author Mark Little (mark at arjuna.com)
- * @version $Id: ClassPathParser.java 2342 2006-03-30 13:06:17Z $
- * @since JTS 2.1.
- */
-
-public class ClassPathParser
-{
-
- public ClassPathParser ()
- {
- _classPath = System.getProperty("java.class.path");
- _start = 0;
- }
-
- /**
- * @return the directory path of the next entry in the CLASSPATH that
- * contains the specified string.
- */
-
- public final String getPath (String contains)
- {
- String toReturn = null;
-
- if ((_classPath != null) && (contains != null))
- {
- int indx = _classPath.indexOf(contains, _start);
-
- if (indx != -1)
- {
- int lastIndex = _classPath.indexOf(pathSeparator, _start);
- int sepIndex = lastIndex+1;
-
- if (lastIndex > indx) // at start of path?
- sepIndex = 0;
- else
- {
- while ((lastIndex < indx) && (lastIndex != -1))
- {
- lastIndex = _classPath.indexOf(pathSeparator, sepIndex);
-
- if (lastIndex == -1)
- lastIndex = _classPath.length();
- else
- {
- if (lastIndex < indx)
- sepIndex = lastIndex+1;
- }
- }
- }
-
- try
- {
- toReturn = _classPath.substring(sepIndex, lastIndex);
-
- _start = indx+1;
- }
- catch (StringIndexOutOfBoundsException e)
- {
- // nothing left!!
- }
- }
- }
-
- return toReturn;
- }
-
- /**
- * Reload the classpath and reset the class ready to re-parse.
- *
- * @return <code>true</code> if a non-null CLASSPATH was loaded,
- * <code>false</code> otherwise.
- */
-
- public final boolean reset ()
- {
- _classPath = System.getProperty("java.class.path");
-
- _start = 0;
-
- return (boolean) (_classPath != null);
- }
-
- private String _classPath;
- private int _start;
-
- private static final char winSeparator = ';';
- private static final char unixSeparator = ':';
-
- private static char pathSeparator = unixSeparator;
-
- static
- {
- pathSeparator = System.getProperty("path.separator").charAt(0);
- }
-
-}
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/SharedTimer.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/SharedTimer.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/SharedTimer.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
-* SharedTimer.java
-*
-* Copyright (c) 2004 Arjuna Technologies Ltd.
-* Arjuna Technologies Ltd. Confidential
-*
-* $Id: SharedTimer.java 2342 2006-03-30 13:06:17Z $
-*/
-package com.arjuna.common.util;
-
-import java.util.Timer;
-
-/**
- * Provides a shared Timer to save resources.
- *
- * From the doc of java.util.Timer:
- * Corresponding to each Timer object is a single background thread that is used to execute all of the timer's tasks,
- * sequentially. Timer tasks should complete quickly. If a timer task takes excessive time to complete, it "hogs" the
- * timer's task execution thread. This can, in turn, delay the execution of subsequent tasks, which may "bunch up" and
- * execute in rapid succession when (and if) the offending task finally completes.
- *
- * @author Thomas Rischbeck <thomas.rischbeck at arjuna.com>
- * @version $Revision: 2342 $
- */
-public class SharedTimer {
-
- /**
- * create a timer that uses a daemon thread to back up its logic.
- */
- static private Timer timer = new Timer(true);
-
- public static Timer getTimer() {
- return timer;
- }
-}
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/VersionCheck.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/VersionCheck.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/VersionCheck.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
-* VersionCheck.java
-*
-* Copyright (c) 2003 Arjuna Technologies Ltd.
-* Arjuna Technologies Ltd. Confidential
-*
-* Created on Feb 10, 2003, 6:02:21 PM by Thomas Rischbeck
-*
-* $Id: VersionCheck.java 2342 2006-03-30 13:06:17Z $
-*/
-
-package com.arjuna.common.util;
-
-/** Determine the JDK Version Number
- *
- * There is a human readible JDK version number available as a Java property. The property name is called "java.version".
- * Unfortunately it is complicated to parse it mechanically. A somewhat better choice is the Java property called
- * "java.class.version". The property value can be converted to a floating pointer value. JDK 1.1 implies 45.3. JDK 1.2
- * implies 46.0. JDK 1.3 implies 47.0. JDK 1.4 implies 48.0.
- * <p>
- * java.class.version property value
- * <ul>
- * <li> JDK 1.1 = 45.3
- * <li> JDK 1.2 = 46.0
- * <li> JDK 1.3 = 47.0
- * <li> JDK 1.4 = 48.0
- * </ul>
- *
- * @author Thomas Rischbeck <thomas.rischbeck at arjuna.com>
- * @version $Id: VersionCheck.java 2342 2006-03-30 13:06:17Z $
- */
-
-public class VersionCheck {
-
- private static final String CLASS_VERSION = System.getProperty("java.class.version","44.0");
- private static final boolean IS_JDK_11 = ("46.0".compareTo(CLASS_VERSION) > 0) && ("45.3".compareTo(CLASS_VERSION) <= 0);
- private static final boolean IS_JDK_12 = ("47.0".compareTo(CLASS_VERSION) > 0) && ("46.0".compareTo(CLASS_VERSION) <= 0);
- private static final boolean IS_JDK_13 = ("48.0".compareTo(CLASS_VERSION) > 0) && ("47.0".compareTo(CLASS_VERSION) <= 0);
- private static final boolean IS_JDK_14 = ("49.0".compareTo(CLASS_VERSION) > 0) && ("48.0".compareTo(CLASS_VERSION) <= 0);
- private static final boolean IS_JDK_13_OR_BELOW = IS_JDK_11 || IS_JDK_12 || IS_JDK_13;
- private static final boolean IS_JDK_14_OR_ABOVE = ("48.0".compareTo(CLASS_VERSION) <= 0);
-
-
- public static final boolean isJDK11only()
- {
- return IS_JDK_11;
- }
-
- public static final boolean isJDK12only()
- {
- return IS_JDK_12;
- }
-
- public static final boolean isJDK13only()
- {
- return IS_JDK_13;
- }
-
- public static final boolean isJDK14only()
- {
- return IS_JDK_14;
- }
-
- public static final boolean isJDK13orBelow()
- {
- return IS_JDK_13_OR_BELOW;
- }
-
- public static final boolean isJDK14orAbove()
- {
- return IS_JDK_14_OR_ABOVE;
- }
-
-}
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/concurrency/Barrier.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/concurrency/Barrier.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/concurrency/Barrier.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,113 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
-* Barrier.java
-*
-* Copyright (c) 2004 Arjuna Technologies Ltd.
-* Arjuna Technologies Ltd. Confidential
-*
-* $Id: Barrier.java 2342 2006-03-30 13:06:17Z $
-*/
-package com.arjuna.common.util.concurrency;
-
-/**
- * TODO
- *
- * @author Thomas Rischbeck <thomas.rischbeck at arjuna.com>
- * @version $Revision: 2342 $
- */
-public class Barrier {
-
- private int size = 0;
- private int counter = 0;
-
- private static final int COLLECTING = 0;
- private static final int OPENING = 1;
-
- private int state = COLLECTING;
- private Object entryLock = new Object();
- private Object openLock = new Object();
-
- /**
- * Create a new Barrier with the given size
- *
- * @param size
- */
- protected Barrier(int size)
- {
- if (size < 2)
- throw new IllegalArgumentException("size must be a minimum of 2!");
- this.size = size;
- }
-
- /**
- * add a token to the box and only return when all required tokens are there (like dataflow)
- * This method only returns once exactly size threads have entered and then all the size
- * threads are released simultaneously
- */
- protected synchronized void enter() {
- //synchronized (entryLock)
- {
- // wait until in COLLECTING state
- while (state != COLLECTING)
- try {
- wait();
- }
- catch (InterruptedException ie)
- {
- ie.printStackTrace();
- }
-
- // transition to OPENING state when the required number of
- // threads have entered the barrier ...
- counter++;
- if (size == counter)
- {
- state = OPENING;
- notifyAll();
- }
- }
-
- //synchronized (openLock)
- {
- // wait until in OPENING state
- while (state != OPENING)
- try {
- wait();
- }
- catch (InterruptedException ie)
- {
- ie.printStackTrace();
- }
-
- // transition to COLLECTING state once all the previously collected
- // threads have left ...
- counter--;
- if (counter == 0)
- {
- state = COLLECTING;
- notifyAll();
- }
- }
- }
-}
-
-
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/concurrency/Rendezvous.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/concurrency/Rendezvous.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/concurrency/Rendezvous.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
-* Rendezvous.java
-*
-* Copyright (c) 2004 Arjuna Technologies Ltd.
-* Arjuna Technologies Ltd. Confidential
-*
-* $Id: Rendezvous.java 2342 2006-03-30 13:06:17Z $
-*/
-package com.arjuna.common.util.concurrency;
-
-
-/**
- * TODO
- *
- * @author Thomas Rischbeck <thomas.rischbeck at arjuna.com>
- * @version $Revision: 2342 $
- */
-public class Rendezvous {
-
- public interface RendezvousFunction {
- public void rendezvousFunction(Object[] inObjects, Object[] outObjects);
- }
-
- public static class Rotator implements RendezvousFunction {
- public void rendezvousFunction(Object[] inObjects, Object[] outObjects)
- {
- int length = inObjects.length;
- for (int i = 0; i < length; i++)
- {
- outObjects[(i+i) % length] = inObjects[i];
- }
-
- }
- }
-
- private int size = 0;
-
- /**
- * counts how many threads are in teh rendezvous already
- */
- private int counter = 0;
-
- private Barrier barrier = null;
-
- private Object[] locks = null;
-
- private Object[] tokensIn = null;
-
- private Object[] tokensOut = null;
-
- private RendezvousFunction func = null;
-
- public Rendezvous(int size)
- {
- this.size = size;
- if (size < 2)
- throw new IllegalArgumentException("size must be a minimum of 2!");
- barrier = new Barrier(size);
- locks = new Object[size];
- tokensIn = new Object[size];
- tokensOut = new Object[size];
- for (int i = 0; i < size; i++)
- locks[i] = new Object();
- func = new Rotator();
- }
-
-
- public Object enter(int id, Object o) {
- if ((id < 0) || (id >= size) )
- throw new IllegalArgumentException("the id must be within the range 0 =< id < size : " + id);
-
- // only one entry per lock-id
- synchronized (locks[id])
- {
- tokensIn[id] = o;
- barrier.enter();
- synchronized(this)
- {
- counter++;
- if (counter == size)
- {
- func.rendezvousFunction(tokensIn, tokensOut);
- counter = 0;
- notifyAll();
- }
- if (counter != 0)
- {
- try
- {
- wait();
- }
- catch (InterruptedException ie)
- {
- // ignore
- }
- }
- }
- return tokensOut[id];
- }
- }
-
- public void setRendezvousFunction(RendezvousFunction func)
- {
- this.func = func;
- }
-}
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/exceptions/PropertyManagerError.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/exceptions/PropertyManagerError.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/exceptions/PropertyManagerError.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
- * Copyright (C) 2001,
- *
- * Hewlett-Packard Arjuna Labs,
- * Newcastle upon Tyne,
- * Tyne and Wear,
- * UK.
- *
- * $Id: PropertyManagerError.java 2342 2006-03-30 13:06:17Z $
- */
-
-package com.arjuna.common.util.exceptions;
-
-/**
- * This error is thrown if a fatal error occurs which would prevent further
- * progress without possibly compromising consistency.
- *
- * @author Mark Little (mark at arjuna.com)
- * @version $Id: PropertyManagerError.java 2342 2006-03-30 13:06:17Z $
- * @since 3.0
- */
-public class PropertyManagerError extends Error
-{
- public PropertyManagerError()
- {
- super();
- }
-
- public PropertyManagerError(String s)
- {
- super(s);
- }
-}
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/Environment.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/Environment.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/Environment.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,185 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package com.arjuna.common.util.logging;
-
-import com.arjuna.common.internal.util.logging.commonPropertyManager;
-
-//import com.hp.mwlabs.common.util.logging.commonPropertyManager;
-
-/**
- * This class defines the property used by the LogManager to determine the LoggerFactory implementation
- * class that should be loaded.
- * The name of the property is <pre>com.arjuna.common.utils.logging.factory</pre> while its possible values,
- * defined by this distribution are:
- * <ul>
- * <li><pre>com.hp.mwlabs.common.util.logging.simpleLog.ArjSimpleLoggerFactory</pre>. This is the default loaded.
- * <li><pre>com.hp.mwlabs.common.util.logging.csf.ArjChannelFactory</pre>
- * <li><pre>com.hp.mwlabs.common.util.logging.log4j.ArjLoggerFactory</pre>
- * </ul>
- *
- * @deprecated since clf-2.0 this class was only used to obtain information about the underlying logger. Such
- * an interface is not provided by Jakarta commons logging (upon which clf-2.0 builds).
- */
-
-public class Environment {
-
- /**
- * @deprecated since clf-2.0
- */
- public static final String LOGGER_FACTORY_PROPERTY = "com.hp.mwlabs.common.utils.logging.factory";
-
- /**
- * @deprecated since clf-2.0
- */
- public static final String LOGGER_FACTORY_DEFAULT = "com.hp.mwlabs.common.util.logging.log4j.ArjLoggerFactory";
-
- /**
- * @deprecated since clf-2.0
- */
- public static final String LOGGER_FACTORY_CSF = "com.hp.mwlabs.common.util.logging.csf.ArjChannelFactory";
-
- /**
- * @deprecated since clf-2.0
- */
- public static final String LOGGER_FACTORY_LOG4J = "com.hp.mwlabs.common.util.logging.log4j.ArjLoggerFactory";
-
- /**
- * @deprecated since clf-2.0
- */
- public static final String LOGGER_FACTORY_SIMPLE = "com.hp.mwlabs.common.util.logging.simpleLog.ArjSimpleLoggerFactory";
-
- public final static String LOGGING_PROPERTIES_NAMESPACE = "com.arjuna.logging";
-
- public static final String LOGGING_LANGUAGE_PROPERTY = LOGGING_PROPERTIES_NAMESPACE + ".language";
- public static final String LOGGING_LANGUAGE_DEFAULT = "en";
-
- public static final String LOGGING_COUNTRY_PROPERTY = LOGGING_PROPERTIES_NAMESPACE + ".country";
- public static final String LOGGING_COUNTRY_DEFAULT = "US";
-
- public static final String LOGGER_OUTPUT_PROPERTY = LOGGING_PROPERTIES_NAMESPACE + ".output";
- public static final String LOGGER_OUTPUT_DEFAULT = "console";
-
- public static final String LOG_DIRECTORY_PROPERTY = LOGGING_PROPERTIES_NAMESPACE + ".log.dir";
- public static final String LOG_DIRECTORY_DEFAULT = ".";
-
- public static final String LOG_FILE_PROPERTY = LOGGING_PROPERTIES_NAMESPACE + ".log.file";
- public static final String LOG_FILE_DEFAULT = "loggingFile";
-
- public static final String LOG_DISABLED_PROPERTY = LOGGING_PROPERTIES_NAMESPACE + ".log.disabled";
- public static final String LOG_DISABLED_DEFAULT = "NO";
-
- public static final String FINER_DEBUG_SUFFIX = ".FinerDebug";
- public static final String FINER_DEBUG_DEFAULT = "NO";
-
- public static final String DEBUG_CLASS_SUFFIX = ".dClass";
- public static final String DEBUG_CLASS_DEFAULT = "com.hp.mw.common.util.logging.DebugLevel";
-
- public static final String FACILITY_CLASS_SUFFIX = ".fClass";
- public static final String FACILITY_CLASS_DEFAULT = "com.hp.mw.common.util.logging.FacilityCode";
-
- public static final String VISIBILITY_CLASS_SUFFIX = ".vClass";
- public static final String VISIBILITY_CLASS_DEFAULT = "com.hp.mw.common.util.logging.VisibilityLevel";
-
- public static final String DEBUG_VALUE_SUFFIX = ".debugValue";
- public static final String FACILITY_VALUE_SUFFIX = ".facilValue";
- public static final String VISIBILITY_VALUE_SUFFIX = ".visibValue";
-
- public static final String LOGGER_LEVEL_PROPERTY = LOGGING_PROPERTIES_NAMESPACE + ".log.level";
- public static final String LOGGER_LEVEL_DEFAULT = "DEBUG";
-
- public static final String YES_VALUE = "YES";
-
- public final static String getLogLevel() {
- return commonPropertyManager.propertyManager.getProperty(LOGGER_LEVEL_PROPERTY, LOGGER_LEVEL_DEFAULT);
- }
-
- public final static String getDebugValue(String key) {
- return commonPropertyManager.propertyManager.getProperty(key + DEBUG_VALUE_SUFFIX);
- }
-
- public final static String getFacilityValue(String key) {
- return commonPropertyManager.propertyManager.getProperty(key + FACILITY_VALUE_SUFFIX);
- }
-
- public final static String getVisibilityValue(String key) {
- return commonPropertyManager.propertyManager.getProperty(key + VISIBILITY_VALUE_SUFFIX);
- }
-
- public final static String getDebugClass(String key) {
- return commonPropertyManager.propertyManager.getProperty(key + DEBUG_CLASS_SUFFIX, DEBUG_CLASS_DEFAULT);
- }
-
- public final static String getFacilityClass(String key) {
- return commonPropertyManager.propertyManager.getProperty(key + FACILITY_CLASS_SUFFIX, FACILITY_CLASS_DEFAULT);
- }
-
- public final static String getVisibilityClass(String key) {
- return commonPropertyManager.propertyManager.getProperty(key + VISIBILITY_CLASS_SUFFIX, VISIBILITY_CLASS_DEFAULT);
- }
-
- public final static boolean isFinerDebug(String key) {
- return getYesNoProperty(commonPropertyManager.propertyManager.getProperty(key + FINER_DEBUG_SUFFIX, FINER_DEBUG_DEFAULT));
- }
-
- public final static boolean isLogDisabled() {
- return getYesNoProperty(commonPropertyManager.propertyManager.getProperty(LOG_DISABLED_PROPERTY, LOG_DISABLED_DEFAULT));
- }
-
- /**
- * @deprecated since clf-2.0
- */
- public final static String getLoggerOutput() {
- return commonPropertyManager.propertyManager.getProperty(LOGGER_OUTPUT_PROPERTY, LOGGER_OUTPUT_DEFAULT);
- }
-
- /**
- * @deprecated since clf-2.0
- */
- public final static String getLoggingDirectory() {
- return commonPropertyManager.propertyManager.getProperty(LOG_DIRECTORY_PROPERTY, LOG_DIRECTORY_DEFAULT);
- }
-
- /**
- * @deprecated since clf-2.0
- */
- public final static String getLoggingFile() {
- return commonPropertyManager.propertyManager.getProperty(LOG_FILE_PROPERTY, LOG_FILE_DEFAULT);
- }
-
- public final static boolean getYesNoProperty(String property) {
- return property.equalsIgnoreCase(YES_VALUE);
- }
-
- /**
- * @deprecated since clf-2.0
- */
- public final static String getLoggingLanguage() {
- return commonPropertyManager.propertyManager.getProperty(LOGGING_LANGUAGE_PROPERTY, LOGGING_LANGUAGE_DEFAULT);
- }
-
- /**
- * @deprecated since clf-2.0
- */
- public final static String getLoggingCountry() {
- return commonPropertyManager.propertyManager.getProperty(LOGGING_COUNTRY_PROPERTY, LOGGING_COUNTRY_DEFAULT);
- }
-
-}
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/ListBundleNames.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/ListBundleNames.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/ListBundleNames.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,122 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package com.arjuna.common.util.logging;
-
-import java.util.Vector;
-
-/**
- * This class is used to define a list of Resource Bundle names that can be associated with a logger object
- *
- * @author Malik SAHEB - malik.saheb at arjuna.com
- * @since 1.1
- * @version $Id: ListBundleNames.java 2342 2006-03-30 13:06:17Z $
- *
- * @deprecated TR--seems to be unused in clf-2.0 -- can we remove it?
- */
-
-public class ListBundleNames {
-
- /*
- * This class is used to manage the list of resource bundle names associated with a logger
- * It should be deprecated and replaced by a class managing a list of object provided by JDK
- */
-
- /**
- * Constructs a new instance of ListBundleNames
- */
- public ListBundleNames()
- {
- ListBundNames = new Vector();
- }
-
- /**
- * add a resource bundle name in the list
- */
- public void add(Object obj)
- {
- if (!ListBundNames.contains(obj))
- ListBundNames.addElement(obj);
- }
-
- /**
- * remove a resource bundle name from the list
- */
- public void remove(Object obj)
- {
- boolean b = ListBundNames.removeElement(obj);
- }
-
- /**
- * Determines if a resource bundle name is in the list
- * @return true if the bundle name is in the list
- */
- public boolean contains(Object obj)
- {
- return ListBundNames.contains(obj);
- }
-
- /**
- * Get the first resource bundle name from the list
- */
- public Object getFirst()
- {
- //index = 0;
- return ListBundNames.firstElement();
- }
-
-
- /**
- * Get the last resource bundle name from the list
- */
- public Object getLast()
- {
- return ListBundNames.lastElement();
- }
-
-
- /**
- * Get a resource bundle name from the list
- */
- public Object getElement(int index)
- {
- return ListBundNames.elementAt(index);
- }
-
- /**
- * Determines if the list is empty
- */
- public boolean isEmpty()
- {
- return ListBundNames.isEmpty();
- }
-
- /**
- * get the nombre of elements in the list
- */
- public int size()
- {
- return ListBundNames.size();
- }
-
- private Vector ListBundNames;
- private int index;
-
-}
Deleted: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/NotSupportedException.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/NotSupportedException.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/NotSupportedException.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package com.arjuna.common.util.logging;
-
-/**
- * The NotSupportedException class is used to inform on the fact that a particular
- * logging implementation is not implemented or on the fact that it does not recognize
- * a particular parameter. For instance, if the underlying logging service is log4j, it is
- * an error to register a handler object implementing the HP LogWriter interface.
- *
- * @author Malik SAHEB - malik.saheb at arjuna.com
- * @since 1.0
- * @version $Id: NotSupportedException.java 2342 2006-03-30 13:06:17Z $
- *
- * @deprecated use OperationNotSupportedException from now on.
- */
-
-public class NotSupportedException extends Exception {
-
- /**
- * Constructs a new instance of NotSupportedException
- */
- public NotSupportedException() {
- super();
- }
-
- /**
- * Constructs a new instance of NotSupportedException using a message for explanation
- */
- public NotSupportedException(String message) {
- super(message);
- }
-
-}
Deleted: labs/jbosstm/trunk/common/lib/ext/mw-common.jar
===================================================================
(Binary files differ)
Deleted: labs/jbosstm/trunk/common/lib/ext/xercesImpl.jar
===================================================================
(Binary files differ)
Deleted: labs/jbosstm/trunk/common/lib/ext/xmlParserAPIs.jar
===================================================================
(Binary files differ)
Deleted: labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/util/concurrency/BarrierTest.java
===================================================================
--- labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/util/concurrency/BarrierTest.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/util/concurrency/BarrierTest.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
-* BarrierTest.java
-*
-* Copyright (c) 2004 Arjuna Technologies Ltd.
-* Arjuna Technologies Ltd. Confidential
-*
-* $Id: BarrierTest.java 2342 2006-03-30 13:06:17Z $
-*/
-package com.arjuna.common.tests.util.concurrency;
-
-import com.arjuna.common.util.concurrency.Barrier;
-
-
-/**
- * TODO
- *
- * @author Thomas Rischbeck <thomas.rischbeck at arjuna.com>
- * @version $Revision: 2342 $
- */
-public class BarrierTest {
-
- public static final int NR_THREADS = 4;
- public static final int BARRIER_SIZE = 3;
-
- Thread[] threads = new Thread[NR_THREADS];
- TestBarrier barrier = new TestBarrier(BARRIER_SIZE);
-
- public static void main(String[] args)
- {
- new BarrierTest().go();
- }
-
- public void go() {
- for (int i = 0; i < NR_THREADS; i++)
- {
- threads[i] = new BarrierThread(barrier);
- threads[i].start();
- }
- }
-
-}
-
-
-class BarrierThread extends Thread {
-
- private TestBarrier b = null;
- private static int threadCounter = 0;
- private int threadNumber = ++threadCounter;
-
- public BarrierThread(TestBarrier b)
- {
- this.b = b;
- this.setName("BarrierThread-" + threadNumber);
- }
-
- public void run() {
- int counter = 0;
- do {
- System.out.println(this + " entering barrier ---- # " + ++counter);
- b.enter();
- System.out.println(this + " left barrier ---- # " + counter);
- try {
- Thread.sleep((long) (Math.random() * 5000.0));
- } catch (InterruptedException e) {
- e.printStackTrace(); //To change body of catch statement use Options | File Templates.
- }
- } while (true);
- }
-}
-
-
-class TestBarrier extends Barrier
-{
- public TestBarrier(final int size)
- {
- super(size) ;
- }
-
- public void enter()
- {
- super.enter() ;
- }
-}
Deleted: labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/util/concurrency/RendezvousTest.java
===================================================================
--- labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/util/concurrency/RendezvousTest.java 2009-04-17 12:26:41 UTC (rev 26107)
+++ labs/jbosstm/trunk/common/tests/com/arjuna/common/tests/util/concurrency/RendezvousTest.java 2009-04-17 12:28:15 UTC (rev 26108)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-/*
-* BarrierTest.java
-*
-* Copyright (c) 2004 Arjuna Technologies Ltd.
-* Arjuna Technologies Ltd. Confidential
-*
-* $Id: RendezvousTest.java 2342 2006-03-30 13:06:17Z $
-*/
-package com.arjuna.common.tests.util.concurrency;
-
-import com.arjuna.common.util.concurrency.Rendezvous;
-
-/**
- * TODO
- *
- * @author Thomas Rischbeck <thomas.rischbeck at arjuna.com>
- * @version $Revision: 2342 $
- */
-public class RendezvousTest {
-
- public static final int CONSUMER_ID = 0;
- public static final int PRODUCER_ID = 1;
-
- public static final int NR_THREADS = 2;
- public static final int RENDEZVOUS_SIZE = 2;
-
- Thread[] threads = new Thread[NR_THREADS];
- Rendezvous rendezvous = new Rendezvous(RENDEZVOUS_SIZE);
-
- public static void main(String[] args)
- {
- new RendezvousTest().go();
- }
-
- public void go() {
-// for (int i = 0; i < NR_THREADS; i++)
-// {
-// threads[i] = new RendezvousThread(rendezvous);
-// threads[i].start();
-// }
- new ConsumerThread(rendezvous).start();
- new ProducerThread(rendezvous).start();
- }
-
-}
-
-
-class ConsumerThread extends Thread {
-
- private Rendezvous r = null;
- private static int threadCounter = 0;
- private int threadNumber = ++threadCounter;
-
- public ConsumerThread(Rendezvous r)
- {
- this.r = r;
- this.setName("ConsumerThread-" + threadNumber);
- }
-
- public void run() {
- int counter = 0;
- do {
- System.out.println(this + " entering rendezvous ---- # " + ++counter);
- Object object = r.enter(RendezvousTest.CONSUMER_ID, null);
- System.out.println(this + " consumed object " + object);
- System.out.println(this + " left rendezvous ---- # " + counter);
-// try {
-// Thread.sleep((long) (Math.random() * 50.0));
-// } catch (InterruptedException e) {
-// e.printStackTrace(); //To change body of catch statement use Options | File Templates.
-// }
- } while (true);
- }
-}
-
-class ProducerThread extends Thread {
-
- private Rendezvous r = null;
- private static int threadCounter = 0;
- private int threadNumber = ++threadCounter;
-
- public ProducerThread(Rendezvous r)
- {
- this.r = r;
- this.setName("ProducerThread-" + threadNumber);
- }
-
- public void run() {
- int counter = 0;
- do {
- System.out.println(this + " entering rendezvous ---- # " + ++counter);
- String object = "TOKEN-" + counter;
- System.out.println(this + " produces object " + object);
- r.enter(RendezvousTest.PRODUCER_ID, object);
- System.out.println(this + " left rendezvous ---- # " + counter);
-// try {
-// Thread.sleep((long) (Math.random() * 500.0));
-// } catch (InterruptedException e) {
-// e.printStackTrace(); //To change body of catch statement use Options | File Templates.
-// }
- } while (true);
- }
-
-}
More information about the jboss-svn-commits
mailing list