[jboss-svn-commits] JBoss Common SVN: r1957 - in branches/refactor-test-branch: . common-core common-core/trunk common-core/trunk/src common-core/trunk/src/etc common-core/trunk/src/main common-core/trunk/src/main/java common-core/trunk/src/main/java/org common-core/trunk/src/main/java/org/jboss common-core/trunk/src/main/java/org/jboss/net common-core/trunk/src/main/java/org/jboss/net/protocol common-core/trunk/src/main/java/org/jboss/net/protocol/file common-core/trunk/src/main/java/org/jboss/net/protocol/http common-core/trunk/src/main/java/org/jboss/net/protocol/njar common-core/trunk/src/main/java/org/jboss/net/protocol/resource common-core/trunk/src/main/java/org/jboss/net/sockets common-core/trunk/src/main/java/org/jboss/net/ssl common-core/trunk/src/main/java/org/jboss/util common-core/trunk/src/main/java/org/jboss/util/collection common-core/trunk/src/main/java/org/jboss/util/deadlock common-core/trunk/src/main/java/org/jboss/util/file common-core/trunk/src/main/java/org/jbos! s/util/id common-core/trunk/src/main/java/org/jboss/util/jmx common-core/trunk/src/main/java/org/jboss/util/loading common-core/trunk/src/main/java/org/jboss/util/naming common-core/trunk/src/main/java/org/jboss/util/platform common-core/trunk/src/main/java/org/jboss/util/property common-core/trunk/src/main/java/org/jboss/util/property/jmx common-core/trunk/src/main/java/org/jboss/util/propertyeditor common-core/trunk/src/main/java/org/jboss/util/state common-core/trunk/src/main/java/org/jboss/util/state/xml common-core/trunk/src/main/java/org/jboss/util/stream common-core/trunk/src/main/java/org/jboss/util/threadpool common-core/trunk/src/main/java/org/jboss/util/timeout common-core/trunk/src/main/java/org/jboss/util/xml common-core/trunk/src/main/java/org/jboss/util/xml/catalog common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers common-core/trunk/tools common-core/trunk/tools/bin common-core! /trunk/tools/etc common-core/trunk/tools/etc/buildmagic common-core/trunk/tools/etc/jbossbuild common-core/trunk/tools/lib common-logging-jdk common-logging-jdk/trunk common-logging-jdk/trunk/src common-logging-jdk/trunk/src/etc common-logging-jdk/trunk/src/main common-logging-jdk/trunk/src/main/java common-logging-jdk/trunk

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Aug 15 15:59:35 EDT 2006


Author: ruel.loehr at jboss.com
Date: 2006-08-15 15:54:07 -0400 (Tue, 15 Aug 2006)
New Revision: 1957

Added:
   branches/refactor-test-branch/common-core/
   branches/refactor-test-branch/common-core/trunk/
   branches/refactor-test-branch/common-core/trunk/build-compile.xml
   branches/refactor-test-branch/common-core/trunk/build-thirdparty.xml
   branches/refactor-test-branch/common-core/trunk/build.bat
   branches/refactor-test-branch/common-core/trunk/build.sh
   branches/refactor-test-branch/common-core/trunk/build.xml
   branches/refactor-test-branch/common-core/trunk/pom.xml
   branches/refactor-test-branch/common-core/trunk/src/
   branches/refactor-test-branch/common-core/trunk/src/etc/
   branches/refactor-test-branch/common-core/trunk/src/etc/default.mf
   branches/refactor-test-branch/common-core/trunk/src/main/
   branches/refactor-test-branch/common-core/trunk/src/main/java/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/DelegatingURLConnection.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLLister.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerBase.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLStreamHandlerFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLLister.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/Handler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/http/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/http/DavURLLister.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/Handler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/Handler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/ResourceURLConnection.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/DefaultSocketFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/InterruptableInputStream.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/MethodHash.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/QueuedClientSocketFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocket.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketClient.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketHandler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketServer.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutClientSocketFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocket.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocketFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutSocket.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/ssl/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/ssl/SSLSocketFactoryBuilder.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/AbstractNestedThrowable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Base64.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/CachePolicy.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Classes.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Counter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/EmptyStringException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Executable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/FieldInstance.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/HashCode.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Heap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossInterface.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossObject.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossStringBuilder.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LRUCachePolicy.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LongCounter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/MethodHashing.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedError.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedRuntimeException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedSQLException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedThrowable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NoSuchMethodException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NotImplementedException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Null.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NullArgumentException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Objects.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/PrettyString.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Primitives.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Semaphore.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SoftObject.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StopWatch.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StringPropertyReplacer.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Strings.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Sync.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SynchronizedCachePolicy.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SysPropertyActions.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableHandler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Throwables.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimedCachePolicy.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerTask.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnexpectedThrowable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnreachableStatementException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSemaphore.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSync.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WeakObject.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WorkerQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/AbstractQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ArrayIterator.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedCollection.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedList.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsUtil.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundIterator.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundKey.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/EmptyCollectionException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/FullCollectionException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Iterators.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListSet.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Queue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ReverseListIterator.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SerializableEnumeration.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftSet.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftValueHashMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakClassCache.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakIdentityHashMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakSet.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakValueHashMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/ApplicationDeadlockException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/DeadlockDetector.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/Resource.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ArchiveBrowser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ClassFileFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/DirectoryArchiveBrowser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilePrefixFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FileSuffixFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenamePrefixFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenameSuffixFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/Files.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarArchiveBrowser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarUtils.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/GUID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/ID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/SerialVersion.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/UID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/VMID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/jmx/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/jmx/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoaderSwitcher.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translatable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translator.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ENCThreadLocalKey.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/NonSerializableFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ReadOnlyContext.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/Util.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/Java.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/PID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyAdapter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Configurable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/DefaultPropertyReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FilePropertyReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/MethodBoundPropertyListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Property.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyAdapter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyContainer.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyError.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyEvent.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyGroup.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyManager.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValueMBean.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BigDecimalEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BlockingModeEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BooleanEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteArrayEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/CharacterEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassArrayEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DateEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DocumentEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DoubleEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ElementEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FileEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FloatEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/InetAddressEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntArrayEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntegerEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/LongEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertiesEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertyEditors.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ShortEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringArrayEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/TextPropertyEditorSupport.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URIEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URLEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/IllegalTransitionException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/State.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/StateMachine.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/Transition.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/xml/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/xml/StateMachineParser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/CRLFPrintWriter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/IMarshalledValue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedInputStream.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedOutputStream.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/StreamListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/Streams.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicTaskWrapper.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPool.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPoolMBean.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BlockingMode.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/MinPooledExecutor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/RunnableTaskWrapper.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/StartTimeoutException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/Task.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskStoppedException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskWrapper.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPool.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolFullException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolMBean.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolStoppedException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/Timeout.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutExt.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueueImpl.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutTarget.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/CatalogLocation.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossErrorHandler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlHelper.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlLoadable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Catalog.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogManager.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Resolver.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Version.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/BootstrapResolver.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Debug.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Namespaces.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/PublicId.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/CatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogParser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/ExtendedXMLCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/OASISXMLCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogParser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXParserHandler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TR9401CatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TextCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/XCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/package.html
   branches/refactor-test-branch/common-core/trunk/tools/
   branches/refactor-test-branch/common-core/trunk/tools/.project
   branches/refactor-test-branch/common-core/trunk/tools/bin/
   branches/refactor-test-branch/common-core/trunk/tools/bin/ant
   branches/refactor-test-branch/common-core/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/common-core/trunk/tools/bin/antRun
   branches/refactor-test-branch/common-core/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/common-core/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/common-core/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/common-core/trunk/tools/etc/
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/common-core/trunk/tools/lib/
   branches/refactor-test-branch/common-core/trunk/tools/lib/README
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/common-logging-jdk/
   branches/refactor-test-branch/common-logging-jdk/trunk/
   branches/refactor-test-branch/common-logging-jdk/trunk/build-compile.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/build-thirdparty.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/build.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/build.sh
   branches/refactor-test-branch/common-logging-jdk/trunk/build.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/pom.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/src/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/etc/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/etc/default.mf
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JBossJDKLogManager.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDKLogManager.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/SecurityActions.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/AbsoluteTimeDateFormat.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/DateTimeDateFormat.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/FormattingInfo.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/ISO8601DateFormat.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternConverter.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternFormatter.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternParser.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/DailyRollingFileHandler.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/FileHandler.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/HandlerSkeleton.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/WriterHandler.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/DOMConfigurator.java
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/.project
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/README
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/common-logging-log4j/
   branches/refactor-test-branch/common-logging-log4j/trunk/
   branches/refactor-test-branch/common-logging-log4j/trunk/build-compile.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/build-thirdparty.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/build.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/build.sh
   branches/refactor-test-branch/common-logging-log4j/trunk/build.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/pom.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/src/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/etc/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/etc/default.mf
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/XLevel.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/DailyRollingFileAppender.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/FileAppender.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RegexEventEvaluator.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RollingFileAppender.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/package.html
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/TCLFilter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternLayout.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternParserEx.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadMDCConverter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadNDCConverter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/Log4jLoggerPlugin.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryStream.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryWriter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerPluginWriter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerStream.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerWriter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/OnlyOnceErrorHandler.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/package.html
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/.project
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/README
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/common-logging-spi/
   branches/refactor-test-branch/common-logging-spi/trunk/
   branches/refactor-test-branch/common-logging-spi/trunk/build-compile.xml
   branches/refactor-test-branch/common-logging-spi/trunk/build-thirdparty.xml
   branches/refactor-test-branch/common-logging-spi/trunk/build.bat
   branches/refactor-test-branch/common-logging-spi/trunk/build.sh
   branches/refactor-test-branch/common-logging-spi/trunk/build.xml
   branches/refactor-test-branch/common-logging-spi/trunk/pom.xml
   branches/refactor-test-branch/common-logging-spi/trunk/src/
   branches/refactor-test-branch/common-logging-spi/trunk/src/etc/
   branches/refactor-test-branch/common-logging-spi/trunk/src/etc/default.mf
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java
   branches/refactor-test-branch/common-logging-spi/trunk/tools/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/.project
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/README
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/jbossxb/
   branches/refactor-test-branch/jbossxb/trunk/
   branches/refactor-test-branch/jbossxb/trunk/build-compile.xml
   branches/refactor-test-branch/jbossxb/trunk/build-thirdparty.xml
   branches/refactor-test-branch/jbossxb/trunk/build.bat
   branches/refactor-test-branch/jbossxb/trunk/build.sh
   branches/refactor-test-branch/jbossxb/trunk/build.xml
   branches/refactor-test-branch/jbossxb/trunk/pom.xml
   branches/refactor-test-branch/jbossxb/trunk/src/
   branches/refactor-test-branch/jbossxb/trunk/src/etc/
   branches/refactor-test-branch/jbossxb/trunk/src/etc/default.mf
   branches/refactor-test-branch/jbossxb/trunk/src/main/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/QNameBuilder.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AbstractMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AttributesImpl.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Constants.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Content.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentPopulator.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentWriter.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelProvider.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DtdMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelProvider.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericValueContainer.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Immutable.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBException.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBRuntimeException.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBValueFormatException.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelProvider.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Marshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MarshallingContext.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/NamespaceRegistry.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectLocalMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelBuilder.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelProvider.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SimpleTypeBindings.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/TypeBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Unmarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerImpl.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallingContext.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Util.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/XercesXsMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueList.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListInitializer.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfo.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfos.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/FieldInfo.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/AddMethodMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/CharactersMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ClassMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/MapEntryMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PackageMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PropertyMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PutMethodMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/SchemaMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ValueMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAnnotation.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAppInfo.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdElement.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/DocumentBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/JBossXBParser.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/SaxJBossXBParser.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/MarshallerImpl.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AbstractAttributeMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AttributeMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/DefaultAttributeMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallingContext.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AllBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributesHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/CharactersHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ChoiceBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementInterceptor.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultHandlers.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultWildcardHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementInterceptor.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/LSInputAdaptor.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ModelGroupBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingInitializer.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingResolver.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfig.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfigMBean.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SequenceBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SimpleTypeBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TermBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TypeBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ValueAdapter.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/WildcardBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinder.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderLoggingErrorHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderTerminatingErrorHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/MapEntry.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtAttributeHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtCharactersHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtElementHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtUtil.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/SimpleDataSource.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPElementHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPIncludeHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPObject.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPUnmarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/Dom2Sax.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/NoopMap.java
   branches/refactor-test-branch/jbossxb/trunk/tools/
   branches/refactor-test-branch/jbossxb/trunk/tools/.project
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/README
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/xml-apis.jar
Removed:
   branches/refactor-test-branch/build-compile.xml
   branches/refactor-test-branch/build-thirdparty.xml
   branches/refactor-test-branch/build.bat
   branches/refactor-test-branch/build.sh
   branches/refactor-test-branch/build.xml
   branches/refactor-test-branch/common-core/trunk/
   branches/refactor-test-branch/common-core/trunk/build-compile.xml
   branches/refactor-test-branch/common-core/trunk/build-thirdparty.xml
   branches/refactor-test-branch/common-core/trunk/build.bat
   branches/refactor-test-branch/common-core/trunk/build.sh
   branches/refactor-test-branch/common-core/trunk/build.xml
   branches/refactor-test-branch/common-core/trunk/pom.xml
   branches/refactor-test-branch/common-core/trunk/src/
   branches/refactor-test-branch/common-core/trunk/src/etc/
   branches/refactor-test-branch/common-core/trunk/src/etc/default.mf
   branches/refactor-test-branch/common-core/trunk/src/main/
   branches/refactor-test-branch/common-core/trunk/src/main/java/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/DelegatingURLConnection.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLLister.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerBase.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLStreamHandlerFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLLister.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/Handler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/http/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/http/DavURLLister.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/Handler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/Handler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/ResourceURLConnection.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/DefaultSocketFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/InterruptableInputStream.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/MethodHash.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/QueuedClientSocketFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocket.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketClient.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketHandler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketServer.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutClientSocketFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocket.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocketFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutSocket.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/ssl/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/ssl/SSLSocketFactoryBuilder.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/AbstractNestedThrowable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Base64.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/CachePolicy.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Classes.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Counter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/EmptyStringException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Executable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/FieldInstance.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/HashCode.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Heap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossInterface.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossObject.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossStringBuilder.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LRUCachePolicy.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LongCounter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/MethodHashing.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedError.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedRuntimeException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedSQLException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedThrowable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NoSuchMethodException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NotImplementedException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Null.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NullArgumentException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Objects.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/PrettyString.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Primitives.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Semaphore.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SoftObject.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StopWatch.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StringPropertyReplacer.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Strings.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Sync.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SynchronizedCachePolicy.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SysPropertyActions.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableHandler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Throwables.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimedCachePolicy.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerTask.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnexpectedThrowable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnreachableStatementException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSemaphore.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSync.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WeakObject.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WorkerQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/AbstractQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ArrayIterator.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedCollection.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedList.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsUtil.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundIterator.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundKey.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/EmptyCollectionException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/FullCollectionException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Iterators.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListSet.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Queue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ReverseListIterator.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SerializableEnumeration.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftSet.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftValueHashMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakClassCache.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakIdentityHashMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakSet.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakValueHashMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/ApplicationDeadlockException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/DeadlockDetector.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/Resource.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ArchiveBrowser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ClassFileFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/DirectoryArchiveBrowser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilePrefixFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FileSuffixFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenamePrefixFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenameSuffixFilter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/Files.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarArchiveBrowser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarUtils.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/GUID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/ID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/SerialVersion.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/UID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/VMID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/jmx/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/jmx/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoaderSwitcher.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translatable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translator.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ENCThreadLocalKey.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/NonSerializableFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ReadOnlyContext.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/Util.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/Java.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/PID.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyAdapter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Configurable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/DefaultPropertyReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FilePropertyReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/MethodBoundPropertyListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Property.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyAdapter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyContainer.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyError.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyEvent.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyGroup.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyManager.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyMap.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValueMBean.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BigDecimalEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BlockingModeEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BooleanEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteArrayEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/CharacterEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassArrayEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DateEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DocumentEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DoubleEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ElementEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FileEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FloatEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/InetAddressEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntArrayEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntegerEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/LongEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertiesEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertyEditors.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ShortEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringArrayEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/TextPropertyEditorSupport.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URIEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URLEditor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/IllegalTransitionException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/State.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/StateMachine.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/Transition.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/xml/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/xml/StateMachineParser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/CRLFPrintWriter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/IMarshalledValue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedInputStream.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedOutputStream.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/StreamListener.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/Streams.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicTaskWrapper.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPool.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPoolMBean.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BlockingMode.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/MinPooledExecutor.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/RunnableTaskWrapper.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/StartTimeoutException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/Task.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskStoppedException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskWrapper.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPool.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolFullException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolMBean.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolStoppedException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/Timeout.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutExt.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutFactory.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueue.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueueImpl.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutTarget.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/CatalogLocation.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossErrorHandler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlHelper.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlLoadable.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Catalog.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogException.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogManager.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Resolver.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Version.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/BootstrapResolver.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Debug.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Namespaces.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/PublicId.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/CatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogParser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/ExtendedXMLCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/OASISXMLCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogParser.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXParserHandler.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TR9401CatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TextCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/XCatalogReader.java
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/package.html
   branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/package.html
   branches/refactor-test-branch/common-core/trunk/tools/
   branches/refactor-test-branch/common-core/trunk/tools/.project
   branches/refactor-test-branch/common-core/trunk/tools/bin/
   branches/refactor-test-branch/common-core/trunk/tools/bin/ant
   branches/refactor-test-branch/common-core/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/common-core/trunk/tools/bin/antRun
   branches/refactor-test-branch/common-core/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/common-core/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/common-core/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/common-core/trunk/tools/etc/
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/common-core/trunk/tools/lib/
   branches/refactor-test-branch/common-core/trunk/tools/lib/README
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/common-core/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/
   branches/refactor-test-branch/common-logging-jdk/trunk/build-compile.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/build-thirdparty.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/build.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/build.sh
   branches/refactor-test-branch/common-logging-jdk/trunk/build.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/pom.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/src/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/etc/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/etc/default.mf
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JBossJDKLogManager.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDKLogManager.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/SecurityActions.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/AbsoluteTimeDateFormat.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/DateTimeDateFormat.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/FormattingInfo.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/ISO8601DateFormat.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternConverter.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternFormatter.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternParser.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/DailyRollingFileHandler.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/FileHandler.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/HandlerSkeleton.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/WriterHandler.java
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/
   branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/DOMConfigurator.java
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/.project
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/README
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/
   branches/refactor-test-branch/common-logging-log4j/trunk/build-compile.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/build-thirdparty.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/build.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/build.sh
   branches/refactor-test-branch/common-logging-log4j/trunk/build.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/pom.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/src/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/etc/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/etc/default.mf
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/XLevel.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/DailyRollingFileAppender.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/FileAppender.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RegexEventEvaluator.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RollingFileAppender.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/package.html
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/TCLFilter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternLayout.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternParserEx.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadMDCConverter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadNDCConverter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/Log4jLoggerPlugin.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryStream.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryWriter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerPluginWriter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerStream.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerWriter.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/OnlyOnceErrorHandler.java
   branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/package.html
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/.project
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/README
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/common-logging-spi/trunk/
   branches/refactor-test-branch/common-logging-spi/trunk/build-compile.xml
   branches/refactor-test-branch/common-logging-spi/trunk/build-thirdparty.xml
   branches/refactor-test-branch/common-logging-spi/trunk/build.bat
   branches/refactor-test-branch/common-logging-spi/trunk/build.sh
   branches/refactor-test-branch/common-logging-spi/trunk/build.xml
   branches/refactor-test-branch/common-logging-spi/trunk/pom.xml
   branches/refactor-test-branch/common-logging-spi/trunk/src/
   branches/refactor-test-branch/common-logging-spi/trunk/src/etc/
   branches/refactor-test-branch/common-logging-spi/trunk/src/etc/default.mf
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java
   branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java
   branches/refactor-test-branch/common-logging-spi/trunk/tools/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/.project
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/README
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/component-info.xml
   branches/refactor-test-branch/jbossbuild.xml
   branches/refactor-test-branch/jbossxb/trunk/
   branches/refactor-test-branch/jbossxb/trunk/build-compile.xml
   branches/refactor-test-branch/jbossxb/trunk/build-thirdparty.xml
   branches/refactor-test-branch/jbossxb/trunk/build.bat
   branches/refactor-test-branch/jbossxb/trunk/build.sh
   branches/refactor-test-branch/jbossxb/trunk/build.xml
   branches/refactor-test-branch/jbossxb/trunk/pom.xml
   branches/refactor-test-branch/jbossxb/trunk/src/
   branches/refactor-test-branch/jbossxb/trunk/src/etc/
   branches/refactor-test-branch/jbossxb/trunk/src/etc/default.mf
   branches/refactor-test-branch/jbossxb/trunk/src/main/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/QNameBuilder.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AbstractMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AttributesImpl.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Constants.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Content.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentPopulator.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentWriter.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelProvider.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DtdMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelProvider.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericValueContainer.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Immutable.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBException.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBRuntimeException.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBValueFormatException.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelProvider.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Marshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MarshallingContext.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/NamespaceRegistry.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectLocalMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelBuilder.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelProvider.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessObjectModelFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SimpleTypeBindings.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/TypeBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Unmarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerImpl.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallingContext.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Util.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/XercesXsMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueList.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListInitializer.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfo.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfos.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/FieldInfo.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/AddMethodMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/CharactersMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ClassMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/MapEntryMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PackageMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PropertyMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PutMethodMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/SchemaMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ValueMetaData.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAnnotation.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAppInfo.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdElement.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/DocumentBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/JBossXBParser.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/SaxJBossXBParser.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/MarshallerImpl.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AbstractAttributeMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AttributeMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/DefaultAttributeMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallingContext.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AllBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributesHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/CharactersHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ChoiceBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementInterceptor.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultHandlers.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultWildcardHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementInterceptor.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/LSInputAdaptor.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ModelGroupBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingInitializer.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingResolver.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfig.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfigMBean.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SequenceBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SimpleTypeBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TermBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TypeBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ValueAdapter.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/WildcardBinding.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinder.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderLoggingErrorHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderTerminatingErrorHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/MapEntry.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtAttributeHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtCharactersHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtElementHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtUtil.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/SimpleDataSource.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPElementHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPIncludeHandler.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPMarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPObject.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPUnmarshaller.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/Dom2Sax.java
   branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/NoopMap.java
   branches/refactor-test-branch/jbossxb/trunk/tools/
   branches/refactor-test-branch/jbossxb/trunk/tools/.project
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant.bat
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun.bat
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/antx.bat
   branches/refactor-test-branch/jbossxb/trunk/tools/bin/lcp.bat
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildfragments/
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/aliases.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/autoload.properties
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/build-common.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent~
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.properties
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/libraries.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/modules.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/targets.ent
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/task.properties
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/version-info.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/jbossbuild.properties
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/release.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/tasks.xml
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/README
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-javamail.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-junit.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-launcher.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-nodeps.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-trax.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-xslp.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/bsf.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/buildmagic-tasks.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/jbossbuild.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/jdtCompilerAdapter.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/junit.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/pretty.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/resolver.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/xalan.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/xercesImpl.jar
   branches/refactor-test-branch/jbossxb/trunk/tools/lib/xml-apis.jar
   branches/refactor-test-branch/src/
   branches/refactor-test-branch/tools/
Log:
commit refactoring of project in test branch

Deleted: branches/refactor-test-branch/build-compile.xml
===================================================================
--- branches/refactor-test-branch/build-compile.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/build-compile.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">   
-]>
-
-<project default="main" name="JBoss/Build">
-
-  &buildmagic;
-  &libraries;
-  &targets;
-   <!-- The combined library classpath -->
-      <path id="library.classpath">
-        <path refid="apache.xerces.classpath"/>
-        <path refid="apache.commons.classpath"/>
-        <path refid="apache.log4j.classpath"/>
-        <path refid="apache.slide.classpath"/>
-        <path refid="dom4j.dom4j.classpath"/>
-        <path refid="wutka.dtdparser.classpath"/>
-        <path refid="oswego.concurrent.classpath"/>
-        <path refid="sun.jaf.classpath"/>
-      </path>
-
-        <!-- The combined dependent module classpath -->
-        <path id="dependentmodule.classpath">
-    </path>
-  
-  <target name="compile-classes"
-    depends="_default:compile-classes"/>
-
-</project>

Deleted: branches/refactor-test-branch/build-thirdparty.xml
===================================================================
--- branches/refactor-test-branch/build-thirdparty.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/build-thirdparty.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-<!-- $Id: build-thirdparty.xml,v 1.113 2006/05/23 23:19:24 jgreene Exp $ -->
-<project name="main.build"
-          default="synchronize"
-          basedir=".">
-
-   <!-- Property File definitions -->
-   <property file="local.properties"/>
-   <property file="synchronize.properties"/>
-   <property environment="env"/>
-
-   <!-- Property Definitions -->
-   <property name="generatedLibrariesFiles" value="thirdparty/libraries.ent"/>
-
-   <!-- Allow jbossbuild.repository to be set from (in order or priority)
-      + Command line -Djbossbuild.repository=...
-      + synchronize.properties jbossbuild.repository setting
-      + JBOSS_REPOSITORY environment variable
-   -->
-   <condition property="jbossbuild.repository" value="${env.JBOSS_REPOSITORY}">
-      <isset property="env.JBOSS_REPOSITORY"/>
-   </condition>
-   <!-- Fall back to default -->
-   <property name="jbossbuild.repository" value="http://repository.jboss.com"/>
-
-   <!-- File Imports -->
-   <import file="tools/etc/jbossbuild/tasks.xml"/>
-
-
-   <!-- Main Definition of dependencies -->
-   <build id="jbossas-thirdparty"
-          impltitle="JBossAS"
-          implversion="jboss-head"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.org"
-          description="JBoss Application Server"
-          cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
-          thirdpartypath="thirdparty/"
-          location="${jbossbuild.repository}"
-          targetdefs="targets">
-
-      <!--
-        The repository is in CVS under the module repository.jboss.com whose contents
-        are pushed to the http://repository.jboss.com site.
-      -->
-
-      <componentref name="apache-xerces" version="2.7.1"/>
-      <componentref name="apache-log4j" version="1.2.8"/>  
-      <componentref name="apache-slide" version="2.0"/> 
-      <componentref name="dom4j" version="1.5"/>   
-      <componentref name="wutka-dtdparser" version="1.2.1"/>
-      <componentref name="oswego-concurrent" version="1.3.4"/>  
-      <componentref name="sun-jaf" version="1.0.2"/>      
-         <componentref name="apache-httpclient" version="2.0.2"/>
-
-
-   </build>
-
-   <synchronizeinfo/>
-
-   <!-- Generate the targets -->
-   <generate generate="jbossas-thirdparty"/>
-
-
-   <target name="generate-lib-file"
-      description="generate libraries.ent and thirdparty license info"
-      depends="synchronize">
-         <gen-lib-file filename="${generatedLibrariesFiles}" path="tools/etc/buildmagic/" />
-      <visit-componentref-graph
-         componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor" />
-   </target>
-
-</project>

Deleted: branches/refactor-test-branch/build.bat
===================================================================
--- branches/refactor-test-branch/build.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/build.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,89 +0,0 @@
- at echo off
-REM  ======================================================================
-REM
-REM  This is the main entry point for the build system.
-REM
-REM  Users should be sure to execute this file rather than 'ant' to ensure
-REM  the correct version is being used with the correct configuration.
-REM
-REM  ======================================================================
-REM
-REM $Id$
-REM
-REM Authors:
-REM     Jason Dillon <jason at planet57.com>
-REM     Sacha Labourey <sacha.labourey at cogito-info.ch>
-REM
-
-REM ******************************************************
-REM Ignore the ANT_HOME variable: we want to use *our*
-REM ANT version and associated JARs.
-REM ******************************************************
-REM Ignore the users classpath, cause it might mess
-REM things up
-REM ******************************************************
-
-SETLOCAL
-
-set CLASSPATH=
-set ANT_HOME=
-set ANT_OPTS=-Djava.protocol.handler.pkgs=org.jboss.net.protocol -Dbuild.script=build.bat
-
-REM ******************************************************
-REM - "for" loops have been unrolled for compatibility
-REM   with some WIN32 systems.
-REM ******************************************************
-
-set NAMES=tools;tools\ant;tools\apache\ant
-set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
-
-REM ******************************************************
-REM ******************************************************
-
-SET EXECUTED=FALSE
-for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
-
-goto :EOF
-
-
-REM ******************************************************
-REM ********* Search for names in the subfolders *********
-REM ******************************************************
-
-:subLoop
-for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %2 %3 %4 %5 %6 %7
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************ Test if ANT Batch file exists ***********
-REM ******************************************************
-
-:testIfExists
-if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************** Batch file has been found *************
-REM ******************************************************
-
-:BatchFound
-if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
-set EXECUTED=TRUE
-
-goto :EOF
-
-REM ******************************************************
-REM ************* Execute Batch file only once ***********
-REM ******************************************************
-
-:ExecuteBatch
-echo Calling %1 %2 %3 %4 %5 %6 %7 %8
-call %1 %2 %3 %4 %5 %6 %7 %8
-
-:end
-
-if "%NOPAUSE%" == "" pause

Deleted: branches/refactor-test-branch/build.sh
===================================================================
--- branches/refactor-test-branch/build.sh	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/build.sh	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,173 +0,0 @@
-#!/bin/sh
-### ====================================================================== ###
-##                                                                          ##
-##  This is the main entry point for the build system.                      ##
-##                                                                          ##
-##  Users should be sure to execute this file rather than 'ant' to ensure   ##
-##  the correct version is being used with the correct configuration.       ##
-##                                                                          ##
-### ====================================================================== ###
-#
-
-# $Id$
-
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-GREP="grep"
-ROOT="/"
-
-# Ignore user's ANT_HOME if it is set
-ANT_HOME=""
-
-# the default search path for ant
-ANT_SEARCH_PATH="\
-    tools
-    tools/ant \
-    tools/apache/ant \
-    ant"
-
-# the default build file name
-ANT_BUILD_FILE="build.xml"
-
-# the default arguments
-ANT_OPTIONS="-find $ANT_BUILD_FILE"
-
-# Use the maximum available, or set MAX_FD != -1 to use that
-MAX_FD="maximum"
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-darwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-
-    Darwin*)
-        darwin=true
-        ;;
-esac
-
-#
-# Helper to complain.
-#
-die() {
-    echo "${PROGNAME}: $*"
-    exit 1
-}
-
-#
-# Helper to complain.
-#
-warn() {
-    echo "${PROGNAME}: $*"
-}
-
-#
-# Helper to source a file if it exists.
-#
-maybe_source() {
-    for file in $*; do
-	if [ -f "$file" ]; then
-	    . $file
-	fi
-    done
-}
-
-search() {
-    search="$*"
-    for d in $search; do
-	ANT_HOME="`pwd`/$d"
-	ANT="$ANT_HOME/bin/ant"
-	if [ -x "$ANT" ]; then
-	    # found one
-	    echo $ANT_HOME
-	    break
-	fi
-    done
-}
-
-#
-# Main function.
-#
-main() {
-    # if there is a build config file. then source it
-    maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
-
-    # Increase the maximum file descriptors if we can
-    if [ $cygwin = "false" ]; then
-	MAX_FD_LIMIT=`ulimit -H -n`
-	if [ $? -eq 0 ]; then
-	    if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
-		# use the system max
-		MAX_FD="$MAX_FD_LIMIT"
-	    fi
-
-	    ulimit -n $MAX_FD
-	    if [ $? -ne 0 ]; then
-		warn "Could not set maximum file descriptor limit: $MAX_FD"
-	    fi
-	else
-	    warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-	fi
-    fi
-
-    # try the search path
-    ANT_HOME=`search $ANT_SEARCH_PATH`
-
-    # try looking up to root
-    if [ "x$ANT_HOME" = "x" ]; then
-	target="build"
-	_cwd=`pwd`
-
-	while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
-	    cd ..
-	    cwd=`pwd`
-	    ANT_HOME=`search $ANT_SEARCH_PATH`
-	done
-
-	# make sure we get back
-	cd $_cwd
-
-	if [ "$cwd" != "$ROOT" ]; then
-	    found="true"
-	fi
-
-	# complain if we did not find anything
-	if [ "$found" != "true" ]; then
-	    die "Could not locate Ant; check \$ANT or \$ANT_HOME."
-	fi
-    fi
-
-    # make sure we have one
-    ANT=$ANT_HOME/bin/ant
-    if [ ! -x "$ANT" ]; then
-	die "Ant file is not executable: $ANT"
-    fi
-
-    # need to specify planet57/buildmagic protocol handler package
-    ANT_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
-
-    # setup some build properties
-    ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"
-
-    # change to the directory where the script lives so users are not forced
-    # to be in the same directory as build.xml
-    cd $DIRNAME
-
-    # export some stuff for ant
-    export ANT ANT_HOME ANT_OPTS
-
-    # execute in debug mode, or simply execute
-    if [ "x$ANT_DEBUG" != "x" ]; then
-	/bin/sh -x $ANT $ANT_OPTIONS "$@"
-    else
-	exec $ANT $ANT_OPTIONS "$@"
-    fi
-}
-
-##
-## Bootstrap
-##
-
-main "$@"

Deleted: branches/refactor-test-branch/build.xml
===================================================================
--- branches/refactor-test-branch/build.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/build.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,250 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">
-]>
-
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-
-<project default="build" name="JBoss/Common">
-
-  <!-- ================================================================== -->
-  <!-- Setup                                                              -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Include the common Buildmagic elements.
-     |
-     | This defines several different targets, properties and paths.
-     | It also sets up the basic extention tasks amoung other things.
-   -->
-
-  &buildmagic;
-
-  <!--
-     | Include the normal targets.
-   -->
-  &targets;
-
-  <!-- ================================================================== -->
-  <!-- Configuration                                                      -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Configure the build system.  
-     |
-     | This target is invoked by the Buildmagic initialization logic and 
-     | should contain module specific configuration elements.
-   -->
-  <target name="configure" unless="configure.disable">
-
-    <!-- =================== -->
-    <!-- Basic Configuration -->
-    <!-- =================== -->
-
-    <!-- Module name(s) & version -->
-    <property name="module.name" value="common"/>
-    <property name="module.Name" value="JBoss/Common"/>
-    <property name="module.version" value="DEV"/>
-
-    
-
-    <!-- The combined dependent module classpath -->
-    <path id="dependentmodule.classpath">
-    </path>
-
-    <!-- ===== -->
-    <!-- Tasks -->
-    <!-- ===== -->
-
-    <call target="_default:task-init"/>
-    
-    <!-- Set project specific properties -->
-    <property name="jboss.home" value="../build/output/jboss-${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="server" value="default"/>
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Compile                                                            -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each 
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-  <target name="compile" depends="_default:compile-etc"
-    description="Compile all source files.">
-    <ant antfile="build-compile.xml" target="compile-classes">
-    	<property name="javac.debug" value="true" />
-    </ant>
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="module-jars" depends="compile">
-
-    <!-- Build jboss-common.jar -->
-    <jar jarfile="${build.lib}/${jar.server.name}"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/**"/>
-        <include name="org/apache/xerces/**"/>
-        <exclude name="org/jboss/xb/**"/>
-      </fileset>
-    </jar>
-
-    <!-- Build jboss-xml-binding.jar -->
-    <jar jarfile="${build.lib}/jboss-xml-binding.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/xb/**"/>
-      </fileset>
-    </jar>
-
-    <!-- Build jboss-common-client.jar -->
-    <jar jarfile="${build.lib}/${jar.client.name}"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/**"/>
-        <include name="org/apache/xerces/**"/>
-        <exclude name="org/jboss/deployment/**"/>
-        <exclude name="org/jboss/xb/**"/>
-      </fileset>
-    </jar>
-
-    <!-- Build namespace.jar -->
-    <jar jarfile="${build.lib}/namespace.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="javax/xml/namespace/*"/>
-      </fileset>
-    </jar>
-
-     <!-- Build browsing.jar -->
-     <jar jarfile="${build.lib}/jboss-archive-browsing.jar"
-       manifest="${build.etc}/default.mf">
-       <fileset dir="${build.classes}">
-         <include name="org/jboss/util/file/*"/>
-       </fileset>
-     </jar>
-
-    <!--
-       | JBoss/Testsuite Support
-     -->
-
-    <!-- testsuite-support.jar -->
-    <jar jarfile="${build.lib}/testsuite-support.jar" manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/logging/**"/>
-      </fileset>
-    </jar>
-  </target>
-
-  <target name="deploy" depends="module-jars" >
-    <copy todir="${jboss.home}/client" overwrite="true">
-      <fileset dir="${build.lib}">
-        <include name="jboss-xml-binding.jar"/>
-        <include name="jboss-common-client.jar"/>
-        <include name="namespace.jar"/>
-      </fileset>
-    </copy>
-    <copy todir="${jboss.home}/lib" overwrite="true">
-      <fileset dir="${build.lib}">
-        <include name="jboss-xml-binding.jar"/>
-        <include name="namespace.jar"/>
-      </fileset>
-    </copy>
-    <copy todir="${jboss.home}/server/${server}/lib" overwrite="true">
-      <fileset dir="${build.lib}">
-        <include name="jboss.jar"/>
-      </fileset>
-    </copy>
-  </target>
-  
-  <target name="build" depends="createthirdparty, main"/>
-  
-   <!-- create the thirdparty folder from items in the repository -->
-   <!-- then generate a new libraries.ent file and include it in  -->
-   <!-- the build                                                 -->
-   <target name="createthirdparty" unless="inhibit.downloads"
-      depends="check.inhibit.downloads, set.proxy">
-      
-      <ant antfile="build-thirdparty.xml" target="generate-lib-file"/>
-   </target>
-
-   <!-- check if thirdparty libraries are to be downloaded -->
-   <target name="check.inhibit.downloads">
-      <condition property="inhibit.downloads">
-         <or>
-            <uptodate property="dependencies.current"
- 	      srcfile="build-thirdparty.xml"
-               targetfile="thirdparty/libraries.ent"/>
-            <istrue value="${nodownload}"/>
-         </or>
-      </condition>
-  </target>
-
-  <!-- check if the the user has specied proxy settings -->
-  <target name="check.proxy">
-    <condition property="hasproxy">
-        <and>
-            <isset property="proxy.host"/>
-            <isset property="proxy.port"/>
-            <not>
-                <equals arg1="" arg2="${proxy.host}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.port}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  </target>
-
-  <!-- set proxy settings -->
-  <condition property="hasproxyauth">
-        <and>
-            <isset property="hasproxy"/>
-            <isset property="proxy.username"/>
-            <isset property="proxy.password"/>
-            <not>
-                <equals arg1="" arg2="${proxy.username}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.password}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
-
-  <!-- set proxy settings without auth -->
-  <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
-    <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
-  </target>
-
-  <!-- set proxy settings using auth -->
-  <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
-    <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
-  </target>  
-  
-</project>

Copied: branches/refactor-test-branch/common-core (from rev 1956, branches/logging_refactoring/common-core)

Copied: branches/refactor-test-branch/common-core/trunk (from rev 1956, branches/logging_refactoring/common-core/trunk)

Deleted: branches/refactor-test-branch/common-core/trunk/build-compile.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/build-compile.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/build-compile.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">   
-]>
-
-<project default="main" name="JBoss/Build">
-
-  &buildmagic;
-  &libraries;
-  &targets;
-   <!-- The combined library classpath -->
-      <path id="library.classpath">
-         <path refid="jboss/common.logging.spi.classpath"/>
-         <path refid="apache.httpclient.classpath"/>
-         <path refid="apache.slide.classpath"/>         
-         <path refid="oswego.concurrent.classpath"/>
-         <path refid="dom4j.dom4j.classpath"/>
-         <path refid="apache.log4j.classpath"/>
-         <path refid="wutka.dtdparser.classpath"/>
-         <path refid="apache.xerces.classpath"/>
-<!--        
-        <path refid="apache.commons.classpath"/>
-        
-        
-        
-        
-        
-        <path refid="sun.jaf.classpath"/>-->
-      </path>
-
-        <!-- The combined dependent module classpath -->
-        <path id="dependentmodule.classpath">
-    </path>
-  
-  <target name="compile-classes" depends="_default:compile-classes">
- 
-  </target>
- 
-</project>

Copied: branches/refactor-test-branch/common-core/trunk/build-compile.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/build-compile.xml)

Deleted: branches/refactor-test-branch/common-core/trunk/build-thirdparty.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/build-thirdparty.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/build-thirdparty.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-<!-- $Id: build-thirdparty.xml,v 1.113 2006/05/23 23:19:24 jgreene Exp $ -->
-<project name="main.build"
-          default="synchronize"
-          basedir=".">
-
-   <!-- Property File definitions -->
-   <property file="local.properties"/>
-   <property file="synchronize.properties"/>
-   <property environment="env"/>
-
-   <!-- Property Definitions -->
-   <property name="generatedLibrariesFiles" value="thirdparty/libraries.ent"/>
-
-   <!-- Allow jbossbuild.repository to be set from (in order or priority)
-      + Command line -Djbossbuild.repository=...
-      + synchronize.properties jbossbuild.repository setting
-      + JBOSS_REPOSITORY environment variable
-   -->
-   <condition property="jbossbuild.repository" value="${env.JBOSS_REPOSITORY}">
-      <isset property="env.JBOSS_REPOSITORY"/>
-   </condition>
-   <!-- Fall back to default -->
-   <property name="jbossbuild.repository" value="http://repository.jboss.com"/>
-
-   <!-- File Imports -->
-   <import file="tools/etc/jbossbuild/tasks.xml"/>
-
-
-   <!-- Main Definition of dependencies -->
-   <build id="jbossas-thirdparty"
-          impltitle="JBossAS"
-          implversion="jboss-head"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.org"
-          description="JBoss Application Server"
-          cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
-          thirdpartypath="thirdparty/"
-          location="${jbossbuild.repository}"
-          targetdefs="targets">
-
-      <!--
-        The repository is in CVS under the module repository.jboss.com whose contents
-        are pushed to the http://repository.jboss.com site.
-      -->
-      <componentref name="apache-httpclient" version="2.0.2"/>
-      <componentref name="apache-slide" version="2.0"/> 
-      <componentref name="oswego-concurrent" version="1.3.4"/>
-      <componentref name="dom4j" version="1.5"/>
-      <componentref name="apache-log4j" version="1.2.8"/> 
-      <componentref name="wutka-dtdparser" version="1.2.1"/>
-      <componentref name="apache-xerces" version="2.7.1"/>
-      <componentref name="jboss/common-logging-spi" version="1.0.1.TEST"/>
-
-   </build>
-
-   <synchronizeinfo/>
-
-   <!-- Generate the targets -->
-   <generate generate="jbossas-thirdparty"/>
-
-
-   <target name="generate-lib-file"
-      description="generate libraries.ent and thirdparty license info"
-      depends="synchronize">
-         <gen-lib-file filename="${generatedLibrariesFiles}" path="tools/etc/buildmagic/" />
-      <visit-componentref-graph
-         componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor" />
-   </target>
-
-</project>

Copied: branches/refactor-test-branch/common-core/trunk/build-thirdparty.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/build-thirdparty.xml)

Deleted: branches/refactor-test-branch/common-core/trunk/build.bat
===================================================================
--- branches/logging_refactoring/common-core/trunk/build.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/build.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,89 +0,0 @@
- at echo off
-REM  ======================================================================
-REM
-REM  This is the main entry point for the build system.
-REM
-REM  Users should be sure to execute this file rather than 'ant' to ensure
-REM  the correct version is being used with the correct configuration.
-REM
-REM  ======================================================================
-REM
-REM $Id$
-REM
-REM Authors:
-REM     Jason Dillon <jason at planet57.com>
-REM     Sacha Labourey <sacha.labourey at cogito-info.ch>
-REM
-
-REM ******************************************************
-REM Ignore the ANT_HOME variable: we want to use *our*
-REM ANT version and associated JARs.
-REM ******************************************************
-REM Ignore the users classpath, cause it might mess
-REM things up
-REM ******************************************************
-
-SETLOCAL
-
-set CLASSPATH=
-set ANT_HOME=
-set ANT_OPTS=-Djava.protocol.handler.pkgs=org.jboss.net.protocol -Dbuild.script=build.bat
-
-REM ******************************************************
-REM - "for" loops have been unrolled for compatibility
-REM   with some WIN32 systems.
-REM ******************************************************
-
-set NAMES=tools;tools\ant;tools\apache\ant
-set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
-
-REM ******************************************************
-REM ******************************************************
-
-SET EXECUTED=FALSE
-for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
-
-goto :EOF
-
-
-REM ******************************************************
-REM ********* Search for names in the subfolders *********
-REM ******************************************************
-
-:subLoop
-for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %2 %3 %4 %5 %6 %7
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************ Test if ANT Batch file exists ***********
-REM ******************************************************
-
-:testIfExists
-if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************** Batch file has been found *************
-REM ******************************************************
-
-:BatchFound
-if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
-set EXECUTED=TRUE
-
-goto :EOF
-
-REM ******************************************************
-REM ************* Execute Batch file only once ***********
-REM ******************************************************
-
-:ExecuteBatch
-echo Calling %1 %2 %3 %4 %5 %6 %7 %8
-call %1 %2 %3 %4 %5 %6 %7 %8
-
-:end
-
-if "%NOPAUSE%" == "" pause

Copied: branches/refactor-test-branch/common-core/trunk/build.bat (from rev 1956, branches/logging_refactoring/common-core/trunk/build.bat)

Deleted: branches/refactor-test-branch/common-core/trunk/build.sh
===================================================================
--- branches/logging_refactoring/common-core/trunk/build.sh	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/build.sh	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,173 +0,0 @@
-#!/bin/sh
-### ====================================================================== ###
-##                                                                          ##
-##  This is the main entry point for the build system.                      ##
-##                                                                          ##
-##  Users should be sure to execute this file rather than 'ant' to ensure   ##
-##  the correct version is being used with the correct configuration.       ##
-##                                                                          ##
-### ====================================================================== ###
-#
-
-# $Id$
-
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-GREP="grep"
-ROOT="/"
-
-# Ignore user's ANT_HOME if it is set
-ANT_HOME=""
-
-# the default search path for ant
-ANT_SEARCH_PATH="\
-    tools
-    tools/ant \
-    tools/apache/ant \
-    ant"
-
-# the default build file name
-ANT_BUILD_FILE="build.xml"
-
-# the default arguments
-ANT_OPTIONS="-find $ANT_BUILD_FILE"
-
-# Use the maximum available, or set MAX_FD != -1 to use that
-MAX_FD="maximum"
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-darwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-
-    Darwin*)
-        darwin=true
-        ;;
-esac
-
-#
-# Helper to complain.
-#
-die() {
-    echo "${PROGNAME}: $*"
-    exit 1
-}
-
-#
-# Helper to complain.
-#
-warn() {
-    echo "${PROGNAME}: $*"
-}
-
-#
-# Helper to source a file if it exists.
-#
-maybe_source() {
-    for file in $*; do
-	if [ -f "$file" ]; then
-	    . $file
-	fi
-    done
-}
-
-search() {
-    search="$*"
-    for d in $search; do
-	ANT_HOME="`pwd`/$d"
-	ANT="$ANT_HOME/bin/ant"
-	if [ -x "$ANT" ]; then
-	    # found one
-	    echo $ANT_HOME
-	    break
-	fi
-    done
-}
-
-#
-# Main function.
-#
-main() {
-    # if there is a build config file. then source it
-    maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
-
-    # Increase the maximum file descriptors if we can
-    if [ $cygwin = "false" ]; then
-	MAX_FD_LIMIT=`ulimit -H -n`
-	if [ $? -eq 0 ]; then
-	    if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
-		# use the system max
-		MAX_FD="$MAX_FD_LIMIT"
-	    fi
-
-	    ulimit -n $MAX_FD
-	    if [ $? -ne 0 ]; then
-		warn "Could not set maximum file descriptor limit: $MAX_FD"
-	    fi
-	else
-	    warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-	fi
-    fi
-
-    # try the search path
-    ANT_HOME=`search $ANT_SEARCH_PATH`
-
-    # try looking up to root
-    if [ "x$ANT_HOME" = "x" ]; then
-	target="build"
-	_cwd=`pwd`
-
-	while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
-	    cd ..
-	    cwd=`pwd`
-	    ANT_HOME=`search $ANT_SEARCH_PATH`
-	done
-
-	# make sure we get back
-	cd $_cwd
-
-	if [ "$cwd" != "$ROOT" ]; then
-	    found="true"
-	fi
-
-	# complain if we did not find anything
-	if [ "$found" != "true" ]; then
-	    die "Could not locate Ant; check \$ANT or \$ANT_HOME."
-	fi
-    fi
-
-    # make sure we have one
-    ANT=$ANT_HOME/bin/ant
-    if [ ! -x "$ANT" ]; then
-	die "Ant file is not executable: $ANT"
-    fi
-
-    # need to specify planet57/buildmagic protocol handler package
-    ANT_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
-
-    # setup some build properties
-    ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"
-
-    # change to the directory where the script lives so users are not forced
-    # to be in the same directory as build.xml
-    cd $DIRNAME
-
-    # export some stuff for ant
-    export ANT ANT_HOME ANT_OPTS
-
-    # execute in debug mode, or simply execute
-    if [ "x$ANT_DEBUG" != "x" ]; then
-	/bin/sh -x $ANT $ANT_OPTIONS "$@"
-    else
-	exec $ANT $ANT_OPTIONS "$@"
-    fi
-}
-
-##
-## Bootstrap
-##
-
-main "$@"

Copied: branches/refactor-test-branch/common-core/trunk/build.sh (from rev 1956, branches/logging_refactoring/common-core/trunk/build.sh)

Deleted: branches/refactor-test-branch/common-core/trunk/build.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/build.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/build.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">
-]>
-
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-
-<project default="build" name="JBoss/Common">
-
-  <!-- ================================================================== -->
-  <!-- Setup                                                              -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Include the common Buildmagic elements.
-     |
-     | This defines several different targets, properties and paths.
-     | It also sets up the basic extention tasks amoung other things.
-   -->
-
-  &buildmagic;
-
-  <!--
-     | Include the normal targets.
-   -->
-  &targets;
-
-  <!-- ================================================================== -->
-  <!-- Configuration                                                      -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Configure the build system.  
-     |
-     | This target is invoked by the Buildmagic initialization logic and 
-     | should contain module specific configuration elements.
-   -->
-
-  <target name="configure" unless="configure.disable">
-
-    <!-- =================== -->
-    <!-- Basic Configuration -->
-    <!-- =================== -->
-
-    <!-- Module name(s) & version -->
-    <property name="module.name" value="common"/>
-    <property name="module.Name" value="JBoss/Common"/>
-    <property name="module.version" value="DEV"/>
-
-    
-
-    <!-- The combined dependent module classpath -->
-    <path id="dependentmodule.classpath">
-    </path>
-
-    <!-- ===== -->
-    <!-- Tasks -->
-    <!-- ===== -->
-
-    <call target="_default:task-init"/>
-    
-    <!-- Set project specific properties -->
-    <property name="jboss.home" value="../build/output/jboss-${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="server" value="default"/>
-    
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Compile                                                            -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each 
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-  <target name="compile" depends="_default:compile-etc"
-    description="Compile all source files.">
-    <ant antfile="build-compile.xml" target="compile-classes"/>
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="module-jars">
-
-    <!-- Build jboss-common.jar -->
-    <jar jarfile="${build.lib}/jboss-common-core.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"/>
-    </jar>
-
-  </target>
-  
-  <target name="build" depends="createthirdparty, main"/>
-  
-   <!-- create the thirdparty folder from items in the repository -->
-   <!-- then generate a new libraries.ent file and include it in  -->
-   <!-- the build                                                 -->
-   <target name="createthirdparty" unless="inhibit.downloads"
-      depends="check.inhibit.downloads, set.proxy">
-      
-      <ant antfile="build-thirdparty.xml" target="generate-lib-file"/>
-   </target>
-
-   <!-- check if thirdparty libraries are to be downloaded -->
-   <target name="check.inhibit.downloads">
-      <condition property="inhibit.downloads">
-         <or>
-            <uptodate property="dependencies.current"
- 	      srcfile="build-thirdparty.xml"
-               targetfile="thirdparty/libraries.ent"/>
-            <istrue value="${nodownload}"/>
-         </or>
-      </condition>
-  </target>
-
-  <!-- check if the the user has specied proxy settings -->
-  <target name="check.proxy">
-    <condition property="hasproxy">
-        <and>
-            <isset property="proxy.host"/>
-            <isset property="proxy.port"/>
-            <not>
-                <equals arg1="" arg2="${proxy.host}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.port}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  </target>
-
-  <!-- set proxy settings -->
-  <condition property="hasproxyauth">
-        <and>
-            <isset property="hasproxy"/>
-            <isset property="proxy.username"/>
-            <isset property="proxy.password"/>
-            <not>
-                <equals arg1="" arg2="${proxy.username}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.password}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
-
-  <!-- set proxy settings without auth -->
-  <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
-    <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
-  </target>
-
-  <!-- set proxy settings using auth -->
-  <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
-    <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
-  </target>  
-  
-</project>

Copied: branches/refactor-test-branch/common-core/trunk/build.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/build.xml)

Deleted: branches/refactor-test-branch/common-core/trunk/pom.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/pom.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/pom.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,138 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>jboss.common.core</groupId>
-  <artifactId>jboss-common-core</artifactId>
-  <packaging>jar</packaging>
-  <version>1.0.1.TEST</version>
-  <name>JBoss Common Classes</name>
-  <url>http://www.jboss.org</url>
-  <description>A set of commonly used classed classes</description>
-  <licenses>
-   <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-   </license>
-  </licenses>
-  <organization>
-    <name>JBoss Inc.</name>
-    <url>http://www.jboss.org</url>
-  </organization>
- 
-  <repositories>
-    <repository>
-      <id>jboss</id>
-      <name>JBoss Inc. Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.com/maven2/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <pluginRepositories>
-     <pluginRepository>
-        <id>jbosspluginrepo</id>
-        <name>jboss plugin repository</name>
-        <url>http://repository.jboss.com/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-      <pluginRepository>
-        <id>central</id>
-        <name>LSU maven2 mirror</name>
-        <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-  </pluginRepositories>
-
-  
-  <build>
-     <sourceDirectory>src/main/java</sourceDirectory>
-  <plugins>
-  
-
-    
-      <!-- define how we want compilation to take place
-           here, we accept most of the defaults but say that we want the
-           optimization flag set, and define the source and target to be 1.4,
-           these setting will be inherited by child projects -->
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0</version>
-          <configuration>
-              <optimize>true</optimize>
-              <source>1.4</source>
-              <target>1.4</target>
-          </configuration>
-      </plugin>  
-
-      <!-- define that we wish to create src jars -->
-      <plugin>
-        <artifactId>maven-source-plugin</artifactId>
-        <inherited>true</inherited>
-       <executions>
-        <execution>
-          <goals>
-            <goal>jar</goal>
-          </goals>
-        </execution>
-      </executions>
-      </plugin>     
-    
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>dom4j</groupId>
-      <artifactId>dom4j</artifactId>
-      <version>1.5</version>
-    </dependency>
-    <dependency>
-      <groupId>apache-xerces</groupId>
-      <artifactId>xml-apis</artifactId>
-      <version>2.7.1</version>
-    </dependency> 
-    <dependency>
-      <groupId>apache-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-      <version>2.0.2</version>
-    </dependency>      
-    <dependency>
-      <groupId>oswego-concurrent</groupId>
-      <artifactId>concurrent</artifactId>
-      <version>1.3.4</version>
-    </dependency>
-    <dependency>
-      <groupId>apache-slide</groupId>
-      <artifactId>webdavlib</artifactId>
-      <version>2.0</version>
-    </dependency>   
-    <dependency>
-      <groupId>apache-log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>1.2.8</version>
-    </dependency>      
-    <dependency>
-      <groupId>jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-      <version>1.0.1.TEST</version>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>  
-
-</project>
-

Copied: branches/refactor-test-branch/common-core/trunk/pom.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/pom.xml)

Copied: branches/refactor-test-branch/common-core/trunk/src (from rev 1956, branches/logging_refactoring/common-core/trunk/src)

Copied: branches/refactor-test-branch/common-core/trunk/src/etc (from rev 1956, branches/logging_refactoring/common-core/trunk/src/etc)

Deleted: branches/refactor-test-branch/common-core/trunk/src/etc/default.mf
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/etc/default.mf	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/etc/default.mf	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Created-By: @java.vm.version@ (@java.vm.vendor@)
-Specification-Title: @specification.title@
-Specification-Version: @specification.version@
-Specification-Vendor: @specification.vendor@
-Implementation-Title: @implementation.title@
-Implementation-URL: @implementation.url@
-Implementation-Version: @implementation.version@
-Implementation-Vendor: @implementation.vendor@
-Implementation-Vendor-Id: @implementation.vendor.id@

Copied: branches/refactor-test-branch/common-core/trunk/src/etc/default.mf (from rev 1956, branches/logging_refactoring/common-core/trunk/src/etc/default.mf)

Copied: branches/refactor-test-branch/common-core/trunk/src/main (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/DelegatingURLConnection.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/DelegatingURLConnection.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/DelegatingURLConnection.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,219 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import java.net.URLConnection;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import java.security.Permission;
-
-/**
- * An delegating URLConnection support class.
- *
- * @todo resolve 1.4 specific issues.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class DelegatingURLConnection
-   extends URLConnection
-{
-   protected URL delegateUrl;
-   protected URLConnection delegateConnection;
-
-   public DelegatingURLConnection(final URL url)
-      throws MalformedURLException, IOException
-   {
-      super(url);
-      
-      delegateUrl = makeDelegateUrl(url);
-      delegateConnection = makeDelegateUrlConnection(delegateUrl);
-   }
-
-   protected URL makeDelegateUrl(final URL url)
-      throws MalformedURLException, IOException
-   {
-      return url;
-   }
-
-   protected URLConnection makeDelegateUrlConnection(final URL url)
-      throws IOException
-   {
-      return url.openConnection();
-   }
-
-   public void connect() throws IOException
-   {
-      delegateConnection.connect();
-   }
-   
-   public URL getURL() {
-      return delegateConnection.getURL();
-   }
-
-   public int getContentLength() {
-      return delegateConnection.getContentLength();
-   }
-
-   public String getContentType() {
-      return delegateConnection.getContentType();
-   }
-
-   public String getContentEncoding() {
-      return delegateConnection.getContentEncoding();
-   }
-
-   public long getExpiration() {
-      return delegateConnection.getExpiration();
-   }
-
-   public long getDate() {
-      return delegateConnection.getDate();
-   }
-
-   public long getLastModified() {
-      return delegateConnection.getLastModified();
-   }
-
-   public String getHeaderField(String name) {
-      return delegateConnection.getHeaderField(name);
-   }
-
-   /* This is specific to 1.4
-   public Map getHeaderFields() {
-      return delegateConnection.getHeaderFields();
-   }
-   */
-   
-   public int getHeaderFieldInt(String name, int _default) {
-      return delegateConnection.getHeaderFieldInt(name, _default);
-   }
-
-   public long getHeaderFieldDate(String name, long _default) {
-      return delegateConnection.getHeaderFieldDate(name, _default);
-   }
-
-   public String getHeaderFieldKey(int n) {
-      return delegateConnection.getHeaderFieldKey(n);
-   }
-
-   public String getHeaderField(int n) {
-      return delegateConnection.getHeaderField(n);
-   }
-
-   public Object getContent() throws IOException {
-      return delegateConnection.getContent();
-   }
-
-   public Object getContent(Class[] classes) throws IOException {
-      return delegateConnection.getContent(classes);
-   }
-
-   public Permission getPermission() throws IOException {
-      return delegateConnection.getPermission();
-   }
-
-   public InputStream getInputStream() throws IOException {
-      return delegateConnection.getInputStream();
-   }
-
-   public OutputStream getOutputStream() throws IOException {
-      return delegateConnection.getOutputStream();
-   }
-
-   public String toString() {
-      return super.toString() + "{ " + delegateConnection + " }";
-   }
-
-   public void setDoInput(boolean doinput) {
-      delegateConnection.setDoInput(doinput);
-   }
-   
-   public boolean getDoInput() {
-      return delegateConnection.getDoInput();
-   }
-
-   public void setDoOutput(boolean dooutput) {
-      delegateConnection.setDoOutput(dooutput);
-    }
-
-   public boolean getDoOutput() {
-      return delegateConnection.getDoOutput();
-   }
-
-   public void setAllowUserInteraction(boolean allowuserinteraction) {
-      delegateConnection.setAllowUserInteraction(allowuserinteraction);
-   }
-
-   public boolean getAllowUserInteraction() {
-      return delegateConnection.getAllowUserInteraction();
-   }
-
-   public void setUseCaches(boolean usecaches) {
-      delegateConnection.setUseCaches(usecaches);
-   }
-
-   public boolean getUseCaches() {
-      return delegateConnection.getUseCaches();
-   }
-
-   public void setIfModifiedSince(long ifmodifiedsince) {
-      delegateConnection.setIfModifiedSince(ifmodifiedsince);
-   }
-
-   public long getIfModifiedSince() {
-      return delegateConnection.getIfModifiedSince();
-   }
-
-   public boolean getDefaultUseCaches() {
-      return delegateConnection.getDefaultUseCaches();
-   }
-
-   public void setDefaultUseCaches(boolean defaultusecaches) {
-      delegateConnection.setDefaultUseCaches(defaultusecaches);
-   }
-
-   public void setRequestProperty(String key, String value) {
-      delegateConnection.setRequestProperty(key, value);
-   }
-
-   /* This is specific to 1.4
-   public void addRequestProperty(String key, String value) {
-      delegateConnection.addRequestProperty(key, value);
-   }
-   */
-   
-   public String getRequestProperty(String key) {
-      return delegateConnection.getRequestProperty(key);
-   }
-
-   /* This is specific to 1.4
-   public Map getRequestProperties() {
-      return delegateConnection.getRequestProperties();
-   }
-   */
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/DelegatingURLConnection.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/DelegatingURLConnection.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLLister.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/URLLister.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLLister.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,88 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.Collection;
-
-/**
- * Interface defining methods that can be used to list the contents of a URL
- * collection irrespective of the protocol.
- */
-public interface URLLister {
-   /**
-    * List the members of the given collection URL that match the patterns
-    * supplied and, if it contains directory that contains NO dot in the name and
-    * scanNonDottedSubDirs is true, recursively finds URL in these directories.
-    * @param baseUrl the URL to list; must end in "/"
-    * @param patterns the patterns to match (separated by ',')
-    * @param scanNonDottedSubDirs enables recursive search for directories containing no dots
-    * @return a Collection of URLs that match
-    * @throws IOException if there was a problem getting the list
-    */
-   Collection listMembers(URL baseUrl, String patterns, boolean scanNonDottedSubDirs) throws IOException;
-   
-   /**
-    * List the members of the given collection URL that match the patterns
-    * supplied. Doesn't recursively list files contained in directories.
-    * @param baseUrl the URL to list; must end in "/"
-    * @param patterns the patterns to match (separated by ',')
-    * @return a Collection of URLs that match
-    * @throws IOException if there was a problem getting the list
-    */
-   Collection listMembers(URL baseUrl, String patterns) throws IOException;
-
-   /**
-    * List the members of the given collection that are accepted by the filter
-    * @param baseUrl the URL to list; must end in "/"
-    * @param filter a filter that is called to determine if a member should
-    *               be returned
-    * @param scanNonDottedSubDirs enables recursive search for directories containing no dots
-    * @return a Collection of URLs that match
-    * @throws IOException if there was a problem getting the list
-    */
-   Collection listMembers(URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException;
-
-   /**
-    * List the members of the given collection that are accepted by the filter
-    * @param baseUrl the URL to list; must end in "/"
-    * @param filter a filter that is called to determine if a member should
-    *               be returned
-    * @return a Collection of URLs that match
-    * @throws IOException if there was a problem getting the list
-    */
-   Collection listMembers(URL baseUrl, URLFilter filter) throws IOException;
-
-   /**
-    * Interface defining a filter for listed members.
-    */
-   public interface URLFilter {
-      /**
-       * Determine whether the supplied memberName should be accepted
-       * @param baseURL the URL of the collection
-       * @param memberName the member of the collection
-       * @return
-       */
-      boolean accept(URL baseURL, String memberName);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLLister.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/URLLister.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerBase.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerBase.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerBase.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,96 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Collection;
-import java.util.StringTokenizer;
-import java.net.URL;
-import java.io.IOException;
-
-/**
- * Support class for URLLister's providing protocol independent functionality.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public abstract class URLListerBase implements URLLister
-{
-   public Collection listMembers (URL baseUrl, String patterns,
-      boolean scanNonDottedSubDirs) throws IOException
-   {
-      // @todo, externalize the separator?
-      StringTokenizer tokens = new StringTokenizer (patterns, ",");
-      String[] members = new String[tokens.countTokens ()];
-      for (int i=0; tokens.hasMoreTokens (); i++)
-      {
-         String token = tokens.nextToken ();
-         // Trim leading/trailing spaces as its unlikely they are meaningful
-         members[i] = token.trim();
-      }
-      URLFilter filter = new URLFilterImpl (members);
-      return listMembers (baseUrl, filter, scanNonDottedSubDirs);
-   }
-
-   public Collection listMembers (URL baseUrl, String patterns) throws IOException
-   {
-      return listMembers (baseUrl, patterns, false);
-   }
-   
-   /**
-    * Inner class representing Filter criteria to be applied to the members
-    * of the returned Collection
-    */
-   public static class URLFilterImpl implements URLFilter
-   {
-      protected boolean allowAll;
-      protected HashSet constants;
-      
-      public URLFilterImpl (String[] patterns)
-      {
-         constants = new HashSet (Arrays.asList (patterns));
-         allowAll = constants.contains ("*");
-      }
-      
-      public boolean accept (URL baseUrl, String name)
-      {
-         if (allowAll)
-         {
-            return true;
-         }
-         if (constants.contains (name))
-         {
-            return true;
-         }
-         return false;
-      }
-   }
-   
-   protected static final URLFilter acceptAllFilter = new URLFilter ()
-   {
-      public boolean accept (URL baseURL, String memberName)
-      {
-         return true;
-      }
-   };
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerBase.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerBase.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,88 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.util.HashMap;
-
-public class URLListerFactory {
-   private static HashMap defaultClasses = new HashMap();
-   static {
-      defaultClasses.put("file", "org.jboss.net.protocol.file.FileURLLister");
-      defaultClasses.put("http", "org.jboss.net.protocol.http.DavURLLister");
-      defaultClasses.put("https", "org.jboss.net.protocol.http.DavURLLister");
-   }
-
-   private HashMap classes;
-
-   /**
-    * Create a URLLister with default listers defined for file and http
-    * protocols.
-    */
-   public URLListerFactory() {
-      classes = (HashMap) defaultClasses.clone();
-   }
-
-   /**
-    * Create a URL lister using the protocol from the URL
-    * @param url the url defining the protocol
-    * @return a URLLister capable of listing URLs of that protocol
-    * @throws MalformedURLException if no lister could be found for the protocol
-    */
-   public URLLister createURLLister(URL url) throws MalformedURLException  {
-      return createURLLister(url.getProtocol());
-   }
-
-   /**
-    * Create a URL lister for the supplied protocol
-    * @param protocol the protocol
-    * @return a URLLister capable of listing URLs of that protocol
-    * @throws MalformedURLException if no lister could be found for the protocol
-    */
-   public URLLister createURLLister(String protocol) throws MalformedURLException {
-      try {
-         String className = (String) classes.get(protocol);
-         if (className == null) {
-            throw new MalformedURLException("No lister class defined for protocol "+protocol);
-         }
-
-         Class clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
-         return (URLLister) clazz.newInstance();
-      } catch (ClassNotFoundException e) {
-         throw new MalformedURLException(e.getMessage());
-      } catch (InstantiationException e) {
-         throw new MalformedURLException(e.getMessage());
-      } catch (IllegalAccessException e) {
-         throw new MalformedURLException(e.getMessage());
-      }
-   }
-
-   /**
-    * Register a URLLister class for a given protocol
-    * @param protocol the protocol this class will handle
-    * @param className the URLLister implementation to instanciate
-    */
-   public void registerListener(String protocol, String className) {
-      classes.put(protocol, className);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/URLListerFactory.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLStreamHandlerFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/URLStreamHandlerFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLStreamHandlerFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,229 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol;
-
-import java.net.URL;
-import java.net.URLStreamHandler;
-import java.util.Collections;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.jboss.logging.Logger;
-
-/**
- * A factory for loading URL protocol handlers.  This is based
- * on Sun's URL mechanism, in that <tt>Handler</tt> classes will be
- * searched for in the packages specified by the java.protocol.handler.pkgs
- * property are searched for classes matching the protocol + ".Handler"
- * classname. The default JBoss package "org.jboss.net.protocol" is searched
- * even if not specified in the java.protocol.handler.pkgs property.
- *
- * <p>This factory is installed by the default server implementaion
- * to ensure that protocol handlers not in the system classpath are
- * located. The thread context class is used first followed by the
- * Class.forName method.
- * </p>
- *
- * <p>Use {@link preload} to force the URL handler map to load the
- *    handlers for each protocol listed in {@link #PROTOCOLS}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author Scott.Stark at jboss.org
- */
-public class URLStreamHandlerFactory
-   implements java.net.URLStreamHandlerFactory
-{
-   /** Class logger. */
-   private static final Logger log = Logger.getLogger(URLStreamHandlerFactory.class);
-   
-   /** The package prefix where JBoss protocol handlers live. */
-   public static final String PACKAGE_PREFIX = "org.jboss.net.protocol";
-   /** A map of protocol names to handlers. Since there can only be one
-    URLStreamHandlerFactory installed, this is a static map that may be
-    cleared.
-    */
-   private static Map handlerMap = Collections.synchronizedMap(new HashMap());
-
-   /** This thread local is used to prevent recursion in the
-    * createURLStreamHandler method. Resolving the protocol handler
-    * class can end up creating a new URL which can loop back into
-    * this factory with a stack like:
-    * <pre>
-      URLStreamHandlerFactory that use the TCL. See bug#669043
-      createURLStreamHandler():146, URLStreamHandlerFactory.java
-      getURLStreamHandler():1057, URL.java
-      <init>():405, URL.java
-      <init>():329, URL.java
-      <init>():321, URL.java
-      <init>():540, URLClassPath.java
-      run():319, URLClassPath.java
-      doPrivileged():-1, AccessController.java
-      getLoader():308, URLClassPath.java
-      getLoader():285, URLClassPath.java
-      findResource():136, URLClassPath.java
-      run():351, URLClassLoader.java
-      doPrivileged():-1, AccessController.java
-      findResource():348, URLClassLoader.java
-      getResource():780, ClassLoader.java
-      getResourceLocally():250, UnifiedClassLoader.java
-      getResourceFromClassLoader():333, UnifiedLoaderRepository3.java
-      getResource():243, UnifiedLoaderRepository3.java
-      getResource():228, UnifiedClassLoader3.java
-     </pre>
-    So we detect recursion based on the protocol value matches the current
-    createURLStreamHandlerProtocol setting.
-   */
-   private static ThreadLocal createURLStreamHandlerProtocol = new ThreadLocal();
-
-   /** The current packages prefixes determined from the java.protocol.handler.pkgs
-    property + the org.jboss.net.protocol default package.
-    */
-   private String[] handlerPkgs = {PACKAGE_PREFIX};
-   /** The last java.protocol.handler.pkgs value. Used to determine if the
-    java.protocol.handler.pkgs property has changed since handlerPkgs was
-    last built.
-    */
-   private String lastHandlerPkgs = PACKAGE_PREFIX;
-
-   /** A list of JBoss specific protocols for preloading. */
-   public static final String PROTOCOLS[] = {
-      "resource",
-      "file"
-   };
-
-   /**
-    * Preload the JBoss specific protocol handlers, so that URL knows about
-    * them even if the handler factory is changed.
-    */
-   public static void preload()
-   {
-      for (int i = 0; i < PROTOCOLS.length; i ++)
-      {
-         try
-         {
-            URL url = new URL(PROTOCOLS[i], "", -1, "");
-            log.trace("Loaded protocol: " + PROTOCOLS[i]);
-         }
-         catch (Exception e)
-         {
-            log.warn("Failed to load protocol: " + PROTOCOLS[i], e);
-         }
-      }
-   }
-
-   /** Clear the current protocol to handler map. The map will be rebuilt
-    as protocol handlers are requested.
-    */
-   public static void clear()
-   {
-      handlerMap.clear();
-   }
-
-   /** Search the handlerPkgs for URLStreamHandler classes matching the
-    * pkg + protocol + ".Handler" naming convention.
-    *
-    * @see #checkHandlerPkgs()
-    * @param protocol The protocol to create a stream handler for
-    * @return The protocol handler or null if not found
-    */
-   public URLStreamHandler createURLStreamHandler(final String protocol)
-   {
-      // Check the handler map
-      URLStreamHandler handler = (URLStreamHandler) handlerMap.get(protocol);
-      if( handler != null )
-         return handler;
-
-      // Validate that createURLStreamHandler is not recursing
-      String prevProtocol = (String) createURLStreamHandlerProtocol.get();
-      if( prevProtocol != null && prevProtocol.equals(protocol) )
-         return null;
-      createURLStreamHandlerProtocol.set(protocol);
-
-      // See if the handler pkgs definition has changed
-      checkHandlerPkgs();
-
-      // Search the handlerPkgs for a matching protocol handler
-      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-      for(int p = 0; p < handlerPkgs.length; p ++)
-      {
-         try
-         {
-            // Form the standard protocol handler class name
-            String classname = handlerPkgs[p] + "." + protocol + ".Handler";
-            Class type = null;
-
-            try
-            {
-               type = ctxLoader.loadClass(classname);
-            }
-            catch(ClassNotFoundException e)
-            {
-               // Try our class loader
-               type = Class.forName(classname);
-            }
-
-            if( type != null )
-            {
-               handler = (URLStreamHandler) type.newInstance();
-               handlerMap.put(protocol, handler);
-               log.trace("Found protocol:"+protocol+" handler:"+handler);
-            }
-         }
-         catch (Throwable ignore)
-         {
-         }
-      }
-
-      createURLStreamHandlerProtocol.set(null);
-      return handler;
-   }
-
-   /** See if the java.protocol.handler.pkgs system property has changed
-    and if it has, parse it to update the handlerPkgs array.
-    */
-   private synchronized void checkHandlerPkgs()
-   {
-      String handlerPkgsProp = System.getProperty("java.protocol.handler.pkgs");
-      if( handlerPkgsProp != null && handlerPkgsProp.equals(lastHandlerPkgs) == false )
-      {
-         // Update the handlerPkgs[] from the handlerPkgsProp
-         StringTokenizer tokeninzer = new StringTokenizer(handlerPkgsProp, "|");
-         ArrayList tmp = new ArrayList();
-         while( tokeninzer.hasMoreTokens() )
-         {
-            String pkg = tokeninzer.nextToken().intern();
-            if( tmp.contains(pkg) == false )
-               tmp.add(pkg);
-         }
-         // Include the JBoss default protocol handler pkg
-         if( tmp.contains(PACKAGE_PREFIX) == false )
-            tmp.add(PACKAGE_PREFIX);
-         handlerPkgs = new String[tmp.size()];
-         tmp.toArray(handlerPkgs);
-         lastHandlerPkgs = handlerPkgsProp;
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/URLStreamHandlerFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/URLStreamHandlerFactory.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,175 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.net.protocol.file;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-
-import java.net.URLConnection;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.net.URLDecoder;
-
-import java.security.Permission;
-import java.io.FilePermission;
-import java.io.BufferedInputStream;
-
-/**
- * Provides local file access via URL semantics, correctly returning
- * the last modified time of the underlying file.
- *
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:scott.stark at jboss.org">Scott.Stark</a>
- * @version $Revision$
- */
-public class FileURLConnection extends URLConnection
-{
-   static boolean decodeFilePaths = true;
-   static
-   {
-      String flag = System.getProperty("org.jboss.net.protocol.file.decodeFilePaths");
-      if (flag != null)
-         decodeFilePaths = Boolean.valueOf(flag).booleanValue();
-   }
-   
-   protected File file;
-
-   public FileURLConnection(final URL url) throws MalformedURLException, IOException
-   {
-      super(url);
-      String path = url.getPath();
-      if (decodeFilePaths)
-         path = URLDecoder.decode(path, "UTF-8");
-      
-      // Convert the url '/' to the os file separator
-      file = new File(path.replace('/', File.separatorChar).replace('|', ':'));
-
-      doOutput = false;
-   }
-
-   /**
-    * Returns the underlying file for this connection.
-    */
-   public File getFile()
-   {
-      return file;
-   }
-
-   /**
-    * Checks if the underlying file for this connection exists.
-    *
-    * @throws FileNotFoundException
-    */
-   public void connect() throws IOException
-   {
-      if (connected)
-         return;
-
-      if (!file.exists())
-      {
-         throw new FileNotFoundException(file.getPath());
-      }
-      
-      connected = true;
-   }
-
-   public InputStream getInputStream() throws IOException
-   {
-      if (!connected)
-         connect();
-
-      return new FileInputStream(file);
-   }
-
-   public OutputStream getOutputStream() throws IOException
-   {
-      if (!connected)
-         connect();
-      SecurityManager sm = System.getSecurityManager();
-      if( sm != null )
-      {
-         // Check for write access
-         FilePermission p = new FilePermission(file.getPath(), "write");
-         sm.checkPermission(p);
-      }
-      return new FileOutputStream(file);
-   }
-
-   /**
-    * Provides support for returning the value for the
-    * <tt>last-modified</tt> header.
-    */
-   public String getHeaderField(final String name)
-   {
-      String headerField = null;
-      if (name.equalsIgnoreCase("last-modified"))
-         headerField = String.valueOf(getLastModified());
-      else if (name.equalsIgnoreCase("content-length"))
-         headerField = String.valueOf(file.length());
-      else if (name.equalsIgnoreCase("content-type"))
-      {
-         headerField = getFileNameMap().getContentTypeFor(file.getName());
-         if( headerField == null )
-         {
-            try
-            {
-               InputStream is = getInputStream();
-               BufferedInputStream bis = new BufferedInputStream(is);
-               headerField = URLConnection.guessContentTypeFromStream(bis);
-               bis.close();
-            }
-            catch(IOException e)
-            {
-            }
-         }
-      }
-      else if (name.equalsIgnoreCase("date"))
-         headerField = String.valueOf(file.lastModified());
-      else
-      {
-         // This always returns null currently
-         headerField = super.getHeaderField(name);
-      }
-      return headerField;
-   }
-
-   /** 
-    * Return a permission for reading of the file
-    */
-   public Permission getPermission() throws IOException
-   {
-      return new FilePermission(file.getPath(), "read");
-   }
-
-   /**
-    * Returns the last modified time of the underlying file.
-    */
-   public long getLastModified()
-   {
-      return file.lastModified();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLConnection.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLLister.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLLister.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLLister.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,167 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.net.protocol.file;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.jboss.logging.Logger;
-import org.jboss.net.protocol.URLListerBase;
-
-/**
- * FileURLLister
- *
- * @author jboynes at users.sf.net
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @version $Revision$
- */
-public class FileURLLister extends URLListerBase
-{
-   /** The Logger */
-   private static final Logger log = Logger.getLogger(FileURLLister.class);
-   
-   // Public --------------------------------------------------------
-   
-   public Collection listMembers(URL baseUrl, URLFilter filter) throws IOException   
-   {
-      return listMembers(baseUrl, filter, false);
-   }
-
-   public Collection listMembers(URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException
-   {
-      // Make sure this is a directory URL
-      String baseUrlString = baseUrl.toString();
-      if (!baseUrlString.endsWith("/"))
-      {
-         throw new IOException("Does not end with '/', not a directory url: " + baseUrlString);
-      }
-      
-      // Verify the directory actually exists
-      File dir = new File(baseUrl.getPath());
-      if (!dir.isDirectory())
-      {
-         throw new FileNotFoundException("Not pointing to a directory, url: " + baseUrlString);
-      }
-      
-      // The list of URLs to return
-      ArrayList resultList = new ArrayList();
-
-      // Do the actual job
-      listFiles(baseUrl, filter, scanNonDottedSubDirs, resultList);
-      
-      // Done
-      return resultList;
-   }
-   
-   // Private -------------------------------------------------------
-   
-   /**
-    * Starting from baseUrl, that should point to a directory, populate the
-    * resultList with the contents that pass the filter (in the form of URLs)
-    * and possibly recurse into subdris not containing a '.' in their name.
-    */
-   private void listFiles(final URL baseUrl, final URLFilter filter, boolean scanNonDottedSubDirs, ArrayList resultList)
-      throws IOException
-   {      
-      // List the files at the current dir level, using the provided filter
-      final File baseDir = new File(baseUrl.getPath());
-      String[] filenames = baseDir.list(new FilenameFilter()
-      {
-         public boolean accept(File dir, String name)
-         {
-            try
-            {
-               return filter.accept(baseUrl, name);
-            }
-            catch (Exception e)
-            {
-               log.debug("Unexpected exception filtering entry '" + name + "' in directory '" + baseDir + "'", e);
-               return true;
-            }
-         }
-      });
-      
-      if (filenames == null)
-      {
-         // This happens only when baseDir not a directory (but this is already
-         // checked by the caller) or some unknown IOException happens internally
-         // (e.g. run out of file descriptors?). Unfortunately the File API
-         // doesn't provide a way to know.
-         throw new IOException("Could not list directory '" + baseDir + "', reason unknown");
-      }      
-      else
-      {
-         String baseUrlString = baseUrl.toString();
-         
-         for (int i = 0; i < filenames.length; i++)
-         {
-            String filename = filenames[i];
-            
-            // Find out if this is a directory
-            File file = new File(baseDir, filename);
-            boolean isDir = file.isDirectory();
-            
-            // The subUrl
-            URL subUrl = createURL(baseUrlString, filename, isDir);
-            
-            // If scanning subdirs and we have a directory, not containing a '.' in
-            // the name, recurse into it. This is to allow recursing into grouping
-            // dirs like ./deploy/jms, ./deploy/management, etc., avoiding
-            // at the same time exploded packages, like .sar, .war, etc.
-            if (scanNonDottedSubDirs && isDir && (filename.indexOf('.') == -1))
-            {
-               // recurse into it
-               listFiles(subUrl, filter, scanNonDottedSubDirs, resultList);
-            }
-            else
-            {
-               // just add to the list
-               resultList.add(subUrl);                
-            }
-         }
-      }
-   }  
-   
-   /**
-    * Create a URL by concatenating the baseUrlString that should end at '/',
-    * the filename, and a trailing slash, if it points to a directory
-    */
-   private URL createURL(String baseUrlString, String filename, boolean isDirectory)
-   {
-      try
-      {
-         return new URL(baseUrlString + filename + (isDirectory ? "/" : ""));
-      } 
-      catch (MalformedURLException e)
-      {
-         // shouldn't happen
-         throw new IllegalStateException();
-      }
-   }
-   
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLLister.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file/FileURLLister.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/Handler.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file/Handler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/Handler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,49 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol.file;
-
-import java.io.IOException;
-
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
-
-/**
- * A protocol handler for the 'file' protocol.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class Handler
-   extends URLStreamHandler
-{
-   public URLConnection openConnection(final URL url)
-      throws IOException
-   {
-      return new FileURLConnection(url);
-   }
-
-   protected void parseURL(final URL url, final String s, final int i, final int j)
-   {
-      super.parseURL(url, s.replace(java.io.File.separatorChar, '/'), i, j);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/Handler.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file/Handler.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>A better implementation of the 'file' protocol.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/file/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/file/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/http (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/http)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/http/DavURLLister.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/http/DavURLLister.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/http/DavURLLister.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,114 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol.http;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpURL;
-import org.apache.webdav.lib.WebdavResource;
-import org.jboss.net.protocol.URLListerBase;
-
-public class DavURLLister extends URLListerBase
-{
-   public Collection listMembers (URL baseUrl, URLFilter filter) throws IOException
-   {
-      return listMembers (baseUrl, filter, false);
-   }
-
-   public Collection listMembers (URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException
-   {
-      WebdavResource resource = null;
-      try
-      {
-         resource = new WebdavResource (baseUrl.toString ());
-         WebdavResource[] resources = resource.listWebdavResources ();
-         List urls = new ArrayList (resources.length);
-         for (int i = 0; i < resources.length; i++)
-         {
-            WebdavResource member = resources[i];
-            HttpURL httpURL = member.getHttpURL ();
-            if (filter.accept (baseUrl, httpURL.getName ()))
-            {
-               String uri = httpURL.getURI();
-               if (member.isCollection ())
-               {
-                  if (! uri.endsWith ("/"))
-                     uri += "/";
-
-                  // it is a directory: do we have to recursively list its content?
-                  String path = httpURL.getPath();
-                  if (scanNonDottedSubDirs && getFilePartFromUrl(path).indexOf (".") == -1)
-                  {
-                     URL subUrl = new URL (uri) ;
-                     urls.addAll (listMembers (subUrl, filter, scanNonDottedSubDirs));
-                  }
-                  else
-                  {
-                     urls.add (new URL (uri));
-                  }
-               }
-               else
-               {
-                  urls.add (new URL (uri));
-               }
-               
-            }
-         }
-         return urls;
-      } catch (HttpException e)
-      {
-         throw new IOException (e.getMessage ());
-      } catch (MalformedURLException e)
-      {
-         // should not happen
-         throw new IllegalStateException (e.getMessage ());
-      } finally
-      {
-         if (resource != null)
-         {
-            resource.close ();
-         }
-      }
-   }
-   
-   protected static final String getFilePartFromUrl (String name)
-   {
-      int length = name.length ();
-      
-      if (name.charAt (length - 1) == '/')
-      {
-         int start = name.lastIndexOf ("/", length - 2);
-         return name.substring (start, length -2);
-      }
-      else
-      {
-         int start = name.lastIndexOf ("/");
-         return name.substring (start);         
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/http/DavURLLister.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/http/DavURLLister.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/njar)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/Handler.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/Handler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/Handler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,175 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol.njar;
-
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.logging.Logger;
-
-import org.jboss.util.stream.Streams;
-import org.jboss.util.ThrowableHandler;
-
-/**
- * A protocol handler for the n(ested)jar protocol.
- *
- * <p>
- * This is class allows you to use the njar: URL protocol. It is very
- * similar to it's jar: cusin.  The difference being that jars can be
- * nested.
- *
- * <p>
- * An example of how to use this class is:
- * <pre>
- *
- *    URL url = new URL("njar:njar:file:c:/test1.zip^/test2.zip^/hello.txt");
- *    url.openStream();
- *
- * </pre>
- *
- * <p>
- * Please be aware that the njar protocol caches it's jar in temporary 
- * storage when connections are opened into them.  So for the above 
- * example, 2 files would cached a temp files names similar to nested-xxxx.jar
- *
- * @todo Add accessors so that the cache can be flushed.
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:cojonudo14 at hotmail.com">Hiram Chirino</a>
- */
-public class Handler
-   extends URLStreamHandler
-{
-   // URL protocol designations
-   public static final String PROTOCOL = "njar";
-   public static final String NJAR_SEPARATOR = "^/";
-   public static final String JAR_SEPARATOR = "!/";
-
-   private static final Logger log = Logger.getLogger(Handler.class);
-
-   protected Map savedJars = new HashMap();
-
-   public URLConnection openConnection(final URL url)
-      throws IOException
-   {
-      String file = url.getFile();
-      String embeddedURL = file;
-      String jarPath = "";
-
-      boolean trace = log.isTraceEnabled();
-      
-      int pos = file.lastIndexOf(NJAR_SEPARATOR);
-      if (pos >= 0)
-      {
-         embeddedURL = file.substring(0, pos);
-         if (file.length() > pos + NJAR_SEPARATOR.length())
-            jarPath = file.substring(pos + NJAR_SEPARATOR.length());
-      }
-
-      if (embeddedURL.startsWith(PROTOCOL))
-      {
-         if (trace) log.trace("Opening next  nested jar: " + embeddedURL);
-         File tempJar = (File) savedJars.get(embeddedURL);
-         if (tempJar == null)
-         {
-            URLConnection embededDataConnection = new URL(embeddedURL).openConnection();
-            if (trace) log.trace("Content length: " + embededDataConnection.getContentLength());
-            
-            InputStream embededData = embededDataConnection.getInputStream();
-            tempJar = File.createTempFile("nested-", ".jar");
-            tempJar.deleteOnExit();
-            
-            if (trace) log.trace("temp file location : " + tempJar);
-            OutputStream output = new FileOutputStream(tempJar);
-            
-            try {
-               // copyb will buffer the streams for us
-               long bytes = Streams.copyb(embededData, output);
-               if (trace) log.trace("copied " + bytes + " bytes");
-            }
-            finally {
-               Streams.flush(output);
-               
-               // close an pass errors to throwable handler (we don't care about them)
-               Streams.close(embededData);
-               Streams.close(output);
-            }
-            
-            savedJars.put(embeddedURL, tempJar);
-         }
-
-         String t = tempJar.getCanonicalFile().toURL().toExternalForm();
-         if (trace) log.trace("file URL : " + t);
-         
-         t = "njar:" + t + NJAR_SEPARATOR + jarPath;
-         if (trace) log.trace("Opening saved jar: " + t);
-
-         URL u = new URL(t);
-         if (trace) log.trace("Using URL: " + u);
-         
-         return u.openConnection();
-      }
-      else
-      {
-         if (trace) log.trace("Opening final nested jar: " + embeddedURL);
-
-         URL u = new URL("jar:" + embeddedURL + JAR_SEPARATOR + jarPath);
-         if (trace) log.trace("Using URL: " + u);
-         
-         return u.openConnection();
-      }
-   }
-
-   public static URL njarToFile(URL url)
-   {
-      if (url.getProtocol().equals(PROTOCOL))
-      {
-         try
-         {
-            // force the resource we are after to be unpacked - thanks
-            // Jan & David...!
-            URL dummy=new URL(PROTOCOL+":"+url.toString()+NJAR_SEPARATOR+"dummy.jar");
-            String tmp=dummy.openConnection().getURL().toString();
-            tmp=tmp.substring("jar:".length());
-            tmp=tmp.substring(0, tmp.length()-(JAR_SEPARATOR+"dummy.jar").length());
-            return new URL(tmp);
-         }
-         catch (Exception ignore)
-         {
-            ThrowableHandler.addWarning(ignore);
-         }
-      }
-
-      return url;
-   }
-}
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/Handler.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/Handler.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Provides a nested jar ('njar') protocol handler.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/njar/package.html)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>URL protocol stream helpers.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/resource)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/Handler.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/Handler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/Handler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,45 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol.resource;
-
-import java.io.IOException;
-
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
-
-/**
- * A protocol handler for the 'resource' protocol.  Provides
- * access to system resources.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class Handler
-   extends URLStreamHandler
-{
-   public URLConnection openConnection(final URL url)
-      throws IOException
-   {
-      return new ResourceURLConnection(url);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/Handler.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/Handler.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/ResourceURLConnection.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/ResourceURLConnection.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/ResourceURLConnection.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,91 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.protocol.resource;
-
-import java.io.IOException;
-import java.io.FileNotFoundException;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import org.jboss.net.protocol.DelegatingURLConnection;
-
-import org.jboss.logging.Logger;
-
-/**
- * Provides access to system resources as a URLConnection.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author Scott.Stark at jboss.org
- */
-public class ResourceURLConnection
-   extends DelegatingURLConnection
-{
-   private static final Logger log = Logger.getLogger(ResourceURLConnection.class);
-
-   public ResourceURLConnection(final URL url)
-      throws MalformedURLException, IOException
-   {
-      super(url);
-   }
-
-   protected URL makeDelegateUrl(final URL url)
-      throws MalformedURLException, IOException
-   {
-      String name = url.getHost();
-      String file = url.getFile();
-      if (file != null && !file.equals(""))
-      {
-         name += file;
-      }
-
-      // first try TCL and then SCL
-
-      ClassLoader cl = Thread.currentThread().getContextClassLoader();
-      URL target = cl.getResource(name);
-
-      if (target == null)
-      {
-         cl = ClassLoader.getSystemClassLoader();
-         target = cl.getResource(name);
-      }
-
-      if (target == null)
-         throw new FileNotFoundException("Could not locate resource: " + name);
-
-      if (log.isTraceEnabled())
-      {
-         log.trace("Target resource URL: " + target);
-         try
-         {
-            log.trace("Target resource URL connection: " + target.openConnection());
-         }
-         catch (Exception ignore)
-         {
-         }
-      }
-
-      // Return a new URL as the cl version does not use the JB stream factory
-      return new URL(target.toExternalForm());
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/ResourceURLConnection.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/ResourceURLConnection.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Provides a system 'resource' access protocol handler.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/protocol/resource/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/DefaultSocketFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/DefaultSocketFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/DefaultSocketFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,132 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.UnknownHostException;
-import java.rmi.server.RMIServerSocketFactory;
-import javax.net.ServerSocketFactory;
-
-/** An implementation of RMIServerSocketFactory that supports backlog and
- * bind address settings
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class DefaultSocketFactory extends ServerSocketFactory
-   implements RMIServerSocketFactory, Serializable
-{
-   static final long serialVersionUID = -7626239955727142958L;
-   private transient InetAddress bindAddress;
-   private int backlog = 200;
-
-   /** Create a socket factory that binds on any address with a default
-    * backlog of 200
-    */
-   public DefaultSocketFactory()
-   {
-      this(null, 200);
-   }
-   /** Create a socket factory with the given bind address
-    */
-   public DefaultSocketFactory(InetAddress bindAddress)
-   {
-      this(bindAddress, 200);
-   }
-   /** Create a socket factory with the given backlog
-    */
-   public DefaultSocketFactory(int backlog)
-   {
-      this(null, backlog);
-   }
-   /** Create a socket factory with the given bind address and backlog
-    */
-   public DefaultSocketFactory(InetAddress bindAddress, int backlog)
-   {
-      this.bindAddress = bindAddress;
-      this.backlog = backlog;
-   }
-
-   public String getBindAddress()
-   {
-      String address = null;
-      if( bindAddress != null )
-         address = bindAddress.getHostAddress();
-      return address;
-   }
-   public void setBindAddress(String host) throws UnknownHostException
-   {
-      bindAddress = InetAddress.getByName(host);
-   }
-
-    /**
-     * Create a server socket on the specified port (port 0 indicates
-     * an anonymous port).
-     * @param  port the port number
-     * @return the server socket on the specified port
-     * @exception IOException if an I/O error occurs during server socket
-     * creation
-     * @since 1.2
-     */
-    public ServerSocket createServerSocket(int port) throws IOException
-    {
-      return createServerSocket(port, backlog, bindAddress);
-   }
-
-   /**
-    * @param port - the port to listen to
-    * @param backlog - how many connections are queued
-    * @return A ServerSocket
-    * @throws IOException
-    */ 
-   public ServerSocket createServerSocket(int port, int backlog)
-      throws IOException
-   {
-      return createServerSocket(port, backlog, null);
-   }
-
-   /**
-    * @param port - the port to listen to
-    * @param backlog - how many connections are queued
-    * @param inetAddress - the network interface address to use
-    * @return
-    * @throws IOException
-    */ 
-   public ServerSocket createServerSocket(int port, int backlog,
-      InetAddress inetAddress) throws IOException
-   {
-        ServerSocket activeSocket = new ServerSocket(port, backlog, bindAddress);
-        return activeSocket;
-    }
-
-    public boolean equals(Object obj)
-    {
-        return obj instanceof DefaultSocketFactory;
-    }
-    public int hashCode()
-    {
-        return getClass().getName().hashCode();
-    }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/DefaultSocketFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/DefaultSocketFactory.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/InterruptableInputStream.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/InterruptableInputStream.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/InterruptableInputStream.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,108 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.SocketTimeoutException;
-
-/** An InputStream that uses the SocketTimeoutException thrown during read
- * timeouts to check if the thread has been interrupted.
- *  
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class InterruptableInputStream extends InputStream
-{
-   private InputStream is;
-
-   public InterruptableInputStream(InputStream is)
-   {
-      this.is = is;
-   }
-
-   public int read() throws IOException
-   {
-      byte[] b = {};
-      int count = internalRead(b, 0, 1);
-      return count > 0 ? b[0] : -1;
-   }
-
-   public int read(byte[] b) throws IOException
-   {
-      return internalRead(b, 0, b.length);
-   }
-
-   public int read(byte[] b, int off, int len) throws IOException
-   {
-      return internalRead(b, off, len);
-   }
-
-   public long skip(long n) throws IOException
-   {
-      return is.skip(n);
-   }
-
-   public int available() throws IOException
-   {
-      return is.available();
-   }
-
-   public void close() throws IOException
-   {
-      is.close();
-   }
-
-   public synchronized void mark(int readlimit)
-   {
-      is.mark(readlimit);
-   }
-
-   public synchronized void reset() throws IOException
-   {
-      is.reset();
-   }
-
-   public boolean markSupported()
-   {
-      return is.markSupported();
-   }
-
-   private int internalRead(byte[] b, int off, int len) throws IOException
-   {
-      int n = -1;
-      while( true )
-      {
-         try
-         {
-            n = is.read(b, off, len);
-            return n;
-         }
-         catch(SocketTimeoutException e)
-         {
-            // Test for thread interrupt
-            if( Thread.interrupted() )
-               throw e;
-         }
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/InterruptableInputStream.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/InterruptableInputStream.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/MethodHash.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/MethodHash.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/MethodHash.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,145 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-import java.util.WeakHashMap;
-import java.util.Map;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.io.DataOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.security.DigestOutputStream;
-import java.security.MessageDigest;
-
-public class MethodHash
-{
-
-   // Static --------------------------------------------------------
-   static Map hashMap = new WeakHashMap();
-   
-   /**
-   * Calculate method hashes. This algo is taken from RMI.
-   *
-   * @param   intf  
-   * @return     
-   */
-   public static Map getInterfaceHashes(Class intf)
-   {
-      // Create method hashes
-      Method[] methods = intf.getMethods();
-      HashMap map = new HashMap();
-      for (int i = 0; i < methods.length; i++)
-      {
-         Method method = methods[i];
-         Class[] parameterTypes = method.getParameterTypes();
-         String methodDesc = method.getName()+"(";
-         for(int j = 0; j < parameterTypes.length; j++)
-         {
-            methodDesc += getTypeString(parameterTypes[j]);
-         }
-         methodDesc += ")"+getTypeString(method.getReturnType());
-         
-         try
-         {
-            long hash = 0;
-            ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(512);
-            MessageDigest messagedigest = MessageDigest.getInstance("SHA");
-            DataOutputStream dataoutputstream = new DataOutputStream(new DigestOutputStream(bytearrayoutputstream, messagedigest));
-            dataoutputstream.writeUTF(methodDesc);
-            dataoutputstream.flush();
-            byte abyte0[] = messagedigest.digest();
-            for(int j = 0; j < Math.min(8, abyte0.length); j++)
-               hash += (long)(abyte0[j] & 0xff) << j * 8;
-            map.put(method.toString(), new Long(hash));
-         }
-         catch (Exception e)
-         {
-            e.printStackTrace();
-         }
-      }
-      
-      return map;
-   }
-   
-   static String getTypeString(Class cl)
-   {
-      if (cl == Byte.TYPE)
-      {
-         return "B";
-      } else if (cl == Character.TYPE)
-      {
-         return "C";
-      } else if (cl == Double.TYPE)
-      {
-         return "D";
-      } else if (cl == Float.TYPE)
-      {
-         return "F";
-      } else if (cl == Integer.TYPE)
-      {
-         return "I";
-      } else if (cl == Long.TYPE)
-      {
-         return "J";
-      } else if (cl == Short.TYPE)
-      {
-         return "S";
-      } else if (cl == Boolean.TYPE)
-      {
-         return "Z";
-      } else if (cl == Void.TYPE)
-      {
-         return "V";
-      } else if (cl.isArray())
-      {
-         return "["+getTypeString(cl.getComponentType());
-      } else
-      {
-         return "L"+cl.getName().replace('.','/')+";";
-      }
-   }
-   
-   /*
-   * The use of hashCode is not enough to differenciate methods
-   * we override the hashCode
-   *
-   * The hashes are cached in a static for efficiency
-   * RO: WeakHashMap needed to support undeploy
-   */
-   public static long calculateHash(Method method)
-   {
-      Map methodHashes = (Map)hashMap.get(method.getDeclaringClass());
-      
-      if (methodHashes == null)
-      {
-         methodHashes = getInterfaceHashes(method.getDeclaringClass());
-         
-         // Copy and add
-         WeakHashMap newHashMap = new WeakHashMap();
-         newHashMap.putAll(hashMap);
-         newHashMap.put(method.getDeclaringClass(), methodHashes);
-         hashMap = newHashMap;
-      }
-      
-      return ((Long)methodHashes.get(method.toString())).longValue();
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/MethodHash.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/MethodHash.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/QueuedClientSocketFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/QueuedClientSocketFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/QueuedClientSocketFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,93 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.io.IOException;
-import java.rmi.server.RMIClientSocketFactory;
-import java.net.Socket;
-import EDU.oswego.cs.dl.util.concurrent.FIFOSemaphore;
-/**
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class QueuedClientSocketFactory
-   implements RMIClientSocketFactory, java.io.Externalizable
-{
-   private transient FIFOSemaphore permits;
-   private long numPermits;
-   public QueuedClientSocketFactory()
-   {
-   }
-
-   public QueuedClientSocketFactory(long nPermits)
-   {
-      permits = new FIFOSemaphore(nPermits);
-      numPermits = nPermits;
-   }
-   /**
-    * Create a server socket on the specified port (port 0 indicates
-    * an anonymous port).
-    * @param  port the port number
-    * @return the server socket on the specified port
-    * @exception IOException if an I/O error occurs during server socket
-    * creation
-    * @since 1.2
-    */
-   public Socket createSocket(String host, int port) throws IOException
-   {
-      try
-      {
-         permits.acquire();
-         return new Socket(host, port);
-      }
-      catch (InterruptedException ex)
-      {
-         throw new IOException("Failed to acquire FIFOSemaphore for ClientSocketFactory");
-      }
-      finally
-      {
-         permits.release();
-      }
-   }
-   
-   public boolean equals(Object obj)
-   {
-      return obj instanceof QueuedClientSocketFactory;
-   }
-   public int hashCode()
-   {
-      return getClass().getName().hashCode();
-   }
-   
-   public void writeExternal(java.io.ObjectOutput out)
-      throws IOException
-   {
-      out.writeLong(numPermits);
-   }
-   public void readExternal(java.io.ObjectInput in)
-      throws IOException, ClassNotFoundException
-   {
-      numPermits = in.readLong();
-      permits = new FIFOSemaphore(numPermits);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/QueuedClientSocketFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/QueuedClientSocketFactory.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocket.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocket.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocket.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,28 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-
-public interface RMIMultiSocket extends java.rmi.Remote
-{
-   public Object invoke (long methodHash, Object[] args) throws Exception;
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocket.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocket.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketClient.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketClient.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketClient.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,61 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-   
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationHandler;
-import java.io.Serializable;
-import java.util.Random;
-import java.rmi.Remote;
-
-/**
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class RMIMultiSocketClient implements InvocationHandler, Serializable
-{
-   protected Remote[] stubs;
-   protected Random random;
-   public RMIMultiSocketClient(Remote[] stubs)
-   {
-      this.stubs = stubs;
-      random = new Random();
-   }
-
-   public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
-   {
-      if (method.getName().equals("hashCode"))
-      {
-         return new Integer(stubs[0].hashCode());
-      }
-      if (method.getName().equals("equals"))
-      {
-         return new Boolean(stubs[0].equals(args[0]));
-      }
-      int i = random.nextInt(stubs.length);
-      long hash = MethodHash.calculateHash(method);
-      RMIMultiSocket target = (RMIMultiSocket)stubs[i];
-      return target.invoke(hash, args);
-   }   
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketClient.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketClient.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketHandler.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,46 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-/**
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class RMIMultiSocketHandler implements RMIMultiSocket
-{
-   Object target;
-   Map invokerMap;
-   public RMIMultiSocketHandler(Object target, Map invokerMap)
-   {
-      this.target = target;
-      this.invokerMap = invokerMap;
-   }
-
-   public Object invoke (long methodHash, Object[] args) throws Exception
-   {
-      Method method = (Method)invokerMap.get(new Long(methodHash));
-      return method.invoke(target, args);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketHandler.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketHandler.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketServer.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketServer.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketServer.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,100 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.rmi.server.UnicastRemoteObject;
-import java.rmi.Remote;
-import java.lang.reflect.Proxy;
-import java.rmi.server.RMIClientSocketFactory;
-import java.rmi.server.RMIServerSocketFactory;
-import java.rmi.RemoteException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.rmi.NoSuchObjectException;
-/**
- *
- * @author bill at jboss.org
- * @version $Revision$
- */
-public class RMIMultiSocketServer
-{
-   private static HashMap handlermap = new HashMap();
-   private static HashMap stubmap = new HashMap();
-
-   public static Remote exportObject(Remote obj,
-                                     int port,
-                                     RMIClientSocketFactory csf, 
-                                     RMIServerSocketFactory ssf,
-                                     Class[] interfaces,
-                                     int numSockets)
-      throws RemoteException
-   {
-      Remote[] stubs = new Remote[numSockets];
-
-      Method[] methods = obj.getClass().getMethods();
-      
-      HashMap invokerMap = new HashMap();
-      for (int i = 0; i < methods.length; i++) {
-         Long methodkey = new Long(MethodHash.calculateHash(methods[i]));
-         invokerMap.put(methodkey, methods[i]);
-      }
-      
-      RMIMultiSocketHandler[] handlers = new RMIMultiSocketHandler[numSockets];
-      for (int i = 0; i < numSockets; i++)
-      {
-         int theport = (port == 0) ? 0 : port + i;
-         handlers[i] = new RMIMultiSocketHandler(obj, invokerMap);
-         stubs[i] = UnicastRemoteObject.exportObject(handlers[i], theport, csf, ssf);
-      }
-
-      Remote remote = (Remote)Proxy.newProxyInstance(
-         obj.getClass().getClassLoader(),
-         interfaces,
-         new RMIMultiSocketClient(stubs));
-      stubmap.put(remote, stubs);
-      handlermap.put(remote, handlers);
-      return remote;
-   }
-
-   public static Remote exportObject(Remote obj,
-                                     int port,
-                                     RMIClientSocketFactory csf, 
-                                     RMIServerSocketFactory ssf,
-                                     int numSockets)
-      throws RemoteException
-   {
-      return exportObject(obj, port, csf, ssf, obj.getClass().getInterfaces(), numSockets);
-   }
-
-   public static boolean unexportObject(Remote obj, boolean force)
-      throws NoSuchObjectException
-   {
-      handlermap.remove(obj);
-      Remote[] stubs = (Remote[])stubmap.remove(obj);
-      for (int i = 0; i < stubs.length; i++)
-      {
-         UnicastRemoteObject.unexportObject(stubs[i], force);
-      }
-      
-      return true;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketServer.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/RMIMultiSocketServer.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutClientSocketFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutClientSocketFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutClientSocketFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,72 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.rmi.server.RMIClientSocketFactory;
-import java.net.Socket;
-import EDU.oswego.cs.dl.util.concurrent.FIFOSemaphore;
-
-/**
- * A RMIClientSocketFactory that installs a InterruptableInputStream to be
- * responsive to thead interruption events.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class TimeoutClientSocketFactory
-   implements RMIClientSocketFactory, Serializable
-{
-   private static final long serialVersionUID = -920483051658660269L;
-
-   public TimeoutClientSocketFactory()
-   {
-   }
-
-   /**
-    * Create a server socket on the specified port (port 0 indicates
-    * an anonymous port).
-    * @param  port the port number
-    * @return the server socket on the specified port
-    * @exception java.io.IOException if an I/O error occurs during server socket
-    * creation
-    * @since 1.2
-    */
-   public Socket createSocket(String host, int port) throws IOException
-   {
-      Socket s = new Socket(host, port);
-      s.setSoTimeout(1000);
-      TimeoutSocket ts = new TimeoutSocket(s);
-      return ts;
-   }
-   
-   public boolean equals(Object obj)
-   {
-      return obj instanceof TimeoutClientSocketFactory;
-   }
-   public int hashCode()
-   {
-      return getClass().getName().hashCode();
-   }
-   
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutClientSocketFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutClientSocketFactory.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocket.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocket.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocket.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,59 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.InetAddress;
-import java.io.IOException;
-
-/** A ServerSocket that returns a TimeoutSocket from the overriden accept.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class TimeoutServerSocket extends ServerSocket
-{
-   public TimeoutServerSocket(int port)
-      throws IOException
-   {
-      this(port, 50);
-   }
-   public TimeoutServerSocket(int port, int backlog)
-      throws IOException
-   {
-      this(port, backlog, null);
-   }
-   public TimeoutServerSocket(int port, int backlog, InetAddress bindAddr)
-      throws IOException
-   {
-      super(port, backlog, bindAddr);
-   }
-
-   public Socket accept() throws IOException
-   {
-      Socket s = super.accept();
-      s.setSoTimeout(1000);
-      TimeoutSocket ts = new TimeoutSocket(s);
-      return ts;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocket.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocket.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocketFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocketFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocketFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,122 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.UnknownHostException;
-import java.rmi.server.RMIServerSocketFactory;
-
-/**
- * A RMIServerSocketFactory that installs a InterruptableInputStream to be
- * responsive to thead interruption events.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class TimeoutServerSocketFactory
-   implements RMIServerSocketFactory, Serializable
-{
-   /** @since 3.2.6 */
-   static final long serialVersionUID = 7006964274840965634L;
-   protected transient InetAddress bindAddress;
-   protected int backlog = 200;
-
-   /**
-    * Create a socket factory that binds on any address with a default
-    * backlog of 200
-    */
-   public TimeoutServerSocketFactory()
-   {
-      this(null, 200);
-   }
-
-   /**
-    * Create a socket factory with the given bind address
-    */
-   public TimeoutServerSocketFactory(InetAddress bindAddress)
-   {
-      this(bindAddress, 200);
-   }
-
-   /**
-    * Create a socket factory with the given backlog
-    */
-   public TimeoutServerSocketFactory(int backlog)
-   {
-      this(null, backlog);
-   }
-
-   /**
-    * Create a socket factory with the given bind address and backlog
-    */
-   public TimeoutServerSocketFactory(InetAddress bindAddress, int backlog)
-   {
-      this.bindAddress = bindAddress;
-      this.backlog = backlog;
-   }
-
-   public String getBindAddress()
-   {
-      String address = null;
-      if (bindAddress != null)
-         address = bindAddress.getHostAddress();
-      return address;
-   }
-
-   public void setBindAddress(String host) throws UnknownHostException
-   {
-      bindAddress = InetAddress.getByName(host);
-   }
-   public void setBindAddress(InetAddress bindAddress)
-   {
-      this.bindAddress = bindAddress;
-   }
-
-   /**
-    * Create a server socket on the specified port (port 0 indicates
-    * an anonymous port).
-    *
-    * @param port the port number
-    * @return the server socket on the specified port
-    * @throws java.io.IOException if an I/O error occurs during server socket
-    *    creation
-    * @since 1.2
-    */
-   public ServerSocket createServerSocket(int port) throws IOException
-   {
-      ServerSocket activeSocket = new TimeoutServerSocket(port, backlog, bindAddress);
-      return activeSocket;
-   }
-
-   public boolean equals(Object obj)
-   {
-      return obj instanceof TimeoutServerSocketFactory;
-   }
-
-   public int hashCode()
-   {
-      return getClass().getName().hashCode();
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocketFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutServerSocketFactory.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutSocket.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutSocket.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutSocket.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,233 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.sockets;
-
-import java.net.Socket;
-import java.net.InetAddress;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.channels.SocketChannel;
-
-/** A Socket that overrides the getInputStream to return a InterruptableInputStream
- *  
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class TimeoutSocket extends Socket
-{
-   private Socket s;
-
-   public TimeoutSocket(Socket s)
-   {
-      this.s = s;
-   }
-
-   public InetAddress getInetAddress()
-   {
-      return s.getInetAddress();
-   }
-
-   public InetAddress getLocalAddress()
-   {
-      return s.getLocalAddress();
-   }
-
-   public int getPort()
-   {
-      return s.getPort();
-   }
-
-   public int getLocalPort()
-   {
-      return s.getLocalPort();
-   }
-
-   public SocketAddress getRemoteSocketAddress()
-   {
-      return s.getRemoteSocketAddress();
-   }
-
-   public SocketAddress getLocalSocketAddress()
-   {
-      return s.getLocalSocketAddress();
-   }
-
-   public SocketChannel getChannel()
-   {
-      return s.getChannel();
-   }
-
-   public InputStream getInputStream() throws IOException
-   {
-      InputStream is = s.getInputStream();
-      InterruptableInputStream iis = new InterruptableInputStream(is);
-      return iis;
-   }
-
-   public OutputStream getOutputStream() throws IOException
-   {
-      return s.getOutputStream();
-   }
-
-   public void setTcpNoDelay(boolean on) throws SocketException
-   {
-      s.setTcpNoDelay(on);
-   }
-
-   public boolean getTcpNoDelay() throws SocketException
-   {
-      return s.getTcpNoDelay();
-   }
-
-   public void setSoLinger(boolean on, int linger) throws SocketException
-   {
-      s.setSoLinger(on, linger);
-   }
-
-   public int getSoLinger() throws SocketException
-   {
-      return s.getSoLinger();
-   }
-
-   public void sendUrgentData(int data) throws IOException
-   {
-      s.sendUrgentData(data);
-   }
-
-   public void setOOBInline(boolean on) throws SocketException
-   {
-      s.setOOBInline(on);
-   }
-
-   public boolean getOOBInline() throws SocketException
-   {
-      return s.getOOBInline();
-   }
-
-   public synchronized void setSoTimeout(int timeout) throws SocketException
-   {
-      s.setSoTimeout(1000);
-   }
-
-   public synchronized int getSoTimeout() throws SocketException
-   {
-      return s.getSoTimeout();
-   }
-
-   public synchronized void setSendBufferSize(int size) throws SocketException
-   {
-      s.setSendBufferSize(size);
-   }
-
-   public synchronized int getSendBufferSize() throws SocketException
-   {
-      return s.getSendBufferSize();
-   }
-
-   public synchronized void setReceiveBufferSize(int size) throws SocketException
-   {
-      s.setReceiveBufferSize(size);
-   }
-
-   public synchronized int getReceiveBufferSize() throws SocketException
-   {
-      return s.getReceiveBufferSize();
-   }
-
-   public void setKeepAlive(boolean on) throws SocketException
-   {
-      s.setKeepAlive(on);
-   }
-
-   public boolean getKeepAlive() throws SocketException
-   {
-      return s.getKeepAlive();
-   }
-
-   public void setTrafficClass(int tc) throws SocketException
-   {
-      s.setTrafficClass(tc);
-   }
-
-   public int getTrafficClass() throws SocketException
-   {
-      return s.getTrafficClass();
-   }
-
-   public void setReuseAddress(boolean on) throws SocketException
-   {
-      s.setReuseAddress(on);
-   }
-
-   public boolean getReuseAddress() throws SocketException
-   {
-      return s.getReuseAddress();
-   }
-
-   public synchronized void close() throws IOException
-   {
-      s.close();
-   }
-
-   public void shutdownInput() throws IOException
-   {
-      s.shutdownInput();
-   }
-
-   public void shutdownOutput() throws IOException
-   {
-      s.shutdownOutput();
-   }
-
-   public String toString()
-   {
-      return s.toString();
-   }
-
-   public boolean isConnected()
-   {
-      return s.isConnected();
-   }
-
-   public boolean isBound()
-   {
-      return s.isBound();
-   }
-
-   public boolean isClosed()
-   {
-      return s.isClosed();
-   }
-
-   public boolean isInputShutdown()
-   {
-      return s.isInputShutdown();
-   }
-
-   public boolean isOutputShutdown()
-   {
-      return s.isOutputShutdown();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutSocket.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/sockets/TimeoutSocket.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/ssl (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/ssl)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/ssl/SSLSocketFactoryBuilder.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/ssl/SSLSocketFactoryBuilder.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/ssl/SSLSocketFactoryBuilder.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,35 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.net.ssl;
-
-import javax.net.ssl.SSLSocketFactory;
-
-
-/** A simple builder for creating SSLSocketFactory instances.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public interface SSLSocketFactoryBuilder
-{
-   SSLSocketFactory getSocketFactory() throws Exception;
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/net/ssl/SSLSocketFactoryBuilder.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/net/ssl/SSLSocketFactoryBuilder.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/AbstractNestedThrowable.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/AbstractNestedThrowable.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/AbstractNestedThrowable.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,145 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.PrintWriter;
-import java.io.PrintStream;
-
-/**
- * A common superclass for <tt>Throwable</tt> classes that can contain
- * a nested <tt>Throwable</tt> detail object.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public abstract class AbstractNestedThrowable
-   extends Throwable
-   implements NestedThrowable
-{
-   /** The nested throwable */
-   protected final Throwable nested;
-
-   /**
-    * Construct a <tt>AbstractNestedThrowable</tt> with the specified 
-    * detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public AbstractNestedThrowable(final String msg) {
-      super(msg);
-      this.nested = null;
-   }
-
-   /**
-    * Construct a <tt>AbstractNestedThrowable</tt> with the specified detail 
-    * message and nested <tt>Throwable</tt>.
-    *
-    * @param msg     Detail message.
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public AbstractNestedThrowable(final String msg, final Throwable nested) {
-      super(msg);
-      this.nested = nested;
-      NestedThrowable.Util.checkNested(this, nested);
-   }
-
-   /**
-    * Construct a <tt>AbstractNestedThrowable</tt> with the specified
-    * nested <tt>Throwable</tt>.
-    *
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public AbstractNestedThrowable(final Throwable nested) {
-      this(nested.getMessage(), nested);
-   }
-
-   /**
-    * Construct a <tt>AbstractNestedThrowable</tt> with no detail.
-    */
-   public AbstractNestedThrowable() {
-      super();
-      this.nested = null;
-   }
-
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getNested() {
-      return nested;
-   }
-
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * <p>For JDK 1.4 compatibility.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getCause() {
-      return nested;
-   }
-   
-   /**
-    * Returns the composite throwable message.
-    *
-    * @return  The composite throwable message.
-    */
-   public String getMessage() {
-      return NestedThrowable.Util.getMessage(super.getMessage(), nested);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print stream.
-    *
-    * @param stream  Stream to print to.
-    */
-   public void printStackTrace(final PrintStream stream) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(stream);
-      }
-      NestedThrowable.Util.print(nested, stream);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print writer.
-    *
-    * @param writer  Writer to print to.
-    */
-   public void printStackTrace(final PrintWriter writer) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(writer);
-      }
-      NestedThrowable.Util.print(nested, writer);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to 
-    * <tt>System.err</tt>.
-    */
-   public void printStackTrace() {
-      printStackTrace(System.err);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/AbstractNestedThrowable.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/AbstractNestedThrowable.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Base64.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Base64.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Base64.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1474 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import org.jboss.logging.Logger;
-
-/**
- * Encodes and decodes to and from Base64 notation.
- *
- * <p>
- * Change Log:
- * </p>
- * <ul>
- *  <li>v2.1 - Cleaned up javadoc comments and unused variables and methods. Added
- *   some convenience methods for reading and writing to and from files.</li>
- *  <li>v2.0.2 - Now specifies UTF-8 encoding in places where the code fails on systems
- *   with other encodings (like EBCDIC).</li>
- *  <li>v2.0.1 - Fixed an error when decoding a single byte, that is, when the
- *   encoded data was a single byte.</li>
- *  <li>v2.0 - I got rid of methods that used booleans to set options. 
- *   Now everything is more consolidated and cleaner. The code now detects
- *   when data that's being decoded is gzip-compressed and will decompress it
- *   automatically. Generally things are cleaner. You'll probably have to
- *   change some method calls that you were making to support the new
- *   options format (<tt>int</tt>s that you "OR" together).</li>
- *  <li>v1.5.1 - Fixed bug when decompressing and decoding to a             
- *   byte[] using <tt>decode( String s, boolean gzipCompressed )</tt>.      
- *   Added the ability to "suspend" encoding in the Output Stream so        
- *   you can turn on and off the encoding if you need to embed base64       
- *   data in an otherwise "normal" stream (like an XML file).</li>  
- *  <li>v1.5 - Output stream pases on flush() command but doesn't do anything itself.
- *      This helps when using GZIP streams.
- *      Added the ability to GZip-compress objects before encoding them.</li>
- *  <li>v1.4 - Added helper methods to read/write files.</li>
- *  <li>v1.3.6 - Fixed OutputStream.flush() so that 'position' is reset.</li>
- *  <li>v1.3.5 - Added flag to turn on and off line breaks. Fixed bug in input stream
- *      where last buffer being read, if not completely full, was not returned.</li>
- *  <li>v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time.</li>
- *  <li>v1.3.3 - Fixed I/O streams which were totally messed up.</li>
- * </ul>
- *
- * <p>
- * I am placing this code in the Public Domain. Do with it as you will.
- * This software comes with no guarantees or warranties but with
- * plenty of well-wishing instead!
- * Please visit <a href="http://iharder.net/base64">http://iharder.net/base64</a>
- * periodically to check for updates or to contribute improvements.
- * </p>
- *
- * @author Robert Harder
- * @author rob at iharder.net
- * @version 2.1
- */
-public class Base64
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(Base64.class);
-
-   /* ********  P U B L I C   F I E L D S  ******** */
-
-   /** No options specified. Value is zero. */
-   public final static int NO_OPTIONS = 0;
-
-   /** Specify encoding. */
-   public final static int ENCODE = 1;
-
-   /** Specify decoding. */
-   public final static int DECODE = 0;
-
-   /** Specify that data should be gzip-compressed. */
-   public final static int GZIP = 2;
-
-   /** Don't break lines when encoding (violates strict Base64 specification) */
-   public final static int DONT_BREAK_LINES = 8;
-
-   /* ********  P R I V A T E   F I E L D S  ******** */
-
-   /** Maximum line length (76) of Base64 output. */
-   private final static int MAX_LINE_LENGTH = 76;
-
-   /** The equals sign (=) as a byte. */
-   private final static byte EQUALS_SIGN = (byte)'=';
-
-   /** The new line character (\n) as a byte. */
-   private final static byte NEW_LINE = (byte)'\n';
-
-   /** Preferred encoding. */
-   private final static String PREFERRED_ENCODING = "UTF-8";
-
-   /** The 64 valid Base64 values. */
-   private final static byte[] ALPHABET;
-   private final static byte[] _NATIVE_ALPHABET = /* May be something funny like EBCDIC */
-   { (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G', (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',
-         (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z', (byte)'a', (byte)'b',
-         (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g', (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n', (byte)'o', (byte)'p',
-         (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z', (byte)'0', (byte)'1', (byte)'2', (byte)'3',
-         (byte)'4', (byte)'5', (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/' };
-
-   /** Determine which ALPHABET to use. */
-   static
-   {
-      byte[] __bytes;
-      try
-      {
-         __bytes = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".getBytes(PREFERRED_ENCODING);
-      } // end try
-      catch (java.io.UnsupportedEncodingException use)
-      {
-         __bytes = _NATIVE_ALPHABET; // Fall back to native encoding
-      } // end catch
-      ALPHABET = __bytes;
-   } // end static
-
-   /**
-    * Translates a Base64 value to either its 6-bit reconstruction value
-    * or a negative number indicating some other meaning.
-    **/
-   private final static byte[] DECODABET = { -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal  0 -  8
-         -5, -5, // Whitespace: Tab and Linefeed
-         -9, -9, // Decimal 11 - 12
-         -5, // Whitespace: Carriage Return
-         -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 14 - 26
-         -9, -9, -9, -9, -9, // Decimal 27 - 31
-         -5, // Whitespace: Space
-         -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 33 - 42
-         62, // Plus sign at decimal 43
-         -9, -9, -9, // Decimal 44 - 46
-         63, // Slash at decimal 47
-         52, 53, 54, 55, 56, 57, 58, 59, 60, 61, // Numbers zero through nine
-         -9, -9, -9, // Decimal 58 - 60
-         -1, // Equals sign at decimal 61
-         -9, -9, -9, // Decimal 62 - 64
-         0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, // Letters 'A' through 'N'
-         14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, // Letters 'O' through 'Z'
-         -9, -9, -9, -9, -9, -9, // Decimal 91 - 96
-         26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, // Letters 'a' through 'm'
-         39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // Letters 'n' through 'z'
-         -9, -9, -9, -9 // Decimal 123 - 126
-   /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 127 - 139
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243
-    -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 */
-   };
-
-   // I think I end up not using the BAD_ENCODING indicator.
-   //private final static byte BAD_ENCODING    = -9; // Indicates error in encoding
-   private final static byte WHITE_SPACE_ENC = -5; // Indicates white space in encoding
-   private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding
-
-   /** Defeats instantiation. */
-   private Base64()
-   {
-   }
-
-   /* ********  E N C O D I N G   M E T H O D S  ******** */
-
-   /**
-    * Encodes up to the first three bytes of array <var>threeBytes</var>
-    * and returns a four-byte array in Base64 notation.
-    * The actual number of significant bytes in your array is
-    * given by <var>numSigBytes</var>.
-    * The array <var>threeBytes</var> needs only be as big as
-    * <var>numSigBytes</var>.
-    * Code can reuse a byte array by passing a four-byte array as <var>b4</var>.
-    *
-    * @param b4 A reusable byte array to reduce array instantiation
-    * @param threeBytes the array to convert
-    * @param numSigBytes the number of significant bytes in your array
-    * @return four byte array in Base64 notation.
-    * @since 1.5.1
-    */
-   private static byte[] encode3to4(byte[] b4, byte[] threeBytes, int numSigBytes)
-   {
-      encode3to4(threeBytes, 0, numSigBytes, b4, 0);
-      return b4;
-   } // end encode3to4
-
-   /**
-    * Encodes up to three bytes of the array <var>source</var>
-    * and writes the resulting four Base64 bytes to <var>destination</var>.
-    * The source and destination arrays can be manipulated
-    * anywhere along their length by specifying
-    * <var>srcOffset</var> and <var>destOffset</var>.
-    * This method does not check to make sure your arrays
-    * are large enough to accomodate <var>srcOffset</var> + 3 for
-    * the <var>source</var> array or <var>destOffset</var> + 4 for
-    * the <var>destination</var> array.
-    * The actual number of significant bytes in your array is
-    * given by <var>numSigBytes</var>.
-    *
-    * @param source the array to convert
-    * @param srcOffset the index where conversion begins
-    * @param numSigBytes the number of significant bytes in your array
-    * @param destination the array to hold the conversion
-    * @param destOffset the index where output will be put
-    * @return the <var>destination</var> array
-    * @since 1.3
-    */
-   private static byte[] encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset)
-   {
-      //           1         2         3
-      // 01234567890123456789012345678901 Bit position
-      // --------000000001111111122222222 Array position from threeBytes
-      // --------|    ||    ||    ||    | Six bit groups to index ALPHABET
-      //          >>18  >>12  >> 6  >> 0  Right shift necessary
-      //                0x3f  0x3f  0x3f  Additional AND
-
-      // Create buffer with zero-padding if there are only one or two
-      // significant bytes passed in the array.
-      // We have to shift left 24 in order to flush out the 1's that appear
-      // when Java treats a value as negative that is cast from a byte to an int.
-      int inBuff = (numSigBytes > 0 ? ((source[srcOffset] << 24) >>> 8) : 0) | (numSigBytes > 1 ? ((source[srcOffset + 1] << 24) >>> 16) : 0)
-            | (numSigBytes > 2 ? ((source[srcOffset + 2] << 24) >>> 24) : 0);
-
-      switch (numSigBytes)
-      {
-         case 3:
-            destination[destOffset] = ALPHABET[(inBuff >>> 18)];
-            destination[destOffset + 1] = ALPHABET[(inBuff >>> 12) & 0x3f];
-            destination[destOffset + 2] = ALPHABET[(inBuff >>> 6) & 0x3f];
-            destination[destOffset + 3] = ALPHABET[(inBuff) & 0x3f];
-            return destination;
-
-         case 2:
-            destination[destOffset] = ALPHABET[(inBuff >>> 18)];
-            destination[destOffset + 1] = ALPHABET[(inBuff >>> 12) & 0x3f];
-            destination[destOffset + 2] = ALPHABET[(inBuff >>> 6) & 0x3f];
-            destination[destOffset + 3] = EQUALS_SIGN;
-            return destination;
-
-         case 1:
-            destination[destOffset] = ALPHABET[(inBuff >>> 18)];
-            destination[destOffset + 1] = ALPHABET[(inBuff >>> 12) & 0x3f];
-            destination[destOffset + 2] = EQUALS_SIGN;
-            destination[destOffset + 3] = EQUALS_SIGN;
-            return destination;
-
-         default:
-            return destination;
-      } // end switch
-   } // end encode3to4
-
-   /**
-    * Serializes an object and returns the Base64-encoded
-    * version of that serialized object. If the object
-    * cannot be serialized or there is another error,
-    * the method will return <tt>null</tt>.
-    * The object is not GZip-compressed before being encoded.
-    *
-    * @param serializableObject The object to encode
-    * @return The Base64-encoded object
-    * @since 1.4
-    */
-   public static String encodeObject(java.io.Serializable serializableObject)
-   {
-      return encodeObject(serializableObject, NO_OPTIONS);
-   } // end encodeObject
-
-   /**
-    * Serializes an object and returns the Base64-encoded
-    * version of that serialized object. If the object
-    * cannot be serialized or there is another error,
-    * the method will return <tt>null</tt>.
-    * <p>
-    * Valid options:<pre>
-    *   GZIP: gzip-compresses object before encoding it.
-    *   DONT_BREAK_LINES: don't break lines at 76 characters
-    *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-    * </pre>
-    * <p>
-    * Example: <code>encodeObject( myObj, Base64.GZIP )</code> or
-    * <p>
-    * Example: <code>encodeObject( myObj, Base64.GZIP | Base64.DONT_BREAK_LINES )</code>
-    *
-    * @param serializableObject The object to encode
-    * @param options Specified options
-    * @return The Base64-encoded object
-    * @see Base64#GZIP
-    * @see Base64#DONT_BREAK_LINES
-    * @since 2.0
-    */
-   public static String encodeObject(java.io.Serializable serializableObject, int options)
-   {
-      // Streams
-      java.io.ByteArrayOutputStream baos = null;
-      java.io.OutputStream b64os = null;
-      java.io.ObjectOutputStream oos = null;
-      java.util.zip.GZIPOutputStream gzos = null;
-
-      // Isolate options
-      int gzip = (options & GZIP);
-      int dontBreakLines = (options & DONT_BREAK_LINES);
-
-      try
-      {
-         // ObjectOutputStream -> (GZIP) -> Base64 -> ByteArrayOutputStream
-         baos = new java.io.ByteArrayOutputStream();
-         b64os = new Base64.OutputStream(baos, ENCODE | dontBreakLines);
-
-         // GZip?
-         if (gzip == GZIP)
-         {
-            gzos = new java.util.zip.GZIPOutputStream(b64os);
-            oos = new java.io.ObjectOutputStream(gzos);
-         } // end if: gzip
-         else oos = new java.io.ObjectOutputStream(b64os);
-
-         oos.writeObject(serializableObject);
-      } // end try
-      catch (java.io.IOException e)
-      {
-         e.printStackTrace();
-         return null;
-      } // end catch
-      finally
-      {
-         try
-         {
-            oos.close();
-         }
-         catch (Exception e)
-         {
-         }
-         try
-         {
-            gzos.close();
-         }
-         catch (Exception e)
-         {
-         }
-         try
-         {
-            b64os.close();
-         }
-         catch (Exception e)
-         {
-         }
-         try
-         {
-            baos.close();
-         }
-         catch (Exception e)
-         {
-         }
-      } // end finally
-
-      // Return value according to relevant encoding.
-      try
-      {
-         return new String(baos.toByteArray(), PREFERRED_ENCODING);
-      } // end try
-      catch (java.io.UnsupportedEncodingException uue)
-      {
-         return new String(baos.toByteArray());
-      } // end catch
-
-   } // end encode
-
-   /**
-    * Encodes a byte array into Base64 notation.
-    * Does not GZip-compress data.
-    *
-    * @param source The data to convert
-    * @since 1.4
-    */
-   public static String encodeBytes(byte[] source)
-   {
-      return encodeBytes(source, 0, source.length, NO_OPTIONS);
-   } // end encodeBytes
-
-   /**
-    * Encodes a byte array into Base64 notation.
-    * <p>
-    * Valid options:<pre>
-    *   GZIP: gzip-compresses object before encoding it.
-    *   DONT_BREAK_LINES: don't break lines at 76 characters
-    *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-    * </pre>
-    * <p>
-    * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or
-    * <p>
-    * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code>
-    *
-    *
-    * @param source The data to convert
-    * @param options Specified options
-    * @see Base64#GZIP
-    * @see Base64#DONT_BREAK_LINES
-    * @since 2.0
-    */
-   public static String encodeBytes(byte[] source, int options)
-   {
-      return encodeBytes(source, 0, source.length, options);
-   } // end encodeBytes
-
-   /**
-    * Encodes a byte array into Base64 notation.
-    * Does not GZip-compress data.
-    *
-    * @param source The data to convert
-    * @param off Offset in array where conversion should begin
-    * @param len Length of data to convert
-    * @since 1.4
-    */
-   public static String encodeBytes(byte[] source, int off, int len)
-   {
-      return encodeBytes(source, off, len, NO_OPTIONS);
-   } // end encodeBytes
-
-   /**
-    * Encodes a byte array into Base64 notation.
-    * <p>
-    * Valid options:<pre>
-    *   GZIP: gzip-compresses object before encoding it.
-    *   DONT_BREAK_LINES: don't break lines at 76 characters
-    *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-    * </pre>
-    * <p>
-    * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or
-    * <p>
-    * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code>
-    *
-    *
-    * @param source The data to convert
-    * @param off Offset in array where conversion should begin
-    * @param len Length of data to convert
-    * @param options Specified options
-    * @see Base64#GZIP
-    * @see Base64#DONT_BREAK_LINES
-    * @since 2.0
-    */
-   public static String encodeBytes(byte[] source, int off, int len, int options)
-   {
-      // Isolate options
-      int dontBreakLines = (options & DONT_BREAK_LINES);
-      int gzip = (options & GZIP);
-
-      // Compress?
-      if (gzip == GZIP)
-      {
-         java.io.ByteArrayOutputStream baos = null;
-         java.util.zip.GZIPOutputStream gzos = null;
-         Base64.OutputStream b64os = null;
-
-         try
-         {
-            // GZip -> Base64 -> ByteArray
-            baos = new java.io.ByteArrayOutputStream();
-            b64os = new Base64.OutputStream(baos, ENCODE | dontBreakLines);
-            gzos = new java.util.zip.GZIPOutputStream(b64os);
-
-            gzos.write(source, off, len);
-            gzos.close();
-         } // end try
-         catch (java.io.IOException e)
-         {
-            e.printStackTrace();
-            return null;
-         } // end catch
-         finally
-         {
-            try
-            {
-               gzos.close();
-            }
-            catch (Exception e)
-            {
-            }
-            try
-            {
-               b64os.close();
-            }
-            catch (Exception e)
-            {
-            }
-            try
-            {
-               baos.close();
-            }
-            catch (Exception e)
-            {
-            }
-         } // end finally
-
-         // Return value according to relevant encoding.
-         try
-         {
-            return new String(baos.toByteArray(), PREFERRED_ENCODING);
-         } // end try
-         catch (java.io.UnsupportedEncodingException uue)
-         {
-            return new String(baos.toByteArray());
-         } // end catch
-      } // end if: compress
-
-      // Else, don't compress. Better not to use streams at all then.
-      else
-      {
-         // Convert option to boolean in way that code likes it.
-         boolean breakLines = dontBreakLines == 0;
-
-         int len43 = len * 4 / 3;
-         byte[] outBuff = new byte[(len43) // Main 4:3
-               + ((len % 3) > 0 ? 4 : 0) // Account for padding
-               + (breakLines ? (len43 / MAX_LINE_LENGTH) : 0)]; // New lines
-         int d = 0;
-         int e = 0;
-         int len2 = len - 2;
-         int lineLength = 0;
-         for (; d < len2; d += 3, e += 4)
-         {
-            encode3to4(source, d + off, 3, outBuff, e);
-
-            lineLength += 4;
-            if (breakLines && lineLength == MAX_LINE_LENGTH)
-            {
-               outBuff[e + 4] = NEW_LINE;
-               e++;
-               lineLength = 0;
-            } // end if: end of line
-         } // en dfor: each piece of array
-
-         if (d < len)
-         {
-            encode3to4(source, d + off, len - d, outBuff, e);
-            e += 4;
-         } // end if: some padding needed
-
-         // Return value according to relevant encoding.
-         try
-         {
-            return new String(outBuff, 0, e, PREFERRED_ENCODING);
-         } // end try
-         catch (java.io.UnsupportedEncodingException uue)
-         {
-            return new String(outBuff, 0, e);
-         } // end catch
-
-      } // end else: don't compress
-
-   } // end encodeBytes
-
-   /* ********  D E C O D I N G   M E T H O D S  ******** */
-
-   /**
-    * Decodes four bytes from array <var>source</var>
-    * and writes the resulting bytes (up to three of them)
-    * to <var>destination</var>.
-    * The source and destination arrays can be manipulated
-    * anywhere along their length by specifying
-    * <var>srcOffset</var> and <var>destOffset</var>.
-    * This method does not check to make sure your arrays
-    * are large enough to accomodate <var>srcOffset</var> + 4 for
-    * the <var>source</var> array or <var>destOffset</var> + 3 for
-    * the <var>destination</var> array.
-    * This method returns the actual number of bytes that
-    * were converted from the Base64 encoding.
-    *
-    *
-    * @param source the array to convert
-    * @param srcOffset the index where conversion begins
-    * @param destination the array to hold the conversion
-    * @param destOffset the index where output will be put
-    * @return the number of decoded bytes converted
-    * @since 1.3
-    */
-   private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset)
-   {
-      // Example: Dk==
-      if (source[srcOffset + 2] == EQUALS_SIGN)
-      {
-         // Two ways to do the same thing. Don't know which way I like best.
-         //int outBuff =   ( ( DECODABET[ source[ srcOffset    ] ] << 24 ) >>>  6 )
-         //              | ( ( DECODABET[ source[ srcOffset + 1] ] << 24 ) >>> 12 );
-         int outBuff = ((DECODABET[source[srcOffset]] & 0xFF) << 18) | ((DECODABET[source[srcOffset + 1]] & 0xFF) << 12);
-
-         destination[destOffset] = (byte)(outBuff >>> 16);
-         return 1;
-      }
-
-      // Example: DkL=
-      else if (source[srcOffset + 3] == EQUALS_SIGN)
-      {
-         // Two ways to do the same thing. Don't know which way I like best.
-         //int outBuff =   ( ( DECODABET[ source[ srcOffset     ] ] << 24 ) >>>  6 )
-         //              | ( ( DECODABET[ source[ srcOffset + 1 ] ] << 24 ) >>> 12 )
-         //              | ( ( DECODABET[ source[ srcOffset + 2 ] ] << 24 ) >>> 18 );
-         int outBuff = ((DECODABET[source[srcOffset]] & 0xFF) << 18) | ((DECODABET[source[srcOffset + 1]] & 0xFF) << 12)
-               | ((DECODABET[source[srcOffset + 2]] & 0xFF) << 6);
-
-         destination[destOffset] = (byte)(outBuff >>> 16);
-         destination[destOffset + 1] = (byte)(outBuff >>> 8);
-         return 2;
-      }
-
-      // Example: DkLE
-      else
-      {
-         try
-         {
-            // Two ways to do the same thing. Don't know which way I like best.
-            //int outBuff =   ( ( DECODABET[ source[ srcOffset     ] ] << 24 ) >>>  6 )
-            //              | ( ( DECODABET[ source[ srcOffset + 1 ] ] << 24 ) >>> 12 )
-            //              | ( ( DECODABET[ source[ srcOffset + 2 ] ] << 24 ) >>> 18 )
-            //              | ( ( DECODABET[ source[ srcOffset + 3 ] ] << 24 ) >>> 24 );
-            int outBuff = ((DECODABET[source[srcOffset]] & 0xFF) << 18) | ((DECODABET[source[srcOffset + 1]] & 0xFF) << 12)
-                  | ((DECODABET[source[srcOffset + 2]] & 0xFF) << 6) | ((DECODABET[source[srcOffset + 3]] & 0xFF));
-
-            destination[destOffset] = (byte)(outBuff >> 16);
-            destination[destOffset + 1] = (byte)(outBuff >> 8);
-            destination[destOffset + 2] = (byte)(outBuff);
-
-            return 3;
-         }
-         catch (Exception e)
-         {
-            log.error("" + source[srcOffset] + ": " + (DECODABET[source[srcOffset]]));
-            log.error("" + source[srcOffset + 1] + ": " + (DECODABET[source[srcOffset + 1]]));
-            log.error("" + source[srcOffset + 2] + ": " + (DECODABET[source[srcOffset + 2]]));
-            log.error("" + source[srcOffset + 3] + ": " + (DECODABET[source[srcOffset + 3]]));
-            return -1;
-         } //end catch
-      }
-   } // end decodeToBytes
-
-   /**
-    * Very low-level access to decoding ASCII characters in
-    * the form of a byte array. Does not support automatically
-    * gunzipping or any other "fancy" features.
-    *
-    * @param source The Base64 encoded data
-    * @param off    The offset of where to begin decoding
-    * @param len    The length of characters to decode
-    * @return decoded data
-    * @since 1.3
-    */
-   public static byte[] decode(byte[] source, int off, int len)
-   {
-      int len34 = len * 3 / 4;
-      byte[] outBuff = new byte[len34]; // Upper limit on size of output
-      int outBuffPosn = 0;
-
-      byte[] b4 = new byte[4];
-      int b4Posn = 0;
-      int i = 0;
-      byte sbiCrop = 0;
-      byte sbiDecode = 0;
-      for (i = off; i < off + len; i++)
-      {
-         sbiCrop = (byte)(source[i] & 0x7f); // Only the low seven bits
-         sbiDecode = DECODABET[sbiCrop];
-
-         if (sbiDecode >= WHITE_SPACE_ENC) // White space, Equals sign or better
-         {
-            if (sbiDecode >= EQUALS_SIGN_ENC)
-            {
-               b4[b4Posn++] = sbiCrop;
-               if (b4Posn > 3)
-               {
-                  outBuffPosn += decode4to3(b4, 0, outBuff, outBuffPosn);
-                  b4Posn = 0;
-
-                  // If that was the equals sign, break out of 'for' loop
-                  if (sbiCrop == EQUALS_SIGN)
-                     break;
-               } // end if: quartet built
-
-            } // end if: equals sign or better
-
-         } // end if: white space, equals sign or better
-         else
-         {
-            throw new IllegalStateException("Bad Base64 input character at " + i + ": " + source[i] + "(decimal)");
-         } // end else:
-      } // each input character
-
-      byte[] out = new byte[outBuffPosn];
-      System.arraycopy(outBuff, 0, out, 0, outBuffPosn);
-      return out;
-   } // end decode
-
-   /**
-    * Decodes data from Base64 notation, automatically
-    * detecting gzip-compressed data and decompressing it.
-    *
-    * @param s the string to decode
-    * @return the decoded data
-    * @since 1.4
-    */
-   public static byte[] decode(String s)
-   {
-      byte[] bytes;
-      try
-      {
-         bytes = s.getBytes(PREFERRED_ENCODING);
-      } // end try
-      catch (java.io.UnsupportedEncodingException uee)
-      {
-         bytes = s.getBytes();
-      } // end catch
-      //</change>
-
-      // Decode
-      bytes = decode(bytes, 0, bytes.length);
-
-      // Check to see if it's gzip-compressed
-      // GZIP Magic Two-Byte Number: 0x8b1f (35615)
-      if (bytes != null && bytes.length >= 4)
-      {
-
-         int head = ((int)bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
-         if (java.util.zip.GZIPInputStream.GZIP_MAGIC == head)
-         {
-            java.io.ByteArrayInputStream bais = null;
-            java.util.zip.GZIPInputStream gzis = null;
-            java.io.ByteArrayOutputStream baos = null;
-            byte[] buffer = new byte[2048];
-            int length = 0;
-
-            try
-            {
-               baos = new java.io.ByteArrayOutputStream();
-               bais = new java.io.ByteArrayInputStream(bytes);
-               gzis = new java.util.zip.GZIPInputStream(bais);
-
-               while ((length = gzis.read(buffer)) >= 0)
-               {
-                  baos.write(buffer, 0, length);
-               } // end while: reading input
-
-               // No error? Get new bytes.
-               bytes = baos.toByteArray();
-
-            } // end try
-            catch (java.io.IOException e)
-            {
-               // Just return originally-decoded bytes
-            } // end catch
-            finally
-            {
-               try
-               {
-                  baos.close();
-               }
-               catch (Exception e)
-               {
-               }
-               try
-               {
-                  gzis.close();
-               }
-               catch (Exception e)
-               {
-               }
-               try
-               {
-                  bais.close();
-               }
-               catch (Exception e)
-               {
-               }
-            } // end finally
-
-         } // end if: gzipped
-      } // end if: bytes.length >= 2
-
-      return bytes;
-   } // end decode
-
-   /**
-    * Attempts to decode Base64 data and deserialize a Java
-    * Object within. Returns <tt>null</tt> if there was an error.
-    *
-    * @param encodedObject The Base64 data to decode
-    * @return The decoded and deserialized object
-    * @since 1.5
-    */
-   public static Object decodeToObject(String encodedObject)
-   {
-      // Decode and gunzip if necessary
-      byte[] objBytes = decode(encodedObject);
-
-      java.io.ByteArrayInputStream bais = null;
-      java.io.ObjectInputStream ois = null;
-      Object obj = null;
-
-      try
-      {
-         bais = new java.io.ByteArrayInputStream(objBytes);
-         ois = new java.io.ObjectInputStream(bais);
-
-         obj = ois.readObject();
-      } // end try
-      catch (java.io.IOException e)
-      {
-         e.printStackTrace();
-         obj = null;
-      } // end catch
-      catch (java.lang.ClassNotFoundException e)
-      {
-         e.printStackTrace();
-         obj = null;
-      } // end catch
-      finally
-      {
-         try
-         {
-            bais.close();
-         }
-         catch (Exception e)
-         {
-         }
-         try
-         {
-            ois.close();
-         }
-         catch (Exception e)
-         {
-         }
-      } // end finally
-
-      return obj;
-   } // end decodeObject
-
-   /**
-    * Convenience method for encoding data to a file.
-    *
-    * @param dataToEncode byte array of data to encode in base64 form
-    * @param filename Filename for saving encoded data
-    * @return <tt>true</tt> if successful, <tt>false</tt> otherwise
-    *
-    * @since 2.1
-    */
-   public static boolean encodeToFile(byte[] dataToEncode, String filename)
-   {
-      boolean success = false;
-      Base64.OutputStream bos = null;
-      try
-      {
-         bos = new Base64.OutputStream(new java.io.FileOutputStream(filename), Base64.ENCODE);
-         bos.write(dataToEncode);
-         success = true;
-      } // end try
-      catch (java.io.IOException e)
-      {
-
-         success = false;
-      } // end catch: IOException
-      finally
-      {
-         try
-         {
-            bos.close();
-         }
-         catch (Exception e)
-         {
-         }
-      } // end finally
-
-      return success;
-   } // end encodeToFile
-
-   /**
-    * Convenience method for decoding data to a file.
-    *
-    * @param dataToDecode Base64-encoded data as a string
-    * @param filename Filename for saving decoded data
-    * @return <tt>true</tt> if successful, <tt>false</tt> otherwise
-    *
-    * @since 2.1
-    */
-   public static boolean decodeToFile(String dataToDecode, String filename)
-   {
-      boolean success = false;
-      Base64.OutputStream bos = null;
-      try
-      {
-         bos = new Base64.OutputStream(new java.io.FileOutputStream(filename), Base64.DECODE);
-         bos.write(dataToDecode.getBytes(PREFERRED_ENCODING));
-         success = true;
-      } // end try
-      catch (java.io.IOException e)
-      {
-         success = false;
-      } // end catch: IOException
-      finally
-      {
-         try
-         {
-            bos.close();
-         }
-         catch (Exception e)
-         {
-         }
-      } // end finally
-
-      return success;
-   } // end decodeToFile
-
-   /**
-    * Convenience method for reading a base64-encoded
-    * file and decoding it.
-    *
-    * @param filename Filename for reading encoded data
-    * @return decoded byte array or null if unsuccessful
-    *
-    * @since 2.1
-    */
-   public static byte[] decodeFromFile(String filename)
-   {
-      byte[] decodedData = null;
-      Base64.InputStream bis = null;
-      try
-      {
-         // Set up some useful variables
-         java.io.File file = new java.io.File(filename);
-         byte[] buffer = null;
-         int length = 0;
-         int numBytes = 0;
-
-         // Check for size of file
-         if (file.length() > Integer.MAX_VALUE)
-         {
-            throw new IllegalStateException("File is too big for this convenience method (" + file.length() + " bytes).");
-         } // end if: file too big for int index
-         buffer = new byte[(int)file.length()];
-
-         // Open a stream
-         bis = new Base64.InputStream(new java.io.BufferedInputStream(new java.io.FileInputStream(file)), Base64.DECODE);
-
-         // Read until done
-         while ((numBytes = bis.read(buffer, length, 4096)) >= 0)
-            length += numBytes;
-
-         // Save in a variable to return
-         decodedData = new byte[length];
-         System.arraycopy(buffer, 0, decodedData, 0, length);
-
-      } // end try
-      catch (java.io.IOException e)
-      {
-         throw new IllegalStateException("Error decoding from file " + filename);
-      } // end catch: IOException
-      finally
-      {
-         try
-         {
-            bis.close();
-         }
-         catch (Exception e)
-         {
-         }
-      } // end finally
-
-      return decodedData;
-   } // end decodeFromFile
-
-   /**
-    * Convenience method for reading a binary file
-    * and base64-encoding it.
-    *
-    * @param filename Filename for reading binary data
-    * @return base64-encoded string or null if unsuccessful
-    *
-    * @since 2.1
-    */
-   public static String encodeFromFile(String filename)
-   {
-      String encodedData = null;
-      Base64.InputStream bis = null;
-      try
-      {
-         // Set up some useful variables
-         java.io.File file = new java.io.File(filename);
-         byte[] buffer = new byte[(int)(file.length() * 1.4)];
-         int length = 0;
-         int numBytes = 0;
-
-         // Open a stream
-         bis = new Base64.InputStream(new java.io.BufferedInputStream(new java.io.FileInputStream(file)), Base64.ENCODE);
-
-         // Read until done
-         while ((numBytes = bis.read(buffer, length, 4096)) >= 0)
-            length += numBytes;
-
-         // Save in a variable to return
-         encodedData = new String(buffer, 0, length, Base64.PREFERRED_ENCODING);
-
-      } // end try
-      catch (java.io.IOException e)
-      {
-         throw new IllegalStateException("Error encoding from file " + filename);
-      } // end catch: IOException
-      finally
-      {
-         try
-         {
-            bis.close();
-         }
-         catch (Exception e)
-         {
-         }
-      } // end finally
-
-      return encodedData;
-   } // end encodeFromFile
-
-   /* ********  I N N E R   C L A S S   I N P U T S T R E A M  ******** */
-
-   /**
-    * A {@link Base64.InputStream} will read data from another
-    * <tt>java.io.InputStream</tt>, given in the constructor,
-    * and encode/decode to/from Base64 notation on the fly.
-    *
-    * @see Base64
-    * @since 1.3
-    */
-   public static class InputStream extends java.io.FilterInputStream
-   {
-      private boolean encode; // Encoding or decoding
-      private int position; // Current position in the buffer
-      private byte[] buffer; // Small buffer holding converted data
-      private int bufferLength; // Length of buffer (3 or 4)
-      private int numSigBytes; // Number of meaningful bytes in the buffer
-      private int lineLength;
-      private boolean breakLines; // Break lines at less than 80 characters
-
-      /**
-       * Constructs a {@link Base64.InputStream} in DECODE mode.
-       *
-       * @param in the <tt>java.io.InputStream</tt> from which to read data.
-       * @since 1.3
-       */
-      public InputStream(java.io.InputStream in)
-      {
-         this(in, DECODE);
-      } // end constructor
-
-      /**
-       * Constructs a {@link Base64.InputStream} in
-       * either ENCODE or DECODE mode.
-       * <p>
-       * Valid options:<pre>
-       *   ENCODE or DECODE: Encode or Decode as data is read.
-       *   DONT_BREAK_LINES: don't break lines at 76 characters
-       *     (only meaningful when encoding)
-       *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-       * </pre>
-       * <p>
-       * Example: <code>new Base64.InputStream( in, Base64.DECODE )</code>
-       *
-       *
-       * @param in the <tt>java.io.InputStream</tt> from which to read data.
-       * @param options Specified options
-       * @see Base64#ENCODE
-       * @see Base64#DECODE
-       * @see Base64#DONT_BREAK_LINES
-       * @since 2.0
-       */
-      public InputStream(java.io.InputStream in, int options)
-      {
-         super(in);
-         this.breakLines = (options & DONT_BREAK_LINES) != DONT_BREAK_LINES;
-         this.encode = (options & ENCODE) == ENCODE;
-         this.bufferLength = encode ? 4 : 3;
-         this.buffer = new byte[bufferLength];
-         this.position = -1;
-         this.lineLength = 0;
-      } // end constructor
-
-      /**
-       * Reads enough of the input stream to convert
-       * to/from Base64 and returns the next byte.
-       *
-       * @return next byte
-       * @since 1.3
-       */
-      public int read() throws java.io.IOException
-      {
-         // Do we need to get data?
-         if (position < 0)
-         {
-            if (encode)
-            {
-               byte[] b3 = new byte[3];
-               int numBinaryBytes = 0;
-               for (int i = 0; i < 3; i++)
-               {
-                  try
-                  {
-                     int b = in.read();
-
-                     // If end of stream, b is -1.
-                     if (b >= 0)
-                     {
-                        b3[i] = (byte)b;
-                        numBinaryBytes++;
-                     } // end if: not end of stream
-
-                  } // end try: read
-                  catch (java.io.IOException e)
-                  {
-                     // Only a problem if we got no data at all.
-                     if (i == 0)
-                        throw e;
-
-                  } // end catch
-               } // end for: each needed input byte
-
-               if (numBinaryBytes > 0)
-               {
-                  encode3to4(b3, 0, numBinaryBytes, buffer, 0);
-                  position = 0;
-                  numSigBytes = 4;
-               } // end if: got data
-               else
-               {
-                  return -1;
-               } // end else
-            } // end if: encoding
-
-            // Else decoding
-            else
-            {
-               byte[] b4 = new byte[4];
-               int i = 0;
-               for (i = 0; i < 4; i++)
-               {
-                  // Read four "meaningful" bytes:
-                  int b = 0;
-                  do
-                  {
-                     b = in.read();
-                  }
-                  while (b >= 0 && DECODABET[b & 0x7f] <= WHITE_SPACE_ENC);
-
-                  if (b < 0)
-                     break; // Reads a -1 if end of stream
-
-                  b4[i] = (byte)b;
-               } // end for: each needed input byte
-
-               if (i == 4)
-               {
-                  numSigBytes = decode4to3(b4, 0, buffer, 0);
-                  position = 0;
-               } // end if: got four characters
-               else if (i == 0)
-               {
-                  return -1;
-               } // end else if: also padded correctly
-               else
-               {
-                  // Must have broken out from above.
-                  throw new java.io.IOException("Improperly padded Base64 input.");
-               } // end
-
-            } // end else: decode
-         } // end else: get data
-
-         // Got data?
-         if (position >= 0)
-         {
-            // End of relevant data?
-            if (/*!encode &&*/position >= numSigBytes)
-               return -1;
-
-            if (encode && breakLines && lineLength >= MAX_LINE_LENGTH)
-            {
-               lineLength = 0;
-               return '\n';
-            } // end if
-            else
-            {
-               lineLength++; // This isn't important when decoding
-               // but throwing an extra "if" seems
-               // just as wasteful.
-
-               int b = buffer[position++];
-
-               if (position >= bufferLength)
-                  position = -1;
-
-               return b & 0xFF; // This is how you "cast" a byte that's
-               // intended to be unsigned.
-            } // end else
-         } // end if: position >= 0
-
-         // Else error
-         else
-         {
-            // When JDK1.4 is more accepted, use an assertion here.
-            throw new java.io.IOException("Error in Base64 code reading stream.");
-         } // end else
-      } // end read
-
-      /**
-       * Calls {@link #read()} repeatedly until the end of stream
-       * is reached or <var>len</var> bytes are read.
-       * Returns number of bytes read into array or -1 if
-       * end of stream is encountered.
-       *
-       * @param dest array to hold values
-       * @param off offset for array
-       * @param len max number of bytes to read into array
-       * @return bytes read into array or -1 if end of stream is encountered.
-       * @since 1.3
-       */
-      public int read(byte[] dest, int off, int len) throws java.io.IOException
-      {
-         int i;
-         int b;
-         for (i = 0; i < len; i++)
-         {
-            b = read();
-
-            //if( b < 0 && i == 0 )
-            //    return -1;
-
-            if (b >= 0)
-               dest[off + i] = (byte)b;
-            else if (i == 0)
-               return -1;
-            else break; // Out of 'for' loop
-         } // end for: each byte read
-         return i;
-      } // end read
-
-   } // end inner class InputStream
-
-   /* ********  I N N E R   C L A S S   O U T P U T S T R E A M  ******** */
-
-   /**
-    * A {@link Base64.OutputStream} will write data to another
-    * <tt>java.io.OutputStream</tt>, given in the constructor,
-    * and encode/decode to/from Base64 notation on the fly.
-    *
-    * @see Base64
-    * @since 1.3
-    */
-   public static class OutputStream extends java.io.FilterOutputStream
-   {
-      private boolean encode;
-      private int position;
-      private byte[] buffer;
-      private int bufferLength;
-      private int lineLength;
-      private boolean breakLines;
-      private byte[] b4; // Scratch used in a few places
-      private boolean suspendEncoding;
-
-      /**
-       * Constructs a {@link Base64.OutputStream} in ENCODE mode.
-       *
-       * @param out the <tt>java.io.OutputStream</tt> to which data will be written.
-       * @since 1.3
-       */
-      public OutputStream(java.io.OutputStream out)
-      {
-         this(out, ENCODE);
-      } // end constructor
-
-      /**
-       * Constructs a {@link Base64.OutputStream} in
-       * either ENCODE or DECODE mode.
-       * <p>
-       * Valid options:<pre>
-       *   ENCODE or DECODE: Encode or Decode as data is read.
-       *   DONT_BREAK_LINES: don't break lines at 76 characters
-       *     (only meaningful when encoding)
-       *     <i>Note: Technically, this makes your encoding non-compliant.</i>
-       * </pre>
-       * <p>
-       * Example: <code>new Base64.OutputStream( out, Base64.ENCODE )</code>
-       *
-       * @param out the <tt>java.io.OutputStream</tt> to which data will be written.
-       * @param options Specified options.
-       * @see Base64#ENCODE
-       * @see Base64#DECODE
-       * @see Base64#DONT_BREAK_LINES
-       * @since 1.3
-       */
-      public OutputStream(java.io.OutputStream out, int options)
-      {
-         super(out);
-         this.breakLines = (options & DONT_BREAK_LINES) != DONT_BREAK_LINES;
-         this.encode = (options & ENCODE) == ENCODE;
-         this.bufferLength = encode ? 3 : 4;
-         this.buffer = new byte[bufferLength];
-         this.position = 0;
-         this.lineLength = 0;
-         this.suspendEncoding = false;
-         this.b4 = new byte[4];
-      } // end constructor
-
-      /**
-       * Writes the byte to the output stream after
-       * converting to/from Base64 notation.
-       * When encoding, bytes are buffered three
-       * at a time before the output stream actually
-       * gets a write() call.
-       * When decoding, bytes are buffered four
-       * at a time.
-       *
-       * @param theByte the byte to write
-       * @since 1.3
-       */
-      public void write(int theByte) throws java.io.IOException
-      {
-         // Encoding suspended?
-         if (suspendEncoding)
-         {
-            super.out.write(theByte);
-            return;
-         } // end if: supsended
-
-         // Encode?
-         if (encode)
-         {
-            buffer[position++] = (byte)theByte;
-            if (position >= bufferLength) // Enough to encode.
-            {
-               out.write(encode3to4(b4, buffer, bufferLength));
-
-               lineLength += 4;
-               if (breakLines && lineLength >= MAX_LINE_LENGTH)
-               {
-                  out.write(NEW_LINE);
-                  lineLength = 0;
-               } // end if: end of line
-
-               position = 0;
-            } // end if: enough to output
-         } // end if: encoding
-
-         // Else, Decoding
-         else
-         {
-            // Meaningful Base64 character?
-            if (DECODABET[theByte & 0x7f] > WHITE_SPACE_ENC)
-            {
-               buffer[position++] = (byte)theByte;
-               if (position >= bufferLength) // Enough to output.
-               {
-                  int len = Base64.decode4to3(buffer, 0, b4, 0);
-                  out.write(b4, 0, len);
-                  //out.write( Base64.decode4to3( buffer ) );
-                  position = 0;
-               } // end if: enough to output
-            } // end if: meaningful base64 character
-            else if (DECODABET[theByte & 0x7f] != WHITE_SPACE_ENC)
-            {
-               throw new java.io.IOException("Invalid character in Base64 data.");
-            } // end else: not white space either
-         } // end else: decoding
-      } // end write
-
-      /**
-       * Calls {@link #write(int)} repeatedly until <var>len</var>
-       * bytes are written.
-       *
-       * @param theBytes array from which to read bytes
-       * @param off offset for array
-       * @param len max number of bytes to read into array
-       * @since 1.3
-       */
-      public void write(byte[] theBytes, int off, int len) throws java.io.IOException
-      {
-         // Encoding suspended?
-         if (suspendEncoding)
-         {
-            super.out.write(theBytes, off, len);
-            return;
-         } // end if: supsended
-
-         for (int i = 0; i < len; i++)
-         {
-            write(theBytes[off + i]);
-         } // end for: each byte written
-
-      } // end write
-
-      /**
-       * Method added by PHIL. [Thanks, PHIL. -Rob]
-       * This pads the buffer without closing the stream.
-       */
-      public void flushBase64() throws java.io.IOException
-      {
-         if (position > 0)
-         {
-            if (encode)
-            {
-               out.write(encode3to4(b4, buffer, position));
-               position = 0;
-            } // end if: encoding
-            else
-            {
-               throw new java.io.IOException("Base64 input not properly padded.");
-            } // end else: decoding
-         } // end if: buffer partially full
-
-      } // end flush
-
-      /**
-       * Flushes and closes (I think, in the superclass) the stream.
-       *
-       * @since 1.3
-       */
-      public void close() throws java.io.IOException
-      {
-         // 1. Ensure that pending characters are written
-         flushBase64();
-
-         // 2. Actually close the stream
-         // Base class both flushes and closes.
-         super.close();
-
-         buffer = null;
-         out = null;
-      } // end close
-
-      /**
-       * Suspends encoding of the stream.
-       * May be helpful if you need to embed a piece of
-       * base640-encoded data in a stream.
-       *
-       * @since 1.5.1
-       */
-      public void suspendEncoding() throws java.io.IOException
-      {
-         flushBase64();
-         this.suspendEncoding = true;
-      } // end suspendEncoding
-
-      /**
-       * Resumes encoding of the stream.
-       * May be helpful if you need to embed a piece of
-       * base640-encoded data in a stream.
-       *
-       * @since 1.5.1
-       */
-      public void resumeEncoding()
-      {
-         this.suspendEncoding = false;
-      } // end resumeEncoding
-
-   } // end inner class OutputStream
-
-} // end class Base64

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Base64.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Base64.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/CachePolicy.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/CachePolicy.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/CachePolicy.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,114 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Interface that specifies a policy for caches. <p>
- * Implementation classes can implement a LRU policy, a random one, 
- * a MRU one, or any other suitable policy.
- * 
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public interface CachePolicy
-{
-   /**
-    * Returns the object paired with the specified key if it's 
-    * present in the cache, otherwise must return null. <br>
-    * Implementations of this method must have complexity of order O(1).
-    * Differently from {@link #peek} this method not only return whether
-    * the object is present in the cache or not, but also 
-    * applies the implemented policy that will "refresh" the cached 
-    * object in the cache, because this cached object
-    * was really requested.
-    * 
-    * @param key the key paired with the object
-    * @see #peek
-    */
-   Object get(Object key);
-
-   /**
-    * Returns the object paired with the specified key if it's 
-    * present in the cache, otherwise must return null. <br>
-    * Implementations of this method must have complexity of order O(1).
-    * This method should not apply the implemented caching policy to the 
-    * object paired with the given key, so that a client can 
-    * query if an object is cached without "refresh" its cache status. Real 
-    * requests for the object must be done using {@link #get}.
-    * 
-    * @param key the key paired with the object
-    * @see #get
-    */	
-   Object peek(Object key);
-   
-   /**
-    * Inserts the specified object into the cache following the 
-    * implemented policy. <br>
-    * Implementations of this method must have complexity of order O(1).
-    * 
-    * @param key the key paired with the object
-    * @param object the object to cache
-    * @see #remove
-    */
-   void insert(Object key, Object object);
-   
-   /**
-    * Remove the cached object paired with the specified key. <br>
-    * Implementations of this method must have complexity of order O(1).
-    * 
-    * @param key the key paired with the object
-    * @see #insert
-    */
-   void remove(Object key);
-   
-   /**
-    * Flushes the cached objects from the cache.
-    */
-   void flush();
-
-   /**
-    * Get the size of the cache.
-    */
-   int size();
-
-
-
-   /**
-    * create the service, do expensive operations etc 
-    */
-   void create() throws Exception;
-   
-   /**
-    * start the service, create is already called
-    */
-   void start() throws Exception;
-   
-   /**
-    * stop the service
-    */
-   void stop();
-   
-   /**
-    * destroy the service, tear down 
-    */
-   void destroy();
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/CachePolicy.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/CachePolicy.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Classes.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Classes.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Classes.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,806 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Array;
-import java.lang.NoSuchMethodException;
-import java.net.URL;
-
-import java.security.AccessController;
-import java.security.CodeSource;
-import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
-import java.util.*;
-
-/**
- * A collection of <code>Class</code> utilities.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author Scott.Stark at jboss.org
- */
-public final class Classes
-{
-   /** The string used to separator packages */
-   public static final String PACKAGE_SEPARATOR = ".";
-
-   /** The characther used to separator packages */
-   public static final char PACKAGE_SEPARATOR_CHAR = '.';
-
-   /** The default package name. */
-   public static final String DEFAULT_PACKAGE_NAME = "<default>";
-
-   /** Format a string buffer containing the Class, Interfaces, CodeSource,
-    and ClassLoader information for the given object clazz.
-
-    @param clazz the Class
-    @param results - the buffer to write the info to
-    */
-   public static void displayClassInfo(Class clazz, StringBuffer results)
-   {
-      // Print out some codebase info for the clazz
-      ClassLoader cl = clazz.getClassLoader();
-      results.append("\n");
-      results.append(clazz.getName());
-      results.append("(");
-      results.append(Integer.toHexString(clazz.hashCode()));
-      results.append(").ClassLoader=");
-      results.append(cl);
-      ClassLoader parent = cl;
-      while( parent != null )
-      {
-         results.append("\n..");
-         results.append(parent);
-         URL[] urls = getClassLoaderURLs(parent);
-         int length = urls != null ? urls.length : 0;
-         for(int u = 0; u < length; u ++)
-         {
-            results.append("\n....");
-            results.append(urls[u]);
-         }
-         if( parent != null )
-            parent = parent.getParent();
-      }
-      CodeSource clazzCS = clazz.getProtectionDomain().getCodeSource();
-      if( clazzCS != null )
-      {
-         results.append("\n++++CodeSource: ");
-         results.append(clazzCS);
-      }
-      else
-         results.append("\n++++Null CodeSource");
-
-      results.append("\nImplemented Interfaces:");
-      Class[] ifaces = clazz.getInterfaces();
-      for(int i = 0; i < ifaces.length; i ++)
-      {
-         Class iface = ifaces[i];
-         results.append("\n++");
-         results.append(iface);
-         results.append("(");
-         results.append(Integer.toHexString(iface.hashCode()));
-         results.append(")");
-         ClassLoader loader = ifaces[i].getClassLoader();
-         results.append("\n++++ClassLoader: ");
-         results.append(loader);
-         ProtectionDomain pd = ifaces[i].getProtectionDomain();
-         CodeSource cs = pd.getCodeSource();
-         if( cs != null )
-         {
-            results.append("\n++++CodeSource: ");
-            results.append(cs);
-         }
-         else
-            results.append("\n++++Null CodeSource");
-      }
-   }
-
-   /** Use reflection to access a URL[] getURLs or URL[] getClasspath method so
-    that non-URLClassLoader class loaders, or class loaders that override
-    getURLs to return null or empty, can provide the true classpath info.
-    */
-   public static URL[] getClassLoaderURLs(ClassLoader cl)
-   {
-      URL[] urls = {};
-      try
-      {
-         Class returnType = urls.getClass();
-         Class[] parameterTypes = {};
-         Class clClass = cl.getClass();
-         Method getURLs = clClass.getMethod("getURLs", parameterTypes);
-         if( returnType.isAssignableFrom(getURLs.getReturnType()) )
-         {
-            Object[] args = {};
-            urls = (URL[]) getURLs.invoke(cl, args);
-         }
-         if( urls == null || urls.length == 0 )
-         {
-            Method getCp = clClass.getMethod("getClasspath", parameterTypes);
-            if( returnType.isAssignableFrom(getCp.getReturnType()) )
-            {
-               Object[] args = {};
-               urls = (URL[]) getCp.invoke(cl, args);
-            }
-         }
-      }
-      catch(Exception ignore)
-      {
-      }
-      return urls;
-   }
-
-   /**
-    * Describe the class of an object
-    *
-    * @param object the object
-    * @return the description
-    */
-   public static String getDescription(Object object)
-   {
-      StringBuffer buffer = new StringBuffer();
-      describe(buffer, object);
-      return buffer.toString();
-   }
-
-   /**
-    * Describe the class of an object
-    *
-    * @param buffer the string buffer 
-    * @param object the object
-    */
-   public static void describe(StringBuffer buffer, Object object)
-   {
-      if (object == null)
-         buffer.append("**null**");
-      else
-         describe(buffer, object.getClass());
-   }
-
-   /**
-    * Describe the class
-    *
-    * @param buffer the string buffer 
-    * @param clazz the clazz
-    */
-   public static void describe(StringBuffer buffer, Class clazz)
-   {
-      if (clazz == null)
-         buffer.append("**null**");
-      else
-      {
-         buffer.append("{class=").append(clazz.getName());
-         Class[] intfs = clazz.getInterfaces();
-         if (intfs.length > 0)
-         {
-            buffer.append(" intfs=");
-            for (int i = 0; i < intfs.length; ++i)
-            {
-               buffer.append(intfs[i].getName());
-               if (i < intfs.length-1)
-                  buffer.append(", ");
-            }
-         }
-         buffer.append("}");
-      }
-   }
-
-   /**
-    * Get the short name of the specified class by striping off the package
-    * name.
-    *
-    * @param classname  Class name.
-    * @return           Short class name.
-    */
-   public static String stripPackageName(final String classname)
-   {
-      int idx = classname.lastIndexOf(PACKAGE_SEPARATOR);
-
-      if (idx != -1)
-         return classname.substring(idx + 1, classname.length());
-      return classname;
-   }
-
-   /**
-    * Get the short name of the specified class by striping off the package
-    * name.
-    *
-    * @param type    Class name.
-    * @return        Short class name.
-    */
-   public static String stripPackageName(final Class type)
-   {
-      return stripPackageName(type.getName());
-   }
-
-   /**
-    * Get the package name of the specified class.
-    *
-    * @param classname  Class name.
-    * @return           Package name or "" if the classname is in the
-    *                   <i>default</i> package.
-    *
-    * @throws EmptyStringException     Classname is an empty string.
-    */
-   public static String getPackageName(final String classname)
-   {
-      if (classname.length() == 0)
-         throw new EmptyStringException();
-
-      int index = classname.lastIndexOf(PACKAGE_SEPARATOR);
-      if (index != -1)
-         return classname.substring(0, index);
-      return "";
-   }
-
-   /**
-    * Get the package name of the specified class.
-    *
-    * @param type    Class.
-    * @return        Package name.
-    */
-   public static String getPackageName(final Class type)
-   {
-      return getPackageName(type.getName());
-   }
-
-   /**
-    * Force the given class to be loaded fully.
-    *
-    * <p>This method attempts to locate a static method on the given class
-    *    the attempts to invoke it with dummy arguments in the hope that
-    *    the virtual machine will prepare the class for the method call and
-    *    call all of the static class initializers.
-    *
-    * @param type    Class to force load.
-    *
-    * @throws NullArgumentException    Type is <i>null</i>.
-    */
-   public static void forceLoad(final Class type)
-   {
-      if (type == null)
-         throw new NullArgumentException("type");
-
-      // don't attempt to force primitives to load
-      if (type.isPrimitive()) return;
-
-      // don't attempt to force java.* classes to load
-      String packageName = Classes.getPackageName(type);
-      // System.out.println("package name: " + packageName);
-
-      if (packageName.startsWith("java.") ||
-         packageName.startsWith("javax."))
-      {
-         return;
-      }
-
-      // System.out.println("forcing class to load: " + type);
-
-      try
-      {
-         Method methods[] = type.getDeclaredMethods();
-         Method method = null;
-         for (int i = 0; i < methods.length; i++)
-         {
-            int modifiers = methods[i].getModifiers();
-            if (Modifier.isStatic(modifiers))
-            {
-               method = methods[i];
-               break;
-            }
-         }
-
-         if (method != null)
-         {
-            method.invoke(null, null);
-         }
-         else
-         {
-            type.newInstance();
-         }
-      }
-      catch (Exception ignore)
-      {
-         ThrowableHandler.add(ignore);
-      }
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                               Primitives                            //
-   /////////////////////////////////////////////////////////////////////////
-
-   /** Primitive type name -> class map. */
-   private static final Map PRIMITIVE_NAME_TYPE_MAP = new HashMap();
-
-   /** Setup the primitives map. */
-   static
-   {
-      PRIMITIVE_NAME_TYPE_MAP.put("boolean", Boolean.TYPE);
-      PRIMITIVE_NAME_TYPE_MAP.put("byte", Byte.TYPE);
-      PRIMITIVE_NAME_TYPE_MAP.put("char", Character.TYPE);
-      PRIMITIVE_NAME_TYPE_MAP.put("short", Short.TYPE);
-      PRIMITIVE_NAME_TYPE_MAP.put("int", Integer.TYPE);
-      PRIMITIVE_NAME_TYPE_MAP.put("long", Long.TYPE);
-      PRIMITIVE_NAME_TYPE_MAP.put("float", Float.TYPE);
-      PRIMITIVE_NAME_TYPE_MAP.put("double", Double.TYPE);
-   }
-
-   /**
-    * Get the primitive type for the given primitive name.
-    *
-    * <p>
-    * For example, "boolean" returns Boolean.TYPE and so on...
-    *
-    * @param name    Primitive type name (boolean, int, byte, ...)
-    * @return        Primitive type or null.
-    *
-    * @exception IllegalArgumentException    Type is not a primitive class
-    */
-   public static Class getPrimitiveTypeForName(final String name)
-   {
-      return (Class) PRIMITIVE_NAME_TYPE_MAP.get(name);
-   }
-
-   /** Map of primitive types to their wrapper classes */
-   private static final Class[] PRIMITIVE_WRAPPER_MAP = {
-      Boolean.TYPE, Boolean.class,
-      Byte.TYPE, Byte.class,
-      Character.TYPE, Character.class,
-      Double.TYPE, Double.class,
-      Float.TYPE, Float.class,
-      Integer.TYPE, Integer.class,
-      Long.TYPE, Long.class,
-      Short.TYPE, Short.class,
-   };
-
-   /**
-    * Get the wrapper class for the given primitive type.
-    *
-    * @param type    Primitive class.
-    * @return        Wrapper class for primitive.
-    *
-    * @exception IllegalArgumentException    Type is not a primitive class
-    */
-   public static Class getPrimitiveWrapper(final Class type)
-   {
-      if (!type.isPrimitive())
-      {
-         throw new IllegalArgumentException("type is not a primitive class");
-      }
-
-      for (int i = 0; i < PRIMITIVE_WRAPPER_MAP.length; i += 2)
-      {
-         if (type.equals(PRIMITIVE_WRAPPER_MAP[i]))
-            return PRIMITIVE_WRAPPER_MAP[i + 1];
-      }
-
-      // should never get here, if we do then PRIMITIVE_WRAPPER_MAP
-      // needs to be updated to include the missing mapping
-      throw new UnreachableStatementException();
-   }
-
-   /**
-    * Object a list of all interfaces starting with the argument class c through
-    * all superclasses
-    * 
-    * @param allIfaces - the list to populate for 
-    * @param c - the class to start scanning for interfaces
-    */
-   public static void getAllInterfaces(List allIfaces, Class c)
-   {
-      while( c != null )
-      {
-         Class[] ifaces = c.getInterfaces();
-         for(int n = 0; n < ifaces.length; n ++)
-         {
-            allIfaces.add(ifaces[n]);
-         }
-         c = c.getSuperclass();
-      }
-   }
-
-   /**
-    * Check if the given class is a primitive wrapper class.
-    *
-    * @param type    Class to check.
-    * @return        True if the class is a primitive wrapper.
-    */
-   public static boolean isPrimitiveWrapper(final Class type)
-   {
-      for (int i = 0; i < PRIMITIVE_WRAPPER_MAP.length; i += 2)
-      {
-         if (type.equals(PRIMITIVE_WRAPPER_MAP[i + 1]))
-         {
-            return true;
-         }
-      }
-
-      return false;
-   }
-
-   /**
-    * Check if the given class is a primitive class or a primitive 
-    * wrapper class.
-    *
-    * @param type    Class to check.
-    * @return        True if the class is a primitive or primitive wrapper.
-    */
-   public static boolean isPrimitive(final Class type)
-   {
-      if (type.isPrimitive() || isPrimitiveWrapper(type))
-      {
-         return true;
-      }
-
-      return false;
-   }
-   /** Check type against boolean, byte, char, short, int, long, float, double.
-    * @param type  The java type name
-    * @return true if this is a primative type name.
-    */
-   public static boolean isPrimitive(final String type)
-   {
-      return PRIMITIVE_NAME_TYPE_MAP.containsKey(type);
-   }
-
-   /**
-    * @param wrapper  a primitive wrapper type
-    * @return  primitive type the passed in wrapper type corresponds to
-    */
-   public static Class getPrimitive(Class wrapper)
-   {
-      Class primitive;
-      if(Integer.class == wrapper)
-      {
-         primitive = int.class;
-      }
-      else if(Long.class == wrapper)
-      {
-         primitive = long.class;
-      }
-      else if(Double.class == wrapper)
-      {
-         primitive = double.class;
-      }
-      else if(Boolean.class == wrapper)
-      {
-         primitive = boolean.class;
-      }
-      else if(Short.class == wrapper)
-      {
-         primitive = short.class;
-      }
-      else if(Float.class == wrapper)
-      {
-         primitive = float.class;
-      }
-      else if(Byte.class == wrapper)
-      {
-         primitive = byte.class;
-      }
-      else if(Character.class == wrapper)
-      {
-         primitive = char.class;
-      }
-      else
-      {
-         throw new IllegalArgumentException("The class is not a primitive wrapper type: " + wrapper);
-      }
-      return primitive;
-   }
-
-   /**
-    * Instantiate a java class object
-    * 
-    * @param expected the expected class type
-    * @param property the system property defining the class
-    * @param defaultClassName the default class name
-    * @return the instantiated object
-    */
-   public static Object instantiate(Class expected, String property, String defaultClassName)
-   {
-      String className = getProperty(property, defaultClassName);
-      Class clazz = null;
-      try
-      {
-         clazz = loadClass(className);
-      }
-      catch (ClassNotFoundException e)
-      {
-         throw new NestedRuntimeException("Cannot load class " + className, e);
-      }
-      Object result = null;
-      try
-      {
-         result = clazz.newInstance();
-      }
-      catch (InstantiationException e)
-      {
-         throw new NestedRuntimeException("Error instantiating " + className, e);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new NestedRuntimeException("Error instantiating " + className, e);
-      }
-      if (expected.isAssignableFrom(clazz) == false)
-         throw new NestedRuntimeException("Class " + className + " from classloader " + clazz.getClassLoader() +
-            " is not of the expected class " + expected + " loaded from " + expected.getClassLoader());
-      return result;
-   }
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Class Loading                            //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * This method acts equivalently to invoking
-    * <code>Thread.currentThread().getContextClassLoader().loadClass(className);</code> but it also
-    * supports primitive types and array classes of object types or primitive types.
-    *
-    * @param className    the qualified name of the class or the name of primitive type or
-    *                     array in the same format as returned by the
-    *                     <code>java.lang.Class.getName()</code> method.
-    * @return             the Class object for the requested className
-    *
-    * @throws ClassNotFoundException when the <code>classLoader</code> can not find the requested class
-    */
-   public static Class loadClass(String className) throws ClassNotFoundException
-   {
-      return loadClass(className, Thread.currentThread().getContextClassLoader());
-   }
-
-   /**
-    * This method acts equivalently to invoking classLoader.loadClass(className)
-    * but it also supports primitive types and array classes of object types or
-    * primitive types.
-    *
-    * @param className the qualified name of the class or the name of primitive
-    * type or array in the same format as returned by the
-    * java.lang.Class.getName() method.
-    * @param classLoader  the ClassLoader used to load classes
-    * @return             the Class object for the requested className
-    *
-    * @throws ClassNotFoundException when the <code>classLoader</code> can not
-    * find the requested class
-    */
-   public static Class loadClass(String className, ClassLoader classLoader)
-      throws ClassNotFoundException
-   {
-      // ClassLoader.loadClass() does not handle primitive types:
-      //
-      //   B            byte
-      //   C            char
-      //   D            double
-      //   F            float
-      //   I            int
-      //   J            long
-      //   S            short
-      //   Z            boolean
-      //   V	         void
-      //
-      if (className.length() == 1)
-      {
-         char type = className.charAt(0);
-         if (type == 'B') return Byte.TYPE;
-         if (type == 'C') return Character.TYPE;
-         if (type == 'D') return Double.TYPE;
-         if (type == 'F') return Float.TYPE;
-         if (type == 'I') return Integer.TYPE;
-         if (type == 'J') return Long.TYPE;
-         if (type == 'S') return Short.TYPE;
-         if (type == 'Z') return Boolean.TYPE;
-         if (type == 'V') return Void.TYPE;
-         // else throw...
-         throw new ClassNotFoundException(className);
-      }
-
-      // Check for a primative type
-      if( isPrimitive(className) == true )
-         return (Class) Classes.PRIMITIVE_NAME_TYPE_MAP.get(className);
-
-      // Check for the internal vm format: Lclassname;
-      if (className.charAt(0) == 'L' && className.charAt(className.length() - 1) == ';')
-         return classLoader.loadClass(className.substring(1, className.length() - 1));
-
-      // first try - be optimistic
-      // this will succeed for all non-array classes and array classes that have already been resolved
-      //
-      try
-      {
-         return classLoader.loadClass(className);
-      }
-      catch (ClassNotFoundException e)
-      {
-         // if it was non-array class then throw it
-         if (className.charAt(0) != '[')
-            throw e;
-      }
-
-      // we are now resolving array class for the first time
-
-      // count opening braces
-      int arrayDimension = 0;
-      while (className.charAt(arrayDimension) == '[')
-         arrayDimension++;
-
-      // resolve component type - use recursion so that we can resolve primitive types also
-      Class componentType = loadClass(className.substring(arrayDimension), classLoader);
-
-      // construct array class
-      return Array.newInstance(componentType, new int[arrayDimension]).getClass();
-   }
-
-   /**
-    * Convert a list of Strings from an Interator into an array of
-    * Classes (the Strings are taken as classnames).
-    *
-    * @param it A java.util.Iterator pointing to a Collection of Strings
-    * @param cl The ClassLoader to use
-    *
-    * @return Array of Classes
-    *
-    * @throws ClassNotFoundException When a class could not be loaded from
-    *         the specified ClassLoader
-    */
-   public final static Class[] convertToJavaClasses(Iterator it,
-                                                    ClassLoader cl)
-      throws ClassNotFoundException
-   {
-      ArrayList classes = new ArrayList();
-      while (it.hasNext())
-      {
-         classes.add(convertToJavaClass((String) it.next(), cl));
-      }
-      return (Class[]) classes.toArray(new Class[classes.size()]);
-   }
-
-   /**
-    * Returns attribute's getter method. If the method not found then NoSuchMethodException will be thrown.
-    * @param cls  the class the attribute belongs too
-    * @param attr  the attribute's name
-    * @return  attribute's getter method
-    * @throws NoSuchMethodException  if the getter was not found
-    */
-   public final static Method getAttributeGetter(Class cls, String attr) throws NoSuchMethodException
-   {
-      StringBuffer buf = new StringBuffer(attr.length() + 3);
-      buf.append("get");
-      if(Character.isLowerCase(attr.charAt(0)))
-      {
-         buf.append(Character.toUpperCase(attr.charAt(0)))
-            .append(attr.substring(1));
-      }
-      else
-      {
-         buf.append(attr);
-      }
-
-      try
-      {
-         return cls.getMethod(buf.toString(), null);
-      }
-      catch (NoSuchMethodException e)
-      {
-         buf.replace(0, 3, "is");
-         return cls.getMethod(buf.toString(), null);
-      }
-   }
-
-   /**
-    * Returns attribute's setter method. If the method not found then NoSuchMethodException will be thrown.
-    * @param cls   the class the attribute belongs to
-    * @param attr  the attribute's name
-    * @param type  the attribute's type
-    * @return  attribute's setter method
-    * @throws NoSuchMethodException  if the setter was not found
-    */
-   public final static Method getAttributeSetter(Class cls, String attr, Class type) throws NoSuchMethodException
-   {
-      StringBuffer buf = new StringBuffer(attr.length() + 3);
-      buf.append("set");
-      if(Character.isLowerCase(attr.charAt(0)))
-      {
-         buf.append(Character.toUpperCase(attr.charAt(0)))
-            .append(attr.substring(1));
-      }
-      else
-      {
-         buf.append(attr);
-      }
-
-      return cls.getMethod(buf.toString(), new Class[]{type});
-   }
-
-   /**
-    * Convert a given String into the appropriate Class.
-    *
-    * @param name Name of class
-    * @param cl ClassLoader to use
-    *
-    * @return The class for the given name
-    *
-    * @throws ClassNotFoundException When the class could not be found by
-    *         the specified ClassLoader
-    */
-   private final static Class convertToJavaClass(String name,
-                                                 ClassLoader cl)
-      throws ClassNotFoundException
-   {
-      int arraySize = 0;
-      while (name.endsWith("[]"))
-      {
-         name = name.substring(0, name.length() - 2);
-         arraySize++;
-      }
-
-      // Check for a primitive type
-      Class c = (Class) PRIMITIVE_NAME_TYPE_MAP.get(name);
-
-      if (c == null)
-      {
-         // No primitive, try to load it from the given ClassLoader
-         try
-         {
-            c = cl.loadClass(name);
-         }
-         catch (ClassNotFoundException cnfe)
-         {
-            throw new ClassNotFoundException("Parameter class not found: " +
-               name);
-         }
-      }
-
-      // if we have an array get the array class
-      if (arraySize > 0)
-      {
-         int[] dims = new int[arraySize];
-         for (int i = 0; i < arraySize; i++)
-         {
-            dims[i] = 1;
-         }
-         c = Array.newInstance(c, dims).getClass();
-      }
-
-      return c;
-   }
-
-   /**
-    * Get a system property
-    * 
-    * @param name the property name
-    * @param defaultValue the default value
-    */
-   private static String getProperty(final String name, final String defaultValue)
-   {
-      return (String) AccessController.doPrivileged(
-      new PrivilegedAction()
-      {
-         public Object run()
-         {
-            return System.getProperty(name, defaultValue);
-         }
-
-      });
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Classes.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Classes.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Counter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Counter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Counter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,247 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.Serializable;
-
-/**
- * An integer counter class.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class Counter
-   implements Serializable, Cloneable
-{
-   /** The current count */
-   private int count;
-
-   /**
-    * Construct a Counter with a starting value.
-    *
-    * @param count   Starting value for counter.
-    */
-   public Counter(final int count) {
-      this.count = count;
-   }
-
-   /**
-    * Construct a Counter.
-    */
-   public Counter() {}
-
-   /**
-    * Increment the counter. (Optional operation)
-    *
-    * @return  The incremented value of the counter.
-    */
-   public int increment() {
-      return ++count;
-   }
-
-   /**
-    * Decrement the counter. (Optional operation)
-    *
-    * @return  The decremented value of the counter.
-    */
-   public int decrement() {
-      return --count;
-   }
-
-   /**
-    * Return the current value of the counter.
-    *
-    * @return  The current value of the counter.
-    */
-   public int getCount() {
-      return count;
-   }
-
-   /**
-    * Reset the counter to zero. (Optional operation)
-    */
-   public void reset() {
-      this.count = 0;
-   }
-
-   /**
-    * Check if the given object is equal to this.
-    *
-    * @param obj  Object to test equality with.
-    * @return     True if object is equal to this.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         return ((Counter)obj).count == count;
-      }
-      
-      return false;
-   }
-
-   /**
-    * Return a string representation of this.
-    *
-    * @return  A string representation of this.
-    */
-   public String toString() {
-      return String.valueOf(count);
-   }
-
-   /**
-    * Return a cloned copy of this object.
-    *
-    * @return  A cloned copy of this object.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                                Wrappers                             //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Base wrapper class for other wrappers.
-    */
-   private static class Wrapper
-      extends Counter
-   {
-      /** The wrapped counter */
-      protected final Counter counter;
-
-      public Wrapper(final Counter counter) {
-         this.counter = counter;
-      }
-
-      public int increment() {
-         return counter.increment();
-      }
-
-      public int decrement() {
-         return counter.decrement();
-      }
-
-      public int getCount() {
-         return counter.getCount();
-      }
-
-      public void reset() {
-         counter.reset();
-      }
-
-      public boolean equals(final Object obj) {
-         return counter.equals(obj);
-      }
-
-      public String toString() {
-         return counter.toString();
-      }
-
-      public Object clone() {
-         return counter.clone();
-      }
-   }
-
-   /**
-    * Return a synchronized counter.
-    *
-    * @param counter    Counter to synchronize.
-    * @return           Synchronized counter.
-    */
-   public static Counter makeSynchronized(final Counter counter) {
-      return new Wrapper(counter) {
-            public synchronized int increment() {
-               return this.counter.increment();
-            }
-
-            public synchronized int decrement() {
-               return this.counter.decrement();
-            }
-
-            public synchronized int getCount() {
-               return this.counter.getCount();
-            }
-
-            public synchronized void reset() {
-               this.counter.reset();
-            }
-
-            public synchronized int hashCode() {
-               return this.counter.hashCode();
-            }
-
-            public synchronized boolean equals(final Object obj) {
-               return this.counter.equals(obj);
-            }
-
-            public synchronized String toString() {
-               return this.counter.toString();
-            }
-
-            public synchronized Object clone() {
-               return this.counter.clone();
-            }
-         };
-   }
-
-   /**
-    * Returns a directional counter.
-    *
-    * @param counter       Counter to make directional.
-    * @param increasing    True to create an increasing only
-    *                      or false to create a decreasing only.
-    * @return              A directional counter.
-    */
-   public static Counter makeDirectional(final Counter counter,
-                                         final boolean increasing)
-   {
-      Counter temp;
-      if (increasing) {
-         temp = new Wrapper(counter) {
-               public int decrement() {
-                  throw new UnsupportedOperationException();
-               }
-
-               public void reset() {
-                  throw new UnsupportedOperationException();
-               }
-            };
-      }
-      else {
-         temp = new Wrapper(counter) {
-               public int increment() {
-                  throw new UnsupportedOperationException();
-               }
-            };
-      }
-      
-      return temp;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Counter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Counter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/EmptyStringException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/EmptyStringException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/EmptyStringException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,49 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Thrown to indicate that a string was empty (aka. <code>""</code>)
- * where it must <b>not</b> be.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class EmptyStringException
-   extends IllegalArgumentException
-{
-   /**
-    * Construct a <tt>EmptyStringException</tt>.
-    *
-    * @param msg  Exception message.
-    */
-   public EmptyStringException(final String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <tt>EmptyStringException</tt>.
-    */
-   public EmptyStringException() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/EmptyStringException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/EmptyStringException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Executable.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Executable.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Executable.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,38 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Interface for the execution of a task.
- * 
- * @see WorkerQueue
- * 
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public interface Executable
-{
-   /**
-    * Executes the implemented task.
-    */
-   void execute() throws Exception;
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Executable.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Executable.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/FieldInstance.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/FieldInstance.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/FieldInstance.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,107 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.lang.reflect.Field;
-
-/**
- * A <tt>FieldInstance</tt> refers to a specific reflected field on an object.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FieldInstance
-{
-   /** Field */
-   protected final Field field;
-
-   /** Instance */
-   protected final Object instance;
-
-   /**
-    * Construct a new field instance.
-    *
-    * @param instance      The instance object the given field belongs to.
-    * @param fieldName     The name of the field to find in the instance.
-    *
-    * @throws NullArgumentException    Instance or fieldName is <tt>null</tt>.
-    * @throws NoSuchFieldException
-    */
-   public FieldInstance(final Object instance, final String fieldName)
-      throws NoSuchFieldException
-   {
-      if (instance == null)
-         throw new NullArgumentException("instance");
-      if (fieldName == null)
-         throw new NullArgumentException("fieldName");
-
-      // Get the field object
-      field = instance.getClass().getField(fieldName);
-
-      // Check if the field is assignable ?
-      if (! field.getDeclaringClass().isAssignableFrom(instance.getClass()))
-         throw new IllegalArgumentException
-            ("field does not belong to instance class");
-
-      this.instance = instance;
-   }
-
-   /**
-    * Get the field.
-    *
-    * @return  Field.
-    */
-   public final Field getField() {
-      return field;
-   }
-
-   /**
-    * Get the instance.
-    *
-    * @return  Instance.
-    */
-   public final Object getInstance() {
-      return instance;
-   }
-
-   /**
-    * Get the value of the field instance.
-    *
-    * @return  Field value.
-    *
-    * @throws IllegalAccessException      Failed to get field value.
-    */ 
-   public final Object get() throws IllegalAccessException {
-      return field.get(instance);
-   }
-
-   /**
-    * Set the value of the field instance
-    *
-    * @param value   Field value.
-    *
-    * @throws IllegalAccessException      Failed to set field value.
-    */
-   public final void set(final Object value) throws IllegalAccessException {
-      field.set(instance, value);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/FieldInstance.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/FieldInstance.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/HashCode.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/HashCode.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/HashCode.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,348 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.Serializable;
-
-/**
- * A hash-code generator and a collection of static hash-code generation
- * methods.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class HashCode
-   implements Serializable, Cloneable, Comparable
-{
-   /** Hashcode for a 'null' value. */
-   private static final int NULL_HASHCODE = 0;
-
-   /** Hashcode for a 'true' boolean */
-   private static final int TRUE_HASHCODE = 1231; // completely arbitrary
-
-   /** Hashcode for a 'false' boolean */
-   private static final int FALSE_HASHCODE = 1237; // completely arbitrary
-
-   /** The hash-code value. */
-   private int value;
-
-   /**
-    * Construct a new <tt>HashCode</tt> using the given <tt>int</tt> as the
-    * base value.
-    *
-    * @param value   <tt>int</tt> to use as the base value.
-    */
-   public HashCode(final int value) {
-      this.value = value;
-   }
-
-   /**
-    * Construct a new <tt>HashCode</tt>.
-    */
-   public HashCode() {
-      this(0);
-   }
-
-   /**
-    * Add the hash-code of the given value.
-    *
-    * @param b    Value to get hash-code from.
-    * @return     <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final boolean b) {
-      value ^= generate(b);
-      return this;
-   }
-
-   /**
-    * Add the hash-code of the given value.
-    *
-    * @param n    Value to get hash-code from.
-    * @return     <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final byte n) {
-      value ^= n;
-      return this;
-   }
-
-   /**
-    * Add the hash-code of the given value.
-    *
-    * @param n    Value to get hash-code from.
-    * @return     <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final char n) {
-      value ^= n;
-      return this;
-   }
-
-   /**
-    * Add the hash-code of the given value.
-    *
-    * @param n    Value to get hash-code from.
-    * @return     <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final short n) {
-      value ^= n;
-      return this;
-   }
-
-   /**
-    * Add the hash-code of the given value.
-    *
-    * @param n    Value to get hash-code from.
-    * @return     <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final int n) {
-      value ^= n;
-      return this;
-   }
-
-   /**
-    * Add the hash-code of the given value.
-    *
-    * @param n    Value to get hash-code from.
-    * @return     <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final long n) {
-      value ^= generate(n);
-      return this;
-   }
-
-   /**
-    * Add the hash-code of the given value.
-    *
-    * @param f    Value to get hash-code from.
-    * @return     <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final float f) {
-      value ^= generate(f);
-      return this;
-   }
-
-   /**
-    * Add the hash-code of the given value.
-    *
-    * @param f    Value to get hash-code from.
-    * @return     <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final double f) {
-      value ^= generate(f);
-      return this;
-   }
-
-   /**
-    * Add the hash-code of the given object.
-    *
-    * @param obj    Value to get hash-code from.
-    * @return        <i>This</i> <tt>HashCode</tt>.
-    */
-   public HashCode add(final Object obj) {
-      value ^= generate(obj);
-      return this;
-   }
-
-   /**
-    * Get the hash-code.
-    *
-    * @return   Hash-code.
-    */
-   public int hashCode() {
-      return (int)value;
-   }
-
-   /**
-    * Compares this object with the specified <tt>int</tt> for order.
-    *
-    * @param other   Value to compare with.
-    * @return        A negative integer, zero, or a positive integer as
-    *                this object is less than, equal to, or greater than
-    *                the specified object.
-    */
-   public int compareTo(final int other) {
-      return (value < other) ? -1 : (value == other) ? 0 : 1;
-   }
-
-   /**
-    * Compares this object with the specified object for order.
-    *
-    * @param other   Value to compare with.
-    * @return        A negative integer, zero, or a positive integer as
-    *                this object is less than, equal to, or greater than
-    *                the specified object.
-    *
-    * @throws ClassCastException    Object is not a <tt>HashCode</tt>.
-    */
-   public int compareTo(final Object obj) throws ClassCastException {
-      HashCode hashCode = (HashCode)obj;
-      return compareTo(hashCode.value);
-   }
-
-   /**
-    * Test the equality of this <tt>HashCode</tt> and another object.
-    *
-    * @param obj    Object to test equality with.
-    * @return       True if object is equal.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         return value == ((HashCode)obj).value;
-      }
-
-      return false;
-   }
-
-   /**
-    * Return a string representation of this <tt>HashCode</tt>.
-    *
-    * @return  A string representation of this <tt>HashCode</tt>.
-    */
-   public String toString() {
-      return String.valueOf(value);
-   }
-
-   /**
-    * Return a cloned copy of this <tt>HashCode</tt>.
-    *
-    * @return   Cloned <tt>HashCode</tt>.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-
-   /////////////////////////////////////////////////////////////////////////
-   //                           Generation Methods                        //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Generate a hash code for a boolean value.
-    *
-    * @param value   Boolean value to generate hash code from.
-    * @return        Hash code.
-    */
-   public static int generate(final boolean value) {
-      return value ? TRUE_HASHCODE : FALSE_HASHCODE;
-   }
-
-   /**
-    * Generate a hash code for a long value.
-    *
-    * @param value   Long value to generate hash code from.
-    * @return        Hash code.
-    */
-   public static int generate(final long value) {
-      return (int)(value ^ (value >> 32));
-   }
-
-   /**
-    * Generate a hash code for a double value.
-    *
-    * @param value   Double value to generate hash code from.
-    * @return        Hash code.
-    */
-   public static int generate(final double value) {
-      return generate(Double.doubleToLongBits(value));
-   }
-
-   /**
-    * Generate a hash code for a float value.
-    *
-    * @param value   Float value to generate hash code from.
-    * @return        Hash code.
-    */
-   public static int generate(final float value) {
-      return Float.floatToIntBits(value);
-   }
-
-   /**
-    * Generate a hash code for a byte array.
-    *
-    * @param bytes   An array of bytes to generate a hash code from.
-    * @return        Hash code.
-    */
-   public static int generate(final byte[] bytes) {
-      int hashcode = 0;
-
-      for (int i=0; i<bytes.length; i++) {
-         hashcode <<= 1;
-         hashcode ^= bytes[i];
-      } 
-
-      return hashcode;
-   }
-
-   /**
-    * Generate a hash code for an object array.
-    *
-    * <p>Does not handle nested primitive array elements.
-    *
-    * @param array   Array to generate hashcode for.
-    * @param deep    True to traverse elements which are arrays to 
-    *                determine the elements hash code.
-    * @return        Hash code.
-    */
-   public static int generate(final Object array[], final boolean deep) {
-      int hashcode = 0;
-
-      for (int i=0; i<array.length; i++) {
-         if (deep && (array[i] instanceof Object[])) {
-            hashcode ^= generate((Object[])array[i], true);
-         }
-         else {
-            hashcode ^= array[i].hashCode();
-         }
-      } 
-
-      return hashcode;
-   }
-
-   /**
-    * Generate a shallow hash code for an object array.
-    *
-    * @param array   Array to generate hashcode for.
-    * @return        Hash code.
-    */
-   public static int generate(final Object array[]) {
-      return generate(array, false);
-   }
-
-   /**
-    * Generate a hash code for an object.
-    *
-    * @param obj     Object to generate hashcode for.
-    * @return        Hash code.
-    */
-   public static int generate(final Object obj) {
-      if (obj != null) {
-         return obj.hashCode();
-      }
-
-      return NULL_HASHCODE;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/HashCode.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/HashCode.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Heap.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Heap.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Heap.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,210 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util; 
- 
-import java.util.Comparator;
-
-/**
- * Data structure that mantains data in a ordered binary tree; each node is
- * greater (smaller) or equal than its 2 sub-nodes, for all the hierarchy. <p>
- * Elements of this data structure should either implement Comparable, or a 
- * Comparator should be given as argument to the constructor.
- *
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public class Heap
-{
-   private Comparator m_comparator;
-   private int m_count;
-   private Object[] m_nodes;
-
-   /**
-    * Creates a new Heap whose elements inserted implement the 
-    * {@link Comparable} interface.
-    */
-   public Heap()
-   {
-      this(null);
-   }
-   
-   /**
-    * Creates a new Heap whose elements are compared using the given
-    * {@link Comparator}.
-    */
-   public Heap(Comparator comparator)
-   {
-      m_comparator = comparator;
-      clear();
-   }
-
-   /**
-    * Inserts the given element in this heap.
-    * 
-    * @see #extract
-    */
-   public void insert(Object obj)
-   {
-      int length = m_nodes.length;
-      // Expand if necessary
-      if (m_count == length)
-      {
-         Object[] newNodes = new Object[length + length];
-         System.arraycopy(m_nodes, 0, newNodes, 0, length);
-         m_nodes = newNodes;
-      }
-      // Be cur_slot the first unused slot index; be par_slot its parent index.
-      // Start from cur_slot and walk up the tree comparing the object to 
-      // insert with the object at par_slot; if it's smaller move down the object at par_slot,
-      // otherwise cur_slot is the index where insert the object. If not done, 
-      // shift up the tree so that now cur_slot is the old par_slot and 
-      // par_slot is the parent index of the new cur_slot (so the grand-parent
-      // index of the old cur_slot) and compare again.
-      int k = m_count;
-      while (k > 0)
-      {
-         int par = parent(k);
-         if (compare(obj, m_nodes[par]) < 0)
-         {
-            m_nodes[k] = m_nodes[par];
-            k = par;
-         }
-         else break;
-      }
-      m_nodes[k] = obj;
-      ++m_count;
-   }
-   
-   /**
-    * Removes and returns the least element of this heap.
-    * 
-    * @see #insert
-    * @see #peek
-    */
-   public Object extract()
-   {
-      if (m_count < 1) {return null;}
-      else
-      {
-         int length = m_nodes.length >> 1;
-         // Shrink if necessary
-         if (length > 5 && m_count < (length >> 1))
-         {
-            Object[] newNodes = new Object[length];
-            System.arraycopy(m_nodes, 0, newNodes, 0, length);
-            m_nodes = newNodes;
-         }
-         //
-         int k = 0;
-         Object ret = m_nodes[k];
-         --m_count;
-         Object last = m_nodes[m_count];
-         for (;;)
-         {
-            int l = left(k);
-            if (l >= m_count) {break;}
-            else
-            {
-               int r = right(k);
-               int child = (r >= m_count || compare(m_nodes[l], m_nodes[r]) < 0) ? l : r;
-               if (compare(last, m_nodes[child]) > 0)
-               {
-                  m_nodes[k] = m_nodes[child];
-                  k = child;
-               }
-               else {break;}
-            }
-         }
-         m_nodes[k] = last;
-         m_nodes[m_count] = null;
-         return ret;
-      }
-   }
-   
-   /**
-    * Returns, without removing it, the least element of this heap.
-    * 
-    * @see #extract
-    */
-   public Object peek()
-   {
-      if (m_count < 1) {return null;}
-      else {return m_nodes[0];}
-   }
-   
-   /**
-    * Empties this heap
-    */
-   public void clear() 
-   {
-      m_count = 0;
-      m_nodes = new Object[10];
-   }
-
-   /**
-    * Compares the given objects using the comparator, if available,
-    * or considering them Comparable objects.
-    * 
-    * @throws ClassCastException if nor the comparator is given
-    * and nor both objects implements the Comparable interface
-    */
-   protected int compare(Object o1, Object o2)
-   {
-      if (m_comparator != null)
-      {
-         return m_comparator.compare(o1, o2);
-      }
-      else
-      {
-         if (o1 == null)
-         {
-            if (o2 == null) {return 0;}
-            else {return -((Comparable)o2).compareTo(o1);}
-         }
-         else {return ((Comparable)o1).compareTo(o2);}
-      }
-   }
-   
-   /**
-    * Returns the parent index of <code>index</code>.
-    */
-   protected int parent(int index)
-   {
-      return (index - 1) >> 1;
-   }
-   
-   /**
-    * Returns the left child index of <code>index</code>.
-    */
-   protected int left(int index)
-   {
-      return index + index + 1;
-   }
-   
-   /**
-    * Returns the right child index of <code>index</code>.
-    */
-   protected int right(int index)
-   {
-      return index + index + 2;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Heap.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Heap.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossInterface.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/JBossInterface.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossInterface.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,58 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Clone the object without throwing a typed exception.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public interface JBossInterface extends Cloneable
-{
-   // Constants -----------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   /**
-    * Clone the object
-    * 
-    * @return a clone of the object
-    */
-   Object clone();
-
-   /**
-    * Print a short version of the object
-    * 
-    * @return the short string
-    */
-   String toShortString();
-   
-   /**
-    * Append the key class properties to the buffer
-    * 
-    * @param buffer the buffer
-    */
-   void toShortString(JBossStringBuilder buffer);
- 
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossInterface.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/JBossInterface.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossObject.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/JBossObject.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossObject.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,281 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.lang.ref.SoftReference;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.jboss.logging.Logger;
-
-/**
- * Utility Class
- * 
- * Utility Class that provides a Logger instance (log) and
- * caching of toString() and hashCode() values.
- * 
- * You most probably want to override the method that
- * comes from JBossInterface:
- * 
- *    public void toShortString(StringBuffer buffer)
- *
- * to append to the buffer the key class properties, and
- * also override the following methods to provide the
- * hashCode and the class properties that should be cached:
- * 
- *    protected void toString(StringBuffer buffer)
- *    protected int getHashCode()
- * 
- * Cached values can be flushed using flushJBossObjectCache()
- * 
- * Caching can be disabled by simply overriding toString()
- * and hashCode(), or returning false from methods:
- * 
- *    protected boolean cacheToString()
- *    protected boolean cacheGetHashCode()  
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class JBossObject implements JBossInterface
-{
-   /** The log */
-   protected Logger log;
-   
-   /** Cached toString */
-   protected transient SoftReference toString;
-   
-   /** Cached hashCode */
-   protected transient int hashCode = Integer.MIN_VALUE;
-
-   /**
-    * Safe equality check
-    * 
-    * @param one an object
-    * @param two another object
-    */
-   public static boolean equals(Object one, Object two)
-   {
-      if (one == null && two != null)
-         return false;
-      if (one != null && one.equals(two) == false)
-         return false;
-      return true;
-   }
-
-   /**
-    * Safe inequality check
-    * 
-    * @param one an object
-    * @param two another object
-    */
-   public static boolean notEqual(Object one, Object two)
-   {
-      return equals(one, two) == false;
-   }
-
-   /**
-    * List the set of JBossObjects
-    *
-    * @param buffer the buffer
-    * @param objects the collection of objects
-    */
-   public static void list(JBossStringBuilder buffer, Collection objects)
-   {
-      if (objects == null)
-         return;
-
-      buffer.append('[');
-      if (objects.isEmpty() == false)
-      {
-         for (Iterator i = objects.iterator(); i.hasNext();)
-         {
-            Object object = i.next();
-            if (object instanceof JBossObject)
-               ((JBossObject) object).toShortString(buffer);
-            else
-               buffer.append(object.toString());
-            if (i.hasNext())
-               buffer.append(", ");
-         }
-      }
-      buffer.append(']');
-   }
-
-   /**
-    * Create a new object
-    */
-   public JBossObject()
-   {
-      log = Logger.getLogger(getClass());
-   }
-   
-   /**
-    * Create a new object using the specified Logger instace
-    * 
-    * @param log the Logger instance to use
-    */
-   public JBossObject(Logger log)
-   {
-      this.log = (log != null) ? log : Logger.getLogger(getClass());
-   }
-   
-   /**
-    * Override toString to cache the value
-    * 
-    * @return the String
-    */
-   public String toString()
-   {
-      if (cacheToString() == false)
-         return toStringImplementation();
-
-      String result = null;
-      if (toString != null)
-         result = (String) toString.get();
-
-      if (result == null)
-      {
-         result = toStringImplementation();
-         toString = new SoftReference(result);
-      }
-      return result;
-   }
-   
-   /**
-    * Override hashCode to cache the value
-    * 
-    * @return the hashCode
-    */
-   public int hashCode()
-   {
-      if (hashCode == Integer.MIN_VALUE || cacheGetHashCode() == false)
-         hashCode = getHashCode();
-      return hashCode;
-   }
-   
-   public Object clone()
-   {
-      try
-      {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public String toShortString()
-   {
-      JBossStringBuilder buffer = new JBossStringBuilder();
-      toShortString(buffer);
-      return buffer.toString();
-   }
-   
-   /**
-    * Append the key class properties to the buffer
-    * 
-    * @param buffer the buffer
-    */
-   public void toShortString(JBossStringBuilder buffer)
-   {
-   }
-   
-   /**
-    * Get the class short name
-    * 
-    * @return the short name of the class
-    */
-   public String getClassShortName()
-   {
-      String longName = getClass().getName();
-      int dot = longName.lastIndexOf('.');
-      if (dot != -1)
-         return longName.substring(dot + 1);
-      return longName;
-   }
-
-   /**
-    * Implementation of String
-    * 
-    * @return the string
-    */
-   protected String toStringImplementation()
-   {
-      JBossStringBuilder buffer = new JBossStringBuilder();
-      buffer.append(getClassShortName()).append('@');
-      buffer.append(Integer.toHexString(System.identityHashCode(this)));
-      buffer.append('{');
-      toString(buffer);
-      buffer.append('}');
-      return buffer.toString();
-   }
-   
-   /**
-    * Flush the JBossObject cached values
-    */
-   protected void flushJBossObjectCache()
-   {
-      toString = null;
-      hashCode = Integer.MIN_VALUE;
-   }
-   
-   /**
-    * Append the class properties to the buffer
-    * 
-    * @param buffer the buffer
-    */
-   protected void toString(JBossStringBuilder buffer)
-   {
-   }
-   
-   /**
-    * Calculate the hashcode
-    * 
-    * @return the hash code
-    */
-   protected int getHashCode()
-   {
-      return super.hashCode();
-   }
-   
-   /**
-    * Whether we should cache the result toString()
-    * 
-    * @return true by default
-    */
-   protected boolean cacheToString()
-   {
-      return true;
-   }
-   
-   /**
-    * Whether we should cache the result hashCode()
-    * 
-    * @return true by default
-    */
-   protected boolean cacheGetHashCode()
-   {
-      return true;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossObject.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/JBossObject.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossStringBuilder.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/JBossStringBuilder.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossStringBuilder.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,541 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.Serializable;
-import java.util.Arrays;
-
-/**
- * A JBossStringBuilder, providing the same functionality as the
- * java5 StringBuilder, except no Appendable which is java5 specific.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class JBossStringBuilder implements Serializable, CharSequence
-{
-   /** Serialization */
-   private static final long serialVersionUID = 1874946609763446794L;
-
-   /** The characters */
-   protected char[] chars;
-
-   /** The position */
-   protected int pos;
-
-   /**
-    * Create a new StringBuilder with no characters and an intial
-    * size of 16
-    */
-   public JBossStringBuilder()
-   {
-      this(16);
-   }
-
-   /**
-    * Create a new StringBuilder with no characters
-    * 
-    * @param capacity the initial capacity
-    */
-   public JBossStringBuilder(int capacity)
-   {
-      chars = new char[capacity];
-   }
-
-
-   /**
-    * Create a new StringBuilder from the given string.
-    * The initial capacity is the length of the string plus 16
-    *  
-    * @param string the string
-    */
-   public JBossStringBuilder(String string)
-   {
-      this(string.length() + 16);
-      append(string);
-   }
-
-   /**
-    * Create a new StringBuilder from the given character sequence.
-    * The initial capacity is the length of the sequence plus 16
-    * 
-    * @param charSequence the character sequence
-    */
-   public JBossStringBuilder(CharSequence charSequence)
-   {
-      this(charSequence.length() + 16);
-      append(charSequence);
-   }
-
-   /**
-    * Create a new StringBuilder from the given character array
-    * 
-    * @param ch the array
-    */
-   public JBossStringBuilder(char[] ch)
-   {
-      this(ch, 0, ch.length);
-   }
-
-   /**
-    * Create a new StringBuilder from the given character array
-    * 
-    * @param ch the array
-    * @param start the start of the array from which to take characters
-    * @param length the lengh of the array from which to take characters
-    */
-   public JBossStringBuilder(char[] ch, int start, int length)
-   {
-      this(length + 16);
-      append(ch, start, length);
-   }
-
-   public JBossStringBuilder append(Object object)
-   {
-      return append(String.valueOf(object));
-   }
-
-   public JBossStringBuilder append(String string)
-   {
-      if (string == null)
-         string = "null";
-
-      int length = string.length();
-      if (length == 0)
-         return this;
-
-      int afterAppend = pos + length;
-      if (afterAppend > chars.length)
-         expandCapacity(afterAppend);
-
-      string.getChars(0, length, chars, pos);
-      pos = afterAppend;
-      return this;
-   }
-
-   public JBossStringBuilder append(StringBuffer buffer)
-   {
-      if (buffer == null)
-         return append("null");
-
-      int length = buffer.length();
-      if (length == 0)
-         return this;
-
-      int afterAppend = pos + length;
-      if (afterAppend > chars.length)
-         expandCapacity(afterAppend);
-
-      buffer.getChars(0, length, chars, pos);
-      pos = afterAppend;
-      return this;
-   }
-
-   public JBossStringBuilder append(CharSequence charSequence)
-   {
-      if (charSequence == null)
-         return append("null");
-
-      int length = charSequence.length();
-      if (length == 0)
-         return this;
-
-      return append(charSequence, 0, charSequence.length());
-   }
-
-   public JBossStringBuilder append(CharSequence charSequence, int start, int end)
-   {
-      if (charSequence == null)
-         return append("null");
-
-      if (start < 0 || end < 0 || start > end || start > charSequence.length())
-         throw new IndexOutOfBoundsException("Invalid start=" + start + " end=" + end + " length=" + charSequence.length());
-
-      int length = end - start;
-      if (length == 0)
-         return this;
-
-      int afterAppend = pos + length;
-      if (afterAppend > chars.length)
-         expandCapacity(afterAppend);
-
-      for (int i = start; i < end; ++i)
-         chars[pos++] = charSequence.charAt(i);
-      pos = afterAppend;
-      return this;
-   }
-
-   public JBossStringBuilder append(char[] array)
-   {
-      if (array == null)
-         return append("null");
-
-      if (array.length == 0)
-         return this;
-
-      String string = String.valueOf(array);
-      return append(string);
-   }
-
-   public JBossStringBuilder append(char[] array, int offset, int length)
-   {
-      if (array == null)
-         return append("null");
-
-      int arrayLength = array.length;
-      if (offset < 0 || length < 0 || offset + length > arrayLength)
-         throw new IndexOutOfBoundsException("Invalid offset=" + offset + " length=" + length + " array.length=" + arrayLength);
-
-      if (length == 0 || arrayLength == 0)
-         return this;
-
-      String string = String.valueOf(array, offset, length);
-      return append(string);
-   }
-
-   public JBossStringBuilder append(boolean primitive)
-   {
-      String string = String.valueOf(primitive);
-      return append(string);
-   }
-
-   public JBossStringBuilder append(char primitive)
-   {
-      String string = String.valueOf(primitive);
-      return append(string);
-   }
-
-   public JBossStringBuilder append(int primitive)
-   {
-      String string = String.valueOf(primitive);
-      return append(string);
-   }
-
-   public JBossStringBuilder append(long primitive)
-   {
-      String string = String.valueOf(primitive);
-      return append(string);
-   }
-
-   public JBossStringBuilder append(float primitive)
-   {
-      String string = String.valueOf(primitive);
-      return append(string);
-   }
-
-   public JBossStringBuilder append(double primitive)
-   {
-      String string = String.valueOf(primitive);
-      return append(string);
-   }
-
-   public JBossStringBuilder delete(int start, int end)
-   {
-      if (start < 0 || start > pos || start > end || end > pos)
-         throw new IndexOutOfBoundsException("Invalid start=" + start + " end=" + end + " length=" + pos);
-
-      if (start == end)
-         return this;
-
-      int removed = end - start;
-      System.arraycopy(chars, start + removed, chars, start, pos - end);
-      pos -= removed;
-      return this;
-   }
-
-   public JBossStringBuilder deleteCharAt(int index)
-   {
-      return delete(index, 1);
-   }
-
-   public JBossStringBuilder replace(int start, int end, String string)
-   {
-      delete(start, end);
-      return insert(start, string);
-   }
-
-   public JBossStringBuilder insert(int index, char[] string)
-   {
-      return insert(index, string, 0, string.length);
-   }
-
-   public JBossStringBuilder insert(int index, char[] string, int offset, int len)
-   {
-      int stringLength = string.length;
-      if (index < 0 || index > pos || offset < 0 || len < 0 || (offset + len) > string.length)
-         throw new IndexOutOfBoundsException("Invalid index=" + index + " offset=" + offset + " len=" + len + " string.length=" + stringLength + " length=" + pos);
-
-      if (len == 0)
-         return this;
-
-      int afterAppend = pos + len;
-      if (afterAppend > chars.length)
-         expandCapacity(afterAppend);
-
-      System.arraycopy(chars, index, chars, index + stringLength, pos - index);
-      System.arraycopy(string, offset, chars, index, len);
-      pos = afterAppend;
-      return this;
-   }
-
-   public JBossStringBuilder insert(int offset, Object object)
-   {
-      if (object == null)
-         return insert(offset, "null");
-      else
-         return insert(offset, String.valueOf(object));
-   }
-
-   public JBossStringBuilder insert(int offset, String string)
-   {
-      if (offset < 0 || offset > pos)
-         throw new IndexOutOfBoundsException("Invalid offset=" + offset + " length=" + pos);
-
-      if (string == null)
-         string = "null";
-
-      int stringLength = string.length();
-
-      int afterAppend = pos + stringLength;
-      if (afterAppend > chars.length)
-         expandCapacity(afterAppend);
-
-      System.arraycopy(chars, offset, chars, offset + stringLength, pos - offset);
-      string.getChars(0, stringLength, chars, offset);
-      pos = afterAppend;
-      return this;
-   }
-
-   public JBossStringBuilder insert(int offset, CharSequence charSequence)
-   {
-      if (charSequence == null)
-         return insert(offset, "null");
-      else
-         return insert(offset, charSequence, 0, charSequence.length());
-   }
-
-   public JBossStringBuilder insert(int offset, CharSequence charSequence, int start, int end)
-   {
-      if (charSequence == null)
-         charSequence = "null";
-
-      int sequenceLength = charSequence.length();
-      if (offset < 0 || offset > pos || start < 0 || end < 0 || start > sequenceLength || end > sequenceLength || start > end)
-         throw new IndexOutOfBoundsException("Invalid offset=" + offset + " start=" + start + " end=" + end + " sequence.length()=" + sequenceLength + " length=" + pos);
-
-      int len = end - start;
-      if (len == 0)
-         return this;
-
-      int afterAppend = pos + len;
-      if (afterAppend > chars.length)
-         expandCapacity(afterAppend);
-
-      System.arraycopy(chars, offset, chars, offset + sequenceLength, pos - offset);
-      for (int i = start; i < end; ++i)
-         chars[offset++] = charSequence.charAt(i);
-      pos = afterAppend;
-      return this;
-   }
-
-   public JBossStringBuilder insert(int offset, boolean primitive)
-   {
-      return insert(offset, String.valueOf(primitive));
-   }
-
-   public JBossStringBuilder insert(int offset, char primitive)
-   {
-      return insert(offset, String.valueOf(primitive));
-   }
-
-   public JBossStringBuilder insert(int offset, int primitive)
-   {
-      return insert(offset, String.valueOf(primitive));
-   }
-
-   public JBossStringBuilder insert(int offset, long primitive)
-   {
-      return insert(offset, String.valueOf(primitive));
-   }
-
-   public JBossStringBuilder insert(int offset, float primitive)
-   {
-      return insert(offset, String.valueOf(primitive));
-   }
-
-   public JBossStringBuilder insert(int offset, double primitive)
-   {
-      return insert(offset, String.valueOf(primitive));
-   }
-
-   public int indexOf(String string)
-   {
-      return indexOf(string, 0);
-   }
-
-   public int indexOf(String string, int fromIndex)
-   {
-      // FIXME
-      return toString().indexOf(string, fromIndex);
-   }
-
-   public int indexOf(char ch)
-   {
-      return indexOf(ch, 0);
-   }
-
-   public int indexOf(char ch, int fromIndex)
-   {
-      // FIXME
-      return toString().indexOf(ch, fromIndex);
-   }
-
-   public int lastIndexOf(String string)
-   {
-      return lastIndexOf(string, pos);
-   }
-
-   public int lastIndexOf(String string, int fromIndex)
-   {
-      // FIXME
-      return toString().lastIndexOf(string, fromIndex);
-   }
-
-   public int lastIndexOf(char ch)
-   {
-      return lastIndexOf(ch, pos);
-   }
-
-   public int lastIndexOf(char ch, int fromIndex)
-   {
-      // FIXME
-      return toString().lastIndexOf(ch, fromIndex);
-   }
-
-   public JBossStringBuilder reverse()
-   {
-      char[] tmp = new char[pos];
-      for(int n = 0; n < pos; n ++)
-         tmp[n] = chars[pos-n-1];
-      chars = tmp;
-      return this;
-   }
-
-   public String toString()
-   {
-      return new String(chars, 0, pos);
-   }
-
-   public int length()
-   {
-      return pos;
-   }
-
-   public int capacity()
-   {
-      return chars.length;
-   }
-
-   public void ensureCapacity(int minimum)
-   {
-      if (minimum < 0 || minimum < chars.length)
-         return;
-      expandCapacity(minimum);
-   }
-
-   public void trimToSize()
-   {
-      char[] trimmed = new char[pos];
-      System.arraycopy(chars, 0, trimmed, 0, pos);
-      chars = trimmed;
-   }
-
-   public void setLength(int newLength)
-   {
-      if (newLength < 0)
-          throw new StringIndexOutOfBoundsException(newLength);
-      if (newLength > chars.length)
-          expandCapacity(newLength);
-      Arrays.fill(chars, newLength, chars.length, '\0');
-      pos = newLength;
-   }
-
-   public char charAt(int index)
-   {
-      return chars[index];
-   }
-
-   public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
-   {
-      if (srcBegin < 0 || dstBegin < 0 || srcBegin > srcEnd || srcEnd > pos || (dstBegin + srcEnd - srcBegin) > dst.length)
-         throw new IndexOutOfBoundsException("Invalid srcBegin=" + srcBegin + " srcEnd=" + srcEnd + " dstBegin=" + dstBegin + " dst.length=" + dst.length + " length=" + pos);
-
-      int len = srcEnd - srcBegin;
-      if (len == 0)
-         return;
-
-      System.arraycopy(chars, srcBegin, dst, dstBegin, len);
-   }
-
-   public void setCharAt(int index, char ch)
-   {
-      if (index < 0 || index > pos)
-         throw new IndexOutOfBoundsException("Invalid index=" + index + " length=" + pos);
-
-      chars[index] = ch;
-   }
-
-   public String substring(int start)
-   {
-      return substring(start, pos);
-   }
-
-   public CharSequence subSequence(int start, int end)
-   {
-      return substring(start, end);
-   }
-
-   public String substring(int start, int end)
-   {
-      if (start < 0 || end < 0 || start > end || end > pos)
-         throw new IndexOutOfBoundsException("Invalid start=" + start + " end=" + end + " length=" + pos);
-
-      return new String(chars, start, end - start);
-   }
-
-   /**
-    * Expand the capacity to the greater of the minimum
-    * or twice the current size
-    * 
-    * @param minimum the minimum
-    */
-   protected void expandCapacity(int minimum)
-   {
-      int newSize = chars.length * 2;
-      if (minimum > newSize)
-         newSize = minimum;
-
-      char[] newChars = new char[newSize];
-      System.arraycopy(chars, 0, newChars, 0, pos);
-      chars = newChars;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/JBossStringBuilder.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/JBossStringBuilder.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LRUCachePolicy.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/LRUCachePolicy.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LRUCachePolicy.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,474 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.util.HashMap;
-
-/**
- * Implementation of a Least Recently Used cache policy.
- *
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public class LRUCachePolicy
-   implements CachePolicy
-{
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-   /**
-    * The map holding the cached objects
-    */
-   protected HashMap m_map;
-   /**
-    * The linked list used to implement the LRU algorithm
-    */
-   protected LRUList m_list;
-   /**
-    * The maximum capacity of this cache
-    */
-   protected int m_maxCapacity;
-   /**
-    * The minimum capacity of this cache
-    */
-   protected int m_minCapacity;
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-   /**
-    * Creates a LRU cache policy object with zero cache capacity.
-    *
-    * @see #create
-    */
-   public LRUCachePolicy()
-   {
-   }
-   /**
-    * Creates a LRU cache policy object with the specified minimum
-    * and maximum capacity.
-    *
-    * @see #create
-    */
-   public LRUCachePolicy(int min, int max)
-   {
-      if (min < 2 || min > max) {throw new IllegalArgumentException("Illegal cache capacities");}
-      m_minCapacity = min;
-      m_maxCapacity = max;
-   }
-
-   // Public --------------------------------------------------------
-
-   // Service implementation ----------------------------------------------
-   /**
-    * Initializes the cache, creating all required objects and initializing their
-    * values.
-    * @see #start
-    * @see #destroy
-    */
-   public void create()
-   {
-      m_map = new HashMap();
-      m_list = createList();
-      m_list.m_maxCapacity = m_maxCapacity;
-      m_list.m_minCapacity = m_minCapacity;
-      m_list.m_capacity = m_maxCapacity;
-   }
-   /**
-    * Starts this cache that is now ready to be used.
-    * @see #create
-    * @see #stop
-    */
-   public void start()
-   {
-   }
-   /**
-    * Stops this cache thus {@link #flush}ing all cached objects. <br>
-    * After this method is called, a call to {@link #start} will restart the cache.
-    * @see #start
-    * @see #destroy
-    */
-   public void stop()
-   {
-      if (m_list != null)
-      {
-         flush();
-      }
-   }
-   /**
-    * Destroys the cache that is now unusable. <br>
-    * To have it working again it must be re-{@link #create}ed and
-    * re-{@link #start}ed.
-    *
-    * @see #create
-    */
-   public void destroy()
-   {
-      if( m_map != null )
-         m_map.clear();
-      if( m_list != null )
-         m_list.clear();
-   }
-
-   public Object get(Object key)
-   {
-      if (key == null)
-      {
-         throw new IllegalArgumentException("Requesting an object using a null key");
-      }
-
-      LRUCacheEntry value = (LRUCacheEntry)m_map.get(key);
-      if (value != null)
-      {
-         m_list.promote(value);
-         return value.m_object;
-      }
-      else
-      {
-         cacheMiss();
-         return null;
-      }
-   }
-   public Object peek(Object key)
-   {
-      if (key == null)
-      {
-         throw new IllegalArgumentException("Requesting an object using a null key");
-      }
-
-      LRUCacheEntry value = (LRUCacheEntry)m_map.get(key);
-      if (value == null)
-      {
-         return null;
-      }
-      else
-      {
-         return value.m_object;
-      }
-   }
-   public void insert(Object key, Object o)
-   {
-      if (o == null) {throw new IllegalArgumentException("Cannot insert a null object in the cache");}
-      if (key == null) {throw new IllegalArgumentException("Cannot insert an object in the cache with null key");}
-      if (m_map.containsKey(key))
-      {
-         throw new IllegalStateException("Attempt to put in the cache an object that is already there");
-      }
-      m_list.demote();
-      LRUCacheEntry entry = createCacheEntry(key, o);
-      m_map.put(key, entry);
-      m_list.promote(entry);
-   }
-   public void remove(Object key)
-   {
-      if (key == null) {throw new IllegalArgumentException("Removing an object using a null key");}
-
-      Object value = m_map.remove(key);
-      if (value != null)
-      {
-         m_list.remove((LRUCacheEntry)value);
-      }
-      //else Do nothing, the object isn't in the cache list
-   }
-   public void flush()
-   {
-      LRUCacheEntry entry = null;
-      while ((entry = m_list.m_tail) != null)
-      {
-         ageOut(entry);
-      }
-   }
-
-   public int size() {
-      return m_list.m_count;
-   }
-
-   // Y overrides ---------------------------------------------------
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-   /**
-    * Factory method for the linked list used by this cache implementation.
-    */
-   protected LRUList createList() {return new LRUList();}
-   /**
-    * Callback method called when the cache algorithm ages out of the cache
-    * the given entry. <br>
-    * The implementation here is removing the given entry from the cache.
-    */
-   protected void ageOut(LRUCacheEntry entry)
-   {
-      remove(entry.m_key);
-   }
-   /**
-    * Callback method called when a cache miss happens.
-    */
-   protected void cacheMiss()
-   {
-   }
-   /**
-    * Factory method for cache entries
-    */
-   protected LRUCacheEntry createCacheEntry(Object key, Object value)
-   {
-      return new LRUCacheEntry(key, value);
-   }
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-   /**
-    * Double queued list used to store cache entries.
-    */
-   public class LRUList
-   {
-      /** The maximum capacity of the cache list */
-      public int m_maxCapacity;
-      /** The minimum capacity of the cache list */
-      public int m_minCapacity;
-      /** The current capacity of the cache list */
-      public int m_capacity;
-      /** The number of cached objects */
-      public int m_count;
-      /** The head of the double linked list */
-      public LRUCacheEntry m_head;
-      /** The tail of the double linked list */
-      public LRUCacheEntry m_tail;
-      /** The cache misses happened */
-      public int m_cacheMiss;
-      /**
-       * Creates a new double queued list.
-       */
-      protected LRUList()
-      {
-         m_head = null;
-         m_tail = null;
-         m_count = 0;
-      }
-      /**
-       * Promotes the cache entry <code>entry</code> to the last used position
-       * of the list. <br>
-       * If the object is already there, does nothing.
-       * @param entry the object to be promoted, cannot be null
-       * @see #demote
-       * @throws IllegalStateException if this method is called with a full cache
-       */
-      protected void promote(LRUCacheEntry entry)
-      {
-         if (entry == null) {throw new IllegalArgumentException("Trying to promote a null object");}
-         if (m_capacity < 1) {throw new IllegalStateException("Can't work with capacity < 1");}
-
-         entryPromotion(entry);
-
-         entry.m_time = System.currentTimeMillis();
-         if (entry.m_prev == null)
-         {
-            if (entry.m_next == null)
-            {
-               // entry is new or there is only the head
-               if (m_count == 0) // cache is empty
-               {
-                  m_head = entry;
-                  m_tail = entry;
-                  ++m_count;
-                  entryAdded(entry);
-               }
-               else if (m_count == 1 && m_head == entry) {} // there is only the head and I want to promote it, do nothing
-               else if (m_count < m_capacity)
-               {
-                  entry.m_prev = null;
-                  entry.m_next = m_head;
-                  m_head.m_prev = entry;
-                  m_head = entry;
-                  ++m_count;
-                  entryAdded(entry);
-               }
-               else if (m_count < m_maxCapacity)
-               {
-                  entry.m_prev = null;
-                  entry.m_next = m_head;
-                  m_head.m_prev = entry;
-                  m_head = entry;
-                  ++m_count;
-                  int oldCapacity = m_capacity;
-                  ++m_capacity;
-                  entryAdded(entry);
-                  capacityChanged(oldCapacity);
-               }
-               else {throw new IllegalStateException("Attempt to put a new cache entry on a full cache");}
-            }
-            else {} // entry is the head, do nothing
-         }
-         else
-         {
-            if (entry.m_next == null) // entry is the tail
-            {
-               LRUCacheEntry beforeLast = entry.m_prev;
-               beforeLast.m_next = null;
-               entry.m_prev = null;
-               entry.m_next = m_head;
-               m_head.m_prev = entry;
-               m_head = entry;
-               m_tail = beforeLast;
-            }
-            else // entry is in the middle of the list
-            {
-               LRUCacheEntry previous = entry.m_prev;
-               previous.m_next = entry.m_next;
-               entry.m_next.m_prev = previous;
-               entry.m_prev = null;
-               entry.m_next = m_head;
-               m_head.m_prev = entry;
-               m_head = entry;
-            }
-         }
-      }
-      /**
-       * Demotes from the cache the least used entry. <br>
-       * If the cache is not full, does nothing.
-       * @see #promote
-       */
-      protected void demote()
-      {
-         if (m_capacity < 1) {throw new IllegalStateException("Can't work with capacity < 1");}
-         if (m_count > m_maxCapacity) {throw new IllegalStateException("Cache list entries number (" + m_count + ") > than the maximum allowed (" + m_maxCapacity + ")");}
-         if (m_count == m_maxCapacity)
-         {
-            LRUCacheEntry entry = m_tail;
-
-            // the entry will be removed by ageOut
-            ageOut(entry);
-         }
-         else {} // cache is not full, do nothing
-      }
-      /**
-       * Removes from the cache list the specified entry.
-       */
-      protected void remove(LRUCacheEntry entry)
-      {
-         if (entry == null) {throw new IllegalArgumentException("Cannot remove a null entry from the cache");}
-         if (m_count < 1) {throw new IllegalStateException("Trying to remove an entry from an empty cache");}
-
-         entry.m_key = entry.m_object = null;
-         if (m_count == 1)
-         {
-            m_head = m_tail = null;
-         }
-         else
-         {
-            if (entry.m_prev == null) // the head
-            {
-               m_head = entry.m_next;
-               m_head.m_prev = null;
-               entry.m_next = null;
-            }
-            else if (entry.m_next == null) // the tail
-            {
-               m_tail = entry.m_prev;
-               m_tail.m_next = null;
-               entry.m_prev = null;
-            }
-            else // in the middle
-            {
-               entry.m_next.m_prev = entry.m_prev;
-               entry.m_prev.m_next = entry.m_next;
-               entry.m_prev = null;
-               entry.m_next = null;
-            }
-         }
-         --m_count;
-         entryRemoved(entry);
-      }
-      /**
-       * Callback that signals that the given entry is just about to be added.
-       */
-      protected void entryPromotion(LRUCacheEntry entry) {}
-      /**
-       * Callback that signals that the given entry has been added to the cache.
-       */
-      protected void entryAdded(LRUCacheEntry entry) {}
-      /**
-       * Callback that signals that the given entry has been removed from the cache.
-       */
-      protected void entryRemoved(LRUCacheEntry entry) {}
-      /**
-       * Callback that signals that the capacity of the cache is changed.
-       * @param oldCapacity the capacity before the change happened
-       */
-      protected void capacityChanged(int oldCapacity) {}
-
-      protected void clear()
-      {
-         LRUCacheEntry entry = m_head;
-         m_head = null;
-         m_tail = null;
-         m_count = 0;
-         for (; entry != null; entry = entry.m_next)
-            entryRemoved(entry);
-      }
-
-      public String toString()
-      {
-         String s = Integer.toHexString(super.hashCode());
-         s += " size: " + m_count;
-         for (LRUCacheEntry entry = m_head; entry != null; entry = entry.m_next)
-         {
-            s += "\n" + entry;
-         }
-         return s;
-      }
-   }
-
-   /**
-    * Double linked cell used as entry in the cache list.
-    */
-   public class LRUCacheEntry
-   {
-      /** Reference to the next cell in the list */
-      public  LRUCacheEntry m_next;
-      /** Reference to the previous cell in the list */
-      public LRUCacheEntry m_prev;
-      /** The key used to retrieve the cached object */
-      public Object m_key;
-      /** The cached object */
-      public Object m_object;
-      /** The timestamp of the creation */
-      public long m_time;
-      /**
-       * Creates a new double linked cell, storing the object we
-       * want to cache and the key that is used to retrieve it.
-       */
-      protected LRUCacheEntry(Object key, Object object)
-      {
-         m_key = key;
-         m_object = object;
-         m_next = null;
-         m_prev = null;
-         m_time = 0; // Set when inserted in the list.
-      }
-      public String toString()
-      {
-         return "key: " + m_key + ", object: " + ( m_object==null ? "null" : Integer.toHexString(m_object.hashCode())) + ", entry: " + Integer.toHexString(super.hashCode());
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LRUCachePolicy.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/LRUCachePolicy.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LongCounter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/LongCounter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LongCounter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,248 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.Serializable;
-
-/**
- * A long integer counter class.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class LongCounter
-   implements Serializable, Cloneable
-{
-   /** The current count */
-   private long count;
-
-   /**
-    * Construct a LongCounter with a starting value.
-    *
-    * @param count   Starting value for counter.
-    */
-   public LongCounter(final long count) {
-      this.count = count;
-   }
-
-   /**
-    * Construct a LongCounter.
-    */
-   public LongCounter() {}
-
-   /**
-    * Increment the counter. (Optional operation)
-    *
-    * @return  The incremented value of the counter.
-    */
-   public long increment() {
-      return ++count;
-   }
-
-   /**
-    * Decrement the counter. (Optional operation)
-    *
-    * @return  The decremented value of the counter.
-    */
-   public long decrement() {
-      return --count;
-   }
-
-   /**
-    * Return the current value of the counter.
-    *
-    * @return  The current value of the counter.
-    */
-   public long getCount() {
-      return count;
-   }
-
-   /**
-    * Reset the counter to zero. (Optional operation)
-    */
-   public void reset() {
-      this.count = 0;
-   }
-
-   /**
-    * Check if the given object is equal to this.
-    *
-    * @param obj  Object to test equality with.
-    * @return     True if object is equal to this.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         return ((LongCounter)obj).count == count;
-      }
-      
-      return false;
-   }
-
-   /**
-    * Return a string representation of this.
-    *
-    * @return  A string representation of this.
-    */
-   public String toString() {
-      return String.valueOf(count);
-   }
-
-   /**
-    * Return a cloned copy of this object.
-    *
-    * @return  A cloned copy of this object.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                                Wrappers                             //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Base wrapper class for other wrappers.
-    */
-   private static class Wrapper
-      extends LongCounter
-   {
-      /** The wrapped counter */
-      protected final LongCounter counter;
-
-      public Wrapper(final LongCounter counter) {
-         this.counter = counter;
-      }
-
-      public long increment() {
-         return counter.increment();
-      }
-
-      public long decrement() {
-         return counter.decrement();
-      }
-
-      public long getCount() {
-         return counter.getCount();
-      }
-
-      public void reset() {
-         counter.reset();
-      }
-
-      public boolean equals(final Object obj) {
-         return counter.equals(obj);
-      }
-
-      public String toString() {
-         return counter.toString();
-      }
-
-      public Object clone() {
-         return counter.clone();
-      }
-   }
-
-   /**
-    * Return a synchronized counter.
-    *
-    * @param counter    LongCounter to synchronize.
-    * @return           Synchronized counter.
-    */
-   public static LongCounter makeSynchronized(final LongCounter counter)
-   {
-      return new Wrapper(counter) {
-            public synchronized long increment() {
-               return this.counter.increment();
-            }
-
-            public synchronized long decrement() {
-               return this.counter.decrement();
-            }
-
-            public synchronized long getCount() {
-               return this.counter.getCount();
-            }
-
-            public synchronized void reset() {
-               this.counter.reset();
-            }
-
-            public synchronized int hashCode() {
-               return this.counter.hashCode();
-            }
-
-            public synchronized boolean equals(final Object obj) {
-               return this.counter.equals(obj);
-            }
-
-            public synchronized String toString() {
-               return this.counter.toString();
-            }
-
-            public synchronized Object clone() {
-               return this.counter.clone();
-            }
-         };
-   }
-
-   /**
-    * Returns a directional counter.
-    *
-    * @param counter       LongCounter to make directional.
-    * @param increasing    True to create an increasing only
-    *                      or false to create a decreasing only.
-    * @return              A directional counter.
-    */
-   public static LongCounter makeDirectional(final LongCounter counter,
-                                             final boolean increasing)
-   {
-      LongCounter temp;
-      if (increasing) {
-         temp = new Wrapper(counter) {
-               public long decrement() {
-                  throw new UnsupportedOperationException();
-               }
-
-               public void reset() {
-                  throw new UnsupportedOperationException();
-               }
-            };
-      }
-      else {
-         temp = new Wrapper(counter) {
-               public long increment() {
-                  throw new UnsupportedOperationException();
-               }
-            };
-      }
-      
-      return temp;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/LongCounter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/LongCounter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/MethodHashing.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/MethodHashing.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/MethodHashing.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,211 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
- 
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.lang.reflect.Method;
-import java.lang.reflect.Constructor;
-import java.security.DigestOutputStream;
-import java.security.MessageDigest;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-/**
- * Create a unique hash for  
- * 
- * @author  <a href="mailto:marc at jboss.org">Marc Fleury</a>
- * @version $Revision$
- */
-public class MethodHashing
-{
-   // Constants -----------------------------------------------------
-   
-   // Static --------------------------------------------------------
-   static Map hashMap = new WeakHashMap();
-
-   public static Method findMethodByHash(Class clazz, long hash) throws Exception
-   {
-      Method[] methods = clazz.getDeclaredMethods();
-      for (int i = 0; i < methods.length; i++)
-      {
-         if (methodHash(methods[i]) == hash) return methods[i];
-      }
-      if (clazz.getSuperclass() != null)
-      {
-         return findMethodByHash(clazz.getSuperclass(), hash);
-      }
-      return null;
-   }
-
-   public static Constructor findConstructorByHash(Class clazz, long hash) throws Exception
-   {
-      Constructor[] cons = clazz.getDeclaredConstructors();
-      for (int i = 0; i < cons.length; i++)
-      {
-         if (constructorHash(cons[i]) == hash) return cons[i];
-      }
-      if (clazz.getSuperclass() != null)
-      {
-         return findConstructorByHash(clazz.getSuperclass(), hash);
-      }
-      return null;
-   }
-
-   public static long methodHash(Method method)
-      throws Exception
-   {
-      Class[] parameterTypes = method.getParameterTypes();
-      String methodDesc = method.getName()+"(";
-      for(int j = 0; j < parameterTypes.length; j++)
-      {
-         methodDesc += getTypeString(parameterTypes[j]);
-      }
-      methodDesc += ")"+getTypeString(method.getReturnType());
-      
-      long hash = 0;
-      ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(512);
-      MessageDigest messagedigest = MessageDigest.getInstance("SHA");
-      DataOutputStream dataoutputstream = new DataOutputStream(new DigestOutputStream(bytearrayoutputstream, messagedigest));
-      dataoutputstream.writeUTF(methodDesc);
-      dataoutputstream.flush();
-      byte abyte0[] = messagedigest.digest();
-      for(int j = 0; j < Math.min(8, abyte0.length); j++)
-         hash += (long)(abyte0[j] & 0xff) << j * 8;
-      return hash;
-   }
-
-   public static long constructorHash(Constructor method)
-      throws Exception
-   {
-      Class[] parameterTypes = method.getParameterTypes();
-      String methodDesc = method.getName()+"(";
-      for(int j = 0; j < parameterTypes.length; j++)
-      {
-         methodDesc += getTypeString(parameterTypes[j]);
-      }
-      methodDesc += ")";
-
-      long hash = 0;
-      ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(512);
-      MessageDigest messagedigest = MessageDigest.getInstance("SHA");
-      DataOutputStream dataoutputstream = new DataOutputStream(new DigestOutputStream(bytearrayoutputstream, messagedigest));
-      dataoutputstream.writeUTF(methodDesc);
-      dataoutputstream.flush();
-      byte abyte0[] = messagedigest.digest();
-      for(int j = 0; j < Math.min(8, abyte0.length); j++)
-         hash += (long)(abyte0[j] & 0xff) << j * 8;
-      return hash;
-   }
-
-   /**
-   * Calculate method hashes. This algo is taken from RMI.
-   *
-   * @param   intf  
-   * @return     
-   */
-   public static Map getInterfaceHashes(Class intf)
-   {
-      // Create method hashes
-      Method[] methods = intf.getDeclaredMethods();
-      HashMap map = new HashMap();
-      for (int i = 0; i < methods.length; i++)
-      {
-         Method method = methods[i];
-         try
-         {
-            long hash = methodHash(method);
-            map.put(method.toString(), new Long(hash));
-         }
-         catch (Exception e)
-         {
-         }
-      }
-      
-      return map;
-   }
-   
-   static String getTypeString(Class cl)
-   {
-      if (cl == Byte.TYPE)
-      {
-         return "B";
-      } else if (cl == Character.TYPE)
-      {
-         return "C";
-      } else if (cl == Double.TYPE)
-      {
-         return "D";
-      } else if (cl == Float.TYPE)
-      {
-         return "F";
-      } else if (cl == Integer.TYPE)
-      {
-         return "I";
-      } else if (cl == Long.TYPE)
-      {
-         return "J";
-      } else if (cl == Short.TYPE)
-      {
-         return "S";
-      } else if (cl == Boolean.TYPE)
-      {
-         return "Z";
-      } else if (cl == Void.TYPE)
-      {
-         return "V";
-      } else if (cl.isArray())
-      {
-         return "["+getTypeString(cl.getComponentType());
-      } else
-      {
-         return "L"+cl.getName().replace('.','/')+";";
-      }
-   }
-   
-   /*
-   * The use of hashCode is not enough to differenciate methods
-   * we override the hashCode
-   *
-   * The hashes are cached in a static for efficiency
-   * RO: WeakHashMap needed to support undeploy
-   */
-   public static long calculateHash(Method method)
-   {
-      Map methodHashes = (Map)hashMap.get(method.getDeclaringClass());
-      
-      if (methodHashes == null)
-      {
-         methodHashes = getInterfaceHashes(method.getDeclaringClass());
-         
-         // Copy and add
-         WeakHashMap newHashMap = new WeakHashMap();
-         newHashMap.putAll(hashMap);
-         newHashMap.put(method.getDeclaringClass(), methodHashes);
-         hashMap = newHashMap;
-      }
-      
-      return ((Long)methodHashes.get(method.toString())).longValue();
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/MethodHashing.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/MethodHashing.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedError.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedError.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedError.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,145 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.PrintWriter;
-import java.io.PrintStream;
-
-/**
- * A common superclass for <tt>Error</tt> classes that can
- * contain a nested <tt>Throwable</tt> detail object.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class NestedError
-   extends Error
-   implements NestedThrowable
-{
-   /** The nested throwable */
-   protected final Throwable nested;
-
-   /**
-    * Construct a <tt>NestedError</tt> with the specified 
-    * detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public NestedError(final String msg) {
-      super(msg);
-      this.nested = null;
-   }
-
-   /**
-    * Construct a <tt>NestedError</tt> with the specified
-    * detail message and nested <tt>Throwable</tt>.
-    *
-    * @param msg     Detail message.
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public NestedError(final String msg, final Throwable nested) {
-      super(msg);
-      this.nested = nested;
-      NestedThrowable.Util.checkNested(this, nested);
-   }
-
-   /**
-    * Construct a <tt>NestedError</tt> with the specified
-    * nested <tt>Throwable</tt>.
-    *
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public NestedError(final Throwable nested) {
-      this(nested.getMessage(), nested);
-   }
-
-   /**
-    * Construct a <tt>NestedError</tt> with no detail.
-    */
-   public NestedError() {
-      super();
-      this.nested = null;
-   }
-
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getNested() {
-      return nested;
-   }
-
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * <p>For JDK 1.4 compatibility.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getCause() {
-      return nested;
-   }
-   
-   /**
-    * Returns the composite throwable message.
-    *
-    * @return  The composite throwable message.
-    */
-   public String getMessage() {
-      return NestedThrowable.Util.getMessage(super.getMessage(), nested);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print stream.
-    *
-    * @param stream  Stream to print to.
-    */
-   public void printStackTrace(final PrintStream stream) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(stream);
-      }
-      NestedThrowable.Util.print(nested, stream);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print writer.
-    *
-    * @param writer  Writer to print to.
-    */
-   public void printStackTrace(final PrintWriter writer) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(writer);
-      }
-      NestedThrowable.Util.print(nested, writer);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to 
-    * <tt>System.err</tt>.
-    */
-   public void printStackTrace() {
-      printStackTrace(System.err);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedError.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedError.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,145 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.PrintWriter;
-import java.io.PrintStream;
-
-/**
- * A common superclass for <tt>Exception</tt> classes that can contain
- * a nested <tt>Throwable</tt> detail object.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class NestedException
-   extends Exception
-   implements NestedThrowable
-{
-   /** The nested throwable */
-   protected final Throwable nested;
-
-   /**
-    * Construct a <tt>NestedException</tt> with the specified detail 
-    * message.
-    *
-    * @param msg  Detail message.
-    */
-   public NestedException(final String msg) {
-      super(msg);
-      this.nested = null;
-   }
-
-   /**
-    * Construct a <tt>NestedException</tt> with the specified detail 
-    * message and nested <tt>Throwable</tt>.
-    *
-    * @param msg     Detail message.
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public NestedException(final String msg, final Throwable nested) {
-      super(msg);
-      this.nested = nested;
-      NestedThrowable.Util.checkNested(this, nested);
-   }
-
-   /**
-    * Construct a <tt>NestedException</tt> with the specified
-    * nested <tt>Throwable</tt>.
-    *
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public NestedException(final Throwable nested) {
-      this(nested.getMessage(), nested);
-   }
-
-   /**
-    * Construct a <tt>NestedException</tt> with no detail.
-    */
-   public NestedException() {
-      super();
-      this.nested = null;
-   }
-   
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getNested() {
-      return nested;
-   }
-
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * <p>For JDK 1.4 compatibility.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getCause() {
-      return nested;
-   }
-      
-   /**
-    * Returns the composite throwable message.
-    *
-    * @return  The composite throwable message.
-    */
-   public String getMessage() {
-      return NestedThrowable.Util.getMessage(super.getMessage(), nested);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print stream.
-    *
-    * @param stream  Stream to print to.
-    */
-   public void printStackTrace(final PrintStream stream) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(stream);
-      }
-      NestedThrowable.Util.print(nested, stream);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print writer.
-    *
-    * @param writer  Writer to print to.
-    */
-   public void printStackTrace(final PrintWriter writer) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(writer);
-      }
-      NestedThrowable.Util.print(nested, writer);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to 
-    * <tt>System.err</tt>.
-    */
-   public void printStackTrace() {
-      printStackTrace(System.err);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedRuntimeException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedRuntimeException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedRuntimeException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,145 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.PrintWriter;
-import java.io.PrintStream;
-
-/**
- * A common superclass for <tt>RuntimeException</tt> classes that can
- * contain a nested <tt>Throwable</tt> detail object.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class NestedRuntimeException
-   extends RuntimeException
-   implements NestedThrowable
-{
-   /** The nested throwable */
-   protected final Throwable nested;
-
-   /**
-    * Construct a <tt>NestedRuntimeException</tt> with the specified 
-    * detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public NestedRuntimeException(final String msg) {
-      super(msg);
-      this.nested = null;
-   }
-
-   /**
-    * Construct a <tt>NestedRuntimeException</tt> with the specified
-    * detail message and nested <tt>Throwable</tt>.
-    *
-    * @param msg     Detail message.
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public NestedRuntimeException(final String msg, final Throwable nested) {
-      super(msg);
-      this.nested = nested;
-      NestedThrowable.Util.checkNested(this, nested);
-   }
-
-   /**
-    * Construct a <tt>NestedRuntimeException</tt> with the specified
-    * nested <tt>Throwable</tt>.
-    *
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public NestedRuntimeException(final Throwable nested) {
-      this(nested.getMessage(), nested);
-   }
-
-   /**
-    * Construct a <tt>NestedRuntimeException</tt> with no detail.
-    */
-   public NestedRuntimeException() {
-      super();
-      this.nested = null;
-   }
-
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getNested() {
-      return nested;
-   }
-   
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * <p>For JDK 1.4 compatibility.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getCause() {
-      return nested;
-   }
-
-   /**
-    * Returns the composite throwable message.
-    *
-    * @return  The composite throwable message.
-    */
-   public String getMessage() {
-      return NestedThrowable.Util.getMessage(super.getMessage(), nested);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print stream.
-    *
-    * @param stream  Stream to print to.
-    */
-   public void printStackTrace(final PrintStream stream) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(stream);
-      }
-      NestedThrowable.Util.print(nested, stream);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print writer.
-    *
-    * @param writer  Writer to print to.
-    */
-   public void printStackTrace(final PrintWriter writer) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(writer);
-      }
-      NestedThrowable.Util.print(nested, writer);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to 
-    * <tt>System.err</tt>.
-    */
-   public void printStackTrace() {
-      printStackTrace(System.err);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedRuntimeException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedRuntimeException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedSQLException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedSQLException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedSQLException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,162 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.PrintWriter;
-import java.io.PrintStream;
-
-import java.sql.SQLException;
-
-/**
- * A common superclass for <tt>SQLException</tt> classes that can contain
- * a nested <tt>Throwable</tt> detail object.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class NestedSQLException
-   extends SQLException
-   implements NestedThrowable
-{
-   /** The nested throwable */
-   protected final Throwable nested;
-
-   /**
-    * Construct a <tt>NestedSQLException</tt> with the specified detail 
-    * message.
-    *
-    * @param msg  Detail message.
-    */
-   public NestedSQLException(final String msg) {
-      super(msg);
-      this.nested = null;
-   }
-
-   /**
-    * Construct a <tt>NestedSQLException</tt> with the specified detail 
-    * message and nested <tt>Throwable</tt>.
-    *
-    * @param msg     Detail message.
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public NestedSQLException(final String msg, final Throwable nested) {
-      super(msg);
-      this.nested = nested;
-      NestedThrowable.Util.checkNested(this, nested);
-   }
-
-   /**
-    * Construct a <tt>NestedSQLException</tt> with the specified
-    * nested <tt>Throwable</tt>.
-    *
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public NestedSQLException(final Throwable nested) {
-      this(nested.getMessage(), nested);
-   }
-
-   /**
-    * Construct a <tt>NestedSQLException</tt>.
-    *
-    * @param msg     Detail message.
-    * @param state   SQL state message.
-    */
-   public NestedSQLException(final String msg, final String state) {
-      super(msg, state);
-      this.nested = null;
-   }
-
-   /**
-    * Construct a <tt>NestedSQLException</tt>.
-    *
-    * @param msg     Detail message.
-    * @param state   SQL state message.
-    * @param code    SQL vendor code.
-    */
-   public NestedSQLException(final String msg, final String state, final int code) {
-      super(msg, state, code);
-      this.nested = null;
-   }
-   
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getNested() {
-      return nested;
-   }
-
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * <p>For JDK 1.4 compatibility.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   public Throwable getCause() {
-      return nested;
-   }
-      
-   /**
-    * Returns the composite throwable message.
-    *
-    * @return  The composite throwable message.
-    */
-   public String getMessage() {
-      return NestedThrowable.Util.getMessage(super.getMessage(), nested);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print stream.
-    *
-    * @param stream  Stream to print to.
-    */
-   public void printStackTrace(final PrintStream stream) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(stream);
-      }
-      NestedThrowable.Util.print(nested, stream);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to the
-    * specified print writer.
-    *
-    * @param writer  Writer to print to.
-    */
-   public void printStackTrace(final PrintWriter writer) {
-      if (nested == null || NestedThrowable.PARENT_TRACE_ENABLED) {
-         super.printStackTrace(writer);
-      }
-      NestedThrowable.Util.print(nested, writer);
-   }
-
-   /**
-    * Prints the composite message and the embedded stack trace to 
-    * <tt>System.err</tt>.
-    */
-   public void printStackTrace() {
-      printStackTrace(System.err);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedSQLException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedSQLException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedThrowable.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedThrowable.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedThrowable.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,245 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.PrintWriter;
-import java.io.PrintStream;
-import java.io.Serializable;
-
-import org.jboss.logging.Logger;
-
-import org.jboss.util.platform.Java;
-
-
-/**
- * Interface which is implemented by all the nested throwable flavors.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface NestedThrowable
-   extends Serializable
-{
-   /**
-    * A system wide flag to enable or disable printing of the
-    * parent throwable traces.
-    *
-    * <p>
-    * This value is set from the system property
-    * <tt>org.jboss.util.NestedThrowable.parentTraceEnabled</tt>
-    * or if that is not set defaults to <tt>true</tt>.
-    */
-   boolean PARENT_TRACE_ENABLED = Util.getBoolean("parentTraceEnabled", true);
-
-   /**
-    * A system wide flag to enable or disable printing of the
-    * nested detail throwable traces.
-    *
-    * <p>
-    * This value is set from the system property
-    * <tt>org.jboss.util.NestedThrowable.nestedTraceEnabled</tt>
-    * or if that is not set defaults to <tt>true</tt> unless
-    * using JDK 1.4 with {@link #PARENT_TRACE_ENABLED} set to false,
-    * then <tt>false</tt> since there is a native mechansim for this there.
-    *
-    * <p>
-    * Note then when running under 1.4 is is not possible to disable
-    * the nested trace output, since that is handled by java.lang.Throwable
-    * which we delegate the parent printing to.
-    */
-   boolean NESTED_TRACE_ENABLED = Util.getBoolean("nestedTraceEnabled",
-                                                  (Java.isCompatible(Java.VERSION_1_4) &&
-                                                   !PARENT_TRACE_ENABLED) ||
-                                                  !Java.isCompatible(Java.VERSION_1_4));
-
-   /**
-    * A system wide flag to enable or disable checking of parent and child
-    * types to detect uneeded nesting
-    *
-    * <p>
-    * This value is set from the system property
-    * <tt>org.jboss.util.NestedThrowable.detectDuplicateNesting</tt>
-    * or if that is not set defaults to <tt>true</tt>.
-    */
-   boolean DETECT_DUPLICATE_NESTING = Util.getBoolean("detectDuplicateNesting", true);
-   
-   /**
-    * Return the nested throwable.
-    *
-    * @return  Nested throwable.
-    */
-   Throwable getNested();
-
-   /**
-    * Return the nested <tt>Throwable</tt>.
-    *
-    * <p>For JDK 1.4 compatibility.
-    *
-    * @return  Nested <tt>Throwable</tt>.
-    */
-   Throwable getCause();
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                      Nested Throwable Utilities                     //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Utilitiy methods for the various flavors of
-    * <code>NestedThrowable</code>.
-    */
-   final class Util 
-   {
-      // Can not be final due to init bug, see getLogger() for details
-      private static Logger log = Logger.getLogger(NestedThrowable.class);
-
-      /**
-       * Something is very broken with class nesting, which can sometimes
-       * leave log uninitialized durring one of the following method calls.
-       *
-       * <p>
-       * This is a HACK to keep those methods from NPE until this problem
-       * can be resolved.
-       */
-      private static Logger getLogger()
-      {
-         if (log == null)
-            log = Logger.getLogger(NestedThrowable.class);
-
-         return log;
-      }
-      
-      /** A helper to get a boolean property. */
-      protected static boolean getBoolean(String name, boolean defaultValue)
-      {
-         name = NestedThrowable.class.getName() + "." + name;
-         String value = System.getProperty(name, String.valueOf(defaultValue));
-
-         // HACK see getLogger() for details
-         log = getLogger();
-         
-         log.debug(name + "=" + value);
-
-         return new Boolean(value).booleanValue();
-      }
-
-      /**
-       * Check and possibly warn if the nested exception type is the same
-       * as the parent type (duplicate nesting).
-       */
-      public static void checkNested(final NestedThrowable parent,
-                                     final Throwable child)
-      {
-         if (!DETECT_DUPLICATE_NESTING || parent == null || child == null) return;
-
-         Class parentType = parent.getClass();
-         Class childType = child.getClass();
-
-         //
-         // This might be backwards... I always get this confused
-         //
-         
-         if (parentType.isAssignableFrom(childType)) {
-            // HACK see getLogger() for details
-            log = getLogger();
-
-            log.warn("Duplicate throwable nesting of same base type: " +
-                     parentType + " is assignable from: " + childType);
-         }
-      }
-      
-      /**
-       * Returns a formated message for the given detail message
-       * and nested <code>Throwable</code>.
-       *
-       * @param msg     Detail message.
-       * @param nested  Nested <code>Throwable</code>.
-       * @return        Formatted message.
-       */
-      public static String getMessage(final String msg,
-                                      final Throwable nested)
-      {
-         StringBuffer buff = new StringBuffer(msg == null ? "" : msg);
-
-         if (nested != null) {
-            buff.append(msg == null ? "- " : "; - ")
-               .append("nested throwable: (")
-               .append(nested)
-               .append(")");
-         }
- 
-         return buff.toString();
-      }
-
-      /**
-       * Prints the nested <code>Throwable</code> to the given stream.
-       *
-       * @param nested  Nested <code>Throwable</code>.
-       * @param stream  Stream to print to.
-       */
-      public static void print(final Throwable nested,
-                               final PrintStream stream)
-      {
-         if (stream == null)
-            throw new NullArgumentException("stream");
-
-         if (NestedThrowable.NESTED_TRACE_ENABLED && nested != null) {
-            synchronized (stream) {
-               if (NestedThrowable.PARENT_TRACE_ENABLED) {
-                  stream.print(" + nested throwable: ");
-               }
-               else {
-                  stream.print("[ parent trace omitted ]: ");
-               }
-               
-               nested.printStackTrace(stream);
-            }
-         }
-      }
-
-      /**
-       * Prints the nested <code>Throwable</code> to the given writer.
-       *
-       * @param nested  Nested <code>Throwable</code>.
-       * @param writer  Writer to print to.
-       */
-      public static void print(final Throwable nested,
-                               final PrintWriter writer)
-      {
-         if (writer == null)
-            throw new NullArgumentException("writer");
-
-         if (NestedThrowable.NESTED_TRACE_ENABLED && nested != null) {
-            synchronized (writer) {
-               if (NestedThrowable.PARENT_TRACE_ENABLED) {
-                  writer.print(" + nested throwable: ");
-               }
-               else {
-                  writer.print("[ parent trace omitted ]: ");
-               }
-               
-               nested.printStackTrace(writer);
-            }
-         }
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NestedThrowable.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NestedThrowable.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NoSuchMethodException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NoSuchMethodException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NoSuchMethodException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,93 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.lang.reflect.Method;
-
-/**
- * A better NoSuchMethodException which can take a Method object
- * and formats the detail message based on in.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class NoSuchMethodException
-   extends java.lang.NoSuchMethodException
-{
-   /**
-    * Construct a <tt>NoSuchMethodException</tt> with the specified detail 
-    * message.
-    *
-    * @param msg  Detail message.
-    */
-   public NoSuchMethodException(String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <tt>NoSuchMethodException</tt> using the given method
-    * object to construct the detail message.
-    *
-    * @param method  Method to determine detail message from.
-    */
-   public NoSuchMethodException(Method method) {
-      super(format(method));
-   }
-
-   /**
-    * Construct a <tt>NoSuchMethodException</tt> using the given method
-    * object to construct the detail message.
-    *
-    * @param msg     Detail message prefix.
-    * @param method  Method to determine detail message suffix from.
-    */
-   public NoSuchMethodException(String msg, Method method) {
-      super(msg + format(method));
-   }
-   
-   /**
-    * Construct a <tt>NoSuchMethodException</tt> with no detail.
-    */
-   public NoSuchMethodException() {
-      super();
-   }
-
-   /**
-    * Return a string representation of the given method object.
-    */
-   public static String format(Method method)
-   {
-      StringBuffer buffer = new StringBuffer();
-      buffer.append(method.getName()).append("(");
-      Class[] paramTypes = method.getParameterTypes();
-      for (int count = 0; count < paramTypes.length; count++) {
-         if (count > 0) {
-            buffer.append(",");
-         }
-         buffer.
-            append(paramTypes[count].getName().substring(paramTypes[count].getName().lastIndexOf(".")+1));
-      }
-      buffer.append(")");
-
-      return buffer.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NoSuchMethodException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NoSuchMethodException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NotImplementedException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NotImplementedException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NotImplementedException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,50 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Thrown to indicate that a method has not been implemented yet.
- * 
- * <p>This exception is used to help stub out implementations.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class NotImplementedException
-   extends RuntimeException
-{
-   /**
-    * Construct a <tt>NotImplementedException</tt> with a detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public NotImplementedException(final String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <tt>NotImplementedException</tt> with no detail.
-    */
-   public NotImplementedException() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NotImplementedException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NotImplementedException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Null.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Null.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Null.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,75 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.Serializable;
-
-/**
- * A class that represents <tt>null</tt>.
- *
- * <p>{@link Null#VALUE} is used to given an object variable a dual-mode
- *    nullified value, where <tt>null</tt> would indicate that the value is 
- *    empty, and {@link Null#VALUE} would idicate that the value has been 
- *    set to <tt>null</tt> (or something to that effect).
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class Null
-   implements Serializable
-{
-   /** The primary instance of Null. */
-   public static final Null VALUE = new Null();
-
-   /** Do not allow public construction. */
-   private Null() {}
-
-   /**
-    * Return a string representation.
-    *
-    * @return  Null
-    */
-   public String toString() {
-      return null;
-   }
-
-   /**
-    * Returns zero.
-    *
-    * @return  Zero.
-    */
-   public int hashCode() {
-      return 0;
-   }
-
-   /**
-    * Check if the given object is a Null instance or <tt>null</tt>.
-    *
-    * @param obj  Object to test.
-    * @return     True if the given object is a Null instance or <tt>null</tt>.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-      return (obj == null || obj.getClass() == getClass());
-   }
-}
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Null.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Null.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NullArgumentException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NullArgumentException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NullArgumentException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,117 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Thrown to indicate that a method argument was <tt>null</tt> and 
- * should <b>not</b> have been.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class NullArgumentException 
-   extends IllegalArgumentException
-{
-   /** The name of the argument that was <tt>null</tt>. */
-   protected final String name;
-
-   /** The index of the argument or null if no index. */
-   protected final Object index;
-   
-   /**
-    * Construct a <tt>NullArgumentException</tt>.
-    *
-    * @param name    Argument name.
-    */
-   public NullArgumentException(final String name) {
-      super(makeMessage(name));
-
-      this.name = name;
-      this.index = null;
-   }
-
-   /**
-    * Construct a <tt>NullArgumentException</tt>.
-    *
-    * @param name    Argument name.
-    * @param index   Argument index.
-    */
-   public NullArgumentException(final String name, final long index) {
-      super(makeMessage(name, new Long(index)));
-
-      this.name = name;
-      this.index = new Long(index);
-   }
-
-   /**
-    * Construct a <tt>NullArgumentException</tt>.
-    *
-    * @param name    Argument name.
-    * @param index   Argument index.
-    */
-   public NullArgumentException(final String name, final Object index) {
-      super(makeMessage(name, index));
-
-      this.name = name;
-      this.index = index;
-   }
-   
-   /**
-    * Construct a <tt>NullArgumentException</tt>.
-    */
-   public NullArgumentException() {
-      this.name = null;
-      this.index = null;
-   }
-
-   /**
-    * Get the argument name that was <tt>null</tt>.
-    *
-    * @return  The argument name that was <tt>null</tt>.
-    */
-   public final String getArgumentName() {
-      return name;
-   }
-
-   /**
-    * Get the argument index.
-    *
-    * @return  The argument index.
-    */
-   public final Object getArgumentIndex() {
-      return index;
-   }
-   
-   /**
-    * Make a execption message for the argument name.
-    */
-   private static String makeMessage(final String name) {
-      return "'" + name + "' is null";
-   }
-
-   /**
-    * Make a execption message for the argument name and index
-    */
-   private static String makeMessage(final String name, final Object index) {
-      return "'" + name + "[" + index + "]' is null";
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/NullArgumentException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/NullArgumentException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Objects.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Objects.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Objects.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,238 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Array;
-
-import java.lang.ref.Reference;
-
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.Serializable;
-
-import org.jboss.util.stream.Streams;
-
-/**
- * A collection of <code>Object</code> utilities.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class Objects
-{
-   /////////////////////////////////////////////////////////////////////////
-   //                           Coercion Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Get a compatible constructor for the given value type
-    *
-    * @param type       Class to look for constructor in
-    * @param valueType  Argument type for constructor
-    * @return           Constructor or null
-    */
-   public static Constructor getCompatibleConstructor(final Class type,
-                                                      final Class valueType)
-   {
-      // first try and find a constructor with the exact argument type
-      try {
-         return type.getConstructor(new Class[] { valueType });
-      }
-      catch (Exception ignore) {
-         // if the above failed, then try and find a constructor with
-         // an compatible argument type
-
-         // get an array of compatible types
-         Class[] types = type.getClasses();
-
-         for (int i=0; i<types.length; i++) {
-            try {
-               return type.getConstructor(new Class[] { types[i] });
-            }
-            catch (Exception ignore2) {}
-         }
-      }
-
-      // if we get this far, then we can't find a compatible constructor
-      return null;
-   }
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Cloning Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Copy an serializable object deeply.
-    *
-    * @param obj  Object to copy.
-    * @return     Copied object.
-    *
-    * @throws IOException
-    * @throws ClassCastException
-    */
-   public static Object copy(final Serializable obj)
-      throws IOException, ClassNotFoundException
-   {
-      ObjectOutputStream out = null;
-      ObjectInputStream in = null;
-      Object copy = null;
-      
-      try {
-         // write the object
-         ByteArrayOutputStream baos = new ByteArrayOutputStream();
-         out = new ObjectOutputStream(baos);
-         out.writeObject(obj);
-         out.flush();
-
-         // read in the copy
-         byte data[] = baos.toByteArray();
-         ByteArrayInputStream bais = new ByteArrayInputStream(data);
-         in = new ObjectInputStream(bais);
-         copy = in.readObject();
-      }
-      finally {
-         Streams.close(out);
-         Streams.close(in);
-      }
-
-      return copy;
-   }
-   
-
-   /////////////////////////////////////////////////////////////////////////
-   //                              Misc Methods                           //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Dereference the given object if it is <i>non-null</i> and is an
-    * instance of <code>Reference</code>.  If the object is <i>null</i>
-    * then <i>null</i> is returned.  If the object is not an instance of
-    * <code>Reference</code>, then the object is returned.
-    *
-    * @param obj  Object to dereference.
-    * @return     Dereferenced object.
-    */
-   public static Object deref(final Object obj) {
-      if (obj != null && obj instanceof Reference) {
-         Reference ref = (Reference)obj;
-         return ref.get();
-      }
-
-      return obj;
-   }
-      
-   /**
-    * Check if the given object is an array (primitve or native).
-    *
-    * @param obj  Object to test.
-    * @return     True of the object is an array.
-    */
-   public static boolean isArray(final Object obj) {
-      if (obj != null)
-         return obj.getClass().isArray();
-      return false;
-   }
-
-   /**
-    * Return an Object array for the given object.
-    *
-    * @param obj  Object to convert to an array.  Converts primitive
-    *             arrays to Object arrays consisting of their wrapper
-    *             classes.  If the object is not an array (object or primitve)
-    *             then a new array of the given type is created and the
-    *             object is set as the sole element.
-    */
-   public static Object[] toArray(final Object obj) {
-      // if the object is an array, the cast and return it.
-      if (obj instanceof Object[]) {
-         return (Object[])obj;
-      }
-
-      // if the object is an array of primitives then wrap the array
-      Class type = obj.getClass();
-      Object array; 
-      if (type.isArray()) {
-         int length = Array.getLength(obj);
-         Class componentType = type.getComponentType();
-         array = Array.newInstance(componentType, length);
-         for (int i=0; i<length; i++) {
-            Array.set(array, i, Array.get(obj, i));
-         }
-      }
-      else {
-         array = Array.newInstance(type, 1);
-         Array.set(array, 0, obj);
-      }
-
-      return (Object[])array;
-   }
-
-   /**
-    * Test the equality of two object arrays.
-    *
-    * @param a       The first array.
-    * @param b       The second array.
-    * @param deep    True to traverse elements which are arrays.
-    * @return        True if arrays are equal.
-    */
-   public static boolean equals(final Object[] a, final Object[] b,
-                                final boolean deep)
-   {
-      if (a == b) return true;
-      if (a == null || b == null) return false;
-      if (a.length != b.length) return false;
-
-      for (int i=0; i<a.length; i++) {
-         Object x = a[i];
-         Object y = b[i];
-
-         if (x != y) return false;
-         if (x == null || y == null) return false;
-         if (deep) {
-            if (x instanceof Object[] && y instanceof Object[]) {
-               if (! equals((Object[])x, (Object[])y, true)) return false;
-            }
-            else {
-               return false;
-            }
-         }
-         if (! x.equals(y)) return false;
-      }
-
-      return true;
-   }
-
-   /**
-    * Test the equality of two object arrays.
-    *
-    * @param a    The first array.
-    * @param b    The second array.
-    * @return     True if arrays are equal.
-    */
-   public static boolean equals(final Object[] a, final Object[] b) {
-      return equals(a, b, true);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Objects.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Objects.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/PrettyString.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/PrettyString.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/PrettyString.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,55 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * A simple interface for objects that can return pretty (ie.
- * prefixed) string representations of themselves.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface PrettyString
-{
-   /**
-    * Returns a pretty representation of the object.
-    *
-    * @param prefix  The string which all lines of the output must be prefixed with.
-    * @return        A pretty representation of the object.
-    */
-   String toPrettyString(String prefix);
-
-   /**
-    * Interface for appending the objects pretty string onto a buffer.
-    */
-   interface Appendable
-   {
-      /**
-       * Appends a pretty representation of the object to the given buffer.
-       *
-       * @param buff    The buffer to use while making pretty.
-       * @param prefix  The string which all lines of the output must be prefixed with.
-       * @return        The buffer.
-       */
-      StringBuffer appendPrettyString(StringBuffer buff, String prefix);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/PrettyString.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/PrettyString.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Primitives.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Primitives.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Primitives.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,125 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Primitive utilities.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class Primitives
-{
-   /**
-    * Get a Boolean from a boolean, equivalent to the java 1.4 method Boolean.valueOf(boolean)
-    *
-    * @param value the boolean
-    * @return the Boolean equivalent
-    */
-   public static Boolean valueOf(boolean value)
-   {
-      if (value)
-         return Boolean.TRUE;
-      else
-         return Boolean.FALSE;
-   }
-
-   /**
-    * Test the equality of two doubles by converting their values into
-    * IEEE 754 floating-point "double format" long values.
-    *
-    * @param a    Double to check equality with.
-    * @param b    Double to check equality with.
-    * @return     True if a equals b.
-    */
-   public static boolean equals(final double a, final double b) {
-      return Double.doubleToLongBits(a) == Double.doubleToLongBits(b);
-   }
-
-   /**
-    * Test the equality of two doubles by converting their values into
-    * IEEE 754 floating-point "single precision" bit layouts.
-    *
-    * @param a    Float to check equality with.
-    * @param b    Float to check equality with.
-    * @return     True if a equals b.
-    */
-   public static boolean equals(final float a, final float b) {
-      return Float.floatToIntBits(a) == Float.floatToIntBits(b);
-   }
-
-   /**
-    * Test the equality of a given sub-section of two byte arrays.
-    *
-    * @param a       The first byte array.
-    * @param abegin  The begining index of the first byte array.
-    * @param b       The second byte array.
-    * @param bbegin  The begining index of the second byte array.
-    * @param length  The length of the sub-section.
-    * @return        True if sub-sections are equal.
-    */
-   public static boolean equals(final byte a[], final int abegin,
-                                final byte b[], final int bbegin,
-                                final int length)
-   {
-      try {
-         int i=length;
-         while (--i >= 0) {
-            if (a[abegin + i] != b[bbegin + i]) {
-               return false;
-            }
-         }
-      }
-      catch (ArrayIndexOutOfBoundsException e) {
-         return false;
-      }
-
-      return true;
-   }
-
-   /**
-    * Test the equality of two byte arrays.
-    *
-    * @param a    The first byte array.
-    * @param b    The second byte array.
-    * @return     True if the byte arrays are equal.
-    */
-   public static boolean equals(final byte a[], final byte b[]) {
-      if (a == b) return true;
-      if (a == null || b == null) return false;
-      if (a.length != b.length) return false;
-
-      try {
-         for (int i=0; i<a.length; i++) {
-            if (a[i] != b[i]) {
-               return false;
-            }
-         }
-      }
-      catch (ArrayIndexOutOfBoundsException e) {
-         return false;
-      }
-
-      return true;
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Primitives.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Primitives.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Semaphore.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Semaphore.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Semaphore.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,238 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.io.StringWriter;
-import java.io.PrintWriter;
-
-/**
- * Semaphore that can allow a specified number of threads to enter, blocking the
- * others. If the specified number of threads is 1, it acts as an exclusive semaphore
- * and can be used instead of synchronized blocks
- *
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public class Semaphore 
-   implements Sync
-{
-   // Constants -----------------------------------------------------
-   private static final long DEADLOCK_TIMEOUT = 5*60*1000;
-
-   // Attributes ----------------------------------------------------
-   private final static boolean m_debug = false;
-   private int m_users;
-   private int m_allowed;
-   private Map m_logMap;
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-   public Semaphore(int allowed)
-   {
-      if (allowed < 1) throw new IllegalArgumentException();
-		
-      m_users = 0;
-      m_allowed = allowed;
-      m_logMap = new HashMap();
-   }
-
-   // Public --------------------------------------------------------
-   public int getUsers() 
-   {
-      synchronized (this)
-      {
-         return m_users;
-      }
-   }
-
-   // Sync implementation ----------------------------------------------
-   public void acquire() throws InterruptedException
-   {
-      synchronized (this)
-      {
-         logAcquire();
-			
-         // One user more called acquire, increase users
-         ++m_users;
-         boolean waitSuccessful = false;
-         while (m_allowed <= 0)
-         {
-            waitSuccessful = waitImpl(this);
-            if (!waitSuccessful) 
-            {
-               // Dealock was detected, restore status, 'cause it's like a release()
-               // that will probably be never called
-               --m_users;
-               ++m_allowed;
-            }
-         }
-         --m_allowed;
-      }
-   }
-
-   public void release()
-   {
-      synchronized (this)
-      {
-         logRelease();
-			
-         --m_users;
-         ++m_allowed;
-         notify();
-      }
-   }
-
-   // Object overrides ---------------------------------------------------
-   public String toString()
-   {
-      return super.toString() + " - " + m_users;
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-   protected boolean waitImpl(Object lock) throws InterruptedException
-   {
-      // Wait (forever) until notified. To discover deadlocks,
-      // turn on debugging of this class
-      long start = System.currentTimeMillis();
-      lock.wait(DEADLOCK_TIMEOUT);
-      long end = System.currentTimeMillis();
-
-      if ((end - start) > (DEADLOCK_TIMEOUT - 1000))
-      {
-         logDeadlock();
-         return false;
-      }
-      return true;
-   }
-	
-   protected void logAcquire()
-   {
-      if (m_debug) 
-      {
-         // Check if thread is already mapped
-         Thread thread = Thread.currentThread();
-
-         // Create stack trace
-         StringWriter sw = new StringWriter();
-         new Exception().printStackTrace(new PrintWriter(sw));
-         String trace = sw.toString();
-		
-         LinkedList list = (LinkedList)m_logMap.get(thread);
-         if (list != null)
-         {
-            // Thread is mapped
-            // Add info
-            Info prevInfo = (Info)list.getLast();
-            Info info = new Info(thread, m_users, trace);
-            list.add(info);
-         }
-         else
-         {
-            // Thread is not mapped, create list and add counter
-            list = new LinkedList();
-            Info info = new Info(thread, m_users, trace);
-            list.add(info);
-            // Map thread
-            m_logMap.put(thread, list);
-         }
-      }
-   }
-   protected void logDeadlock()
-   {
-      System.err.println();
-      System.err.println("DEADLOCK ON SEMAPHORE " + this);
-      if (m_debug)
-      {
-         for (Iterator i = m_logMap.values().iterator(); i.hasNext();) 
-         {
-            LinkedList list = (LinkedList)i.next();
-            for (Iterator iter = list.iterator(); iter.hasNext();)
-            {
-               System.err.println(iter.next());
-            }
-         }
-      }
-      System.err.println();
-   }
-   protected void logRelease()
-   {
-      if (m_debug)
-      {
-         // Find a matching thread and remove info for it
-         Thread thread = Thread.currentThread();
-
-         LinkedList list = (LinkedList)m_logMap.get(thread);
-         if (list != null) 
-         {
-            Info info = new Info(thread, 0, "");
-            if (!list.remove(info))
-            {
-               System.err.println("LOG INFO SIZE: " + list);
-               new IllegalStateException("BUG: semaphore log list does not contain required info").printStackTrace();
-            }
-
-            // If no info left, remove the mapping
-            int size = list.size();
-            if (size < 1) 
-            {
-               m_logMap.remove(thread);
-            }
-         }			
-         else 
-         {
-            throw new IllegalStateException("Semaphore log failed: release called without acquire");
-         }
-      }
-   }
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-   private class Info
-   {
-      private Info(Thread t, int i, String s)
-      {
-         m_thread = t;
-         m_counter = i;
-         m_trace = s;
-      }
-      private Thread m_thread;
-      private int m_counter;
-      private String m_trace;
-      public boolean equals(Object o) 
-      {
-         Info other = (Info)o;
-         return m_thread == other.m_thread;
-      }
-      public String toString() 
-      {
-         return m_thread + " - " + m_counter + "\n" + m_trace;
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Semaphore.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Semaphore.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SoftObject.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/SoftObject.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SoftObject.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,123 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.lang.ref.SoftReference;
-import java.lang.ref.ReferenceQueue;
-
-/**
- * Convenience class to wrap an <tt>Object</tt> into a <tt>SoftReference</tt>.
- *
- * <p>Modified from <tt>java.util.WeakHashMap.WeakKey</tt>.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class SoftObject
-   extends SoftReference
-{
-   /** The hash code of the nested object */
-   protected final int hashCode;
-   
-   /**
-    * Construct a <tt>SoftObject</tt>.
-    *
-    * @param obj  Object to reference.
-    */
-   public SoftObject(final Object obj) {
-      super(obj);
-      hashCode = obj.hashCode();
-   }
-   
-   /**
-    * Construct a <tt>SoftObject</tt>.
-    *
-    * @param obj     Object to reference.
-    * @param queue   Reference queue.
-    */
-   public SoftObject(final Object obj, final ReferenceQueue queue) {
-      super(obj, queue);
-      hashCode = obj.hashCode();
-   }
-   
-   /**
-    * Check the equality of an object with this.
-    *
-    * @param obj  Object to test equality with.
-    * @return     True if object is equal.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         SoftObject soft = (SoftObject)obj;
-         
-         Object a = this.get();
-         Object b = soft.get();
-         if (a == null || b == null) return false;
-         if (a == b) return true;
-
-         return a.equals(b);
-      }
-
-      return false;
-   }
-   
-   /**
-    * Return the hash code of the nested object.
-    *
-    * @return  The hash code of the nested object.
-    */
-   public int hashCode() {
-      return hashCode;
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Factory Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Create a <tt>SoftObject</tt> for the given object.
-    *
-    * @param obj     Object to reference.
-    * @return        <tt>SoftObject</tt> or <tt>null</tt> if object is null.
-    */
-   public static SoftObject create(final Object obj) {
-      if (obj == null) return null;
-      else return new SoftObject(obj);
-   }
-   
-   /**
-    * Create a <tt>SoftObject</tt> for the given object.
-    *
-    * @param obj     Object to reference.
-    * @param queue   Reference queue.
-    * @return        <tt>SoftObject</tt> or <tt>null</tt> if object is null.
-    */
-   public static SoftObject create(final Object obj, 
-                                   final ReferenceQueue queue) 
-   {
-      if (obj == null) return null;
-      else return new SoftObject(obj, queue);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SoftObject.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/SoftObject.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StopWatch.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/StopWatch.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StopWatch.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,359 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.Serializable;
-
-/**
- * Simulates a stop watch with a <em>lap</em> counter.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class StopWatch
-   implements Serializable, Cloneable
-{
-   /** Total time */
-   protected long total = 0;
-
-   /** Start time */
-   protected long start = -1;
-
-   /** Stop time */
-   protected long stop = -1;
-
-   /** The <i>lap</i> count */
-   protected int count = 0;
-
-   /** Is the watch started */
-   protected boolean running = false;
-
-   /**
-    * Default constructor.
-    */
-   public StopWatch() {}
-
-   /**
-    * Construct a StopWatch.
-    *
-    * @param running    Start the watch
-    */
-   public StopWatch(final boolean running)
-   {
-      if (running) start();
-   }
-
-   /**
-    * Start the watch.
-    *
-    * @param reset   True to reset the watch prior to starting.
-    */
-   public void start(final boolean reset)
-   {
-      if (!running) {
-         if (reset) reset();
-         start = System.currentTimeMillis();
-         running = true;
-      }
-   }
-
-   /**
-    * Start the watch.
-    */
-   public void start()
-   {
-      start(false);
-   }
-
-   /**
-    * Stop the watch.
-    *
-    * @return  Elapsed time or 0 if the watch was never started.
-    */
-   public long stop()
-   {
-      long lap = 0;
-
-      if (running) {
-         count++;
-         stop = System.currentTimeMillis();
-         lap = stop - start;
-         total += lap;
-         running = false;
-      }
-
-      return lap;
-   }
-
-   /**
-    * Reset the watch.
-    */
-   public void reset()
-   {
-      start = -1;
-      stop = -1;
-      total = 0;
-      count = 0;
-      running = false;
-   }
-
-   /**
-    * Get the <i>lap</i> count.
-    *
-    * @return  The <i>lap</i> count.
-    */
-   public int getLapCount()
-   {
-      return count;
-   }
-
-   /**
-    * Get the elapsed <i>lap</i> time since the watch was started.
-    *
-    * @return  Elapsed <i>lap</i> time or 0 if the watch was never started
-    */
-   public long getLapTime()
-   {
-      if (start == -1) {
-         return 0;
-      }
-      else if (running) {
-         return System.currentTimeMillis() - start;
-      }
-      else {
-         return stop - start;
-      }
-   }
-
-   /**
-    * Get the average <i>lap</i> time since the watch was started.
-    *
-    * @return  Average <i>lap</i> time since the watch was started.
-    */
-   public long getAverageLapTime()
-   {
-      return (count == 0) ? 0 : getLapTime() / getLapCount();
-   }
-
-   /**
-    * Get the elapsed time since the watch was created or last reset.
-    *
-    * @return  Elapsed time or 0 if the watch was never started.
-    */
-   public long getTime()
-   {
-      if (start == -1) {
-         return 0;
-      }
-      else if (running) {
-         return total + System.currentTimeMillis() - start;
-      }
-      else {
-         return total;
-      }
-   }
-
-   /**
-    * Check if the watch is running.
-    *
-    * @return  True if the watch is running.
-    */
-   public boolean isRunning()
-   {
-      return running;
-   }
-
-   /**
-    * Return a string representation.
-    */
-   public String toString()
-   {
-      StringBuffer buff = new StringBuffer();
-      
-      if (running) {
-         // the watch has not been stopped
-         formatElapsedTime(buff, getTime());
-
-         // add the current lap time too if there is more than one lap
-         if (count >= 1) {
-            buff.append(", count=").append(count);
-            buff.append(", current=");
-            formatElapsedTime(buff, getLapTime());
-         }
-      }
-      else {
-         // the watch has been stopped
-         formatElapsedTime(buff, getTime());
-
-         // add extra info if there is more than one lap
-         if (count > 1) {
-            buff.append(", count=").append(count);
-            buff.append(", average=");
-            formatElapsedTime(buff, getAverageLapTime());
-         }
-      }
-
-      return buff.toString();
-   }
-
-   private void formatElapsedTime(final StringBuffer buff, final long lapsed)
-   {
-      long m = lapsed / 60000;
-      if (m != 0) {
-         buff.append(m).append("m:");
-      }
-
-      long s = (lapsed - 60000 * m) / 1000;
-      if (s != 0) {
-         buff.append(s).append("s:");
-      }
-
-      // ms is always there, even if it was 0 too
-      long ms = (lapsed - 60000 * m - 1000 * s);
-      buff.append(ms).append("ms");
-   }
-   
-   /**
-    * Return a cloned copy of this object.
-    *
-    * @return  A cloned copy of this object.
-    */
-   public Object clone()
-   {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                                Wrappers                             //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Base wrapper class for other wrappers.
-    */
-   private static class Wrapper
-      extends StopWatch
-   {
-      protected StopWatch watch;
-
-      public Wrapper(final StopWatch watch) {
-         this.watch = watch;
-      }
-
-      public void start(final boolean reset) {
-         watch.start(reset);
-      }
-
-      public void start() {
-         watch.start();
-      }
-
-      public long stop() {
-         return watch.stop();
-      }
-
-      public void reset() {
-         watch.reset();
-      }
-
-      public long getLapTime() {
-         return watch.getLapTime();
-      }
-
-      public long getAverageLapTime() {
-         return watch.getAverageLapTime();
-      }
-
-      public int getLapCount() {
-         return watch.getLapCount();
-      }
-
-      public long getTime() {
-         return watch.getTime();
-      }
-
-      public boolean isRunning() {
-         return watch.isRunning();
-      }
-
-      public String toString() {
-         return watch.toString();
-      }
-   }
-
-   /**
-    * Return a synchronized stop watch.
-    *
-    * @param watch    StopWatch to synchronize.
-    * @return         Synchronized stop watch.
-    */
-   public static StopWatch makeSynchronized(final StopWatch watch)
-   {
-      return new Wrapper(watch)
-         {
-            public synchronized void start(final boolean reset) {
-               this.watch.start(reset);
-            }
-
-            public synchronized void start() {
-               this.watch.start();
-            }
-
-            public synchronized long stop() {
-               return this.watch.stop();
-            }
-
-            public synchronized void reset() {
-               this.watch.reset();
-            }
-
-            public synchronized long getLapTime() {
-               return this.watch.getLapTime();
-            }
-
-            public synchronized long getAverageLapTime() {
-               return this.watch.getAverageLapTime();
-            }
-
-            public synchronized int getLapCount() {
-               return this.watch.getLapCount();
-            }
-
-            public synchronized long getTime() {
-               return this.watch.getTime();
-            }
-
-            public synchronized boolean isRunning() {
-               return this.watch.isRunning();
-            }
-
-            public synchronized String toString() {
-               return this.watch.toString();
-            }
-         };
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StopWatch.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/StopWatch.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StringPropertyReplacer.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/StringPropertyReplacer.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StringPropertyReplacer.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,257 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.util.Properties;
-import java.io.File;
-
-/**
- * A utility class for replacing properties in strings. 
- *
- * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author <a href="Scott.Stark at jboss.org">Scott Stark</a>
- * @author <a href="claudio.vesco at previnet.it">Claudio Vesco</a>
- * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @version <tt>$Revision$</tt> 
- */
-public final class StringPropertyReplacer
-{
-   /** New line string constant */
-   public static final String NEWLINE = SysPropertyActions.getProperty("line.separator", "\n");
-
-   /** File separator value */
-   private static final String FILE_SEPARATOR = File.separator;
-
-   /** Path separator value */
-   private static final String PATH_SEPARATOR = File.pathSeparator;
-
-   /** File separator alias */
-   private static final String FILE_SEPARATOR_ALIAS = "/";
-
-   /** Path separator alias */
-   private static final String PATH_SEPARATOR_ALIAS = ":";
-
-   // States used in property parsing
-   private static final int NORMAL = 0;
-   private static final int SEEN_DOLLAR = 1;
-   private static final int IN_BRACKET = 2;
-
-   /**
-    * Go through the input string and replace any occurance of ${p} with
-    * the System.getProperty(p) value. If there is no such property p defined,
-    * then the ${p} reference will remain unchanged.
-    * 
-    * If the property reference is of the form ${p:v} and there is no such property p,
-    * then the default value v will be returned.
-    * 
-    * If the property reference is of the form ${p1,p2} or ${p1,p2:v} then
-    * the primary and the secondary properties will be tried in turn, before
-    * returning either the unchanged input, or the default value.
-    * 
-    * The property ${/} is replaced with System.getProperty("file.separator")
-    * value and the property ${:} is replaced with System.getProperty("path.separator").
-    * 
-    * @param string - the string with possible ${} references
-    * @return the input string with all property references replaced if any.
-    *    If there are no valid references the input string will be returned.
-    */
-   public static String replaceProperties(final String string)
-   {
-      return replaceProperties(string, null);
-   }
-
-   /**
-    * Go through the input string and replace any occurance of ${p} with
-    * the props.getProperty(p) value. If there is no such property p defined,
-    * then the ${p} reference will remain unchanged.
-    * 
-    * If the property reference is of the form ${p:v} and there is no such property p,
-    * then the default value v will be returned.
-    * 
-    * If the property reference is of the form ${p1,p2} or ${p1,p2:v} then
-    * the primary and the secondary properties will be tried in turn, before
-    * returning either the unchanged input, or the default value.
-    * 
-    * The property ${/} is replaced with System.getProperty("file.separator")
-    * value and the property ${:} is replaced with System.getProperty("path.separator").
-    *
-    * @param string - the string with possible ${} references
-    * @param props - the source for ${x} property ref values, null means use System.getProperty()
-    * @return the input string with all property references replaced if any.
-    *    If there are no valid references the input string will be returned.
-    * @throws java.lang.AccessControlException when not authorised to retrieved system properties
-    */
-   public static String replaceProperties(final String string, final Properties props)
-   {
-      final char[] chars = string.toCharArray();
-      StringBuffer buffer = new StringBuffer();
-      boolean properties = false;
-      int state = NORMAL;
-      int start = 0;
-      for (int i = 0; i < chars.length; ++i)
-      {
-         char c = chars[i];
-
-         // Dollar sign outside brackets
-         if (c == '$' && state != IN_BRACKET)
-            state = SEEN_DOLLAR;
-
-         // Open bracket immediatley after dollar
-         else if (c == '{' && state == SEEN_DOLLAR)
-         {
-            buffer.append(string.substring(start, i - 1));
-            state = IN_BRACKET;
-            start = i - 1;
-         }
-
-         // No open bracket after dollar
-         else if (state == SEEN_DOLLAR)
-            state = NORMAL;
-
-         // Closed bracket after open bracket
-         else if (c == '}' && state == IN_BRACKET)
-         {
-            // No content
-            if (start + 2 == i)
-            {
-               buffer.append("${}"); // REVIEW: Correct?
-            }
-            else // Collect the system property
-            {
-               String value = null;
-
-               String key = string.substring(start + 2, i);
-               
-               // check for alias
-               if (FILE_SEPARATOR_ALIAS.equals(key))
-               {
-                  value = FILE_SEPARATOR;
-               }
-               else if (PATH_SEPARATOR_ALIAS.equals(key))
-               {
-                  value = PATH_SEPARATOR;
-               }
-               else
-               {
-                  // check from the properties
-                  if (props != null)
-                     value = props.getProperty(key);
-                  else
-                     value = System.getProperty(key);
-                  
-                  if (value == null)
-                  {
-                     // Check for a default value ${key:default}
-                     int colon = key.indexOf(':');
-                     if (colon > 0)
-                     {
-                        String realKey = key.substring(0, colon);
-                        if (props != null)
-                           value = props.getProperty(realKey);
-                        else
-                           value = System.getProperty(realKey);
-
-                        if (value == null)
-                        {
-                           // Check for a composite key, "key1,key2"                           
-                           value = resolveCompositeKey(realKey, props);
-                        
-                           // Not a composite key either, use the specified default
-                           if (value == null)
-                              value = key.substring(colon+1);
-                        }
-                     }
-                     else
-                     {
-                        // No default, check for a composite key, "key1,key2"
-                        value = resolveCompositeKey(key, props);
-                     }
-                  }
-               }
-
-               if (value != null)
-               {
-                  properties = true;
-                  buffer.append(value);
-               }
-            }
-            start = i + 1;
-            state = NORMAL;
-         }
-      }
-
-      // No properties
-      if (properties == false)
-         return string;
-
-      // Collect the trailing characters
-      if (start != chars.length)
-         buffer.append(string.substring(start, chars.length));
-
-      // Done
-      return buffer.toString();
-   }
-   
-   /**
-    * Try to resolve a "key" from the provided properties by
-    * checking if it is actually a "key1,key2", in which case
-    * try first "key1", then "key2". If all fails, return null.
-    * 
-    * It also accepts "key1," and ",key2".
-    * 
-    * @param key the key to resolve
-    * @param props the properties to use
-    * @return the resolved key or null
-    */
-   private static String resolveCompositeKey(String key, Properties props)
-   {
-      String value = null;
-      
-      // Look for the comma
-      int comma = key.indexOf(',');
-      if (comma > -1)
-      {
-         // If we have a first part, try resolve it
-         if (comma > 0)
-         {  
-            // Check the first part
-            String key1 = key.substring(0, comma);
-            if (props != null)
-               value = props.getProperty(key1);            
-            else
-               value = System.getProperty(key1);
-         }
-         // Check the second part, if there is one and first lookup failed
-         if (value == null && comma < key.length() - 1)
-         {
-            String key2 = key.substring(comma + 1);
-            if (props != null)
-               value = props.getProperty(key2);
-            else
-               value = System.getProperty(key2);
-         }         
-      }
-      // Return whatever we've found or null
-      return value;
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/StringPropertyReplacer.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/StringPropertyReplacer.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Strings.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Strings.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Strings.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1094 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Map;
-
-/**
- * A collection of String utilities.
- *
- * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author <a href="Scott.Stark at jboss.org">Scott Stark</a>
- * @author <a href="claudio.vesco at previnet.it">Claudio Vesco</a>
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @version <tt>$Revision$</tt>
- */
-public final class Strings
-{
-   /** An empty string constant */
-   public static final String EMPTY = "";
-
-   /** Millisecond conversion constants */
-   private static final long MSEC = 1;
-   private static final long SECS = 1000;
-   private static final long MINS = 60 * 1000;
-   private static final long HOUR = 60 * 60 * 1000;
-   
-   /**
-    * List of valid Java keywords, see The Java Language Specification
-    * Second Edition Section 3.9, 3.10.3 and 3.10.7
-    */
-   private static final String[] keywords =
-      {
-         "abstract",
-         "boolean",
-         "break",
-         "byte",
-         "case",
-         "catch",
-         "char",
-         "class",
-         "const",
-         "continue",
-         "default",
-         "do",
-         "double",
-         "else",
-         "extends",
-         "final",
-         "finally",
-         "float",
-         "for",
-         "goto",
-         "if",
-         "implements",
-         "import",
-         "instanceof",
-         "int",
-         "interface",
-         "long",
-         "native",
-         "new",
-         "package",
-         "private",
-         "protected",
-         "public",
-         "return",
-         "short",
-         "static",
-         "strictfp",
-         "super",
-         "switch",
-         "synchronized",
-         "this",
-         "throw",
-         "throws",
-         "transient",
-         "try",
-         "void",
-         "volatile",
-         "while",
-
-         "true", // technically no keywords but we are not picky
-         "false",
-         "null"
-      };
-
-   /**
-    * List of EJB-QL Identifiers as defined in the EJB 2.0 Specification
-    * Section 11.2.6.1
-    */
-   private static final String[] ejbQlIdentifiers =
-      {
-         "AND",
-         "AS",
-         "BETWEEN",
-         "DISTINCT",
-         "EMPTY",
-         "FALSE",
-         "FROM",
-         "IN",
-         "IS",
-         "LIKE",
-         "MEMBER",
-         "NOT",
-         "NULL",
-         "OBJECT",
-         "OF",
-         "OR",
-         "SELECT",
-         "UNKNOWN",
-         "TRUE",
-         "WHERE",
-      };
-
-   /////////////////////////////////////////////////////////////////////////
-   //                         Substitution Methods                        //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Substitute sub-strings in side of a string.
-    *
-    * @param buff    Stirng buffer to use for substitution (buffer is not reset)
-    * @param from    String to substitute from
-    * @param to      String to substitute to
-    * @param string  String to look for from in
-    * @return        Substituted string
-    */
-   public static String subst(final StringBuffer buff, final String from,
-      final String to, final String string)
-   {
-      int begin = 0, end = 0;
-
-      while ((end = string.indexOf(from, end)) != -1)
-      {
-         // append the first part of the string
-         buff.append(string.substring(begin, end));
-
-         // append the replaced string
-         buff.append(to);
-
-         // update positions
-         begin = end + from.length();
-         end = begin;
-      }
-
-      // append the rest of the string
-      buff.append(string.substring(begin, string.length()));
-
-      return buff.toString();
-   }
-
-   /**
-    * Substitute sub-strings in side of a string.
-    *
-    * @param from    String to substitute from
-    * @param to      String to substitute to
-    * @param string  String to look for from in
-    * @return        Substituted string
-    */
-   public static String subst(final String from, final String to,
-      final String string)
-   {
-      return subst(new StringBuffer(), from, to, string);
-   }
-
-   /**
-    * Substitute sub-strings in side of a string.
-    *
-    * @param buff       String buffer to use for substitution (buffer is not reset)
-    * @param string     String to subst mappings in
-    * @param map        Map of from->to strings
-    * @param beginToken Beginning token
-    * @param endToken   Ending token
-    * @return           Substituted string
-    */
-   public static String subst(final StringBuffer buff, final String string,
-      final Map map, final String beginToken,
-      final String endToken)
-   {
-      int begin = 0, rangeEnd = 0;
-      Range range;
-
-      while ((range = rangeOf(beginToken, endToken, string, rangeEnd)) != null)
-      {
-         // append the first part of the string
-         buff.append(string.substring(begin, range.begin));
-
-         // Get the string to replace from the map
-         String key = string.substring(range.begin + beginToken.length(),
-            range.end);
-         Object value = map.get(key);
-         // if mapping does not exist then use empty;
-         if (value == null) value = EMPTY;
-
-         // append the replaced string
-         buff.append(value);
-
-         // update positions
-         begin = range.end + endToken.length();
-         rangeEnd = begin;
-      }
-
-      // append the rest of the string
-      buff.append(string.substring(begin, string.length()));
-
-      return buff.toString();
-   }
-
-   /**
-    * Substitute sub-strings in side of a string.
-    *
-    * @param string     String to subst mappings in
-    * @param map        Map of from->to strings
-    * @param beginToken Beginning token
-    * @param endToken   Ending token
-    * @return           Substituted string
-    */
-   public static String subst(final String string, final Map map,
-      final String beginToken, final String endToken)
-   {
-      return subst(new StringBuffer(), string, map, beginToken, endToken);
-   }
-
-   /**
-    * Substitute index identifiers with the replacement value from the
-    * given array for the corresponding index.
-    *
-    * @param buff       The string buffer used for the substitution
-    *                   (buffer is not reset).
-    * @param string     String substitution format.
-    * @param replace    Array of strings whose values will be used as 
-    *                   replacements in the given string when a token with
-    *                   their index is found.
-    * @param token      The character token to specify the start of an index
-    *                   reference.
-    * @return           Substituted string.
-    */
-   public static String subst(final StringBuffer buff, final String string,
-      final String replace[], final char token)
-   {
-      int i = string.length();
-      for (int j = 0; j >= 0 && j < i; j++)
-      {
-         char c = string.charAt(j);
-
-         // if the char is the token, then get the index
-         if (c == token)
-         {
-
-            // if we aren't at the end of the string, get the index
-            if (j != i)
-            {
-               int k = Character.digit(string.charAt(j + 1), 10);
-
-               if (k == -1)
-               {
-                  buff.append(string.charAt(j + 1));
-               }
-               else if (k < replace.length)
-               {
-                  buff.append(replace[k]);
-               }
-
-               j++;
-            }
-         }
-         else
-         {
-            buff.append(c);
-         }
-      }
-
-      return buff.toString();
-   }
-
-   /**
-    * Substitute index identifiers with the replacement value from the
-    * given array for the corresponding index.
-    *
-    * @param string     String substitution format.
-    * @param replace    Array of strings whose values will be used as 
-    *                   replacements in the given string when a token with
-    *                   their index is found.
-    * @param token      The character token to specify the start of an index
-    *                   reference.
-    * @return           Substituted string.
-    */
-   public static String subst(final String string, final String replace[],
-      final char token)
-   {
-      return subst(new StringBuffer(), string, replace, token);
-   }
-
-   /**
-    * Substitute index identifiers (with <code>%</code> for the index token)
-    * with the replacement value from the given array for the corresponding
-    * index.
-    *
-    * @param string     String substitution format.
-    * @param replace    Array of strings whose values will be used as 
-    *                   replacements in the given string when a token with
-    *                   their index is found.
-    * @return           Substituted string.
-    */
-   public static String subst(final String string, final String replace[])
-   {
-      return subst(new StringBuffer(), string, replace, '%');
-   }
-
-   /////////////////////////////////////////////////////////////////////////
-   //                             Range Methods                           //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Represents a range between two integers.
-    */
-   public static class Range
-   {
-      /** The beginning of the range. */
-      public int begin;
-
-      /** The end of the range. */
-      public int end;
-
-      /**
-       * Construct a new range.
-       *
-       * @param begin   The beginning of the range.
-       * @param end     The end of the range.
-       */
-      public Range(int begin, int end)
-      {
-         this.begin = begin;
-         this.end = end;
-      }
-
-      /**
-       * Default constructor.
-       */
-      public Range()
-      {
-      }
-   }
-
-   /**
-    * Return the range from a begining token to an ending token.
-    *
-    * @param beginToken String to indicate begining of range.
-    * @param endToken   String to indicate ending of range.
-    * @param string     String to look for range in.
-    * @param fromIndex  Beginning index.
-    * @return           (begin index, end index) or <i>null</i>.
-    */
-   public static Range rangeOf(final String beginToken, final String endToken,
-      final String string, final int fromIndex)
-   {
-      int begin = string.indexOf(beginToken, fromIndex);
-
-      if (begin != -1)
-      {
-         int end = string.indexOf(endToken, begin + 1);
-         if (end != -1)
-         {
-            return new Range(begin, end);
-         }
-      }
-
-      return null;
-   }
-
-   /**
-    * Return the range from a begining token to an ending token.
-    *
-    * @param beginToken String to indicate begining of range.
-    * @param endToken   String to indicate ending of range.
-    * @param string     String to look for range in.
-    * @return           (begin index, end index) or <i>null</i>.
-    */
-   public static Range rangeOf(final String beginToken, final String endToken,
-      final String string)
-   {
-      return rangeOf(beginToken, endToken, string, 0);
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                           Spliting Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Split up a string into multiple strings based on a delimiter.
-    *
-    * @param string  String to split up.
-    * @param delim   Delimiter.
-    * @param limit   Limit the number of strings to split into
-    *                (-1 for no limit).
-    * @return        Array of strings.
-    */
-   public static String[] split(final String string, final String delim,
-      final int limit)
-   {
-      // get the count of delim in string, if count is > limit 
-      // then use limit for count.  The number of delimiters is less by one
-      // than the number of elements, so add one to count.
-      int count = count(string, delim) + 1;
-      if (limit > 0 && count > limit)
-      {
-         count = limit;
-      }
-
-      String strings[] = new String[count];
-      int begin = 0;
-
-      for (int i = 0; i < count; i++)
-      {
-         // get the next index of delim
-         int end = string.indexOf(delim, begin);
-         
-         // if the end index is -1 or if this is the last element
-         // then use the string's length for the end index
-         if (end == -1 || i + 1 == count)
-            end = string.length();
-
-         // if end is 0, then the first element is empty
-         if (end == 0)
-            strings[i] = EMPTY;
-         else
-            strings[i] = string.substring(begin, end);
-
-         // update the begining index
-         begin = end + 1;
-      }
-
-      return strings;
-   }
-
-   /**
-    * Split up a string into multiple strings based on a delimiter.
-    *
-    * @param string  String to split up.
-    * @param delim   Delimiter.
-    * @return        Array of strings.
-    */
-   public static String[] split(final String string, final String delim)
-   {
-      return split(string, delim, -1);
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                    Joining/Concatenation Methods                    //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Join an array of strings into one delimited string.
-    *
-    * @param buff    String buffered used for join (buffer is not reset).
-    * @param array   Array of objects to join as strings.
-    * @param delim   Delimiter to join strings with or <i>null</i>.
-    * @return        Joined string.
-    */
-   public static String join(final StringBuffer buff, final Object array[],
-      final String delim)
-   {
-      boolean haveDelim = (delim != null);
-
-      for (int i = 0; i < array.length; i++)
-      {
-         buff.append(array[i]);
-
-         // if this is the last element then don't append delim
-         if (haveDelim && (i + 1) < array.length)
-         {
-            buff.append(delim);
-         }
-      }
-
-      return buff.toString();
-   }
-
-   /**
-    * Join an array of strings into one delimited string.
-    *
-    * @param array   Array of objects to join as strings.
-    * @param delim   Delimiter to join strings with or <i>null</i>.
-    * @return        Joined string.
-    */
-   public static String join(final Object array[], final String delim)
-   {
-      return join(new StringBuffer(), array, delim);
-   }
-
-   /**
-    * Convert and join an array of objects into one string.
-    *
-    * @param array   Array of objects to join as strings.
-    * @return        Converted and joined objects.
-    */
-   public static String join(final Object array[])
-   {
-      return join(array, null);
-   }
-
-   /**
-    * Convert and join an array of bytes into one string.
-    *
-    * @param array   Array of objects to join as strings.
-    * @return        Converted and joined objects.
-    */
-   public static String join(final byte array[])
-   {
-      Byte bytes[] = new Byte[array.length];
-      for (int i = 0; i < bytes.length; i++)
-      {
-         bytes[i] = new Byte(array[i]);
-      }
-
-      return join(bytes, null);
-   }
-
-   /**
-    * Return a string composed of the given array.
-    *
-    * @param buff       Buffer used to construct string value (not reset).
-    * @param array      Array of objects.
-    * @param prefix     String prefix.
-    * @param separator  Element sepearator.
-    * @param suffix     String suffix.
-    * @return           String in the format of:
-    *                   prefix + n ( + separator + n+i)* + suffix.
-    */
-   public static String join(final StringBuffer buff, final Object[] array,
-      final String prefix, final String separator,
-      final String suffix)
-   {
-      buff.append(prefix);
-      join(buff, array, separator);
-      buff.append(suffix);
-
-      return buff.toString();
-   }
-
-   /**
-    * Return a string composed of the given array.
-    *
-    * @param array      Array of objects.
-    * @param prefix     String prefix.
-    * @param separator  Element sepearator.
-    * @param suffix     String suffix.
-    * @return           String in the format of:
-    *                   prefix + n ( + separator + n+i)* + suffix.
-    */
-   public static String join(final Object[] array, final String prefix,
-      final String separator, final String suffix)
-   {
-      return join(new StringBuffer(), array, prefix, separator, suffix);
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                          Counting Methods                           //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Count the number of instances of substring within a string.
-    *
-    * @param string     String to look for substring in.
-    * @param substring  Sub-string to look for.
-    * @return           Count of substrings in string.
-    */
-   public static int count(final String string, final String substring)
-   {
-      int count = 0;
-      int idx = 0;
-
-      while ((idx = string.indexOf(substring, idx)) != -1)
-      {
-         idx++;
-         count++;
-      }
-
-      return count;
-   }
-
-   /**
-    * Count the number of instances of character within a string.
-    *
-    * @param string     String to look for substring in.
-    * @param c          Character to look for.
-    * @return           Count of substrings in string.
-    */
-   public static int count(final String string, final char c)
-   {
-      return count(string, String.valueOf(c));
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Padding Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Return a string padded with the given string for the given count.
-    *
-    * @param buff       String buffer used for padding (buffer is not reset).
-    * @param string     Pad element.
-    * @param count      Pad count.
-    * @return           Padded string.
-    */
-   public static String pad(final StringBuffer buff, final String string,
-      final int count)
-   {
-      for (int i = 0; i < count; i++)
-      {
-         buff.append(string);
-      }
-
-      return buff.toString();
-   }
-
-   /**
-    * Return a string padded with the given string for the given count.
-    *
-    * @param string     Pad element.
-    * @param count      Pad count.
-    * @return           Padded string.
-    */
-   public static String pad(final String string, final int count)
-   {
-      return pad(new StringBuffer(), string, count);
-   }
-
-   /**
-    * Return a string padded with the given string value of an object
-    * for the given count.
-    *
-    * @param obj     Object to convert to a string.
-    * @param count   Pad count.
-    * @return        Padded string.
-    */
-   public static String pad(final Object obj, final int count)
-   {
-      return pad(new StringBuffer(), String.valueOf(obj), count);
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                              Misc Methods                           //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * <p>Compare two strings.
-    *
-    * <p>Both or one of them may be null.
-    *
-    * @return true if object equals or intern ==, else false. 
-    */
-   public static boolean compare(final String me, final String you)
-   {
-      // If both null or intern equals
-      if (me == you)
-         return true;
-      
-      // if me null and you are not
-      if (me == null && you != null)
-         return false;
-      
-      // me will not be null, test for equality
-      return me.equals(you);
-   }
-
-   /**
-    * Check if the given string is empty.
-    *
-    * @param string     String to check
-    * @return           True if string is empty
-    */
-   public static boolean isEmpty(final String string)
-   {
-      return string.equals(EMPTY);
-   }
-
-   /**
-    * Return the <i>nth</i> index of the given token occurring in the given string.
-    *
-    * @param string     String to search.
-    * @param token      Token to match.
-    * @param index      <i>Nth</i> index.
-    * @return           Index of <i>nth</i> item or -1.
-    */
-   public static int nthIndexOf(final String string, final String token,
-      final int index)
-   {
-      int j = 0;
-
-      for (int i = 0; i < index; i++)
-      {
-         j = string.indexOf(token, j + 1);
-         if (j == -1) break;
-      }
-
-      return j;
-   }
-
-   /**
-    * Capitalize the first character of the given string.
-    *
-    * @param string     String to capitalize.
-    * @return           Capitalized string.
-    *
-    * @throws IllegalArgumentException    String is <kk>null</kk> or empty.
-    */
-   public static String capitalize(final String string)
-   {
-      if (string == null)
-         throw new NullArgumentException("string");
-      if (string.equals(""))
-         throw new EmptyStringException("string");
-
-      return Character.toUpperCase(string.charAt(0)) + string.substring(1);
-   }
-
-   /**
-    * Trim each string in the given string array.
-    *
-    * <p>This modifies the string array.
-    *
-    * @param strings    String array to trim.
-    * @return           String array with each element trimmed.
-    */
-   public static String[] trim(final String[] strings)
-   {
-      for (int i = 0; i < strings.length; i++)
-      {
-         strings[i] = strings[i].trim();
-      }
-
-      return strings;
-   }
-
-   /**
-    * Make a URL from the given string.
-    *
-    * <p>
-    * If the string is a properly formatted file URL, then the file
-    * portion will be made canonical.
-    *
-    * <p>
-    * If the string is an invalid URL then it will be converted into a
-    * file URL.
-    *
-    * @param urlspec           The string to construct a URL for.
-    * @param relativePrefix    The string to prepend to relative file
-    *                          paths, or null to disable prepending.
-    * @return                  A URL for the given string.
-    *
-    * @throws MalformedURLException  Could not make a URL for the given string.
-    */
-   public static URL toURL(String urlspec, final String relativePrefix) throws MalformedURLException
-   {
-      urlspec = urlspec.trim();
-
-      URL url;
-
-      try
-      {
-         url = new URL(urlspec);
-         if (url.getProtocol().equals("file"))
-         {
-            url = makeURLFromFilespec(url.getFile(), relativePrefix);
-         }
-      }
-      catch (Exception e)
-      {
-         // make sure we have a absolute & canonical file url
-         try
-         {
-            url = makeURLFromFilespec(urlspec, relativePrefix);
-         }
-         catch (IOException n)
-         {
-            //
-            // jason: or should we rethrow e?
-            //
-            throw new MalformedURLException(n.toString());
-         }
-      }
-
-      return url;
-   }
-
-   /** A helper to make a URL from a filespec. */
-   private static URL makeURLFromFilespec(final String filespec, final String relativePrefix)
-      throws IOException
-   {
-      // make sure the file is absolute & canonical file url
-      File file = new File(filespec);
-      
-      // if we have a prefix and the file is not abs then prepend
-      if (relativePrefix != null && !file.isAbsolute())
-      {
-         file = new File(relativePrefix, filespec);
-      }
-      
-      // make sure it is canonical (no ../ and such)
-      file = file.getCanonicalFile();
-
-      return file.toURL();
-   }
-
-   /**
-    * Make a URL from the given string.
-    *
-    * @see #toURL(String,String)
-    *
-    * @param urlspec    The string to construct a URL for.
-    * @return           A URL for the given string.
-    *
-    * @throws MalformedURLException  Could not make a URL for the given string.
-    */
-   public static URL toURL(final String urlspec) throws MalformedURLException
-   {
-      return toURL(urlspec, null);
-   }
-
-   /**
-    * Check whether the given String is a reserved Java Keyword
-    * according to the Java Language Specifications.
-    *
-    * @param s String to check
-    *
-    * @return <code>true</code> if the given String is a reserved Java
-    *         keyword, <code>false</code> otherwise.
-    */
-   public final static boolean isJavaKeyword(String s)
-   {
-      if (s == null || s.length() == 0)
-      {
-         return false;
-      }
-
-      for (int i = 0; i < keywords.length; i++)
-      {
-         if (keywords[i].equals(s))
-         {
-            return true;
-         }
-      }
-
-      return false;
-   }
-
-   /**
-    * Check whether the given String is an identifier according to the
-    * EJB-QL definition. See The EJB 2.0 Documentation Section 11.2.6.1.
-    *
-    * @param s String to check
-    *
-    * @return <code>true</code> if the given String is a reserved
-    *         identifier in EJB-QL, <code>false</code> otherwise.
-    */
-   public final static boolean isEjbQlIdentifier(String s)
-   {
-      if (s == null || s.length() == 0)
-      {
-         return false;
-      }
-
-      for (int i = 0; i < ejbQlIdentifiers.length; i++)
-      {
-         if (ejbQlIdentifiers[i].equalsIgnoreCase(s))
-         {
-            return true;
-         }
-      }
-
-      return false;
-   }
-
-   /**
-    * Check whether the given String is a valid identifier according
-    * to the Java Language specifications.
-    *
-    * See The Java Language Specification Second Edition, Section 3.8
-    * for the definition of what is a valid identifier.
-    *
-    * @param s String to check
-    *
-    * @return <code>true</code> if the given String is a valid Java
-    *         identifier, <code>false</code> otherwise.
-    */
-   public final static boolean isValidJavaIdentifier(String s)
-   {
-      // an empty or null string cannot be a valid identifier
-      if (s == null || s.length() == 0)
-      {
-         return false;
-      }
-
-      char[] c = s.toCharArray();
-      if (!Character.isJavaIdentifierStart(c[0]))
-      {
-         return false;
-      }
-
-      for (int i = 1; i < c.length; i++)
-      {
-         if (!Character.isJavaIdentifierPart(c[i]))
-         {
-            return false;
-         }
-      }
-
-      return true;
-   }
-
-   /**
-    * Returns a new string with all the whitespace removed
-    * 
-    * @param s the source string
-    * @return the string without whitespace or null
-    */
-   public static String removeWhiteSpace(String s)
-   {
-      String retn = null;
-      
-      if (s != null)
-      {
-         int len = s.length();
-         StringBuffer sbuf = new StringBuffer(len);
-         
-         for (int i = 0; i < len; i++)
-         {
-            char c = s.charAt(i);
-            
-            if (!Character.isWhitespace(c))
-                sbuf.append(c);
-         }
-         retn = sbuf.toString();
-      }
-      return retn;
-   }
-
-   /**
-    * The default toString implementation of an object
-    * 
-    * @param object the object
-    * @return a string in the form className at hexHashCode
-    */
-   public static final String defaultToString(Object object)
-   {
-      if (object == null)
-         return "null";
-      else
-         return object.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(object));
-   }
-
-   /**
-    * The default toString implementation of an object
-    * 
-    * @param object the object
-    * @param buffer the string builder
-    * @return a string in the form className at hexHashCode
-    */
-   public static final void defaultToString(JBossStringBuilder buffer, Object object)
-   {
-      if (object == null)
-         buffer.append("null");
-      else
-      {
-         buffer.append(object.getClass().getName());
-         buffer.append('@');
-         buffer.append(Integer.toHexString(System.identityHashCode(object)));
-      }
-   }
-
-   /**
-    * The default toString implementation of an object
-    * 
-    * @param object the object
-    * @param buffer the string buffer
-    * @return a string in the form className at hexHashCode
-    */
-   public static final void defaultToString(StringBuffer buffer, Object object)
-   {
-      if (object == null)
-         buffer.append("null");
-      else
-      {
-         buffer.append(object.getClass().getName());
-         buffer.append('@');
-         buffer.append(Integer.toHexString(System.identityHashCode(object)));
-      }
-   }
-   
-   /**
-    * Parses a time period into a long.
-    *
-    * Translates possible [msec|sec|min|h] suffixes
-    *
-    * For example:
-    *   "1"      ->  1 (msec)
-    *   "1msec   ->  1 (msec)
-    *   "1sec"   ->  1000 (msecs)
-    *   "1min"   ->  60000 (msecs)
-    *   "1h"     ->  3600000 (msecs)
-    * 
-    * Accepts negative periods, e.g. "-1"
-    * 
-    * @param period the stringfied time period
-    * @return the parsed time period as long
-    * @throws NumberFormatException
-    */
-   public static long parseTimePeriod(String period)
-   {
-      try
-      {
-         String s = period.toLowerCase();
-         long factor;
-         
-         // look for suffix
-         if (s.endsWith("msec"))
-         {
-            s = s.substring(0, s.lastIndexOf("msec"));
-            factor = MSEC;
-         }
-         else if (s.endsWith("sec"))
-         {
-            s = s.substring(0, s.lastIndexOf("sec"));
-            factor = SECS;
-         }
-         else if (s.endsWith("min"))
-         {
-            s = s.substring(0, s.lastIndexOf("min"));
-            factor = MINS;
-         }
-         else if (s.endsWith("h"))
-         {
-            s = s.substring(0, s.lastIndexOf("h"));
-            factor = HOUR;
-         }
-         else
-         {
-            factor = 1;
-         }  
-         return Long.parseLong(s) * factor;
-      }
-      catch (RuntimeException e)
-      {
-         // thrown in addition when period is 'null'
-         throw new NumberFormatException("For input time period: '" + period + "'");
-      }
-   }
-   
-   /**
-    * Same like parseTimePeriod(), but guards for negative entries.
-    * 
-    * @param period the stringfied time period
-    * @return the parsed time period as long
-    * @throws NumberFormatException
-    */
-   public static long parsePositiveTimePeriod(String period)
-   {
-      long retval = parseTimePeriod(period);
-      if (retval < 0)
-      {
-         throw new NumberFormatException("Negative input time period: '" + period + "'");
-      }
-      return retval;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Strings.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Strings.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Sync.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Sync.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Sync.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Interface that gives synchronization semantic to implementors
- *
- * @see Semaphore
- * 
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public interface Sync 
-{
-   /**
-    * Acquires this sync
-    * 
-    * @see #release
-    */
-   void acquire() throws InterruptedException;
-   
-   /**
-    * Releases this sync
-    * 
-    * @see #acquire
-    */
-   void release();
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Sync.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Sync.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SynchronizedCachePolicy.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/SynchronizedCachePolicy.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SynchronizedCachePolicy.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,98 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-
-/**
- * A synchronized cache policy wrapper.
- *
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision$
- * @see CachePolicy
- */
-public final class SynchronizedCachePolicy
-   implements CachePolicy
-{
-
-   // Attributes ----------------------------------------------------
-
-   private final CachePolicy delegate;
-
-   // Constructors --------------------------------------------------
-
-   public SynchronizedCachePolicy(CachePolicy delegate)
-   {
-      this.delegate = delegate;
-   }
-
-   // CachePolicy implementation ------------------------------------
-
-   synchronized public Object get(Object key)
-   {
-      return delegate.get(key);
-   }
-
-   synchronized public Object peek(Object key)
-   {
-      return delegate.get(key);
-   }
-
-   synchronized public void insert(Object key, Object object)
-   {
-      delegate.insert(key, object);
-   }
-
-   synchronized public void remove(Object key)
-   {
-      delegate.remove(key);
-   }
-
-   synchronized public void flush()
-   {
-      delegate.flush();
-   }
-
-   synchronized public int size()
-   {
-      return delegate.size();
-   }
-
-   synchronized public void create() throws Exception
-   {
-      delegate.create();
-   }
-
-   synchronized public void start() throws Exception
-   {
-      delegate.start();
-   }
-
-   synchronized public void stop()
-   {
-      delegate.stop();
-   }
-
-   synchronized public void destroy()
-   {
-      delegate.destroy();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SynchronizedCachePolicy.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/SynchronizedCachePolicy.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SysPropertyActions.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/SysPropertyActions.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SysPropertyActions.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,69 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.security.PrivilegedAction;
-import java.security.AccessController;
-
-/**
- * Priviledged actions for the package
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-class SysPropertyActions
-{
-   interface SysProps
-   {
-      SysProps NON_PRIVILEDGED = new SysProps()
-      {
-         public String getProperty(final String name, final String defaultValue)
-         {
-            return System.getProperty(name, defaultValue);
-         }
-      };
-      SysProps PRIVILEDGED = new SysProps()
-      {
-         public String getProperty(final String name, final String defaultValue)
-         {
-            PrivilegedAction action = new PrivilegedAction()
-            {
-               public Object run()
-               {
-                  return System.getProperty(name, defaultValue);
-               }
-            };
-            return (String) AccessController.doPrivileged(action);
-         }
-      };
-      String getProperty(String name, String defaultValue);
-   }
-
-   public static String getProperty(String name, String defaultValue)
-   {
-      String prop;
-      if( System.getSecurityManager() == null )
-         prop = SysProps.NON_PRIVILEDGED.getProperty(name, defaultValue);
-      else
-         prop = SysProps.PRIVILEDGED.getProperty(name, defaultValue);
-      return prop;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/SysPropertyActions.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/SysPropertyActions.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableHandler.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/ThrowableHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,147 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-
-/**
- * A static singleton that handles processing throwables that otherwise would
- * be ignored or dumped to System.err.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class ThrowableHandler
-{
-   /**
-    * Container for throwable types.
-    */
-   public static interface Type
-   {
-      /** Unknown throwable. */
-      int UNKNOWN = 0;
-
-      /** Error throwable. */
-      int ERROR = 1;
-
-      /** Warning throwable. */
-      int WARNING = 2;
-   }
-   
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Listener Methods                         //
-   /////////////////////////////////////////////////////////////////////////
-
-   /** The list of listeners */
-   protected static List listeners = Collections.synchronizedList(new ArrayList());
-
-   /**
-    * Add a ThrowableListener to the listener list.  Listener is added only
-    * if if it is not already in the list.
-    *
-    * @param listener   ThrowableListener to add to the list.
-    */
-   public static void addThrowableListener(ThrowableListener listener) {
-      // only add the listener if it isn't already in the list
-      if (!listeners.contains(listener)) {
-         listeners.add(listener);
-      }
-   }
-
-   /**
-    * Remove a ThrowableListener from the listener list.
-    *
-    * @param listener   ThrowableListener to remove from the list.
-    */
-   public static void removeThrowableListener(ThrowableListener listener) {
-      listeners.remove(listener);
-   }
-
-   /**
-    * Fire onThrowable to all registered listeners.
-    * 
-    * @param type    The type off the throwable.
-    * @param t       Throwable
-    */
-   protected static void fireOnThrowable(int type, Throwable t) {
-      Object[] list = listeners.toArray();
-
-      for (int i=0; i<list.length; i++) {
-         ((ThrowableListener)list[i]).onThrowable(type, t);
-      }
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                          Throwable Processing                       //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Add a throwable that is to be handled.
-    *
-    * @param type    The type off the throwable.
-    * @param t       Throwable to be handled.
-    */
-   public static void add(int type, Throwable t) {
-      // don't add null throwables
-      if (t == null) return;
-
-      try {
-         fireOnThrowable(type, t);
-      }
-      catch (Throwable bad) {
-         // don't let these propagate, that could introduce unwanted side-effects
-         System.err.println("Unable to handle throwable: " + t + " because of:");
-         bad.printStackTrace();
-      }
-   }
-      
-   /**
-    * Add a throwable that is to be handled with unknown type.
-    *
-    * @param t    Throwable to be handled.
-    */
-   public static void add(Throwable t) {
-      add(Type.UNKNOWN, t);
-   }
-
-   /**
-    * Add a throwable that is to be handled with error type.
-    *
-    * @param t    Throwable to be handled.
-    */
-   public static void addError(Throwable t) {
-      add(Type.ERROR, t);
-   }
-
-   /**
-    * Add a throwable that is to be handled with warning type.
-    *
-    * @param t    Throwable to be handled.
-    */
-   public static void addWarning(Throwable t) {
-      add(Type.ERROR, t);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableHandler.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/ThrowableHandler.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableListener.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/ThrowableListener.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableListener.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.util.EventListener;
-
-/**
- * An interface used to handle <tt>Throwable</tt> events.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface ThrowableListener
-   extends EventListener
-{
-   /**
-    * Process a throwable.
-    *
-    * @param type    The type off the throwable.
-    * @param t       Throwable
-    */
-   void onThrowable(int type, Throwable t);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/ThrowableListener.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/ThrowableListener.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Throwables.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Throwables.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Throwables.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,49 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.io.PrintStream;
-import java.io.ByteArrayOutputStream;
-
-/**
- * A collection of Throwable utilities.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class Throwables
-{
-   /**
-    * Return a string that consists of the stack trace of the given 
-    * <code>Throwable</code>.
-    *
-    * @param t    <code>Throwable</code> to get stack trace from.
-    * @return     <code>Throwable</code> stack trace as a string.
-    */
-   public static String toString(final Throwable t) {
-      ByteArrayOutputStream output = new ByteArrayOutputStream();
-      PrintStream stream = new PrintStream(output);
-      t.printStackTrace(stream);
-
-      return output.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/Throwables.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/Throwables.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimedCachePolicy.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/TimedCachePolicy.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimedCachePolicy.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,401 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
-
-/** An implementation of a timed cache. This is a cache whose entries have a
-    limited lifetime with the ability to refresh their lifetime. The entries
-    managed by the cache implement the TimedCachePolicy.TimedEntry interface. If
-    an object inserted into the cache does not implement this interface, it will
-    be wrapped in a DefaultTimedEntry and will expire without the possibility of
-    refresh after getDefaultLifetime() seconds.
-
-    This is a lazy cache policy in that objects are not checked for expiration
-    until they are accessed.
-
-    @author <a href="mailto:Scott.Stark at jboss.org">Scott Stark</a>.
-    @version $Revision$
-*/
-public class TimedCachePolicy
-   extends TimerTask /* A legacy base class that is no longer used as this level */
-   implements CachePolicy
-{
-   /** The interface that cache entries support.
-    */
-   public static interface TimedEntry
-   {
-      /** Initializes an entry with the current cache time. This is called when
-          the entry is first inserted into the cache so that entries do not
-          have to know the absolute system time.
-      */
-      public void init(long now);
-      
-      /** Is the entry still valid basis the current time
-          @return true if the entry is within its lifetime, false if it is expired.
-      */
-      public boolean isCurrent(long now);
-      
-      /** Attempt to extend the entry lifetime by refreshing it.
-          @return true if the entry was refreshed successfully, false otherwise.
-      */
-      public boolean refresh();
-      
-      /** Notify the entry that it has been removed from the cache.
-      */
-      public void destroy();
-
-      /** Get the value component of the TimedEntry. This may or may not
-          be the TimedEntry implementation.
-      */
-      public Object getValue();
-   }
-
-   protected static Timer resolutionTimer = new Timer(true);
-
-   /** The map of cached TimedEntry objects. */
-   protected Map entryMap;
-   /** The lifetime in seconds to use for objects inserted
-       that do not implement the TimedEntry interface. */
-   protected int defaultLifetime;
-   /** A flag indicating if entryMap should be synchronized */
-   protected boolean threadSafe;
-   /** The caches notion of the current time */
-   protected long now;
-   /** The resolution in seconds of the cach current time */
-   protected int resolution;
-   /** */
-   protected ResolutionTimer theTimer;
-
-   /** Creates a new TimedCachePolicy with a default entry lifetime of 30 mins
-       that does not synchronized access to its policy store and uses a 60
-       second resolution.
-   */
-   public TimedCachePolicy() 
-   {
-      this(30*60, false, 0);
-   }
-   /** Creates a new TimedCachePolicy with the given default entry lifetime
-       that does not synchronized access to its policy store and uses a 60
-       second resolution.
-   */
-   public TimedCachePolicy(int defaultLifetime)
-   {
-      this(defaultLifetime, false, 0);
-   }
-   /** Creates a new TimedCachePolicy with the given default entry lifetime
-       that does/does not synchronized access to its policy store depending
-       on the value of threadSafe.
-       @param defaultLifetime - the lifetime in seconds to use for objects inserted
-       that do not implement the TimedEntry interface.
-       @param threadSafe - a flag indicating if the cach store should be synchronized
-       to allow correct operation under multi-threaded access. If true, the
-       cache store is synchronized. If false the cache store is unsynchronized and
-       the cache is not thread safe.
-       @param resolution - the resolution in seconds of the cache timer. A cache does
-       not query the system time on every get() invocation. Rather the cache
-       updates its notion of the current time every 'resolution' seconds.
-   */
-   public TimedCachePolicy(int defaultLifetime, boolean threadSafe, int resolution)
-   {
-      this.defaultLifetime = defaultLifetime;
-      this.threadSafe = threadSafe;
-      if( resolution <= 0 )
-         resolution = 60;
-      this.resolution = resolution;
-   }
-
-   // Service implementation ----------------------------------------------
-   /** Initializes the cache for use. Prior to this the cache has no store.
-    */
-   public void create()
-   {
-      if( threadSafe )
-         entryMap = Collections.synchronizedMap(new HashMap());
-      else
-         entryMap = new HashMap();
-      now = System.currentTimeMillis();
-   }
-   /** Schedules this with the class resolutionTimer Timer object for
-       execution every resolution seconds.
-   */
-   public void start()
-   {
-      theTimer = new ResolutionTimer();
-      resolutionTimer.scheduleAtFixedRate(theTimer, 0, 1000*resolution);
-   }
-   /** Stop cancels the resolution timer and flush()es the cache.
-    */
-   public void stop() 
-   {
-      theTimer.cancel();
-      flush();
-   }
-   /** Clears the cache of all entries.
-    */
-   public void destroy() 
-   {
-      entryMap.clear();
-   }
-
-   // --- Begin CachePolicy interface methods
-   /** Get the cache value for key if it has not expired. If the TimedEntry
-    is expired its destroy method is called and then removed from the cache.
-    @return the TimedEntry value or the original value if it was not an
-       instance of TimedEntry if key is in the cache, null otherwise.
-   */
-   public Object get(Object key) 
-   {
-      TimedEntry entry = (TimedEntry) entryMap.get(key);
-      if( entry == null )
-         return null;
-
-      if( entry.isCurrent(now) == false )
-      {   // Try to refresh the entry
-         if( entry.refresh() == false )
-         {   // Failed, remove the entry and return null
-            entry.destroy();
-            entryMap.remove(key);
-            return null;
-         }
-      }
-      Object value = entry.getValue();
-      return value;
-   }
-   /** Get the cache value for key. This method does not check to see if
-       the entry has expired.
-       @return the TimedEntry value or the original value if it was not an
-       instancee of TimedEntry if key is in the cache, null otherwise.
-   */
-   public Object peek(Object key) 
-   {
-      TimedEntry entry = (TimedEntry) entryMap.get(key);
-      Object value = null;
-      if( entry != null )
-         value = entry.getValue();
-      return value;
-   }
-   /** Insert a value into the cache. In order to have the cache entry
-       reshresh itself value would have to implement TimedEntry and
-       implement the required refresh() method logic.
-       @param key - the key for the cache entry
-       @param value - Either an instance of TimedEntry that will be inserted without
-       change, or an abitrary value that will be wrapped in a non-refreshing
-       TimedEntry.
-   */
-   public void insert(Object key, Object value) 
-   {
-      if( entryMap.containsKey(key) )
-         throw new IllegalStateException("Attempt to insert duplicate entry");
-      TimedEntry entry = null;
-      if( (value instanceof TimedEntry) == false )
-      {   // Wrap the value in a DefaultTimedEntry
-         entry = new DefaultTimedEntry(defaultLifetime, value);
-      }
-      else
-      {
-         entry = (TimedEntry) value;
-      }
-      entry.init(now);
-      entryMap.put(key, entry);
-   }
-   /** Remove the entry associated with key and call destroy on the entry
-    if found.
-    */
-   public void remove(Object key) 
-   {
-      TimedEntry entry = (TimedEntry) entryMap.remove(key);
-      if( entry != null )
-         entry.destroy();
-   }
-   /** Remove all entries from the cache.
-    */
-   public void flush() 
-   {
-      Map tmpMap = null;
-      synchronized( this )
-      {
-         tmpMap = entryMap;
-         if( threadSafe )
-            entryMap = Collections.synchronizedMap(new HashMap());
-         else
-            entryMap = new HashMap();
-      }
-
-      // Notify the entries of their removal
-      Iterator iter = tmpMap.values().iterator();
-      while( iter.hasNext() )
-      {
-         TimedEntry entry = (TimedEntry) iter.next();
-         entry.destroy();
-      }
-      tmpMap.clear();
-   }
-
-   public int size()
-   {
-      return entryMap.size();
-   }
-   // --- End CachePolicy interface methods
-
-   /** Get the list of keys for entries that are not expired.
-    *
-    * @return A List of the keys corresponding to valid entries
-    */
-   public List getValidKeys()
-   {
-      ArrayList validKeys = new ArrayList();
-      synchronized( entryMap )
-      {
-         Iterator iter = entryMap.entrySet().iterator();
-         while( iter.hasNext() )
-         {
-            Map.Entry entry = (Map.Entry) iter.next();
-            TimedEntry value = (TimedEntry) entry.getValue();
-            if( value.isCurrent(now) == true )
-               validKeys.add(entry.getKey());
-         }
-      }
-      return validKeys;
-   }
-
-   /** Get the default lifetime of cache entries.
-    @return default lifetime in seconds of cache entries.
-    */
-   public int getDefaultLifetime()
-   {
-      return defaultLifetime;
-   }
-   /** Set the default lifetime of cache entries for new values added to the cache.
-    @param defaultLifetime - lifetime in seconds of cache values that do
-    not implement TimedEntry.
-    */
-   public synchronized void setDefaultLifetime(int defaultLifetime)
-   {
-      this.defaultLifetime = defaultLifetime;
-   }
-
-   /**
-    * Get the frequency of the current time snapshot.
-    * @return the current timer resolution in seconds.
-    */ 
-   public int getResolution()
-   {
-      return resolution;
-   }
-   /** Set the cache timer resolution
-    * 
-    @param resolution - the resolution in seconds of the cache timer. A cache does
-    not query the system time on every get() invocation. Rather the cache
-    updates its notion of the current time every 'resolution' seconds.
-    */ 
-   public synchronized void setResolution(int resolution)
-   {
-      if( resolution <= 0 )
-         resolution = 60;
-      if( resolution != this.resolution )
-      {
-         this.resolution = resolution;
-         theTimer.cancel();
-         theTimer = new ResolutionTimer();
-         resolutionTimer.scheduleAtFixedRate(theTimer, 0, 1000*resolution);
-      }
-   }
-
-   /** The TimerTask run method. It updates the cache time to the
-       current system time.
-   */
-   public void run()
-   {
-      now = System.currentTimeMillis();
-   }
-
-   /** Get the cache time.
-       @return the cache time last obtained from System.currentTimeMillis()
-   */
-   public long currentTimeMillis()
-   {
-      return now;
-   }
-
-   /** Get the raw TimedEntry for key without performing any expiration check.
-       @return the TimedEntry value associated with key if one exists, null otherwise.
-   */
-   public TimedEntry peekEntry(Object key) 
-   {
-      TimedEntry entry = (TimedEntry) entryMap.get(key);
-      return entry;
-   }
-
-   /** The default implementation of TimedEntry used to wrap non-TimedEntry
-       objects inserted into the cache.
-   */
-   static class DefaultTimedEntry implements TimedEntry
-   {
-      long expirationTime;
-      Object value;
-
-      DefaultTimedEntry(long lifetime, Object value)
-      {
-         this.expirationTime = 1000 * lifetime;
-         this.value = value;
-      }
-      public void init(long now)
-      {
-         expirationTime += now;
-      }
-      public boolean isCurrent(long now)
-      {
-         return expirationTime > now;
-      }
-      public boolean refresh()
-      {
-         return false;
-      }
-      public void destroy()
-      {
-      }
-      public Object getValue()
-      {
-         return value;
-      }        
-   }
-
-   /**
-    
-    */
-   private class ResolutionTimer extends TimerTask
-   {
-      public void run()
-      {
-         TimedCachePolicy.this.run();
-      }
-   }
-}
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimedCachePolicy.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/TimedCachePolicy.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerQueue.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/TimerQueue.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerQueue.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,198 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * This class runs in a single thread {@link TimerTask}s that have been 
- * scheduled. <p>
- * A similar class is present in java.util package of jdk version >= 1.3;
- * for compatibility with jdk 1.2 it is reimplemented here.
- *
- * @see TimerTask
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public class TimerQueue 
-   extends WorkerQueue
-{
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-   /* This member is accessed only from putJob and getJob, that will 
-      then guarantee necessary synchronization on it */
-   private Heap m_heap;
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-   /**
-    * Creates a new timer queue with default thread name of "TimerTask Thread"
-    */
-   public TimerQueue() 
-   {
-      this("TimerTask Thread");
-   }
-   /**
-    * Creates a new timer queue with the specified thread name
-    */
-   public TimerQueue(String threadName) 
-   {
-      super(threadName);
-      m_heap = new Heap();
-   }
-
-   // Public --------------------------------------------------------
-   /**
-    * Schedules the given TimerTask for immediate execution.
-    */
-   public void schedule(TimerTask t) 
-   {
-      schedule(t, 0);
-   }
-   /**
-    * Schedule the given TimerTask to be executed after <code>delay</code>
-    * milliseconds.
-    */
-   public void schedule(TimerTask t, long delay) 
-   {
-      if (t == null) throw new IllegalArgumentException("Can't schedule a null TimerTask");
-      if (delay < 0) delay = 0;
-      t.setNextExecutionTime(System.currentTimeMillis() + delay);
-      putJob(t);
-   }
-
-   // Z implementation ----------------------------------------------
-
-   // WorkerQueue overrides ---------------------------------------------------
-   protected void putJobImpl(Executable task) 
-   {
-      m_heap.insert(task);
-      ((TimerTask)task).setState(TimerTask.SCHEDULED);
-      notifyAll();
-   }
-   protected Executable getJobImpl() throws InterruptedException
-   {
-      while (m_heap.peek() == null) 
-      {
-         wait();
-      }
-      TimerTask task = (TimerTask)m_heap.extract();
-      switch (task.getState())
-      {
-       case TimerTask.CANCELLED:
-       case TimerTask.EXECUTED:
-          //don't hold onto last dead task if we wait.
-          task = null;
-          return getJobImpl();
-       case TimerTask.NEW:
-       case TimerTask.SCHEDULED:
-          return task;
-       default:
-          throw new IllegalStateException("TimerTask has an illegal state");
-      }
-   }
-   protected Runnable createQueueLoop() 
-   {
-      return new TimerTaskLoop();
-   }
-   protected void clear() 
-   {
-      super.clear();
-      synchronized (this) 
-      {
-         m_heap.clear();
-      }
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-   /**
-    * Class that loops getting the next job to be executed and then 
-    * executing it, in the timer task thread.
-    */
-   protected class TimerTaskLoop implements Runnable 
-   {
-      public void run() 
-      {
-         try
-         {
-            while (true) 
-            {
-               try 
-               {
-                  // Wait for the first job
-                  TimerTask task = (TimerTask)getJob();
-                  long now = System.currentTimeMillis();
-                  long executionTime = task.getNextExecutionTime();
-                  long timeToWait = executionTime - now;
-                  boolean runTask = timeToWait <= 0;
-                  if (!runTask)
-                  {
-                     // Entering here when a new job is scheduled but
-                     // it's not yet time to run the first one;
-                     // the job was extracted from the heap, reschedule
-                     putJob(task);
-                     Object mutex = TimerQueue.this;
-                     synchronized (mutex)
-                     {
-                        // timeToWait is always strictly > 0, so I don't wait forever
-                        mutex.wait(timeToWait);
-                     }
-                  }
-                  else
-                  {
-                     if (task.isPeriodic())
-                     {
-                        // Reschedule with the new time
-                        task.setNextExecutionTime(executionTime + task.getPeriod());
-                        putJob(task);
-                     }
-                     else
-                     {
-                        // The one-shot task is already removed from 
-                        // the heap, mark it as executed
-                        task.setState(TimerTask.EXECUTED);
-                     }
-                     // Run it !
-                     task.execute();
-                  }
-               }
-               catch (InterruptedException x)
-               {
-                  // Exit the thread
-                  break;
-               }
-               catch (Exception e)
-               {
-                  ThrowableHandler.add(ThrowableHandler.Type.ERROR, e);
-               }
-            }
-         }
-         finally	{clear();}
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerQueue.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/TimerQueue.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerTask.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/TimerTask.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerTask.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,165 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * A class that represent a task that can be scheduled for one-shot or
- * repeated execution by a {@link TimerQueue}. <p>
- * A similar class is present in java.util package of jdk version >= 1.3;
- * for compatibility with jdk 1.2 we reimplemented it.
- *
- * @see TimerQueue
- * 
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public abstract class TimerTask 
-   implements Executable, Comparable
-{
-   /** The state before the first execution */
-   static final int NEW = 1;
-   /** The state after first execution if the TimerTask is repeating */
-   static final int SCHEDULED = 2;
-   /** The state after first execution if the TimerTask is not repeating */
-   static final int EXECUTED = 3;
-   /** The state when cancelled */
-   static final int CANCELLED = 4;
-
-   // Attributes ----------------------------------------------------
-   private final Object m_lock = new Object();
-   private int m_state;
-   // this is a constant, and need not be locked
-   private final long m_period;
-   private long m_nextExecutionTime;
-
-   /**
-    * Creates a TimerTask object that will be executed once.
-    */
-   protected TimerTask() 
-   {
-      m_state = NEW;
-      m_period = 0;
-   }
-   
-   /**
-    * Creates a TimerTask object that will be executed every <code>period</code>
-    * milliseconds. <p>
-    * @param period the execution period; if zero, will be executed only once.
-    */
-   protected TimerTask(long period) 
-   {
-      m_state = NEW;
-      if (period < 0) throw new IllegalArgumentException("Period can't be negative");
-      m_period = period;
-   }
-
-   /**
-    * Cancels the next execution of this TimerTask (if any). <br>
-    * If the TimerTask is executing it will prevent the next execution (if any).
-    * @returns true if one or more scheduled execution will not take place,
-    * false otherwise.
-    */
-   public boolean cancel() 
-   {
-      synchronized (getLock()) 
-      {
-         boolean ret = (m_state == SCHEDULED);
-         m_state = CANCELLED;
-         return ret;
-      }
-   }
-
-   // Executable implementation ---------------------------------------
-
-   /**
-    * The task to be executed, to be implemented in subclasses.
-    */
-   public abstract void execute() throws Exception;
-
-   // Comparable implementation ---------------------------------------
-   
-   /**
-    * A TimerTask is less than another if it will be scheduled before.
-    * @throws ClassCastException if other is not a TimerTask, according to the Comparable contract
-    */
-   public int compareTo(Object other)
-   {
-      if (other == this) return 0;
-      TimerTask t = (TimerTask) other;
-      long diff = getNextExecutionTime() - t.getNextExecutionTime();
-      return (int) diff;
-   }
-
-   /** Returns the mutex that syncs the access to this object */
-   Object getLock() 
-   {
-      return m_lock;
-   }
-   
-   /** Sets the state of execution of this TimerTask */
-   void setState(int state) 
-   {
-      synchronized (getLock())
-      {
-         m_state = state;
-      }
-   }
-   
-   /** Returns the state of execution of this TimerTask */
-   int getState() 
-   {
-      synchronized (getLock())
-      {
-         return m_state;
-      }
-   }
-   
-   /** Returns whether this TimerTask is periodic */
-   boolean isPeriodic() 
-   {
-      return m_period > 0;
-   }
-   
-   /** Returns the next execution time for this TimerTask */
-   long getNextExecutionTime() 
-   {
-      synchronized (getLock())
-      {
-         return m_nextExecutionTime;
-      }
-   }
-   
-   /** Sets the next execution time for this TimerTask */
-   void setNextExecutionTime(long time) 
-   {
-      synchronized (getLock())
-      {
-         m_nextExecutionTime = time;
-      }
-   }
-
-   /** Returns the period of this TimerTask */
-   protected long getPeriod() 
-   {
-      return m_period;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/TimerTask.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/TimerTask.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnexpectedThrowable.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/UnexpectedThrowable.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnexpectedThrowable.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,72 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Thrown to indicate that a Throwable was caught but was not expected.
- * This is typical when catching Throwables to handle and rethrow Exceptions
- * and Errors.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class UnexpectedThrowable
-   extends NestedError
-{
-   /**
-    * Construct a <tt>UnexpectedThrowable</tt> with the specified 
-    * detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public UnexpectedThrowable(final String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <tt>UnexpectedThrowable</tt> with the specified
-    * detail message and nested <tt>Throwable</tt>.
-    *
-    * @param msg     Detail message.
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public UnexpectedThrowable(final String msg, final Throwable nested) {
-      super(msg, nested);
-   }
-
-   /**
-    * Construct a <tt>UnexpectedThrowable</tt> with the specified
-    * nested <tt>Throwable</tt>.
-    *
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public UnexpectedThrowable(final Throwable nested) {
-      super(nested);
-   }
-
-   /**
-    * Construct a <tt>UnexpectedThrowable</tt> with no detail.
-    */
-   public UnexpectedThrowable() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnexpectedThrowable.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/UnexpectedThrowable.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnreachableStatementException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/UnreachableStatementException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnreachableStatementException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,49 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Thrown to indicate that section of code that should never have been
- * reachable, has just been reached.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class UnreachableStatementException 
-   extends RuntimeException
-{
-   /**
-    * Construct a <tt>UnreachableStatementException</tt> with a detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public UnreachableStatementException(final String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <tt>UnreachableStatementException</tt> with no detail.
-    */
-   public UnreachableStatementException() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/UnreachableStatementException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/UnreachableStatementException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSemaphore.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/WaitSemaphore.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSemaphore.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,95 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Wait exclusive semaphore with wait - notify primitives
- *
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public class WaitSemaphore
-   extends Semaphore
-   implements WaitSync
-{
-   // Constants -----------------------------------------------------
-   private final static int MAX_USERS_ALLOWED = 1;
-
-   // Attributes ----------------------------------------------------
-   private int m_waiters;
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-   public WaitSemaphore()
-   {
-      super(MAX_USERS_ALLOWED);
-   }
-
-   // Public --------------------------------------------------------
-   public void doWait() throws InterruptedException
-   {
-      synchronized (this)
-      {
-         release();
-         ++m_waiters;
-         waitImpl(this);
-         --m_waiters;
-         acquire();
-      }
-   }
-
-   public void doNotify() throws InterruptedException
-   {
-      synchronized (this)
-      {
-         if (getWaiters() > 0)
-         {
-            acquire();
-            notify();
-            release();
-         }
-      }
-   }
-
-   public int getWaiters()
-   {
-      synchronized (this)
-      {
-         return m_waiters;
-      }
-   }
-
-   // Object overrides ---------------------------------------------------
-   public String toString()
-   {
-      return super.toString() + " - " + m_waiters;
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSemaphore.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/WaitSemaphore.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSync.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/WaitSync.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSync.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,48 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Interface that gives wait - notify primitives to implementors.
- *
- * @see Semaphore
- * 
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public interface WaitSync
-   extends Sync
-{
-   /**
-    * Pone in wait status this sync, until {@link #doNotify} is called to wake it up.
-    * 
-    * @see #doNotify
-    */
-   void doWait() throws InterruptedException;
-   
-   /**
-    * Wakes up this sync that has been posed in wait status by a {@link #doWait} call.
-    * If this sync is not waiting, invoking this method should have no effect.
-    * @see #doWait
-    */
-   void doNotify() throws InterruptedException;
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WaitSync.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/WaitSync.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WeakObject.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/WeakObject.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WeakObject.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,123 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-import java.lang.ref.WeakReference;
-import java.lang.ref.ReferenceQueue;
-
-/**
- * Convenience class to wrap an <tt>Object</tt> into a <tt>WeakReference</tt>.
- *
- * <p>Modified from <tt>java.util.WeakHashMap.WeakKey</tt>.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class WeakObject
-   extends WeakReference
-{
-   /** The hash code of the nested object */
-   protected final int hashCode;
-   
-   /**
-    * Construct a <tt>WeakObject</tt>.
-    *
-    * @param obj  Object to reference.
-    */
-   public WeakObject(final Object obj) {
-      super(obj);
-      hashCode = obj.hashCode();
-   }
-   
-   /**
-    * Construct a <tt>WeakObject</tt>.
-    *
-    * @param obj     Object to reference.
-    * @param queue   Reference queue.
-    */
-   public WeakObject(final Object obj, final ReferenceQueue queue) {
-      super(obj, queue);
-      hashCode = obj.hashCode();
-   }
-   
-   /**
-    * Check the equality of an object with this.
-    *
-    * @param obj  Object to test equality with.
-    * @return     True if object is equal.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         WeakObject soft = (WeakObject)obj;
-         
-         Object a = this.get();
-         Object b = soft.get();
-         if (a == null || b == null) return false;
-         if (a == b) return true;
-
-         return a.equals(b);
-      }
-
-      return false;
-   }
-   
-   /**
-    * Return the hash code of the nested object.
-    *
-    * @return  The hash code of the nested object.
-    */
-   public int hashCode() {
-      return hashCode;
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Factory Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Create a <tt>WeakObject</tt> for the given object.
-    *
-    * @param obj     Object to reference.
-    * @return        <tt>WeakObject</tt> or <tt>null</tt> if object is null.
-    */
-   public static WeakObject create(final Object obj) {
-      if (obj == null) return null;
-      else return new WeakObject(obj);
-   }
-   
-   /**
-    * Create a <tt>WeakObject</tt> for the given object.
-    *
-    * @param obj     Object to reference.
-    * @param queue   Reference queue.
-    * @return        <tt>WeakObject</tt> or <tt>null</tt> if object is null.
-    */
-   public static WeakObject create(final Object obj,
-                                   final ReferenceQueue queue)
-   {
-      if (obj == null) return null;
-      else return new WeakObject(obj, queue);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WeakObject.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/WeakObject.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WorkerQueue.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/WorkerQueue.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WorkerQueue.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,262 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util;
-
-/**
- * Class that queues {@link Executable} jobs that are executed sequentially 
- * by a single thread.
- *
- * @see Executable
- * 
- * @author <a href="mailto:simone.bordet at compaq.com">Simone Bordet</a>
- * @version $Revision$
- */
-public class WorkerQueue
-{
-   /** The thread that runs the Executable jobs */
-   protected Thread m_queueThread;
-   
-   /** The job that will be executed by the worker thread */
-   private JobItem m_currentJob;
-
-   /**
-    * Creates a new worker queue with default thread name of "Worker Thread"
-    */
-   public WorkerQueue() 
-   {
-      this("Worker Thread");
-   }
-
-   /**
-    * Creates a new worker queue with the specified thread name
-    */
-   public WorkerQueue(String threadName) 
-   {
-      m_queueThread = new Thread(createQueueLoop(), threadName);
-   }
-   
-   /**
-    * Creates a new worker queue with the specified thread name
-    * and daemon mode flag
-    */
-   public WorkerQueue(String threadName, boolean isDaemon) 
-   {
-      m_queueThread = new Thread(createQueueLoop(), threadName);
-      m_queueThread.setDaemon(isDaemon);
-   }
-
-   /**
-    * Starts the worker queue.
-    * @see #stop
-    */
-   public void start() 
-   {
-      if (m_queueThread != null) {m_queueThread.start();}
-   }
-
-   /**
-    * Stops nicely the worker queue. <br> 
-    * After this call trying to put a new job will result in a 
-    * InterruptedException to be thrown. The jobs queued before and not 
-    * yet processed are processed until the queue is empty, then this 
-    * worker queue is cleared.
-    * @see #clear
-    * @see #start
-    * @see #isInterrupted
-    */
-   public synchronized void stop() 
-   {
-      if (m_queueThread != null) {m_queueThread.interrupt();}
-   }
-   
-   /**
-    * Called by a thread that is not the WorkerQueue thread, this method 
-    * queues the job and, if necessary, wakes up this worker queue that is 
-    * waiting in {@link #getJob}.
-    */
-   public synchronized void putJob(Executable job)
-   {
-      // Preconditions
-      if (m_queueThread == null || !m_queueThread.isAlive()) {
-         throw new IllegalStateException("Can't put job, thread is not alive or not present");
-      }
-      
-      if (isInterrupted()) {
-         throw new IllegalStateException("Can't put job, thread was interrupted");
-      }
-        
-      putJobImpl(job);
-   }
-   
-   /**
-    * Returns whether the worker thread has been interrupted. <br>
-    * When this method returns true, it is not possible to put new jobs in the
-    * queue and the already present jobs are executed and removed from the 
-    * queue, then the thread exits.
-    * 
-    * @see #stop
-    */
-   protected boolean isInterrupted() 
-   {
-      return m_queueThread.isInterrupted();
-   }
-
-   /**
-    * Called by this class, this method checks if the queue is empty; 
-    * if it is, then waits, else returns the current job.
-    * 
-    * @see #putJob
-    */
-   protected synchronized Executable getJob() throws InterruptedException
-   {
-      // Preconditions
-      if (m_queueThread == null || !m_queueThread.isAlive()) {
-         throw new IllegalStateException();
-      }
-        
-      return getJobImpl();
-   }
-   
-   /**
-    * Never call this method, only override in subclasses to perform
-    * job getting in a specific way, normally tied to the data structure 
-    * holding the jobs.
-    */
-   protected Executable getJobImpl() throws InterruptedException
-   {
-      // While the queue is empty, wait();
-      // when notified take an event from the queue and return it.
-      while (m_currentJob == null) {wait();}
-      // This one is the job to return
-      JobItem item = m_currentJob;
-      // Go on to the next object for the next call. 
-      m_currentJob = m_currentJob.m_next;
-      return item.m_job;
-   }
-   
-   /**
-    * Never call this method, only override in subclasses to perform
-    * job adding in a specific way, normally tied to the data structure
-    * holding the jobs.
-    */
-   protected void putJobImpl(Executable job) 
-   {
-      JobItem posted = new JobItem(job);      
-      if (m_currentJob == null) 
-      {
-         // The queue is empty, set the current job to process and
-         // wake up the thread waiting in method getJob
-         m_currentJob = posted;
-         notifyAll();
-      }
-      else 
-      {
-         JobItem item = m_currentJob;
-         // The queue is not empty, find the end of the queue ad add the
-         // posted job at the end
-         while (item.m_next != null) {item = item.m_next;}
-         item.m_next = posted;           
-      }
-   }
-
-   /**
-    * Clears the running thread after the queue has been stopped. <br> 
-    * After this call, this worker queue is unusable and can be garbaged.
-    */
-   protected void clear() 
-   {
-      m_queueThread = null;
-      m_currentJob = null;
-   }
-   
-   /**
-    * Creates the loop that will get the next job and process it. <br>
-    * Override in subclasses to create a custom loop.
-    */
-   protected Runnable createQueueLoop() {
-      return new QueueLoop();
-   }
-   
-   /**
-    * Class that loops getting the next job to be executed and then 
-    * executing it, in the worker thread.
-    */
-   protected class QueueLoop
-      implements Runnable 
-   {
-      public void run() 
-      {
-         try
-         {
-            while (true) 
-            {
-               try 
-               {
-                  if (isInterrupted()) 
-                  {
-                     flush();
-                     break;
-                  }
-                  else 
-                  {
-                     getJob().execute();
-                  }
-               }
-               catch (InterruptedException e) 
-               {
-                  try {
-                     flush();
-                  }
-                  catch (Exception ignored) {}
-                  break;
-               }
-               catch (Exception e) {
-                  ThrowableHandler.add(ThrowableHandler.Type.ERROR, e);
-               }
-            }
-         }
-         finally {
-            clear();
-         }
-      }
-      
-      protected void flush() throws Exception
-      {
-         // Empty the queue of the posted jobs and exit
-         while (m_currentJob != null) 
-         {
-            m_currentJob.m_job.execute();
-            m_currentJob = m_currentJob.m_next;
-         }
-      }
-   }
-   
-   /**
-    * Simple linked cell, that has only a reference to the next job.
-    */
-   private class JobItem 
-   {
-      private Executable m_job;
-      private JobItem m_next;
-      private JobItem(Executable job) {m_job = job;}
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/WorkerQueue.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/WorkerQueue.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/AbstractQueue.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/AbstractQueue.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/AbstractQueue.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,159 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.AbstractCollection;
-
-/**
- * An abstract implementation of a Queue.  Sub-classes must provide methods
- * for <code>addLast(Object)</code> and <code>removeFirst()</code>.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public abstract class AbstractQueue
-   extends AbstractCollection
-   implements Queue
-{
-   /** Default maximum queue size */
-   public static int DEFAULT_MAXIMUM_SIZE = UNLIMITED_MAXIMUM_SIZE;
-
-   /** Maximum queue size */
-   protected int maximumSize = DEFAULT_MAXIMUM_SIZE;
-
-   /**
-    * Initializes the AbstractQueue.
-    */
-   protected AbstractQueue() {}
-
-   /**
-    * Initializes the AbstractQueue.
-    *
-    * @param maxSize    Maximum queue size.
-    *
-    * @exception IllegalArgumentException    Illegal size.
-    */
-   protected AbstractQueue(final int maxSize) {
-      setMaximumSize(maxSize);
-   }
-
-   /**
-    * Get the maximum size of the queue.
-    *
-    * @return  Maximum queue size or {@link #UNLIMITED_MAXIMUM_SIZE}.
-    */
-   public int getMaximumSize() {
-      return maximumSize;
-   }
-
-   /**
-    * Set the maximum size of the queue
-    *
-    * @param size    New maximim queue size or {@link #UNLIMITED_MAXIMUM_SIZE}.
-    *
-    * @exception IllegalArgumentException    Illegal size.
-    */
-   public void setMaximumSize(final int size) {
-      if (size < 0 && size != UNLIMITED_MAXIMUM_SIZE)
-         throw new IllegalArgumentException("illegal size: " + size);
-
-      maximumSize = size;
-   }
-
-   /**
-    * Check if the queue is full.
-    *
-    * @return  True if the queue is full.
-    */
-   public boolean isFull() {
-      if (maximumSize != UNLIMITED_MAXIMUM_SIZE && size() >= maximumSize)
-         return true;
-
-      return false;
-   }
-
-   /**
-    * Check if the queue is empty.
-    *
-    * @return True if the queue is empty.
-    */
-   public boolean isEmpty() {
-      if (size() <= 0)
-         return true;
-
-      return false;
-   }
-
-   /**
-    * Append and object to the underling list.
-    *
-    * @param obj     Object to enqueue.
-    * @return        True if collection was modified.
-    *
-    * @exception FullCollectionException     The queue is full.
-    */
-   public boolean add(Object obj) throws FullCollectionException {
-      if (isFull())
-         throw new FullCollectionException();
-
-      return addLast(obj);
-   }
-
-   /**
-    * Remove and return the first object in the queue.
-    *
-    * @return  Dequeued object.
-    *
-    * @exception EmptyCollectionException    The queue is empty.
-    */
-   public Object remove() throws EmptyCollectionException {
-      if (isEmpty())
-         throw new EmptyCollectionException();
-
-      return removeFirst();
-   }
-
-   /**
-    * Removes all of the elements from this queue
-    */
-   public void clear() {
-      while (!isEmpty()) {
-         remove();
-      }
-   }
-
-   /**
-    * Appends the given element to the end of the queue
-    *
-    * @param obj  Object to append
-    * @return     Per Collection.add(), we return a boolean to indicate if
-    *             the object modified the collection.
-    */
-   protected abstract boolean addLast(Object obj);
-
-   /**
-    * Remove the first object in the queue
-    *
-    * @return  First object in the queue
-    */
-   protected abstract Object removeFirst();
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/AbstractQueue.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/AbstractQueue.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ArrayIterator.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/ArrayIterator.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ArrayIterator.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,103 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import java.io.Serializable;
-
-import org.jboss.util.NullArgumentException;
-
-/**
- * An array iterator.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class ArrayIterator
-   implements Iterator, Serializable, Cloneable
-{
-   /** Array to iterate over. */
-   protected final Object[] array;
-
-   /** The current position in the array. */
-   protected int index;
-
-   /**
-    * Construct an ArrayIterator.
-    *
-    * @param array   The array to iterate over.
-    */
-   public ArrayIterator(final Object[] array) {
-      if (array == null)
-         throw new NullArgumentException("array");
-
-      this.array = array;
-   }
-
-   /**
-    * Returns true if there are more elements in the iteration.
-    *
-    * @return  True if there are more elements in the iteration.
-    */
-   public boolean hasNext() {
-      return index < array.length;
-   }
-
-   /**
-    * Returns the next element in the iteration.
-    *
-    * @return  The next element in the iteration.
-    *
-    * @throws NoSuchElementException   The are no more elements available.
-    */
-   public Object next() {
-      if (! hasNext())
-         throw new NoSuchElementException();
-
-      return array[index++];
-   }
-
-   /**
-    * Unsupported.
-    *
-    * @throws UnsupportedOperationException
-    */
-   public void remove() {
-      throw new UnsupportedOperationException();
-   }
-
-   /**
-    * Returns a shallow cloned copy of this object.
-    *
-    * @return  A shallow cloned copy of this object.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ArrayIterator.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/ArrayIterator.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedCollection.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CachedCollection.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedCollection.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,149 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.Collection;
-import java.util.AbstractCollection;
-import java.util.Iterator;
-
-import java.lang.ref.ReferenceQueue;
-
-import org.jboss.util.SoftObject;
-import org.jboss.util.Objects;
-
-/**
- * A wrapper around a <code>Collection</code> which translates added objects
- * into {@link SoftObject} references, allowing the VM to garbage collect
- * objects in the collection when memory is low.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class CachedCollection
-   extends AbstractCollection
-{
-   /** Reference queue */
-   protected final ReferenceQueue queue = new ReferenceQueue();
-
-   /** Wrapped collection */
-   protected final Collection collection;
-
-   /**
-    * Construct a CachedCollection.
-    *
-    * @param collection    Collection to wrap.
-    */
-   public CachedCollection(final Collection collection) {
-      this.collection = collection;
-   }
-
-   /**
-    * Returns an iterator over the elements contained in this collection.
-    *
-    * @return An iterator over the elements contained in this collection.
-    */
-   public Iterator iterator() {
-      maintain();
-      return new MyIterator(collection.iterator());
-   }
-
-   /**
-    * Returns the size of the collection.
-    *
-    * @return  The number of elements in the collection.
-    */
-   public int size() {
-      maintain();
-      return collection.size();
-   }
-
-   /**
-    * Add an object to the collection.
-    *
-    * @param obj  Object (or <i>null</i> to add to the collection.
-    * @return     True if object was added.
-    */
-   public boolean add(final Object obj) {
-      maintain();
-
-      SoftObject soft = SoftObject.create(obj, queue);
-      
-      return collection.add(soft);
-   }
-
-   /**
-    * Maintains the collection by removing garbage collected objects.
-    */
-   private void maintain() {
-      SoftObject obj;
-      int count = 0;
-
-      while ((obj = (SoftObject)queue.poll()) != null) {
-         count++;
-         collection.remove(obj);
-      }
-
-      if (count != 0) {
-         // some temporary debugging fluff
-         System.err.println("vm reclaimed " + count + " objects");
-      }
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                       De-Referencing Iterator                       //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * A dereferencing iterator.
-    */
-   private final class MyIterator
-      implements Iterator
-   {
-      private final Iterator iter;
-
-      public MyIterator(final Iterator iter) {
-         this.iter = iter;
-      }
-
-      public boolean hasNext() {
-         maintain();
-         return iter.hasNext();
-      }
-
-      private Object nextObject() {
-         Object obj = iter.next();
-
-         return Objects.deref(obj);
-      }
-
-      public Object next() {
-         maintain();
-         return nextObject();
-      }
-
-      public void remove() {
-         maintain();
-         iter.remove();
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedCollection.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CachedCollection.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedList.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CachedList.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedList.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,162 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.List;
-import java.util.LinkedList;
-import java.util.AbstractList;
-
-import java.lang.ref.ReferenceQueue;
-
-import org.jboss.util.SoftObject;
-import org.jboss.util.Objects;
-
-/**
- * A wrapper around a <code>List</code> which translates added objects
- * into {@link SoftObject} references, allowing the VM to garbage collect
- * objects in the collection when memory is low.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class CachedList
-   extends AbstractList
-{
-   /** Reference queue. */
-   protected final ReferenceQueue queue = new ReferenceQueue();
-
-   /** Wrapped list. */
-   protected final List list;
-
-   /**
-    * Construct a <tt>CachedList</tt>.
-    *
-    * @param list    List to wrap.
-    */
-   public CachedList(final List list) {
-      this.list = list;
-   }
-
-   /**
-    * Construct a <tt>CachedList</tt> using a <tt>LinkedList</tt> for
-    * storage.
-    */
-   public CachedList() {
-      this(new LinkedList());
-   }
-
-   /**
-    * Dereference the object at the given index.
-    */
-   private Object getObject(final int index) {
-      Object obj = list.get(index);
-
-      return Objects.deref(obj);
-   }
-
-   /**
-    * Returns the element at the specified position in this list.
-    *
-    * @param index   Index of element to return.
-    * @return        The element at the specified position.
-    */
-   public Object get(final int index) {
-      maintain();
-      return getObject(index);
-   }
-
-   /**
-    * Return the size of the list.
-    *
-    * @return  The number of elements in the list.
-    */
-   public int size() {
-      maintain();
-      return list.size();
-   }
-
-   /**
-    * Replaces the element at the specified position in this list with the 
-    * specified element.
-    *
-    * @param index   Index of element to replace.
-    * @param obj     Element to be stored at the specified postion.
-    * @return        The previous element at the given index.
-    */
-   public Object set(final int index, final Object obj) {
-      maintain();
-      
-      SoftObject soft = SoftObject.create(obj, queue);
-      soft = (SoftObject)list.set(index, soft);
-
-      return Objects.deref(soft);
-   }
-
-   /**
-    * Inserts the specified element at the specified position in this list
-    * (optional operation). Shifts the element currently at that position
-    * (if any) and any subsequent elements to the right (adds one to their
-    * indices).
-    *
-    * @param index   Index at which the specified element is to be inserted.
-    * @param obj     Element to be inserted.
-    */
-   public void add(final int index, final Object obj) {
-      maintain();
-
-      SoftObject soft = SoftObject.create(obj, queue);
-      list.add(index, soft);
-   }
-
-   /**
-    * Removes the element at the specified position in this list (optional
-    * operation). Shifts any subsequent elements to the left (subtracts one
-    * from their indices). Returns the element that was removed from the list.
-    *
-    * @param index   The index of the element to remove.
-    * @return        The element previously at the specified position.
-    */
-   public Object remove(final int index) {
-      maintain();
-
-      Object obj = list.remove(index);
-      return Objects.deref(obj);
-   }
-
-   /**
-    * Maintains the collection by removing garbage collected objects.
-    */
-   private void maintain() {
-      SoftObject obj;
-      int count = 0;
-
-      while ((obj = (SoftObject)queue.poll()) != null) {
-         count++;
-         list.remove(obj);
-      }
-
-      if (count != 0) {
-         // some temporary debugging fluff
-         System.err.println("vm reclaimed " + count + " objects");
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CachedList.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CachedList.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,49 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-/**
- * A generic collection exception.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class CollectionException
-   extends RuntimeException
-{
-   /**
-    * Construct a <code>CollectionException</code> with the specified 
-    * detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public CollectionException(String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <code>CollectionException</code> with no detail.
-    */
-   public CollectionException() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,91 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.util.collection.LazyList;
-import org.jboss.util.collection.LazyMap;
-import org.jboss.util.collection.LazySet;
-
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
-import EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList;
-import EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArraySet;
-
-/**
- * Collections factory.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class CollectionsFactory
-{
-   /**
-    * Defines the map implementation
-    */
-   public static final Map createLazyMap()
-   {
-      return new LazyMap();
-   }
-
-   /**
-    * Defines the list implementation
-    */
-   public static final List createLazyList()
-   {
-      return new LazyList();
-   }
-
-   /**
-    * Defines the set implementation
-    */
-   public static final Set createLazySet()
-   {
-      return new LazySet();
-   }
-
-   /**
-    * Defines the concurrent map implementation
-    */
-   public static final Map createConcurrentReaderMap()
-   {
-      return new ConcurrentReaderHashMap();
-   }
-
-   /**
-    * Defines the concurrent list implementation
-    */
-   public static final List createCopyOnWriteList()
-   {
-      return new CopyOnWriteArrayList();
-   }
-
-   /**
-    * Defines the concurrent set implementation
-    */
-   public static final Set createCopyOnWriteSet()
-   {
-      return new CopyOnWriteArraySet();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsFactory.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsUtil.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsUtil.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsUtil.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,49 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.util.collection;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-
-/**
- * CollectionsUtil.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class CollectionsUtil
-{
-   /**
-    * Create a list from an enumeration
-    * 
-    * @param e the enumeration
-    * @return the list
-    */
-   public static List list(Enumeration e)
-   {
-      ArrayList result = new ArrayList();
-      while (e.hasMoreElements())
-         result.add(e.nextElement());
-      return result;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsUtil.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CollectionsUtil.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundIterator.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundIterator.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundIterator.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,96 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * A compound iterator, which iterates over all of the elements in the
- * given iterators.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class CompoundIterator
-   implements Iterator
-{
-   /** The array of iterators to iterate over. */
-   protected final Iterator iters[];
-
-   /** The index of the current iterator. */
-   protected int index;
-
-   /**
-    * Construct a CompoundIterator over the given array of iterators.
-    *
-    * @param iters   Array of iterators to iterate over.
-    *
-    * @throws IllegalArgumentException    Array is <kk>null</kk> or empty.
-    */
-   public CompoundIterator(final Iterator iters[]) {
-      if (iters == null || iters.length == 0)
-         throw new IllegalArgumentException("array is null or empty");
-     
-      this.iters = iters;
-   }
-
-   /**
-    * Check if there are more elements.
-    *
-    * @return  True if there are more elements.
-    */
-   public boolean hasNext() {
-      for (; index < iters.length; index++) {
-         if (iters[index] != null && iters[index].hasNext()) {
-            return true;
-         }
-      }
-
-      return false;
-   }
-
-   /**
-    * Return the next element from the current iterator.
-    *
-    * @return  The next element from the current iterator.
-    *
-    * @throws NoSuchElementException   There are no more elements.
-    */
-   public Object next() {
-      if (!hasNext()) {
-         throw new NoSuchElementException();
-      }
-
-      return iters[index].next();
-   }
-
-   /**
-    * Remove the current element from the current iterator.
-    *
-    * @throws IllegalStateException
-    * @throws UnsupportedOperationException
-    */
-   public void remove() {
-      iters[index].remove();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundIterator.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundIterator.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundKey.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundKey.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundKey.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,125 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.io.Serializable;
-
-import org.jboss.util.NullArgumentException;
-import org.jboss.util.Objects;
-import org.jboss.util.HashCode;
-import org.jboss.util.Strings;
-
-/**
- * An immutable compound key class.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class CompoundKey
-   implements Serializable, Cloneable
-{
-   /** The elements of the key */
-   private final Object elements[];
-
-   /**
-    * Construct a CompoundKey.
-    *
-    * @param elements   Elements of the key.
-    */
-   public CompoundKey(final Object elements[]) {
-      if (elements == null)
-         throw new NullArgumentException("elements");
-
-      this.elements = elements;
-   }
-
-   /**
-    * Construct a CompoundKey.
-    *
-    * @param a    Element.
-    * @param b    Element.
-    */
-   public CompoundKey(final Object a, final Object b) {
-      this(new Object[] { a, b });
-   }
-
-   /**
-    * Construct a CompoundKey.
-    *
-    * @param a    Element.
-    * @param b    Element.
-    * @param c    Element.
-    */
-   public CompoundKey(final Object a, final Object b, final Object c) {
-      this(new Object[] { a, b, c });
-   }
-
-   /**
-    * Test the equality of an object with this.
-    *
-    * @param obj  Object to test equality with.
-    * @return     True if object is equal.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         CompoundKey key = (CompoundKey)obj;
-
-         return Objects.equals(key.elements, elements);
-      }
-
-      return false;
-   }
-
-   /**
-    * Get the hash code of this object.
-    *
-    * @return  Hash code.
-    */
-   public int hashCode() {
-      return HashCode.generate(elements);
-   }
-
-   /**
-    * Return a string representation of this object.
-    *
-    * @return  A string representation of this object.
-    */
-   public String toString() {
-      return super.toString() + Strings.join(elements, "[", ",", "]");
-   }
-
-   /**
-    * Return a shallow cloned copy of this object.
-    *
-    * @return   Shallow cloned copy of this object.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundKey.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/CompoundKey.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/EmptyCollectionException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/EmptyCollectionException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/EmptyCollectionException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,50 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-/**
- * Thrown to indicate that an operation can not be performed on an empty
- * collection.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class EmptyCollectionException
-   extends CollectionException
-{
-   /**
-    * Construct a <code>EmptyCollectionException</code> with the specified 
-    * detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public EmptyCollectionException(String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <code>EmptyCollectionException</code> with no detail.
-    */
-   public EmptyCollectionException() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/EmptyCollectionException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/EmptyCollectionException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/FullCollectionException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/FullCollectionException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/FullCollectionException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,50 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-/**
- * Thrown to indicate that an operation can not be performed on a full
- * collection.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FullCollectionException
-   extends CollectionException
-{
-   /**
-    * Construct a <code>FullCollectionException</code> with the specified 
-    * detail message.
-    *
-    * @param msg  Detail message.
-    */
-   public FullCollectionException(String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <code>FullCollectionException</code> with no detail.
-    */
-   public FullCollectionException() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/FullCollectionException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/FullCollectionException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Iterators.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/Iterators.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Iterators.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,305 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.Iterator;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-import java.util.Map;
-import java.util.HashMap;
-
-import org.jboss.util.Null;
-
-/**
- * A collection of <code>Iterator</code> and <code>Enumeration</code>
- * utilities.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class Iterators
-{
-   /////////////////////////////////////////////////////////////////////////
-   //                    Enumeration/Iterator Conversion                  //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * An Enumeration to Iterator wrapper.
-    */
-   private static final class Enum2Iterator
-      implements Iterator
-   {
-      private final Enumeration enumeration;
-    
-      public Enum2Iterator(final Enumeration enumeration) {
-         this.enumeration = enumeration;
-      }
-   
-      public boolean hasNext() {
-         return enumeration.hasMoreElements();
-      }
-    
-      public Object next() {
-         return enumeration.nextElement();
-      }
-      
-      public void remove() {
-         throw new UnsupportedOperationException("Enumerations are immutable");
-      }
-   }
-
-   /**
-    * Return an Iterator wrapper for the given Enumeration
-    *
-    * @param enum    Enumeration to wrap
-    * @return        Enumeration wrapped as an Iterator
-    */
-   public static Iterator forEnumeration(final Enumeration enumeration) {
-      return new Enum2Iterator(enumeration);
-   }
-
-   /**
-    * An Iterator to Enumeration wrapper class.
-    */
-   private static final class Iter2Enumeration
-      implements Enumeration
-   {
-      private final Iterator iter;
-
-      public Iter2Enumeration(final Iterator iter) {
-         this.iter = iter;
-      }
-
-      public boolean hasMoreElements() {
-         return iter.hasNext();
-      }
-
-      public Object nextElement() {
-         return iter.next();
-      }
-   }
-
-   /**
-    * Return an Enumeration for the given Iterator.
-    *
-    * @param iter    Iterator to wrap.
-    * @return        Enumeration wrapper.
-    */
-   public static Enumeration toEnumeration(final Iterator iter) {
-      return new Iter2Enumeration(iter);
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                           Iterator Wrappers                         //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Wraps an Iterator making it immutable, by disabling calls to
-    * <code>remove()</code>
-    */
-   private static final class ImmutableIterator
-      implements Iterator
-   {
-      private final Iterator iter;
-
-      public ImmutableIterator(final Iterator iter) {
-         this.iter = iter;
-      }
-
-      public boolean hasNext() {
-         return iter.hasNext();
-      }
-
-      public Object next() {
-         return iter.next();
-      }
-
-      public void remove() {
-         throw new UnsupportedOperationException("iterator is immutable");
-      }
-   }
-
-   /**
-    * Make an Iterator immutable
-    *
-    * @param iter    Iterator to make immutable
-    * @return        Imutable iterator
-    */
-   public static Iterator makeImmutable(final Iterator iter) {
-      return new ImmutableIterator(iter);
-   }
-
-   /**
-    * Wraps an Iterator making it synchronized.
-    */
-   private static final class SyncIterator
-      implements Iterator
-   {
-      private final Iterator iter;
-
-      public SyncIterator(final Iterator iter) {
-         this.iter = iter;
-      }
-
-      public synchronized boolean hasNext() {
-         return iter.hasNext();
-      }
-
-      public synchronized Object next() {
-         return iter.next();
-      }
-
-      public synchronized void remove() {
-         iter.remove();
-      }
-   }
-
-   /**
-    * Returns a synchronized version of the given Iterator.
-    *
-    * @param iter    Iterator to synchronize.
-    * @return        Synchronized Iterator.
-    */
-   public static Iterator makeSynchronized(final Iterator iter) {
-      return new SyncIterator(iter);
-   }
-
-   /**
-    * Wraps an Enumeration making it synchronized.
-    */
-   private static final class SyncEnumeration
-      implements Enumeration
-   {
-      private final Enumeration enumeration;
-
-      public SyncEnumeration(final Enumeration enumeration) {
-         this.enumeration = enumeration;
-      }
-
-      public synchronized boolean hasMoreElements() {
-         return enumeration.hasMoreElements();
-      }
-
-      public synchronized Object nextElement() {
-         return enumeration.nextElement();
-      }
-   }
-
-   /**
-    * Returns a synchronized version of the given Enumeration.
-    *
-    * @param enum    Enumeration to synchronize.
-    * @return        Synchronized Enumeration.
-    */
-   public static Enumeration makeSynchronized(final Enumeration enumeration) {
-      return new SyncEnumeration(enumeration);
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Empty Iterator                           //
-   /////////////////////////////////////////////////////////////////////////
-
-   /** An empty Iterator */
-   public static final Iterator EMPTY_ITERATOR = new EmptyIterator();
-
-   /**
-    * An empty Iterator
-    */
-   private static final class EmptyIterator
-      implements Iterator
-   {
-      public boolean hasNext() {
-         return false;
-      }
-   
-      public Object next() { 
-         throw new NoSuchElementException("no more elements");
-      }
-   
-      public void remove() {
-         throw new IllegalStateException("no more elements");
-      }
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                              Misc Methods                           //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Returns an Iterator containing the <i>union</i> of all of the elements
-    * in the given iterator array.
-    *
-    * @param iters   Array of iterators.
-    * @return        Iterator containing the <i>union</i>.
-    */
-   public static Iterator union(final Iterator iters[]) {
-      Map map = new HashMap();
-
-      for (int i=0; i < iters.length; i++) {
-         if (iters[i] != null) {
-            while (iters[i].hasNext()) {
-               Object obj = iters[i].next();
-               if (!map.containsKey(obj)) {
-                  map.put(obj, Null.VALUE);
-               }
-            }
-         }
-      }
-
-      return map.keySet().iterator();
-   }
-
-   /**
-    * Return a delimited string representation of all of the elements
-    * in the given Iterator.
-    *
-    * @param iter    Iterator to convert to string.
-    * @param delim   Elemement delimiter.
-    * @return        Delimited string value.
-    */
-   public static String toString(final Iterator iter, final String delim) {
-      StringBuffer buff = new StringBuffer();
-      while (iter.hasNext()) {
-         buff.append(iter.next());
-
-         if (iter.hasNext()) {
-            buff.append(delim);
-         }
-      }
-
-      return buff.toString();
-   }
-
-   /**
-    * Return a comma delimited string representation of all of the elements
-    * in the given Iterator.
-    *
-    * @param iter    Iterator to convert to string.
-    * @return        Delimited string value.
-    */
-   public static String toString(final Iterator iter) {
-      return toString(iter, ",");
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Iterators.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/Iterators.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,182 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.util.collection;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-/**
- * LazyList.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class LazyList implements List
-{
-   /** The delegate list */
-   private List delegate = Collections.EMPTY_LIST; 
-
-   public void add(int index, Object element)
-   {
-      if (delegate instanceof ArrayList == false)
-         delegate = new ArrayList(delegate);
-      delegate.add(index, element);
-   }
-
-   public boolean add(Object o)
-   {
-      if (delegate == Collections.EMPTY_LIST)
-      {
-         delegate = Collections.singletonList(o);
-         return true;
-      }
-      else
-      {
-         if (delegate instanceof ArrayList == false)
-            delegate = new ArrayList(delegate);
-         return delegate.add(o);
-      }
-   }
-
-   public boolean addAll(Collection c)
-   {
-      if (delegate instanceof ArrayList == false)
-         delegate = new ArrayList(delegate);
-      return delegate.addAll(c);
-   }
-
-   public boolean addAll(int index, Collection c)
-   {
-      if (delegate instanceof ArrayList == false)
-         delegate = new ArrayList(delegate);
-      return delegate.addAll(index, c);
-   }
-
-   public void clear()
-   {
-      delegate = Collections.EMPTY_LIST;
-   }
-
-   public boolean contains(Object o)
-   {
-      return delegate.contains(o);
-   }
-
-   public boolean containsAll(Collection c)
-   {
-      return delegate.containsAll(c);
-   }
-
-   public Object get(int index)
-   {
-      return delegate.get(index);
-   }
-
-   public int indexOf(Object o)
-   {
-      return delegate.indexOf(o);
-   }
-
-   public boolean isEmpty()
-   {
-      return delegate.isEmpty();
-   }
-
-   public Iterator iterator()
-   {
-      return delegate.iterator();
-   }
-
-   public int lastIndexOf(Object o)
-   {
-      return delegate.lastIndexOf(o);
-   }
-
-   public ListIterator listIterator()
-   {
-      return delegate.listIterator();
-   }
-
-   public ListIterator listIterator(int index)
-   {
-      return delegate.listIterator(index);
-   }
-
-   public Object remove(int index)
-   {
-      if (delegate instanceof ArrayList == false)
-         delegate = new ArrayList(delegate);
-      return delegate.remove(index);
-   }
-
-   public boolean remove(Object o)
-   {
-      if (delegate instanceof ArrayList == false)
-         delegate = new ArrayList(delegate);
-      return delegate.remove(o);
-   }
-
-   public boolean removeAll(Collection c)
-   {
-      if (delegate instanceof ArrayList == false)
-         delegate = new ArrayList(delegate);
-      return delegate.remove(c);
-   }
-
-   public boolean retainAll(Collection c)
-   {
-      if (delegate instanceof ArrayList == false)
-         delegate = new ArrayList(delegate);
-      return delegate.retainAll(c);
-   }
-
-   public Object set(int index, Object element)
-   {
-      if (delegate instanceof ArrayList == false)
-         delegate = new ArrayList(delegate);
-      return delegate.set(index, element);
-   }
-
-   public int size()
-   {
-      return delegate.size();
-   }
-
-   public List subList(int fromIndex, int toIndex)
-   {
-      return delegate.subList(fromIndex, toIndex);
-   }
-
-   public Object[] toArray()
-   {
-      return delegate.toArray();
-   }
-
-   public Object[] toArray(Object[] a)
-   {
-      return delegate.toArray(a);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/LazyList.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,114 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.util.collection;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * LazyMap.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class LazyMap implements Map
-{
-   /** The delegate map */
-   private Map delegate = Collections.EMPTY_MAP;
-   
-   public void clear()
-   {
-      delegate = Collections.EMPTY_MAP;
-   }
-
-   public boolean containsKey(Object key)
-   {
-      return delegate.containsKey(key);
-   }
-
-   public boolean containsValue(Object value)
-   {
-      return delegate.containsValue(value);
-   }
-
-   public Set entrySet()
-   {
-      return delegate.entrySet();
-   }
-
-   public Object get(Object key)
-   {
-      return delegate.get(key);
-   }
-
-   public boolean isEmpty()
-   {
-      return delegate.isEmpty();
-   }
-
-   public Set keySet()
-   {
-      return delegate.keySet();
-   }
-
-   public Object put(Object key, Object value)
-   {
-      if (delegate == Collections.EMPTY_MAP)
-      {
-         delegate = Collections.singletonMap(key, value);
-         return null;
-      }
-      else
-      {
-         if (delegate instanceof HashMap == false)
-            delegate = new HashMap(delegate);
-         return delegate.put(key, value);
-      }
-   }
-
-   public void putAll(Map t)
-   {
-      if (delegate instanceof HashMap == false)
-         delegate = new HashMap(delegate);
-      delegate.putAll(t);
-   }
-
-   public Object remove(Object key)
-   {
-      if (delegate instanceof HashMap == false)
-         delegate = new HashMap(delegate);
-      return delegate.remove(key);
-   }
-
-   public int size()
-   {
-      return delegate.size();
-   }
-
-   public Collection values()
-   {
-      return delegate.values();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/LazyMap.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,123 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.util.collection;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * LazySet.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class LazySet implements Set
-{
-   /** The delegate set */
-   private Set delegate = Collections.EMPTY_SET;
-   
-   public boolean add(Object o)
-   {
-      if (delegate == Collections.EMPTY_SET)
-      {
-         delegate = Collections.singleton(o);
-         return true;
-      }
-      else
-      {
-         if (delegate instanceof HashSet == false)
-            delegate = new HashSet(delegate);
-         return delegate.add(o);
-      }
-   }
-
-   public boolean addAll(Collection c)
-   {
-      if (delegate instanceof HashSet == false)
-         delegate = new HashSet(delegate);
-      return delegate.addAll(c);
-   }
-
-   public void clear()
-   {
-      delegate = Collections.EMPTY_SET;
-   }
-
-   public boolean contains(Object o)
-   {
-      return delegate.contains(o);
-   }
-
-   public boolean containsAll(Collection c)
-   {
-      return delegate.containsAll(c);
-   }
-
-   public boolean isEmpty()
-   {
-      return delegate.isEmpty();
-   }
-
-   public Iterator iterator()
-   {
-      return delegate.iterator();
-   }
-
-   public boolean remove(Object o)
-   {
-      if (delegate instanceof HashSet == false)
-         delegate = new HashSet(delegate);
-      return delegate.remove(o);
-   }
-
-   public boolean removeAll(Collection c)
-   {
-      if (delegate instanceof HashSet == false)
-         delegate = new HashSet(delegate);
-      return delegate.removeAll(c);
-   }
-
-   public boolean retainAll(Collection c)
-   {
-      if (delegate instanceof HashSet == false)
-         delegate = new HashSet(delegate);
-      return delegate.retainAll(c);
-   }
-
-   public int size()
-   {
-      return delegate.size();
-   }
-
-   public Object[] toArray()
-   {
-      return delegate.toArray();
-   }
-
-   public Object[] toArray(Object[] a)
-   {
-      return delegate.toArray(a);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/LazySet.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListQueue.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/ListQueue.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListQueue.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,171 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.List;
-import java.util.LinkedList;
-import java.util.Iterator;
-
-import org.jboss.util.NullArgumentException;
-
-/**
- * A ListQueue implements a first-in, first-out container using a List as
- * a data structure.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class ListQueue
-   extends AbstractQueue
-{
-   /** List container */
-   protected final List list;
-
-   /**
-    * Construct a new <i>constrained</i> ListQueue.
-    *
-    * @param list    The list which will be used to store queued objects.
-    * @param maxSize The maximum size of the queue.
-    *
-    * @exception IllegalArgumentException    List is <i>null</i>.
-    */
-   public ListQueue(final List list, final int maxSize) {
-      super(maxSize);
-
-      if (list == null)
-         throw new NullArgumentException("list");
-
-      this.list = list;
-   }
-
-   /**
-    * Construct a new <i>constrained</i> ListQueue using a
-    * <code>LinkedList</code> for a data-structure.
-    *
-    * @param maxSize The maximum size of the queue.
-    */
-   public ListQueue(final int maxSize) {
-      super(maxSize);
-      this.list = new LinkedList();
-   }
-
-   /**
-    * Construct a new <i>unconstrained</i> ListQueue.
-    *
-    * @param list    The list which will be used to store queued objects.
-    *
-    * @exception IllegalArgumentException    List is <i>null</i>
-    */
-   public ListQueue(final List list) {
-      this(list, UNLIMITED_MAXIMUM_SIZE);
-   }
-
-   /**
-    * Construct a new <i>unconstrained</i> ListQueue using a
-    * <code>LinkedList</code> for a data-structure.
-    */
-   public ListQueue() {
-      this(new LinkedList(), UNLIMITED_MAXIMUM_SIZE);
-   }
-
-   /**
-    * Appends the given element to the end of this list.
-    *
-    * @param obj  Object to append.
-    */
-   protected boolean addLast(final Object obj) {
-      return list.add(obj);
-   }
-
-   /**
-    * Remove the first object in the queue.
-    *
-    * @return  First object in the queue.
-    */
-   protected Object removeFirst() {
-      return list.remove(0);
-   }
-
-   /**
-    * Get the size of the queue.
-    *
-    * @return  The number of elements in the queue.
-    */
-   public int size() {
-      return list.size();
-   }
-
-   /**
-    * Returns an iterator over the elements in this list in proper sequence.
-    * 
-    * @return  An iterator over the elements in this list in proper sequence.
-    */
-   public Iterator iterator() {
-      return list.iterator();
-   }
-
-   /**
-    * Get the object at the front of the queue.
-    *
-    * @return  Object at the front of the queue.
-    *
-    * @exception EmptyCollectionException    The queue is empty.
-    */
-   public Object getFront() throws EmptyCollectionException {
-      if (isEmpty())
-         throw new EmptyCollectionException();
-
-      return list.get(0);
-   }
-
-   /**
-    * Get the object at the back of the queue.
-    *
-    * @return  Object at the back of the queue.
-    *
-    * @exception EmptyCollectionException    The queue is empty.
-    */
-   public Object getBack() throws EmptyCollectionException {
-      if (isEmpty())
-         throw new EmptyCollectionException();
-
-      return list.get(list.size() - 1);
-   }
-
-   /**
-    * Returns an iterator over the elements in this list in reverse sequence.
-    *
-    * @return  An iterator over the elements in this list in reverse sequence.
-    */
-   public Iterator reverseIterator() {
-      return new ReverseListIterator(list);
-   }
-
-   /**
-    * Return a String representation of this queue.
-    *
-    * @return  String
-    */
-   public String toString() {
-      return list.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListQueue.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/ListQueue.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListSet.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/ListSet.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListSet.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,178 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Set;
-import java.util.AbstractSet;
-import java.util.Iterator;
-import java.util.Collection;
-import java.io.Serializable;
-
-import org.jboss.util.NullArgumentException;
-
-/**
- * A thin wrapper around a <code>List</code> transforming it into a
- * modifiable <code>Set</code>.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class ListSet
-   extends AbstractSet
-   implements Set, Cloneable, Serializable
-{
-   /** The <tt>List</tt> which will be used for element storage. */
-   protected final List list;
-
-   /**
-    * Construct a <tt>ListSet</tt>.
-    *
-    * @param list    The <tt>List</tt> which will be used for element storage.
-    *
-    * @throws IllegalArgumentException    List is <tt>null</tt> or contains
-    *                                     duplicate entries.
-    */
-   public ListSet(final List list) {
-      if (list == null)
-         throw new NullArgumentException("list");
-
-      // make sure there are no duplicates
-      int size = list.size();
-      for (int i=0; i<size; i++) {
-         Object obj = list.get(i);
-         if (list.indexOf(obj) != list.lastIndexOf(obj)) {
-            throw new IllegalArgumentException
-               ("list contains duplicate entries");
-         }
-      }
-
-      this.list = list;
-   }
-
-   /**
-    * Construct a <tt>ListSet</tt> using an <tt>ArrayList</tt> for backing.
-    */
-   public ListSet() {
-      this(new ArrayList());
-   }
-
-   /**
-    * Construct a <tt>ListSet</tt> using an <tt>ArrayList</tt> for backing
-    * and populated with the given elements.
-    *
-    * @param elements   The elements for the list.
-    */
-   public ListSet(final Collection elements) {
-      this(new ArrayList(elements));
-   }
-   
-   public List getList()
-   {
-      return list;
-   }
-   
-   /**
-    * Return the size of the set.
-    *
-    * @return  The size of the set.
-    */
-   public int size() {
-      return list.size();
-   }
-
-   /**
-    * Return an iteration over the elements in the set.
-    *
-    * @return  An iteration over the elements in the set.
-    */
-   public Iterator iterator() {
-      return list.iterator();
-   }
-
-   /**
-    * Add an element to the set.
-    *
-    * @param obj  Element to add to the set.
-    * @return     True if the element was added.
-    */
-   public boolean add(final Object obj) {
-      boolean added = false;
-
-      if (!list.contains(obj)) {
-         added = list.add(obj);
-      }
-
-      return added;
-   }
-
-   /**
-    * Returns <tt>true</tt> if this set contains no elements.
-    *
-    * @return  <tt>true</tt> if this set contains no elements.
-    */
-   public boolean isEmpty() {
-      return list.isEmpty();
-   }
-
-   /**
-    * Returns <tt>true</tt> if this set contains the specified element.
-    *
-    * @param obj  Element whose presence in this set is to be tested.
-    * @return     <tt>true</tt> if this set contains the specified element.
-    */
-   public boolean contains(final Object obj) {
-      return list.contains(obj);
-   }
-
-   /**
-    * Removes the given element from this set if it is present.
-    *
-    * @param obj  Object to be removed from this set, if present.
-    * @return     <tt>true</tt> if the set contained the specified element.
-    */
-   public boolean remove(final Object obj) {
-      return list.remove(obj);
-   }
-
-   /**
-    * Removes all of the elements from this set.
-    */
-   public void clear() {
-      list.clear();
-   }
-
-   /**
-     * Returns a shallow copy of this <tt>ListSet</tt> instance.
-     *
-     * @return    A shallow copy of this set.
-     */
-   public Object clone() {
-      try { 
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) { 
-         throw new InternalError();
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ListSet.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/ListSet.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Queue.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/Queue.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Queue.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,104 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.Collection;
-
-/**
- * An iterface used to implement a first-in, first-out container.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface Queue
-   extends Collection
-{
-   /** Unlimited maximum queue size identifier. */
-   int UNLIMITED_MAXIMUM_SIZE = -1;
-
-   /**
-    * Get the maximum size of the queue.
-    *
-    * @return  Maximum pool size or {@link #UNLIMITED_MAXIMUM_SIZE}.
-    */
-   int getMaximumSize();
-
-   /**
-    * Set the maximum size of the queue.
-    *
-    * @param size    New maximim pool size or {@link #UNLIMITED_MAXIMUM_SIZE}.
-    *
-    * @exception IllegalArgumentException    Illegal size.
-    */
-   void setMaximumSize(int size) throws IllegalArgumentException;
-
-   /**
-    * Check if the queue is full.
-    *
-    * @return  True if the queue is full.
-    */
-   boolean isFull();
-
-   /**
-    * Check if the queue is empty.
-    *
-    * @return True if the queue is empty.
-    */
-   boolean isEmpty();
-
-   /**
-    * Enqueue an object onto the queue.
-    *
-    * @param obj     Object to enqueue.
-    * @return        True if collection was modified.
-    *
-    * @exception FullCollectionException     The queue is full.
-    */
-   boolean add(Object obj) throws FullCollectionException;
-
-   /**
-    * Dequeue an object from the queue.
-    *
-    * @return     Dequeued object.
-    *
-    * @exception EmptyCollectionException    The queue is empty.
-    */
-   Object remove() throws EmptyCollectionException;
-
-   /**
-    * Get the object at the front of the queue.
-    *
-    * @return  Object at the front of the queue.
-    *
-    * @exception EmptyCollectionException    The queue is empty.
-    */
-   Object getFront() throws EmptyCollectionException;
-
-   /**
-    * Get the object at the back of the queue.
-    *
-    * @return  Object at the back of the queue.
-    *
-    * @exception EmptyCollectionException    The queue is empty.
-    */
-   Object getBack() throws EmptyCollectionException;
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/Queue.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/Queue.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ReverseListIterator.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/ReverseListIterator.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ReverseListIterator.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,83 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-/**
- * An iterator that returns elements in reverse order from a list.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class ReverseListIterator
-   implements Iterator
-{
-   /** The list to get elements from */
-   protected final List list;
-   
-   /** The current index of the list */
-   protected int current;
-
-   /**
-    * Construct a ReverseListIterator for the given list.
-    *
-    * @param list    List to iterate over.
-    */
-   public ReverseListIterator(final List list) {
-      this.list = list;
-      current = list.size() - 1;
-   }
-
-   /**
-    * Check if there are more elements.
-    *
-    * @return  True if there are more elements.
-    */
-   public boolean hasNext() {
-      return current > 0;
-   }
-
-   /**
-    * Get the next element.
-    *
-    * @return  The next element.
-    *
-    * @throws NoSuchElementException
-    */
-   public Object next() {
-      if (current <= 0) {
-         throw new NoSuchElementException();
-      }
-      
-      return list.get(current--);
-   }
-
-   /**
-    * Remove the current element.
-    */
-   public void remove() {
-      list.remove(current);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/ReverseListIterator.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/ReverseListIterator.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SerializableEnumeration.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/SerializableEnumeration.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SerializableEnumeration.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,83 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-
-/**
- * ???
- *      
- * @author ???
- * @version $Revision$
- */
-public class SerializableEnumeration
-   extends ArrayList
-   implements Enumeration
-{
-   private int index;
-
-   public SerializableEnumeration () {
-      index = 0;
-   }
-
-   public SerializableEnumeration (Collection c) {
-      super(c);
-      index = 0;
-   }
-	 
-   public SerializableEnumeration (int initialCapacity) {
-      super(initialCapacity);
-      index = 0;
-   }
-	 
-   public boolean hasMoreElements() {
-      return (index < size());
-   }
-	
-   public Object nextElement() throws NoSuchElementException
-   {
-      try {
-         Object nextObj = get(index);
-         index++;
-         return nextObj;
-      }
-      catch (IndexOutOfBoundsException e) {
-         throw new NoSuchElementException();
-      }
-   }
-
-   private void writeObject(java.io.ObjectOutputStream out)
-      throws java.io.IOException
-   {
-      // the only thing to write is the index field
-      out.defaultWriteObject();
-   }
-   
-   private void readObject(java.io.ObjectInputStream in)
-      throws java.io.IOException, ClassNotFoundException
-   {
-      in.defaultReadObject();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SerializableEnumeration.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/SerializableEnumeration.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftSet.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/SoftSet.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftSet.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,254 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.lang.ref.ReferenceQueue;
-import java.lang.ref.SoftReference;
-import java.lang.reflect.Array;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * An implementation of Set that manages a map of soft references to
- * the set values. The map is keyed by the value hashCode and so this
- * is only useful for value whose hashCode is a valid identity
- * representation (String, primative wrappers, etc).
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class SoftSet implements Set
-{
-   private HashMap map = new HashMap();
-   /** The queue of garbage collected soft references */
-   private ReferenceQueue gcqueue = new ReferenceQueue();
-
-   static class ComparableSoftReference extends SoftReference
-   {
-      private Integer key;
-      ComparableSoftReference(Integer key, Object o, ReferenceQueue q)
-      {
-         super(o, q);
-         this.key = key;
-      }
-      Integer getKey()
-      {
-         return key;
-      }
-   }
-   static class ComparableSoftReferenceIterator implements Iterator
-   {
-      Iterator theIter;
-      ComparableSoftReferenceIterator(Iterator theIter)
-      {
-         this.theIter = theIter;
-      }
-      public boolean hasNext()
-      {
-         return theIter.hasNext();
-      }
-      public Object next()
-      {
-         ComparableSoftReference csr = (ComparableSoftReference) theIter.next();
-         return csr.get();
-      }
-      public void remove()
-      {
-         theIter.remove();
-      }
-   }
-
-   /**
-    * 
-    */
-   public SoftSet()
-   {
-   }
-
-   public int size()
-   {
-      processQueue();
-      return map.size();
-   }
-
-   public boolean isEmpty()
-   {
-      processQueue();
-      return map.isEmpty();
-   }
-
-   public boolean contains(Object o)
-   {
-      processQueue();
-      Integer key = new Integer(o.hashCode());
-      boolean contains = map.containsKey(key);
-      return contains;
-   }
-
-   public Iterator iterator()
-   {
-      processQueue();
-      Iterator theIter = map.values().iterator();
-      return new ComparableSoftReferenceIterator(theIter);
-   }
-
-   public Object[] toArray()
-   {
-      processQueue();
-      return toArray(new Object[0]);
-   }
-
-   public Object[] toArray(Object[] a)
-   {
-      processQueue();
-      int size = map.size();
-      Object[] array = {};
-      if( a.length >= size )
-         array = a;
-      Iterator iter = map.values().iterator();
-      int index = 0;
-      while( iter.hasNext() )
-      {
-         ComparableSoftReference csr = (ComparableSoftReference) iter.next();
-         Object value = csr.get();
-         // Create the correct array type
-         if( array.length == 0 )
-         {
-            if( value == null )
-            {
-               index ++;
-               continue;
-            }
-            Array.newInstance(value.getClass(), size);
-         }
-         array[index] = value;
-         index ++;
-      }
-      return array;
-   }
-
-   public boolean add(Object o)
-   {
-      processQueue();
-      Integer key = new Integer(o.hashCode());
-      ComparableSoftReference sr = new ComparableSoftReference(key, o, gcqueue);
-      return map.put(key, sr) == null;
-   }
-
-   public boolean remove(Object o)
-   {
-      processQueue();
-      Integer key = new Integer(o.hashCode());
-      return map.remove(key) != null;
-   }
-
-   public boolean containsAll(Collection c)
-   {
-      processQueue();
-      Iterator iter = c.iterator();
-      boolean contains = true;
-      while( iter.hasNext() )
-      {
-         Object value = iter.next();
-         Integer key = new Integer(value.hashCode());
-         contains &= map.containsKey(key);
-      }
-      return contains;
-   }
-
-   public boolean addAll(Collection c)
-   {
-      processQueue();
-      Iterator iter = c.iterator();
-      boolean added = false;
-      while( iter.hasNext() )
-      {
-         Object value = iter.next();
-         Integer key = new Integer(value.hashCode());
-         ComparableSoftReference sr = new ComparableSoftReference(key, value, gcqueue);
-         added |= map.put(key, sr) == null;
-      }
-      return added;
-   }
-
-   public boolean retainAll(Collection c)
-   {
-      Iterator iter = iterator();
-      boolean removed = false;
-      while( iter.hasNext() )
-      {
-         Object value = iter.next();
-         if( c.contains(value) == false )
-         {
-            iter.remove();
-            removed = true;
-         }
-      }
-      return removed;
-   }
-
-   public boolean removeAll(Collection c)
-   {
-      processQueue();
-      Iterator iter = c.iterator();
-      boolean removed = false;
-      while( iter.hasNext() )
-      {
-         Object value = iter.next();
-         removed |= remove(value);
-      }
-      return removed;
-   }
-
-   public void clear()
-   {
-      while( gcqueue.poll() != null )
-         ;
-      map.clear();
-   }
-
-   public boolean equals(Object o)
-   {
-      return map.equals(o);
-   }
-
-   public int hashCode()
-   {
-      return map.hashCode();
-   }
-
-   /**
-    * Iterate through the gcqueue for for any cleared reference, remove
-    * the associated value from the underlying set.
-    */
-   private void processQueue()
-   {
-      ComparableSoftReference cr;
-      while( (cr = (ComparableSoftReference) gcqueue.poll()) != null )
-      {
-         map.remove(cr.getKey());
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftSet.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/SoftSet.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftValueHashMap.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/SoftValueHashMap.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftValueHashMap.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,247 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.lang.ref.ReferenceQueue;
-import java.lang.ref.SoftReference;
-import java.util.AbstractMap;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * This Map will remove entries when the value in the map has been
- * cleaned from garbage collection
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:bill at jboss.org">Bill Burke</a>
- */
-public class SoftValueHashMap
-   extends AbstractMap
-   implements Map 
-{
-   private static class SoftValueRef extends SoftReference
-   {
-      public Object key;
-
-      private SoftValueRef(Object key, Object val, ReferenceQueue q)
-      {
-         super(val, q);
-         this.key = key;
-      }
-      
-      private static SoftValueRef create(Object key, Object val, ReferenceQueue q)
-      {
-         if (val == null) return null;
-         else return new SoftValueRef(key, val, q);
-      }
-      
-   }
-   public Set entrySet() 
-   { 
-      processQueue();
-      return hash.entrySet();
-   }
-
-   /* Hash table mapping WeakKeys to values */
-   private Map hash;
-
-   /* Reference queue for cleared WeakKeys */
-   private ReferenceQueue queue = new ReferenceQueue();
-   
-   /* Remove all invalidated entries from the map, that is, remove all entries
-      whose values have been discarded.  
-    */
-   private void processQueue()
-   {
-      SoftValueRef ref;
-      while ((ref = (SoftValueRef)queue.poll()) != null) {
-         if (ref == (SoftValueRef) hash.get(ref.key)) {
-            // only remove if it is the *exact* same WeakValueRef
-            //
-            hash.remove(ref.key);
-         }
-      }
-   }
-
-
-   /* -- Constructors -- */
-
-   /**
-    * Constructs a new, empty <code>WeakHashMap</code> with the given
-    * initial capacity and the given load factor.
-    *
-    * @param  initialCapacity  The initial capacity of the
-    *                          <code>WeakHashMap</code>
-    *
-    * @param  loadFactor       The load factor of the <code>WeakHashMap</code>
-    *
-    * @throws IllegalArgumentException  If the initial capacity is less than
-    *                                   zero, or if the load factor is
-    *                                   nonpositive
-    */
-   public SoftValueHashMap(int initialCapacity, float loadFactor)
-   {
-      hash = new HashMap(initialCapacity, loadFactor);
-   }
-
-   /**
-    * Constructs a new, empty <code>WeakHashMap</code> with the given
-    * initial capacity and the default load factor, which is
-    * <code>0.75</code>.
-    *
-    * @param  initialCapacity  The initial capacity of the
-    *                          <code>WeakHashMap</code>
-    *
-    * @throws IllegalArgumentException  If the initial capacity is less than
-    *                                   zero
-    */
-   public SoftValueHashMap(int initialCapacity)
-   {
-      hash = new HashMap(initialCapacity);
-   }
-
-   /**
-    * Constructs a new, empty <code>WeakHashMap</code> with the default
-    * initial capacity and the default load factor, which is
-    * <code>0.75</code>.
-    */
-   public SoftValueHashMap()
-   {
-      hash = new HashMap();
-   }
-
-   /**
-    * Constructs a new <code>WeakHashMap</code> with the same mappings as the
-    * specified <tt>Map</tt>.  The <code>WeakHashMap</code> is created with an
-    * initial capacity of twice the number of mappings in the specified map
-    * or 11 (whichever is greater), and a default load factor, which is
-    * <tt>0.75</tt>.
-    *
-    * @param   t the map whose mappings are to be placed in this map.
-    * @since	1.3
-    */
-   public SoftValueHashMap(Map t)
-   {
-      this(Math.max(2*t.size(), 11), 0.75f);
-      putAll(t);
-   }
-
-   /* -- Simple queries -- */
-
-   /**
-    * Returns the number of key-value mappings in this map.
-    * <strong>Note:</strong> <em>In contrast with most implementations of the
-    * <code>Map</code> interface, the time required by this operation is
-    * linear in the size of the map.</em>
-    */
-   public int size()
-   {
-      processQueue();
-      return hash.size();
-   }
-
-   /**
-    * Returns <code>true</code> if this map contains no key-value mappings.
-    */
-   public boolean isEmpty()
-   {
-      processQueue();
-      return hash.isEmpty();
-   }
-
-   /**
-    * Returns <code>true</code> if this map contains a mapping for the
-    * specified key.
-    *
-    * @param   key   The key whose presence in this map is to be tested
-    */
-   public boolean containsKey(Object key)
-   {
-      processQueue();
-      return hash.containsKey(key);
-   }
-
-   /* -- Lookup and modification operations -- */
-
-   /**
-    * Returns the value to which this map maps the specified <code>key</code>.
-    * If this map does not contain a value for this key, then return
-    * <code>null</code>.
-    *
-    * @param  key  The key whose associated value, if any, is to be returned
-    */
-   public Object get(Object key)
-   {
-      processQueue();
-      SoftReference ref = (SoftReference)hash.get(key);
-      if (ref != null) return ref.get();
-      return null;
-   }
-
-   /**
-    * Updates this map so that the given <code>key</code> maps to the given
-    * <code>value</code>.  If the map previously contained a mapping for
-    * <code>key</code> then that mapping is replaced and the previous value is
-    * returned.
-    *
-    * @param  key    The key that is to be mapped to the given
-    *                <code>value</code> 
-    * @param  value  The value to which the given <code>key</code> is to be
-    *                mapped
-    *
-    * @return  The previous value to which this key was mapped, or
-    *          <code>null</code> if if there was no mapping for the key
-    */
-   public Object put(Object key, Object value) 
-   {
-      processQueue();
-      Object rtn = hash.put(key, SoftValueRef.create(key, value, queue));
-      if (rtn != null) rtn = ((SoftReference)rtn).get();
-      return rtn;
-   }
-
-   /**
-    * Removes the mapping for the given <code>key</code> from this map, if
-    * present.
-    *
-    * @param  key  The key whose mapping is to be removed
-    *
-    * @return  The value to which this key was mapped, or <code>null</code> if
-    *          there was no mapping for the key
-    */
-   public Object remove(Object key) 
-   {
-      processQueue();
-      return hash.remove(key);
-   }
-
-   /**
-    * Removes all mappings from this map.
-    */
-   public void clear()
-   {
-      processQueue();
-      hash.clear();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/SoftValueHashMap.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/SoftValueHashMap.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakClassCache.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/WeakClassCache.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakClassCache.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,129 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.lang.ref.WeakReference;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-/**
- * A weak class cache that instantiates does not a hold a
- * strong reference to either the classloader or class.<p>
- * 
- * It creates the class specific data in two stages
- * to avoid recursion.<p>
- * 
- * instantiate - creates the data<br>
- * generate - fills in the details
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- */
-public abstract class WeakClassCache
-{
-   /** The cache */
-   protected Map cache = new WeakHashMap(); 
-
-   /**
-    * Get the information for a class
-    * 
-    * @param clazz the class
-    * @return the info
-    */
-   public Object get(Class clazz)
-   {
-      if (clazz == null)
-         throw new IllegalArgumentException("Null class");
-      
-      Map classLoaderCache = getClassLoaderCache(clazz.getClassLoader());
-
-      WeakReference weak = (WeakReference) classLoaderCache.get(clazz.getName());
-      if (weak != null)
-      {
-         Object result = weak.get();
-         if (result != null)
-            return result;
-      }
-
-      Object result = instantiate(clazz);
-
-      weak = new WeakReference(result);
-      classLoaderCache.put(clazz.getName(), weak);
-      
-      generate(clazz, result);
-      
-      return result;
-   }
-   
-   /**
-    * Get the information for a class
-    * 
-    * @param name the name
-    * @param cl the classloader
-    * @return the info
-    * @throws ClassNotFoundException when the class cannot be found
-    */
-   public Object get(String name, ClassLoader cl) throws ClassNotFoundException
-   {
-      if (name == null)
-         throw new IllegalArgumentException("Null name");
-      if (cl == null)
-         throw new IllegalArgumentException("Null classloader");
-      Class clazz = cl.loadClass(name);
-      return get(clazz);
-   }
-   
-   /**
-    * Instantiate for a class
-    * 
-    * @param clazz the class
-    * @return the result
-    */
-   protected abstract Object instantiate(Class clazz);
-   
-   /**
-    * Fill in the result
-    * 
-    * @param clazz the class
-    * @param result the result
-    */
-   protected abstract void generate(Class clazz, Object result);
-   
-   /**
-    * Get the cache for the classloader
-    * 
-    * @param cl the classloader
-    * @return the map
-    */
-   protected Map getClassLoaderCache(ClassLoader cl)
-   {
-      synchronized (cache)
-      {
-         Map result = (Map) cache.get(cl);
-         if (result == null)
-         {
-            result = CollectionsFactory.createConcurrentReaderMap();
-            cache.put(cl, result);
-         }
-         return result;
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakClassCache.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/WeakClassCache.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakIdentityHashMap.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/WeakIdentityHashMap.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakIdentityHashMap.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,942 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-
-package org.jboss.util.collection;
-
-
-import java.lang.ref.WeakReference;
-import java.lang.ref.ReferenceQueue;
-import java.util.*;
-
-/**
- * A hashtable-based <tt>Map</tt> implementation with <em>weak keys</em> and
- * using reference-equality in place of object-equality when comparing keys
- * (and values).  In an <tt>WeakIdentityHashMap</tt>, two keys <tt>k1</tt> and
- * <tt>k2</tt> are considered equal if and only if <tt>(k1==k2)</tt>.
- * An entry in a <tt>WeakIdentityHashMap</tt> will automatically be removed when
- * its key is no longer in ordinary use.  More precisely, the presence of a
- * mapping for a given key will not prevent the key from being discarded by the
- * garbage collector, that is, made finalizable, finalized, and then reclaimed.
- * When a key has been discarded its entry is effectively removed from the map.
- *
- * <p>Based on java.util.WeakHashMap</p>
- *
- * @author      Dawid Kurzyniec
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @see		java.util.IdentityHashMap
- * @see		java.util.WeakHashMap
- */
-public class WeakIdentityHashMap /*extends AbstractMap*/ implements Map {
-
-    /**
-     * The default initial capacity -- MUST be a power of two.
-     */
-    private static final int DEFAULT_INITIAL_CAPACITY = 16;
-
-    /**
-     * The maximum capacity, used if a higher value is implicitly specified
-     * by either of the constructors with arguments.
-     * MUST be a power of two <= 1<<30.
-     */
-    private static final int MAXIMUM_CAPACITY = 1 << 30;
-
-    /**
-     * The load fast used when none specified in constructor.
-     */
-    private static final float DEFAULT_LOAD_FACTOR = 0.75f;
-
-    /**
-     * The table, resized as necessary. Length MUST Always be a power of two.
-     */
-    private Entry[] table;
-
-    /**
-     * The number of key-value mappings contained in this weak hash map.
-     */
-    private int size;
-
-    /**
-     * The next size value at which to resize (capacity * load factor).
-     */
-    private int threshold;
-
-    /**
-     * The load factor for the hash table.
-     */
-    private final float loadFactor;
-
-    /**
-     * Reference queue for cleared WeakEntries
-     */
-    private final ReferenceQueue queue = new ReferenceQueue();
-
-    /**
-     * The number of times this HashMap has been structurally modified
-     * Structural modifications are those that change the number of mappings in
-     * the HashMap or otherwise modify its internal structure (e.g.,
-     * rehash).  This field is used to make iterators on Collection-views of
-     * the HashMap fail-fast.  (See ConcurrentModificationException).
-     */
-    private volatile int modCount;
-
-    /**
-     * Each of these fields are initialized to contain an instance of the
-     * appropriate view the first time this view is requested.  The views are
-     * stateless, so there's no reason to create more than one of each.
-     */
-    transient volatile Set        keySet = null;
-    transient volatile Collection values = null;
-
-    /**
-     * Constructs a new, empty <tt>WeakIdentityHashMap</tt> with the given
-     * initial capacity and the given load factor.
-     *
-     * @param  initialCapacity The initial capacity of the
-     *                         <tt>WeakIdentityHashMap</tt>
-     * @param  loadFactor      The load factor of the
-     *                         <tt>WeakIdentityHashMap</tt>
-     * @throws IllegalArgumentException  If the initial capacity is negative,
-     *         or if the load factor is nonpositive.
-     */
-    public WeakIdentityHashMap(int initialCapacity, float loadFactor) {
-        if (initialCapacity < 0)
-            throw new IllegalArgumentException("Illegal Initial Capacity: "+
-                                               initialCapacity);
-        if (initialCapacity > MAXIMUM_CAPACITY)
-            initialCapacity = MAXIMUM_CAPACITY;
-
-        if (loadFactor <= 0 || Float.isNaN(loadFactor))
-            throw new IllegalArgumentException("Illegal Load factor: "+
-                                               loadFactor);
-        int capacity = 1;
-        while (capacity < initialCapacity)
-            capacity <<= 1;
-        table = new Entry[capacity];
-        this.loadFactor = loadFactor;
-        threshold = (int)(capacity * loadFactor);
-    }
-
-    /**
-     * Constructs a new, empty <tt>WeakIdentityHashMap</tt> with the given
-     * initial capacity and the default load factor, which is <tt>0.75</tt>.
-     *
-     * @param  initialCapacity The initial capacity of the
-     *                         <tt>WeakIdentityHashMap</tt>
-     * @throws IllegalArgumentException  If the initial capacity is negative.
-     */
-    public WeakIdentityHashMap(int initialCapacity) {
-        this(initialCapacity, DEFAULT_LOAD_FACTOR);
-    }
-
-    /**
-     * Constructs a new, empty <tt>WeakIdentityHashMap</tt> with the default
-     * initial capacity (16) and the default load factor (0.75).
-     */
-    public WeakIdentityHashMap() {
-        this.loadFactor = DEFAULT_LOAD_FACTOR;
-        threshold = (int)(DEFAULT_INITIAL_CAPACITY);
-        table = new Entry[DEFAULT_INITIAL_CAPACITY];
-    }
-
-    /**
-     * Constructs a new <tt>WeakIdentityHashMap</tt> with the same mappings as
-     * the specified <tt>Map</tt>.  The <tt>WeakIdentityHashMap</tt> is created
-     * with default load factor, which is <tt>0.75</tt> and an initial capacity
-     * sufficient to hold the mappings in the specified <tt>Map</tt>.
-     *
-     * @param   t the map whose mappings are to be placed in this map.
-     * @throws  NullPointerException if the specified map is null.
-     */
-    public WeakIdentityHashMap(Map t) {
-        this(Math.max((int) (t.size() / DEFAULT_LOAD_FACTOR) + 1, 16),
-             DEFAULT_LOAD_FACTOR);
-        putAll(t);
-    }
-
-    // internal utilities
-
-    /**
-     * Value representing null keys inside tables.
-     */
-    private static final Object NULL_KEY = new Object();
-
-    /**
-     * Use NULL_KEY for key if it is null.
-     */
-    private static Object maskNull(Object key) {
-        return (key == null ? NULL_KEY : key);
-    }
-
-    /**
-     * Return internal representation of null key back to caller as null
-     */
-    private static Object unmaskNull(Object key) {
-        return (key == NULL_KEY ? null : key);
-    }
-
-    /**
-     * Return a hash code for non-null Object x.
-     */
-    int hash(Object x) {
-        int h = System.identityHashCode(x);
-        return h - (h << 7);  // that is,, -127 * h
-    }
-
-    /**
-     * Return index for hash code h.
-     */
-    static int indexFor(int h, int length) {
-        return h & (length-1);
-    }
-
-    /**
-     * Expunge stale entries from the table.
-     */
-    private void expungeStaleEntries() {
-        Object r;
-        while ( (r = queue.poll()) != null) {
-            Entry e = (Entry)r;
-            int h = e.hash;
-            int i = indexFor(h, table.length);
-
-            Entry prev = table[i];
-            Entry p = prev;
-            while (p != null) {
-                Entry next = p.next;
-                if (p == e) {
-                    if (prev == e)
-                        table[i] = next;
-                    else
-                        prev.next = next;
-                    e.next = null;  // Help GC
-                    e.value = null; //  "   "
-                    size--;
-                    break;
-                }
-                prev = p;
-                p = next;
-            }
-        }
-    }
-
-    /**
-     * Return the table after first expunging stale entries
-     */
-    private Entry[] getTable() {
-        expungeStaleEntries();
-        return table;
-    }
-
-    /**
-     * Returns the number of key-value mappings in this map.
-     * This result is a snapshot, and may not reflect unprocessed
-     * entries that will be removed before next attempted access
-     * because they are no longer referenced.
-     */
-    public int size() {
-        if (size == 0)
-            return 0;
-        expungeStaleEntries();
-        return size;
-    }
-
-    /**
-     * Returns <tt>true</tt> if this map contains no key-value mappings.
-     * This result is a snapshot, and may not reflect unprocessed
-     * entries that will be removed before next attempted access
-     * because they are no longer referenced.
-     */
-    public boolean isEmpty() {
-        return size() == 0;
-    }
-
-    /**
-     * Returns the value to which the specified key is mapped in this weak
-     * hash map, or <tt>null</tt> if the map contains no mapping for
-     * this key.  A return value of <tt>null</tt> does not <i>necessarily</i>
-     * indicate that the map contains no mapping for the key; it is also
-     * possible that the map explicitly maps the key to <tt>null</tt>. The
-     * <tt>containsKey</tt> method may be used to distinguish these two
-     * cases.
-     *
-     * @param   key the key whose associated value is to be returned.
-     * @return  the value to which this map maps the specified key, or
-     *          <tt>null</tt> if the map contains no mapping for this key.
-     * @see #put(Object, Object)
-     */
-    public Object get(Object key) {
-        Object k = maskNull(key);
-        int h = hash(k);
-        Entry[] tab = getTable();
-        int index = indexFor(h, tab.length);
-        Entry e = tab[index];
-        while (e != null) {
-            if (e.hash == h && k == e.get())
-                return e.value;
-            e = e.next;
-        }
-        return null;
-    }
-
-    /**
-     * Returns <tt>true</tt> if this map contains a mapping for the
-     * specified key.
-     *
-     * @param   key   The key whose presence in this map is to be tested
-     * @return  <tt>true</tt> if there is a mapping for <tt>key</tt>;
-     *          <tt>false</tt> otherwise
-     */
-    public boolean containsKey(Object key) {
-        return getEntry(key) != null;
-    }
-
-    /**
-     * Returns the entry associated with the specified key in the HashMap.
-     * Returns null if the HashMap contains no mapping for this key.
-     */
-    Entry getEntry(Object key) {
-        Object k = maskNull(key);
-        int h = hash(k);
-        Entry[] tab = getTable();
-        int index = indexFor(h, tab.length);
-        Entry e = tab[index];
-        while (e != null && !(e.hash == h && k == e.get()))
-            e = e.next;
-        return e;
-    }
-
-    /**
-     * Associates the specified value with the specified key in this map.
-     * If the map previously contained a mapping for this key, the old
-     * value is replaced.
-     *
-     * @param key key with which the specified value is to be associated.
-     * @param value value to be associated with the specified key.
-     * @return previous value associated with specified key, or <tt>null</tt>
-     *	       if there was no mapping for key.  A <tt>null</tt> return can
-     *	       also indicate that the HashMap previously associated
-     *	       <tt>null</tt> with the specified key.
-     */
-    public Object put(Object key, Object value) {
-        Object k = maskNull(key);
-        int h = hash(k);
-        Entry[] tab = getTable();
-        int i = indexFor(h, tab.length);
-        
-        for (Entry e = tab[i]; e != null; e = e.next) {
-            if (h == e.hash && k == e.get()) {
-                Object oldValue = e.value;
-                if (value != oldValue)
-                    e.value = value;
-                return oldValue;
-            }
-        }
-
-        modCount++;
-        tab[i] = new Entry(k, value, queue, h, tab[i]);
-        if (++size >= threshold)
-            resize(tab.length * 2);
-        return null;
-    }
-
-    /**
-     * Rehashes the contents of this map into a new <tt>HashMap</tt> instance
-     * with a larger capacity. This method is called automatically when the
-     * number of keys in this map exceeds its capacity and load factor.
-     *
-     * Note that this method is a no-op if it's called with newCapacity ==
-     * 2*MAXIMUM_CAPACITY (which is Integer.MIN_VALUE).
-     *
-     * @param newCapacity the new capacity, MUST be a power of two.
-     */
-    void resize(int newCapacity) {
-        // assert (newCapacity & -newCapacity) == newCapacity; // power of 2
-
-        Entry[] oldTable = getTable();
-        int oldCapacity = oldTable.length;
-
-        // check if needed
-        if (size < threshold || oldCapacity > newCapacity)
-            return;
-
-        Entry[] newTable = new Entry[newCapacity];
-
-        transfer(oldTable, newTable);
-        table = newTable;
-
-        /*
-         * If ignoring null elements and processing ref queue caused massive
-         * shrinkage, then restore old table.  This should be rare, but avoids
-         * unbounded expansion of garbage-filled tables.
-         */
-        if (size >= threshold / 2) {
-            threshold = (int)(newCapacity * loadFactor);
-        } else {
-            expungeStaleEntries();
-            transfer(newTable, oldTable);
-            table = oldTable;
-        }
-    }
-
-    /** Transfer all entries from src to dest tables */
-    private void transfer(Entry[] src, Entry[] dest) {
-        for (int j = 0; j < src.length; ++j) {
-            Entry e = src[j];
-            src[j] = null;
-            while (e != null) {
-                Entry next = e.next;
-                Object key = e.get();
-                if (key == null) {
-                    e.next = null;  // Help GC
-                    e.value = null; //  "   "
-                    size--;
-                } else {
-                    int i = indexFor(e.hash, dest.length);
-                    e.next = dest[i];
-                    dest[i] = e;
-                }
-                e = next;
-            }
-        }
-    }
-
-    /**
-     * Copies all of the mappings from the specified map to this map These
-     * mappings will replace any mappings that this map had for any of the
-     * keys currently in the specified map.<p>
-     *
-     * @param t mappings to be stored in this map.
-     * @throws  NullPointerException if the specified map is null.
-     */
-    public void putAll(Map t) {
-        // Expand enough to hold t's elements without resizing.
-        int n = t.size();
-        if (n == 0)
-            return;
-        if (n >= threshold) {
-            n = (int)(n / loadFactor + 1);
-            if (n > MAXIMUM_CAPACITY)
-                n = MAXIMUM_CAPACITY;
-            int capacity = table.length;
-            while (capacity < n)
-                capacity <<= 1;
-            resize(capacity);
-        }
-
-        for (Iterator i = t.entrySet().iterator(); i.hasNext(); ) {
-            Map.Entry e = (Map.Entry) i.next();
-            put(e.getKey(), e.getValue());
-        }
-    }
-
-    /**
-     * Removes the mapping for this key from this map if present.
-     *
-     * @param key key whose mapping is to be removed from the map.
-     * @return previous value associated with specified key, or <tt>null</tt>
-     *	       if there was no mapping for key.  A <tt>null</tt> return can
-     *	       also indicate that the map previously associated <tt>null</tt>
-     *	       with the specified key.
-     */
-    public Object remove(Object key) {
-        Object k = maskNull(key);
-        int h = hash(k);
-        Entry[] tab = getTable();
-        int i = indexFor(h, tab.length);
-        Entry prev = tab[i];
-        Entry e = prev;
-
-        while (e != null) {
-            Entry next = e.next;
-            if (h == e.hash && k == e.get()) {
-                modCount++;
-                size--;
-                if (prev == e)
-                    tab[i] = next;
-                else
-                    prev.next = next;
-                return e.value;
-            }
-            prev = e;
-            e = next;
-        }
-
-        return null;
-    }
-
-
-
-    /** Special version of remove needed by Entry set */
-    Entry removeMapping(Object o) {
-        if (!(o instanceof Map.Entry))
-            return null;
-        Entry[] tab = getTable();
-        Map.Entry entry = (Map.Entry)o;
-        Object k = maskNull(entry.getKey());
-        int h = hash(k);
-        int i = indexFor(h, tab.length);
-        Entry prev = tab[i];
-        Entry e = prev;
-
-        while (e != null) {
-            Entry next = e.next;
-            if (h == e.hash && e.equals(entry)) {
-                modCount++;
-                size--;
-                if (prev == e)
-                    tab[i] = next;
-                else
-                    prev.next = next;
-                return e;
-            }
-            prev = e;
-            e = next;
-        }
-
-        return null;
-    }
-
-    /**
-     * Removes all mappings from this map.
-     */
-    public void clear() {
-        // clear out ref queue. We don't need to expunge entries
-        // since table is getting cleared.
-        while (queue.poll() != null)
-            ;
-
-        modCount++;
-        Entry tab[] = table;
-        for (int i = 0; i < tab.length; ++i)
-            tab[i] = null;
-        size = 0;
-
-        // Allocation of array may have caused GC, which may have caused
-        // additional entries to go stale.  Removing these entries from the
-        // reference queue will make them eligible for reclamation.
-        while (queue.poll() != null)
-            ;
-   }
-
-    /**
-     * Returns <tt>true</tt> if this map maps one or more keys to the
-     * specified value.
-     *
-     * @param value value whose presence in this map is to be tested.
-     * @return <tt>true</tt> if this map maps one or more keys to the
-     *         specified value.
-     */
-    public boolean containsValue(Object value) {
-        if (value==null)
-            return containsNullValue();
-
-        Entry tab[] = getTable();
-        for (int i = tab.length ; i-- > 0 ;)
-            for (Entry e = tab[i] ; e != null ; e = e.next)
-                if (value.equals(e.value))
-                    return true;
-        return false;
-    }
-
-    /**
-     * Special-case code for containsValue with null argument
-     */
-    private boolean containsNullValue() {
-        Entry tab[] = getTable();
-        for (int i = tab.length ; i-- > 0 ;)
-            for (Entry e = tab[i] ; e != null ; e = e.next)
-                if (e.value==null)
-                    return true;
-        return false;
-    }
-
-    /**
-     * The entries in this hash table extend WeakReference, using its main ref
-     * field as the key.
-     */
-    private static class Entry extends WeakReference implements Map.Entry {
-        private Object value;
-        private final int hash;
-        private Entry next;
-
-        /**
-         * Create new entry.
-         */
-        Entry(Object key, Object value, ReferenceQueue queue,
-              int hash, Entry next) {
-            super(key, queue);
-            this.value = value;
-            this.hash  = hash;
-            this.next  = next;
-        }
-
-        public Object getKey() {
-            return unmaskNull(this.get());
-        }
-
-        public Object getValue() {
-            return value;
-        }
-
-        public Object setValue(Object newValue) {
-            Object oldValue = value;
-            value = newValue;
-            return oldValue;
-        }
-
-        public boolean equals(Object o) {
-            if (!(o instanceof Map.Entry))
-                return false;
-            Map.Entry e = (Map.Entry)o;
-            Object k1 = getKey();
-            Object k2 = e.getKey();
-            if (k1 == k2) {
-                Object v1 = getValue();
-                Object v2 = e.getValue();
-                if (v1 == v2 || (v1 != null && v1.equals(v2)))
-                    return true;
-            }
-            return false;
-        }
-
-        public int hashCode() {
-            Object k = getKey();
-            Object v = getValue();
-            return  ((k==null ? 0 : System.identityHashCode(k)) ^
-                     (v==null ? 0 : v.hashCode()));
-        }
-
-        public String toString() {
-            return getKey() + "=" + getValue();
-        }
-    }
-
-    private abstract class HashIterator implements Iterator {
-        int index;
-        Entry entry = null;
-        Entry lastReturned = null;
-        int expectedModCount = modCount;
-
-        /**
-         * Strong reference needed to avoid disappearance of key
-         * between hasNext and next
-         */
-        Object nextKey = null;
-
-        /**
-         * Strong reference needed to avoid disappearance of key
-         * between nextEntry() and any use of the entry
-         */
-        Object currentKey = null;
-
-        HashIterator() {
-            index = (size() != 0 ? table.length : 0);
-        }
-
-        public boolean hasNext() {
-            Entry[] t = table;
-
-            while (nextKey == null) {
-                Entry e = entry;
-                int i = index;
-                while (e == null && i > 0)
-                    e = t[--i];
-                entry = e;
-                index = i;
-                if (e == null) {
-                    currentKey = null;
-                    return false;
-                }
-                nextKey = e.get(); // hold on to key in strong ref
-                if (nextKey == null)
-                    entry = entry.next;
-            }
-            return true;
-        }
-
-        /** The common parts of next() across different types of iterators */
-        protected Entry nextEntry() {
-            if (modCount != expectedModCount)
-                throw new ConcurrentModificationException();
-            if (nextKey == null && !hasNext())
-                throw new NoSuchElementException();
-
-            lastReturned = entry;
-            entry = entry.next;
-            currentKey = nextKey;
-            nextKey = null;
-            return lastReturned;
-        }
-
-        public void remove() {
-            if (lastReturned == null)
-                throw new IllegalStateException();
-            if (modCount != expectedModCount)
-                throw new ConcurrentModificationException();
-
-            WeakIdentityHashMap.this.remove(currentKey);
-            expectedModCount = modCount;
-            lastReturned = null;
-            currentKey = null;
-        }
-
-    }
-
-    private class ValueIterator extends HashIterator {
-        public Object next() {
-            return nextEntry().value;
-        }
-    }
-
-    private class KeyIterator extends HashIterator {
-        public Object next() {
-            return nextEntry().getKey();
-        }
-    }
-
-    private class EntryIterator extends HashIterator {
-        public Object next() {
-            return nextEntry();
-        }
-    }
-
-    // Views
-
-    private transient Set entrySet = null;
-
-    /**
-     * Returns a set view of the keys contained in this map.  The set is
-     * backed by the map, so changes to the map are reflected in the set, and
-     * vice-versa.  The set supports element removal, which removes the
-     * corresponding mapping from this map, via the <tt>Iterator.remove</tt>,
-     * <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and
-     * <tt>clear</tt> operations.  It does not support the <tt>add</tt> or
-     * <tt>addAll</tt> operations.
-     *
-     * @return a set view of the keys contained in this map.
-     */
-    public Set keySet() {
-        Set ks = keySet;
-        return (ks != null ? ks : (keySet = new KeySet()));
-    }
-
-    private class KeySet extends AbstractSet {
-        public Iterator iterator() {
-            return new KeyIterator();
-        }
-
-        public int size() {
-            return WeakIdentityHashMap.this.size();
-        }
-
-        public boolean contains(Object o) {
-            return containsKey(o);
-        }
-
-        public boolean remove(Object o) {
-            if (containsKey(o)) {
-                WeakIdentityHashMap.this.remove(o);
-                return true;
-            }
-            else
-                return false;
-        }
-
-        public void clear() {
-            WeakIdentityHashMap.this.clear();
-        }
-
-        public Object[] toArray() {
-            Collection c = new ArrayList(size());
-            for (Iterator i = iterator(); i.hasNext(); )
-                c.add(i.next());
-            return c.toArray();
-        }
-
-        public Object[] toArray(Object a[]) {
-            Collection c = new ArrayList(size());
-            for (Iterator i = iterator(); i.hasNext(); )
-                c.add(i.next());
-            return c.toArray(a);
-        }
-    }
-
-    /**
-     * Returns a collection view of the values contained in this map.  The
-     * collection is backed by the map, so changes to the map are reflected in
-     * the collection, and vice-versa.  The collection supports element
-     * removal, which removes the corresponding mapping from this map, via the
-     * <tt>Iterator.remove</tt>, <tt>Collection.remove</tt>,
-     * <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations.
-     * It does not support the <tt>add</tt> or <tt>addAll</tt> operations.
-     *
-     * @return a collection view of the values contained in this map.
-     */
-    public Collection values() {
-        Collection vs = values;
-        return (vs != null ?  vs : (values = new Values()));
-    }
-
-    private class Values extends AbstractCollection {
-        public Iterator iterator() {
-            return new ValueIterator();
-        }
-
-        public int size() {
-            return WeakIdentityHashMap.this.size();
-        }
-
-        public boolean contains(Object o) {
-            return containsValue(o);
-        }
-
-        public void clear() {
-            WeakIdentityHashMap.this.clear();
-        }
-
-        public Object[] toArray() {
-            Collection c = new ArrayList(size());
-            for (Iterator i = iterator(); i.hasNext(); )
-                c.add(i.next());
-            return c.toArray();
-        }
-
-        public Object[] toArray(Object a[]) {
-            Collection c = new ArrayList(size());
-            for (Iterator i = iterator(); i.hasNext(); )
-                c.add(i.next());
-            return c.toArray(a);
-        }
-    }
-
-    /**
-     * Returns a collection view of the mappings contained in this map.  Each
-     * element in the returned collection is a <tt>Map.Entry</tt>.  The
-     * collection is backed by the map, so changes to the map are reflected in
-     * the collection, and vice-versa.  The collection supports element
-     * removal, which removes the corresponding mapping from the map, via the
-     * <tt>Iterator.remove</tt>, <tt>Collection.remove</tt>,
-     * <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations.
-     * It does not support the <tt>add</tt> or <tt>addAll</tt> operations.
-     *
-     * @return a collection view of the mappings contained in this map.
-     * @see java.util.Map.Entry
-     */
-    public Set entrySet() {
-        Set es = entrySet;
-        return (es != null ? es : (entrySet = new EntrySet()));
-    }
-
-    private class EntrySet extends AbstractSet {
-        public Iterator iterator() {
-            return new EntryIterator();
-        }
-
-        public boolean contains(Object o) {
-            if (!(o instanceof Map.Entry))
-                return false;
-            Map.Entry e = (Map.Entry)o;
-            Object k = e.getKey();
-            Entry candidate = getEntry(e.getKey());
-            return candidate != null && candidate.equals(e);
-        }
-
-        public boolean remove(Object o) {
-            return removeMapping(o) != null;
-        }
-
-        public int size() {
-            return WeakIdentityHashMap.this.size();
-        }
-
-        public void clear() {
-            WeakIdentityHashMap.this.clear();
-        }
-
-        public Object[] toArray() {
-            Collection c = new ArrayList(size());
-            for (Iterator i = iterator(); i.hasNext(); )
-                c.add(new SimpleEntry((Map.Entry) i.next()));
-            return c.toArray();
-        }
-
-        public Object[] toArray(Object a[]) {
-            Collection c = new ArrayList(size());
-            for (Iterator i = iterator(); i.hasNext(); )
-                c.add(new SimpleEntry((Map.Entry) i.next()));
-            return c.toArray(a);
-        }
-    }
-
-    static class SimpleEntry implements Map.Entry {
-        Object key;
-        Object value;
-
-        public SimpleEntry(Object key, Object value) {
-            this.key   = key;
-            this.value = value;
-        }
-
-        public SimpleEntry(Map.Entry e) {
-            this.key   = e.getKey();
-            this.value = e.getValue();
-        }
-
-        public Object getKey() {
-            return key;
-        }
-
-        public Object getValue() {
-            return value;
-        }
-
-        public Object setValue(Object value) {
-            Object oldValue = this.value;
-            this.value = value;
-            return oldValue;
-        }
-
-        public boolean equals(Object o) {
-            if (!(o instanceof Map.Entry))
-                return false;
-            Map.Entry e = (Map.Entry)o;
-            return eq(key, e.getKey()) &&  eq(value, e.getValue());
-        }
-
-        public int hashCode() {
-            Object v;
-            return ((key   == null)   ? 0 :   key.hashCode()) ^
-                   ((value == null)   ? 0 : value.hashCode());
-        }
-
-        public String toString() {
-            return key + "=" + value;
-        }
-
-        private static boolean eq(Object o1, Object o2) {
-            return (o1 == null ? o2 == null : o1.equals(o2));
-        }
-    }
-
-}
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakIdentityHashMap.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/WeakIdentityHashMap.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakSet.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/WeakSet.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakSet.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,226 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.lang.ref.ReferenceQueue;
-
-import java.util.Set;
-import java.util.HashSet;
-import java.util.AbstractSet;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import org.jboss.util.NullArgumentException;
-import org.jboss.util.WeakObject;
-
-/**
- * A <tt>Set</tt> implementation with <em>weak elements</em>.  An entry in
- * a <tt>WeakSet</tt> will automatically be removed when the element is no
- * longer in ordinary use.  More precisely, the presence of an given element
- * will not prevent the element from being discarded by the garbage collector,
- * that is, made finalizable, finalized, and then reclaimed.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class WeakSet
-   extends AbstractSet
-   implements Set
-{
-   /** The reference queue used to get object removal notifications. */
-   protected final ReferenceQueue queue = new ReferenceQueue();
-
-   /** The <tt>Set</tt> which will be used for element storage. */
-   protected final Set set;
-
-   /**
-    * Construct a <tt>WeakSet</tt>.  Any elements in the given set will be
-    * wrapped in {@link WeakObject} references.
-    *
-    * @param set  The <tt>Set</tt> which will be used for element storage.
-    *
-    * @throws NullArgumentException    Set is <tt>null</tt>.
-    */
-   public WeakSet(final Set set) {
-      if (set == null)
-         throw new NullArgumentException("set");
-
-      // reset any elements to weak objects
-      if (set.size() != 0) {
-         Object elements[] = set.toArray();
-         set.clear();
-
-         for (int i=0; i<elements.length; i++) {
-            add(elements[i]);
-         }
-      }
-
-      this.set = set;
-   }
-
-   /**
-    * Construct a <tt>WeakSet</tt> based on a <tt>HashSet</tt>.
-    */
-   public WeakSet() {
-      this(new HashSet());
-   }
-
-   /**
-    * Maintain the elements in the set.  Removes objects from the set that
-    * have been reclaimed due to GC.
-    */
-   protected final void maintain() {
-      WeakObject weak;
-      while ((weak = (WeakObject)queue.poll()) != null) {
-         set.remove(weak);
-      }
-   }
-
-   /**
-    * Return the size of the set.
-    *
-    * @return  The size of the set.
-    */
-   public int size() {
-      maintain();
-
-      return set.size();
-   }
-
-   /**
-    * Return an iteration over the elements in the set.
-    *
-    * @return  An iteration over the elements in the set.
-    */
-   public Iterator iterator() {
-      return new Iterator() {
-
-            /** The set's iterator */
-            Iterator iter = set.iterator();
-
-            /** The next available object. */
-            Object next = null;
-
-            public boolean hasNext() {
-               while (iter.hasNext()) {
-                  WeakObject weak = (WeakObject)iter.next();
-                  Object obj = null;
-                  if (weak != null && (obj = weak.get()) == null) {
-                     // object has been reclaimed by the GC
-                     continue;
-                  }
-
-                  next = obj;
-                  return true;
-               }
-
-               return false;
-            }
-
-            public Object next() {
-               if ((next == null) && !hasNext()) {
-                  throw new NoSuchElementException();
-               }
-
-               Object obj = next;
-               next = null;
-
-               return obj;
-            }
-
-            public void remove() {
-               iter.remove();
-            }
-         };
-   }
-
-   /**
-    * Add an element to the set.
-    *
-    * @param obj  Element to add to the set.
-    * @return     True if the element was added.
-    */
-   public boolean add(final Object obj) {
-      maintain();
-
-      return set.add(WeakObject.create(obj, queue));
-   }
-
-   /**
-    * Returns <tt>true</tt> if this set contains no elements.
-    *
-    * @return  <tt>true</tt> if this set contains no elements.
-    */
-   public boolean isEmpty() {
-      maintain();
-
-      return set.isEmpty();
-   }
-
-   /**
-    * Returns <tt>true</tt> if this set contains the specified element.
-    *
-    * @param obj  Element whose presence in this set is to be tested.
-    * @return     <tt>true</tt> if this set contains the specified element.
-    */
-   public boolean contains(final Object obj) {
-      maintain();
-
-      return set.contains(WeakObject.create(obj));
-   }
-
-   /**
-    * Removes the given element from this set if it is present.
-    *
-    * @param obj  Object to be removed from this set, if present.
-    * @return     <tt>true</tt> if the set contained the specified element.
-    */
-   public boolean remove(final Object obj) {
-      maintain();
-
-      return set.remove(WeakObject.create(obj));
-   }
-
-   /**
-    * Removes all of the elements from this set.
-    */
-   public void clear() {
-      set.clear();
-   }
-
-   /**
-     * Returns a shallow copy of this <tt>WeakSet</tt> instance: the elements
-     * themselves are not cloned.
-     *
-     * @return    A shallow copy of this set.
-     */
-   public Object clone() {
-      maintain();
-
-      try { 
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) { 
-         throw new InternalError();
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakSet.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/WeakSet.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakValueHashMap.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/WeakValueHashMap.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakValueHashMap.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,248 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.collection;
-
-import java.util.Map;
-import java.util.AbstractMap;
-import java.util.HashMap;
-import java.util.Set;
-
-import java.lang.ref.WeakReference;
-import java.lang.ref.ReferenceQueue;
-
-
-/**
- * This Map will remove entries when the value in the map has been
- * cleaned from garbage collection
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:bill at jboss.org">Bill Burke</a>
- */
-public class WeakValueHashMap
-   extends AbstractMap
-   implements Map 
-{
-   private static class WeakValueRef extends WeakReference
-   {
-      public Object key;
-
-      private WeakValueRef(Object key, Object val, ReferenceQueue q)
-      {
-         super(val, q);
-         this.key = key;
-      }
-      
-      private static WeakValueRef create(Object key, Object val, ReferenceQueue q)
-      {
-         if (val == null) return null;
-         else return new WeakValueRef(key, val, q);
-      }
-      
-   }
-   public Set entrySet() 
-   { 
-      processQueue();
-      return hash.entrySet();
-   }
-
-   /* Hash table mapping WeakKeys to values */
-   private Map hash;
-
-   /* Reference queue for cleared WeakKeys */
-   private ReferenceQueue queue = new ReferenceQueue();
-   
-   /* Remove all invalidated entries from the map, that is, remove all entries
-      whose values have been discarded.  
-    */
-   private void processQueue()
-   {
-      WeakValueRef ref;
-      while ((ref = (WeakValueRef)queue.poll()) != null) {
-         if (ref == (WeakValueRef) hash.get(ref.key)) {
-            // only remove if it is the *exact* same WeakValueRef
-            //
-            hash.remove(ref.key);
-         }
-      }
-   }
-
-
-   /* -- Constructors -- */
-
-   /**
-    * Constructs a new, empty <code>WeakHashMap</code> with the given
-    * initial capacity and the given load factor.
-    *
-    * @param  initialCapacity  The initial capacity of the
-    *                          <code>WeakHashMap</code>
-    *
-    * @param  loadFactor       The load factor of the <code>WeakHashMap</code>
-    *
-    * @throws IllegalArgumentException  If the initial capacity is less than
-    *                                   zero, or if the load factor is
-    *                                   nonpositive
-    */
-   public WeakValueHashMap(int initialCapacity, float loadFactor)
-   {
-      hash = new HashMap(initialCapacity, loadFactor);
-   }
-
-   /**
-    * Constructs a new, empty <code>WeakHashMap</code> with the given
-    * initial capacity and the default load factor, which is
-    * <code>0.75</code>.
-    *
-    * @param  initialCapacity  The initial capacity of the
-    *                          <code>WeakHashMap</code>
-    *
-    * @throws IllegalArgumentException  If the initial capacity is less than
-    *                                   zero
-    */
-   public WeakValueHashMap(int initialCapacity)
-   {
-      hash = new HashMap(initialCapacity);
-   }
-
-   /**
-    * Constructs a new, empty <code>WeakHashMap</code> with the default
-    * initial capacity and the default load factor, which is
-    * <code>0.75</code>.
-    */
-   public WeakValueHashMap()
-   {
-      hash = new HashMap();
-   }
-
-   /**
-    * Constructs a new <code>WeakHashMap</code> with the same mappings as the
-    * specified <tt>Map</tt>.  The <code>WeakHashMap</code> is created with an
-    * initial capacity of twice the number of mappings in the specified map
-    * or 11 (whichever is greater), and a default load factor, which is
-    * <tt>0.75</tt>.
-    *
-    * @param   t the map whose mappings are to be placed in this map.
-    * @since	1.3
-    */
-   public WeakValueHashMap(Map t)
-   {
-      this(Math.max(2*t.size(), 11), 0.75f);
-      putAll(t);
-   }
-
-   /* -- Simple queries -- */
-
-   /**
-    * Returns the number of key-value mappings in this map.
-    * <strong>Note:</strong> <em>In contrast with most implementations of the
-    * <code>Map</code> interface, the time required by this operation is
-    * linear in the size of the map.</em>
-    */
-   public int size()
-   {
-      processQueue();
-      return hash.size();
-   }
-
-   /**
-    * Returns <code>true</code> if this map contains no key-value mappings.
-    */
-   public boolean isEmpty()
-   {
-      processQueue();
-      return hash.isEmpty();
-   }
-
-   /**
-    * Returns <code>true</code> if this map contains a mapping for the
-    * specified key.
-    *
-    * @param   key   The key whose presence in this map is to be tested
-    */
-   public boolean containsKey(Object key)
-   {
-      processQueue();
-      return hash.containsKey(key);
-   }
-
-   /* -- Lookup and modification operations -- */
-
-   /**
-    * Returns the value to which this map maps the specified <code>key</code>.
-    * If this map does not contain a value for this key, then return
-    * <code>null</code>.
-    *
-    * @param  key  The key whose associated value, if any, is to be returned
-    */
-   public Object get(Object key)
-   {
-      processQueue();
-      WeakReference ref = (WeakReference)hash.get(key);
-      if (ref != null) return ref.get();
-      return null;
-   }
-
-   /**
-    * Updates this map so that the given <code>key</code> maps to the given
-    * <code>value</code>.  If the map previously contained a mapping for
-    * <code>key</code> then that mapping is replaced and the previous value is
-    * returned.
-    *
-    * @param  key    The key that is to be mapped to the given
-    *                <code>value</code> 
-    * @param  value  The value to which the given <code>key</code> is to be
-    *                mapped
-    *
-    * @return  The previous value to which this key was mapped, or
-    *          <code>null</code> if if there was no mapping for the key
-    */
-   public Object put(Object key, Object value) 
-   {
-      processQueue();
-      Object rtn = hash.put(key, WeakValueRef.create(key, value, queue));
-      if (rtn != null) rtn = ((WeakReference)rtn).get();
-      return rtn;
-   }
-
-   /**
-    * Removes the mapping for the given <code>key</code> from this map, if
-    * present.
-    *
-    * @param  key  The key whose mapping is to be removed
-    *
-    * @return  The value to which this key was mapped, or <code>null</code> if
-    *          there was no mapping for the key
-    */
-   public Object remove(Object key) 
-   {
-      processQueue();
-      return hash.remove(key);
-   }
-
-   /**
-    * Removes all mappings from this map.
-    */
-   public void clear()
-   {
-      processQueue();
-      hash.clear();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/WeakValueHashMap.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/WeakValueHashMap.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Extentions to the <i>Java Collections framework</i>.<p>
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/collection/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/collection/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/deadlock)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/ApplicationDeadlockException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/deadlock/ApplicationDeadlockException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/ApplicationDeadlockException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,82 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.deadlock;
-
-/**
- * This exception class is thrown when application deadlock is detected when trying to lock an entity bean
- * This is probably NOT a result of a jboss bug, but rather that the application is access the same entity
- * beans within 2 different transaction in a different order.  Remember, with a PessimisticEJBLock, 
- * Entity beans are locked until the transaction commits or is rolled back.
- *
- * @author <a href="bill at burkecentral.com">Bill Burke</a>
- *
- * @version $Revision$
- *
- * <p><b>Revisions:</b><br>
- * <p><b>2002/02/13: billb</b>
- *  <ol>
- *  <li>Initial revision
- *  </ol>
- */
-public class ApplicationDeadlockException extends RuntimeException
-{
-   protected boolean retry = false;
-
-
-   public ApplicationDeadlockException()
-   {
-      super();
-   }
-
-   public ApplicationDeadlockException(String msg, boolean retry)
-   {
-      super(msg);
-      this.retry = retry;
-   }
-
-   public boolean retryable()
-   {
-      return retry;
-   }
-
-   
-   /**
-    * Detects exception contains is or a ApplicationDeadlockException.
-    */
-   public static ApplicationDeadlockException isADE(Throwable t)
-   {
-      while (t!=null)
-      {
-         if (t instanceof ApplicationDeadlockException)
-         {
-            return (ApplicationDeadlockException)t;
-         }
-         else
-         {
-            t = t.getCause();
-         }
-      }
-      return null;
-   }
-
-}
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/ApplicationDeadlockException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/deadlock/ApplicationDeadlockException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/DeadlockDetector.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/deadlock/DeadlockDetector.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/DeadlockDetector.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,100 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.deadlock;
-
-import java.util.HashMap;
-import java.util.HashSet;
-
-/**
- * Created by IntelliJ IDEA.
- * User: wburke
- * Date: Aug 21, 2003
- * Time: 2:10:46 PM
- * To change this template use Options | File Templates.
- */
-public class DeadlockDetector
-{
-   // TODO Maybe this should be an MBean in the future
-   public static DeadlockDetector singleton = new DeadlockDetector();
-   // This following is for deadlock detection
-   protected HashMap waiting = new HashMap();
-
-   public void deadlockDetection(Object holder, Resource resource)
-           throws ApplicationDeadlockException
-   {
-      HashSet set = new HashSet();
-      set.add(holder);
-
-      Object checkHolder = resource.getResourceHolder();
-
-      synchronized (waiting)
-      {
-         addWaiting(holder, resource);
-
-         while (checkHolder != null)
-         {
-            Resource waitingFor = (Resource)waiting.get(checkHolder);
-            Object holding = null;
-            if (waitingFor != null)
-            {
-               holding = waitingFor.getResourceHolder();
-            }
-            if (holding != null)
-            {
-               if (set.contains(holding))
-               {
-                  // removeWaiting should be cleaned up in acquire
-                  String msg = "Application deadlock detected, resource="+resource
-                     +", holder="+holder+", waitingResource="+waitingFor
-                     +", waitingResourceHolder="+holding;
-                  throw new ApplicationDeadlockException(msg, true);
-               }
-               set.add(holding);
-            }
-            checkHolder = holding;
-         }
-      }
-   }
-
-   /**
-    * Add a transaction waiting for a lock
-    */
-   public void addWaiting(Object holder, Resource resource)
-   {
-      synchronized (waiting)
-      {
-         waiting.put(holder, resource);
-      }
-   }
-
-   /**
-    * Remove a transaction waiting for a lock
-    */
-   public void removeWaiting(Object holder)
-   {
-      synchronized (waiting)
-      {
-         waiting.remove(holder);
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/DeadlockDetector.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/deadlock/DeadlockDetector.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/Resource.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/deadlock/Resource.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/Resource.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,34 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.deadlock;
-
-/**
- * Created by IntelliJ IDEA.
- * User: wburke
- * Date: Aug 21, 2003
- * Time: 2:11:52 PM
- * To change this template use Options | File Templates.
- */
-public interface Resource
-{
-   Object getResourceHolder();
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/deadlock/Resource.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/deadlock/Resource.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ArchiveBrowser.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/ArchiveBrowser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ArchiveBrowser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,70 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.io.File;
-import java.net.URL;
-import java.net.URISyntaxException;
-import java.net.URI;
-import java.util.Iterator;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public abstract class ArchiveBrowser
-{
-   public interface Filter
-   {
-      boolean accept(String filename);
-   }
-
-   public static Iterator getBrowser(URL url, Filter filter)
-   {
-      if (url.getProtocol().equals("file"))
-      {
-         File f = null;
-         try
-         {
-            f = new File(new URI(url.toString()));
-         }
-         catch (URISyntaxException e)
-         {
-            throw new RuntimeException( "Not a valid URL: " + url, e );
-         }
-         if (f.isDirectory())
-         {
-            return new DirectoryArchiveBrowser(f, filter);
-         }
-         else
-         {
-            return new JarArchiveBrowser(f, filter);
-         }
-      }
-      else
-      {
-         throw new RuntimeException("NOT IMPLEMENTED");
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ArchiveBrowser.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/ArchiveBrowser.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ClassFileFilter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/ClassFileFilter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ClassFileFilter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-/**
- * ArchiveBrowser filter to find .class files
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class ClassFileFilter implements ArchiveBrowser.Filter
-{
-   public boolean accept(String filename)
-   {
-      return filename.endsWith(".class");
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/ClassFileFilter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/ClassFileFilter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/DirectoryArchiveBrowser.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/DirectoryArchiveBrowser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/DirectoryArchiveBrowser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,98 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class DirectoryArchiveBrowser implements Iterator
-{
-   private Iterator files;
-
-   public DirectoryArchiveBrowser(File file, ArchiveBrowser.Filter filter)
-   {
-      ArrayList list = new ArrayList();
-      try
-      {
-         create(list, file, filter);
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-      files = list.iterator();
-   }
-
-   public static void create(List list, File dir, ArchiveBrowser.Filter filter) throws Exception
-   {
-      File[] files = dir.listFiles();
-      for (int i = 0; i < files.length; i++)
-      {
-         if (files[i].isDirectory())
-         {
-            create(list, files[i], filter);
-         }
-         else
-         {
-            if (filter.accept(files[i].getAbsolutePath()))
-            {
-               list.add(files[i]);
-            }
-         }
-      }
-   }
-
-   public boolean hasNext()
-   {
-      return files.hasNext();
-   }
-
-   public Object next()
-   {
-      File fp = (File) files.next();
-      try
-      {
-         return new FileInputStream(fp);
-      }
-      catch (FileNotFoundException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public void remove()
-   {
-      throw new RuntimeException("Illegal operation call");
-   }
-
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/DirectoryArchiveBrowser.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/DirectoryArchiveBrowser.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilePrefixFilter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/FilePrefixFilter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilePrefixFilter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,78 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.io.File;
-import java.io.FileFilter;
-
-/**
- * A <em>prefix</em> based file filter.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FilePrefixFilter
-   implements FileFilter
-{
-   /** The prefix which files must have to be accepted. */
-   protected final String prefix;
-
-   /** Flag to signal that we want to ignore the case. */
-   protected final boolean ignoreCase;
-
-   /**
-    * Construct a <tt>FilePrefixFilter</tt>.
-    *
-    * @param prefix     The prefix which files must have to be accepted.
-    * @param ignoreCase <tt>True</tt> if the filter should be case-insensitive.
-    */
-   public FilePrefixFilter(final String prefix,
-                           final boolean ignoreCase)
-   {
-      this.ignoreCase = ignoreCase;
-      this.prefix = (ignoreCase ? prefix.toLowerCase() : prefix);
-   }
-
-   /**
-    * Construct a case sensitive <tt>FilePrefixFilter</tt>.
-    *
-    * @param prefix  The prefix which files must have to be accepted.
-    */
-   public FilePrefixFilter(final String prefix) {
-      this(prefix, false);
-   }
-
-   /**
-    * Check if a file is acceptible.
-    *
-    * @param file    The file to check.
-    * @return        <tt>true</tt> if the file is acceptable.
-    */
-   public boolean accept(final File file) {
-      if (ignoreCase) {
-         return file.getName().toLowerCase().startsWith(prefix);
-      }
-      else {
-         return file.getName().startsWith(prefix);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilePrefixFilter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/FilePrefixFilter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FileSuffixFilter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/FileSuffixFilter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FileSuffixFilter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,112 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.io.File;
-import java.io.FileFilter;
-
-/**
- * A <em>suffix</em> based file filter.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FileSuffixFilter
-   implements FileFilter
-{
-   /** A list of suffixes which files must have to be accepted. */
-   protected final String suffixes[];
-
-   /** Flag to signal that we want to ignore the case. */
-   protected final boolean ignoreCase;
-
-   /**
-    * Construct a <tt>FileSuffixFilter</tt>.
-    *
-    * @param suffixes   A list of suffixes which files mut have to be accepted.
-    * @param ignoreCase <tt>True</tt> if the filter should be case-insensitive.
-    */
-   public FileSuffixFilter(final String suffixes[],
-                           final boolean ignoreCase)
-   {
-      this.ignoreCase = ignoreCase;
-      if (ignoreCase) {
-         this.suffixes = new String[suffixes.length];
-         for (int i=0; i<suffixes.length; i++) {
-            this.suffixes[i] = suffixes[i].toLowerCase();
-         }
-      }
-      else {
-         this.suffixes = suffixes;
-      }
-   }
-
-   /**
-    * Construct a <tt>FileSuffixFilter</tt>.
-    *
-    * @param suffixes   A list of suffixes which files mut have to be accepted.
-    */
-   public FileSuffixFilter(final String suffixes[])
-   {
-      this(suffixes, false);
-   }
-
-   /**
-    * Construct a <tt>FileSuffixFilter</tt>.
-    *
-    * @param suffix     The suffix which files must have to be accepted.
-    * @param ignoreCase <tt>True</tt> if the filter should be case-insensitive.
-    */
-   public FileSuffixFilter(final String suffix,
-                           final boolean ignoreCase)
-   {
-      this(new String[] { suffix }, ignoreCase);
-   }
-
-   /**
-    * Construct a case sensitive <tt>FileSuffixFilter</tt>.
-    *
-    * @param suffix  The suffix which files must have to be accepted.
-    */
-   public FileSuffixFilter(final String suffix) {
-      this(suffix, false);
-   }
-
-   /**
-    * Check if a file is acceptible.
-    *
-    * @param file    The file to check.
-    * @return        <tt>true</tt> if the file is acceptable.
-    */
-   public boolean accept(final File file) {
-      boolean success = false;
-
-      for (int i=0; i<suffixes.length && !success; i++) {
-         if (ignoreCase)
-            success = file.getName().toLowerCase().endsWith(suffixes[i]);
-         else
-            success = file.getName().endsWith(suffixes[i]);
-      }
-
-      return success;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FileSuffixFilter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/FileSuffixFilter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenamePrefixFilter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/FilenamePrefixFilter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenamePrefixFilter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,79 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.io.File;
-import java.io.FilenameFilter;
-
-/**
- * A <em>prefix</em> based filename filter.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FilenamePrefixFilter
-   implements FilenameFilter
-{
-   /** The prefix which files must have to be accepted. */
-   protected final String prefix;
-
-   /** Flag to signal that we want to ignore the case. */
-   protected final boolean ignoreCase;
-
-   /**
-    * Construct a <tt>FilenamePrefixFilter</tt>.
-    *
-    * @param prefix     The prefix which files must have to be accepted.
-    * @param ignoreCase <tt>True</tt> if the filter should be case-insensitive.
-    */
-   public FilenamePrefixFilter(final String prefix,
-                               final boolean ignoreCase)
-   {
-      this.ignoreCase = ignoreCase;
-      this.prefix = (ignoreCase ? prefix.toLowerCase() : prefix);
-   }
-
-   /**
-    * Construct a case sensitive <tt>FilenamePrefixFilter</tt>.
-    *
-    * @param prefix  The prefix which files must have to be accepted.
-    */
-   public FilenamePrefixFilter(final String prefix) {
-      this(prefix, false);
-   }
-
-   /**
-    * Check if a file is acceptible.
-    *
-    * @param dir  The directory the file resides in.
-    * @param name The name of the file.
-    * @return     <tt>true</tt> if the file is acceptable.
-    */
-   public boolean accept(final File dir, final String name) {
-      if (ignoreCase) {
-         return name.toLowerCase().startsWith(prefix);
-      }
-      else {
-         return name.startsWith(prefix);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenamePrefixFilter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/FilenamePrefixFilter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenameSuffixFilter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/FilenameSuffixFilter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenameSuffixFilter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,79 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.io.File;
-import java.io.FilenameFilter;
-
-/**
- * A <em>suffix</em> based filename filter.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FilenameSuffixFilter
-   implements FilenameFilter
-{
-   /** The suffix which files must have to be accepted. */
-   protected final String suffix;
-
-   /** Flag to signal that we want to ignore the case. */
-   protected final boolean ignoreCase;
-
-   /**
-    * Construct a <tt>FilenameSuffixFilter</tt>.
-    *
-    * @param suffix     The suffix which files must have to be accepted.
-    * @param ignoreCase <tt>True</tt> if the filter should be case-insensitive.
-    */
-   public FilenameSuffixFilter(final String suffix,
-                               final boolean ignoreCase)
-   {
-      this.ignoreCase = ignoreCase;
-      this.suffix = (ignoreCase ? suffix.toLowerCase() : suffix);
-   }
-
-   /**
-    * Construct a case sensitive <tt>FilenameSuffixFilter</tt>.
-    *
-    * @param suffix  The suffix which files must have to be accepted.
-    */
-   public FilenameSuffixFilter(final String suffix) {
-      this(suffix, false);
-   }
-
-   /**
-    * Check if a file is acceptible.
-    *
-    * @param dir  The directory the file resides in.
-    * @param name The name of the file.
-    * @return     <tt>true</tt> if the file is acceptable.
-    */
-   public boolean accept(final File dir, final String name) {
-      if (ignoreCase) {
-         return name.toLowerCase().endsWith(suffix);
-      }
-      else {
-         return name.endsWith(suffix);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/FilenameSuffixFilter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/FilenameSuffixFilter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/Files.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/Files.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/Files.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,410 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.stream.Streams;
-
-/**
- * A collection of file utilities.
- *
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:Scott.Stark at jboss.org">Scott Stark<a/>
- * @author  <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @version $Revision$
- */
-public final class Files
-{
-   /** The Logger instance */   
-   private static final Logger log = Logger.getLogger(Files.class);
-   
-   /** for byte-to-hex conversions */
-   private static final char[] hexDigits = new char[]
-      { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
-   
-   /** The default size of the copy buffer. */
-   public static final int DEFAULT_BUFFER_SIZE = 8192;
-
-   /** Delete a file, or a directory and all of its contents.
-    *
-    * @param dir The directory or file to delete.
-    * @return True if all delete operations were successfull.
-    */
-   public static boolean delete(final File dir)
-   {
-      boolean success = true;
-
-      File files[] = dir.listFiles();
-      if (files != null)
-      {
-         for (int i = 0; i < files.length; i++)
-         {
-            File f = files[i];
-            if( f.isDirectory() == true )
-            {
-               // delete the directory and all of its contents.
-               if( delete(f) == false )
-               {
-                  success = false;
-                  log.debug("Failed to delete dir: "+f.getAbsolutePath());
-               }
-            }
-            // delete each file in the directory
-            else if( f.delete() == false )
-            {
-               success = false;
-               log.debug("Failed to delete file: "+f.getAbsolutePath());
-            }
-         }
-      }
-
-      // finally delete the directory
-      if( dir.delete() == false )
-      {
-         success = false;
-         log.debug("Failed to delete dir: "+dir.getAbsolutePath());
-      }
-
-      return success;
-   }
-
-   /**
-    * Delete a file or directory and all of its contents.
-    *
-    * @param dirname  The name of the file or directory to delete.
-    * @return True if all delete operations were successfull.
-    */
-   public static boolean delete(final String dirname)
-   {
-      return delete(new File(dirname));
-   }
-
-   /**
-    * Delete a directory contaning the given file and all its contents.
-    *
-    * @param filename a file or directory in the containing directory to delete
-    * @return true if all delete operations were successfull, false if any
-    * delete failed.
-    */
-   public static boolean deleteContaining(final String filename)
-   {
-      File file = new File(filename);
-      File containingDir = file.getParentFile();
-      return delete(containingDir);
-   }
-
-   /**
-    * Copy a file.
-    *
-    * @param source  Source file to copy.
-    * @param target  Destination target file.
-    * @param buff    The copy buffer.
-    *
-    * @throws IOException  Failed to copy file.
-    */
-   public static void copy(final File source,
-         final File target,
-         final byte buff[])
-         throws IOException
-   {
-      BufferedInputStream in = new BufferedInputStream(new FileInputStream(source));
-      BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(target));
-
-      int read;
-
-      try
-      {
-         while ((read = in.read(buff)) != -1)
-         {
-            out.write(buff, 0, read);
-         }
-      }
-      finally
-      {
-         Streams.flush(out);
-         Streams.close(in);
-         Streams.close(out);
-      }
-   }
-
-   /**
-    * Copy a file.
-    *
-    * @param source  Source file to copy.
-    * @param target  Destination target file.
-    * @param size    The size of the copy buffer.
-    *
-    * @throws IOException  Failed to copy file.
-    */
-   public static void copy(final File source,
-         final File target,
-         final int size)
-         throws IOException
-   {
-      copy(source, target, new byte[size]);
-   }
-
-   /**
-    * Copy a file.
-    *
-    * @param source  Source file to copy.
-    * @param target  Destination target file.
-    *
-    * @throws IOException  Failed to copy file.
-    */
-   public static void copy(final File source, final File target)
-         throws IOException
-   {
-      copy(source, target, DEFAULT_BUFFER_SIZE);
-   }
-   
-   /**
-    * Copy a remote/local URL to a local file
-    * 
-    * @param src the remote or local URL
-    * @param dest the local file
-    * @throws IOException upon error
-    */
-   public static void copy(URL src, File dest) throws IOException
-   {
-      log.debug("Copying " + src + " -> " + dest);
-      
-      // Validate that the dest parent directory structure exists
-      File dir = dest.getParentFile();
-      if (!dir.exists())
-      {
-         if (!dir.mkdirs())
-         {
-            throw new IOException("mkdirs failed for: " + dir.getAbsolutePath());
-         }
-      }
-      // Remove any existing dest content
-      if (dest.exists())
-      {
-         if (!Files.delete(dest))
-         {
-            throw new IOException("delete of previous content failed for: " + dest.getAbsolutePath());
-         }
-      }
-      // Treat local and remote URLs the same
-      // prepare streams, do the copy and flush
-      InputStream in = new BufferedInputStream(src.openStream());
-      OutputStream out = new BufferedOutputStream(new FileOutputStream(dest));
-      Streams.copy(in, out);
-      out.flush();
-      out.close();
-      in.close();
-   }
-   
-   /**
-    * Used to encode any string into a string that is safe to use as 
-    * a file name on most operating systems.
-    * 
-    * Use decodeFileName() to get back the original string.
-    * 
-    * Copied by Adrian's org.jboss.mq.pm.file.PersistenceManager
-    * and adapted to use hex instead of decimal digits
-    * 
-    * @param name the filename to encode
-    * @return a filesystem-friendly filename
-    */   
-   public static String encodeFileName(String name)
-   {
-      return encodeFileName(name, '@');
-   }
-   
-   /**
-    * Used to decode a file system friendly filename produced
-    * by encodeFileName() method, above.
-    * 
-    * Copied by Adrian's org.jboss.mq.pm.file.PersistenceManager
-    * and adapted to use hex instead of decimal digits
-    * 
-    * Note:
-    *   Decoding will not work if encoding produced
-    *   multi-byte encoded characters. If this is truly
-    *   needed we'll have to revise the encoding.
-    * 
-    * @param name the filename to decode
-    * @return the original name
-    */
-   public static String decodeFileName(String name)
-   {
-      return decodeFileName(name, '@');
-   }
-   
-   /**
-    * See encodeFileName(String) above.
-    * 
-    * @param name the filename to encode
-    * @param escape the escape character to use
-    * @return a filesystem-friendly filename
-    */ 
-   public static String encodeFileName(String name, char escape)
-   {
-      StringBuffer rc = new StringBuffer();
-      for (int i = 0; i < name.length(); i++ )
-      {
-         switch (name.charAt(i))
-         {
-            // These are the safe characters...
-            case 'a': case 'A': case 'b': case 'B': case 'c': case 'C':
-            case 'd': case 'D': case 'e': case 'E': case 'f': case 'F':
-            case 'g': case 'G': case 'h': case 'H': case 'i': case 'I':
-            case 'j': case 'J': case 'k': case 'K': case 'l': case 'L':
-            case 'm': case 'M': case 'n': case 'N': case 'o': case 'O':
-            case 'p': case 'P': case 'q': case 'Q': case 'r': case 'R':
-            case 's': case 'S': case 't': case 'T': case 'u': case 'U':
-            case 'v': case 'V': case 'w': case 'W': case 'x': case 'X':
-            case 'y': case 'Y': case 'z': case 'Z':
-            case '1': case '2': case '3': case '4': case '5': 
-            case '6': case '7': case '8': case '9': case '0': 
-            case '-': case '_': case '.':
-               rc.append(name.charAt(i));
-               break;
-
-            // Any other character needs to be encoded.
-            default:
-            
-               // We encode the characters as <esc>hh,
-               // where <esc> is the passed escape character and
-               // hh is the hex value of the UTF8 byte of the character.
-               // You might get <esc>hh<esc>hh since UTF8 can produce multiple
-               // bytes for a single character.
-               try
-               {
-                  byte data[] = ("" + name.charAt(i)).getBytes("UTF8");
-                  for (int j = 0; j < data.length; j++)
-                  {
-                     rc.append(escape);
-                     rc.append(hexDigits[ (data[j] >> 4) & 0xF ]); // high order digit
-                     rc.append(hexDigits[ (data[j]     ) & 0xF ]); // low order digit                     
-                  }
-               }
-               catch (UnsupportedEncodingException wonthappen)
-               {
-                  // nada
-               }
-         }
-      }
-      return rc.toString();
-   }
-
-   /**
-    * See decodeFileName(String) above.
-    *  
-    * @param name the filename to decode
-    * @param escape the escape character to use
-    * @return the original name
-    */
-   public static String decodeFileName(String name, char escape)
-   {
-      if (name == null)
-      {
-         return null;
-      }
-      StringBuffer sbuf = new StringBuffer(name.length());
-      
-      for (int i = 0; i < name.length(); i++)
-      {
-         char c = name.charAt(i);
-         if (c == escape)
-         {
-            char h1 = name.charAt(++i);
-            char h2 = name.charAt(++i);
-
-            // convert hex digits to integers
-            int d1 = (h1 >= 'a') ? (10 + h1 - 'a')
-                  : ((h1 >= 'A') ? (10 + h1 - 'A') 
-                                     :  (h1 - '0'));
-            
-            int d2 = (h2 >= 'a') ? (10 + h2 - 'a')
-                  : ((h2 >= 'A') ? (10 + h2 - 'A')
-                                      : (h2 - '0'));
-            
-            // handling only the <esc>hh case here, as we don't know
-            // if <esc>hh<esc>hh belong to the same character
-            // (and we are lazy to change the encoding) - REVISIT
-            byte[] bytes = new byte[] { (byte)(d1 * 16 + d2) };
-            
-            try 
-            {
-               String s = new String(bytes, "UTF8");
-               sbuf.append(s);
-            }
-            catch (UnsupportedEncodingException wonthappen)
-            {
-               // nada
-            }
-         }
-         else
-         {
-            sbuf.append(c);
-         }
-      }
-      return sbuf.toString();
-   }      
-
-   /**
-    * Build a relative path to the given base path.
-    * @param base - the path used as the base
-    * @param path - the path to compute relative to the base path
-    * @return A relative path from base to path
-    * @throws IOException
-    */ 
-   public static String findRelativePath(String base, String path)
-      throws IOException
-   {
-      String a = new File(base).getCanonicalFile().toURI().getPath();
-      String b = new File(path).getCanonicalFile().toURI().getPath();
-      String[] basePaths = a.split("/");
-      String[] otherPaths = b.split("/");
-      int n = 0;
-      for(; n < basePaths.length && n < otherPaths.length; n ++)
-      {
-         if( basePaths[n].equals(otherPaths[n]) == false )
-            break;
-      }
-      System.out.println("Common length: "+n);
-      StringBuffer tmp = new StringBuffer("../");
-      for(int m = n; m < basePaths.length - 1; m ++)
-         tmp.append("../");
-      for(int m = n; m < otherPaths.length; m ++)
-      {
-         tmp.append(otherPaths[m]);
-         tmp.append("/");
-      }
-
-      return tmp.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/Files.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/Files.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarArchiveBrowser.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/JarArchiveBrowser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarArchiveBrowser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,102 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.util.Iterator;
-import java.util.Enumeration;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipEntry;
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- *
- **/
-public class JarArchiveBrowser implements Iterator
-{
-   ZipFile zip;
-   Enumeration entries;
-   ZipEntry next;
-   ArchiveBrowser.Filter filter;
-
-   public JarArchiveBrowser(File f, ArchiveBrowser.Filter filter)
-   {
-      this.filter = filter;
-      try
-      {
-         zip = new ZipFile(f);
-         entries = zip.entries();
-      }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
-      }
-      setNext();
-   }
-
-   public boolean hasNext()
-   {
-      return next != null;
-   }
-
-   private void setNext()
-   {
-      next = null;
-      while (entries.hasMoreElements() && next == null)
-      {
-         do
-         {
-            next = (ZipEntry) entries.nextElement();
-         } while (entries.hasMoreElements() && next.isDirectory());
-         if (next.isDirectory()) next = null;
-
-         if (next != null && !filter.accept(next.getName()))
-         {
-            next = null;
-         }
-      }
-   }
-
-   public Object next()
-   {
-      ZipEntry entry = next;
-      setNext();
-
-      try
-      {
-         return zip.getInputStream(entry);
-      }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   public void remove()
-   {
-      throw new RuntimeException("Illegal operation on ArchiveBrowser");
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarArchiveBrowser.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/JarArchiveBrowser.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarUtils.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/JarUtils.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarUtils.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,424 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.file;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.JarURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.jar.JarInputStream;
-import java.util.jar.JarOutputStream;
-import java.util.jar.Manifest;
-import java.util.zip.ZipEntry;
-
-/** A utility class for dealing with Jar files.
-
- at author Scott.Stark at jboss.org
- at version $Revision$
-*/
-public final class JarUtils
-{
-   /**
-    * Hide the constructor
-    */
-   private JarUtils()
-   {
-   }
-   
-   /**
-    * <P>This function will create a Jar archive containing the src
-    * file/directory.  The archive will be written to the specified
-    * OutputStream.</P>
-    *
-    * <P>This is a shortcut for<br>
-    * <code>jar(out, new File[] { src }, null, null, null);</code></P>
-    *
-    * @param out The output stream to which the generated Jar archive is
-    *        written.
-    * @param src The file or directory to jar up.  Directories will be
-    *        processed recursively.
-    */
-   public static void jar(OutputStream out, File src) throws IOException
-   {
-      jar(out, new File[] { src }, null, null, null);
-   }
- 
-   /**
-    * <P>This function will create a Jar archive containing the src
-    * file/directory.  The archive will be written to the specified
-    * OutputStream.</P>
-    *
-    * <P>This is a shortcut for<br>
-    * <code>jar(out, src, null, null, null);</code></P>
-    *
-    * @param out The output stream to which the generated Jar archive is
-    *        written.
-    * @param src The file or directory to jar up.  Directories will be
-    *        processed recursively.
-    */
-   public static void jar(OutputStream out, File[] src) throws IOException
-   {
-      jar(out, src, null, null, null);
-   }
-   
-   /**
-    * <P>This function will create a Jar archive containing the src
-    * file/directory.  The archive will be written to the specified
-    * OutputStream.  Directories are processed recursively, applying the
-    * specified filter if it exists.
-    *
-    * <P>This is a shortcut for<br>
-    * <code>jar(out, src, filter, null, null);</code></P>
-    *
-    * @param out The output stream to which the generated Jar archive is
-    *        written.
-    * @param src The file or directory to jar up.  Directories will be
-    *        processed recursively.
-    * @param filter The filter to use while processing directories.  Only
-    *        those files matching will be included in the jar archive.  If
-    *        null, then all files are included.
-    */
-   public static void jar(OutputStream out, File[] src, FileFilter filter)
-      throws IOException
-   {
-      jar(out, src, filter, null, null);
-   }
-   
-   /**
-    * <P>This function will create a Jar archive containing the src
-    * file/directory.  The archive will be written to the specified
-    * OutputStream.  Directories are processed recursively, applying the
-    * specified filter if it exists.
-    *
-    * @param out The output stream to which the generated Jar archive is
-    *        written.
-    * @param src The file or directory to jar up.  Directories will be
-    *        processed recursively.
-    * @param filter The filter to use while processing directories.  Only
-    *        those files matching will be included in the jar archive.  If
-    *        null, then all files are included.
-    * @param prefix The name of an arbitrary directory that will precede all
-    *        entries in the jar archive.  If null, then no prefix will be
-    *        used.
-    * @param man The manifest to use for the Jar archive.  If null, then no
-    *        manifest will be included.
-    */
-   public static void jar(OutputStream out, File[] src, FileFilter filter,
-      String prefix, Manifest man) throws IOException
-   {
-      
-      for (int i = 0; i < src.length; i++)
-      {
-         if (!src[i].exists())
-         {
-            throw new FileNotFoundException(src.toString());
-         }
-      }
-      
-      JarOutputStream jout;
-      if (man == null)
-      {
-         jout = new JarOutputStream(out);
-      }
-      else
-      {
-         jout = new JarOutputStream(out, man);
-      }
-      if (prefix != null && prefix.length() > 0 && !prefix.equals("/"))
-      {
-         // strip leading '/'
-         if (prefix.charAt(0) == '/')
-         {
-            prefix = prefix.substring(1);
-         }
-         // ensure trailing '/'
-         if (prefix.charAt(prefix.length() - 1) != '/')
-         {
-            prefix = prefix + "/";
-         }
-      } 
-      else
-      {
-         prefix = "";
-      }
-      JarInfo info = new JarInfo(jout, filter);
-      for (int i = 0; i < src.length; i++)
-      {
-         jar(src[i], prefix, info);
-      }
-      jout.close();
-   }
-   
-   /**
-    * This simple convenience class is used by the jar method to reduce the
-    * number of arguments needed.  It holds all non-changing attributes
-    * needed for the recursive jar method.
-    */
-   private static class JarInfo
-   {
-      public JarOutputStream out;
-      public FileFilter filter;
-      public byte[] buffer;
-      
-      public JarInfo(JarOutputStream out, FileFilter filter)
-      {
-         this.out = out;
-         this.filter = filter;
-         buffer = new byte[1024];
-      }
-   }
-   
-   /**
-    * This recursive method writes all matching files and directories to
-    * the jar output stream.
-    */
-   private static void jar(File src, String prefix, JarInfo info)
-      throws IOException
-   {
-      
-      JarOutputStream jout = info.out;
-      if (src.isDirectory())
-      {
-         // create / init the zip entry
-         prefix = prefix + src.getName() + "/";
-         ZipEntry entry = new ZipEntry(prefix);
-         entry.setTime(src.lastModified());
-         entry.setMethod(JarOutputStream.STORED);
-         entry.setSize(0L);
-         entry.setCrc(0L);
-         jout.putNextEntry(entry);
-         jout.closeEntry();
-         
-         // process the sub-directories
-         File[] files = src.listFiles(info.filter);
-         for (int i = 0; i < files.length; i++)
-         {
-            jar(files[i], prefix, info);
-         }
-      } 
-      else if (src.isFile())
-      {
-         // get the required info objects
-         byte[] buffer = info.buffer;
-         
-         // create / init the zip entry
-         ZipEntry entry = new ZipEntry(prefix + src.getName());
-         entry.setTime(src.lastModified());
-         jout.putNextEntry(entry);
-         
-         // dump the file
-         FileInputStream in = new FileInputStream(src);
-         int len;
-         while ((len = in.read(buffer, 0, buffer.length)) != -1)
-         {
-            jout.write(buffer, 0, len);
-         }
-         in.close();
-         jout.closeEntry();
-      }
-   }
-   
-   /**
-    * Dump the contents of a JarArchive to the dpecified destination.
-    */
-   public static void unjar(InputStream in, File dest) throws IOException
-   {
-      if (!dest.exists())
-      {
-         dest.mkdirs();
-      }
-      if (!dest.isDirectory())
-      {
-         throw new IOException("Destination must be a directory.");
-      }
-      JarInputStream jin = new JarInputStream(in);
-      byte[] buffer = new byte[1024];
-      
-      ZipEntry entry = jin.getNextEntry();
-      while (entry != null)
-      {
-         String fileName = entry.getName();
-         if (fileName.charAt(fileName.length() - 1) == '/')
-         {
-            fileName = fileName.substring(0, fileName.length() - 1);
-         }
-         if (fileName.charAt(0) == '/')
-         {
-            fileName = fileName.substring(1);
-         }
-         if (File.separatorChar != '/')
-         {
-            fileName = fileName.replace('/', File.separatorChar);
-         }
-         File file = new File(dest, fileName);
-         if (entry.isDirectory())
-         {
-            // make sure the directory exists
-            file.mkdirs();
-            jin.closeEntry();
-         } 
-         else
-         {
-            // make sure the directory exists
-            File parent = file.getParentFile();
-            if (parent != null && !parent.exists())
-            {
-               parent.mkdirs();
-            }
-            
-            // dump the file
-            OutputStream out = new FileOutputStream(file);
-            int len = 0;
-            while ((len = jin.read(buffer, 0, buffer.length)) != -1)
-            {
-               out.write(buffer, 0, len);
-            }
-            out.flush();
-            out.close();
-            jin.closeEntry();
-            file.setLastModified(entry.getTime());
-         }
-         entry = jin.getNextEntry();
-      }
-      /* Explicity write out the META-INF/MANIFEST.MF so that any headers such
-      as the Class-Path are see for the unpackaged jar
-      */
-      Manifest mf = jin.getManifest();
-      if (mf != null)
-      {
-         File file = new File(dest, "META-INF/MANIFEST.MF");
-         File parent = file.getParentFile();
-         if( parent.exists() == false )
-         {
-            parent.mkdirs();
-         }
-         OutputStream out = new FileOutputStream(file);
-         mf.write(out);
-         out.flush();
-         out.close();
-      }
-      jin.close();
-   }
-
-   /** Given a URL check if its a jar url(jar:<url>!/archive) and if it is,
-    extract the archive entry into the given dest directory and return a file
-    URL to its location. If jarURL is not a jar url then it is simply returned
-    as the URL for the jar.
-
-    @param jarURL the URL to validate and extract the referenced entry if its
-      a jar protocol URL
-    @param dest the directory into which the nested jar will be extracted.
-    @return the file: URL for the jar referenced by the jarURL parameter.
-    */
-   public static URL extractNestedJar(URL jarURL, File dest)
-      throws IOException
-   {
-      // This may not be a jar URL so validate the protocol 
-      if( jarURL.getProtocol().equals("jar") == false )
-         return jarURL;
-
-      String destPath = dest.getAbsolutePath();
-      URLConnection urlConn = jarURL.openConnection();
-      JarURLConnection jarConn = (JarURLConnection) urlConn;
-      // Extract the archive to dest/jarName-contents/archive
-      String parentArchiveName = jarConn.getJarFile().getName();
-      // Find the longest common prefix between destPath and parentArchiveName
-      int length = Math.min(destPath.length(), parentArchiveName.length());
-      int n = 0;
-      while( n < length )
-      {
-         char a = destPath.charAt(n);
-         char b = parentArchiveName.charAt(n);
-         if( a != b )
-            break;
-         n ++;
-      }
-      // Remove any common prefix from parentArchiveName
-      parentArchiveName = parentArchiveName.substring(n);
-
-      File archiveDir = new File(dest, parentArchiveName+"-contents");
-      if( archiveDir.exists() == false && archiveDir.mkdirs() == false )
-         throw new IOException("Failed to create contents directory for archive, path="+archiveDir.getAbsolutePath());
-      String archiveName = jarConn.getEntryName();
-      File archiveFile = new File(archiveDir, archiveName);
-      File archiveParentDir = archiveFile.getParentFile();
-      if( archiveParentDir.exists() == false && archiveParentDir.mkdirs() == false )
-         throw new IOException("Failed to create parent directory for archive, path="+archiveParentDir.getAbsolutePath());
-      InputStream archiveIS = jarConn.getInputStream();
-      FileOutputStream fos = new FileOutputStream(archiveFile);
-      BufferedOutputStream bos = new BufferedOutputStream(fos);
-      byte[] buffer = new byte[4096];
-      int read;
-      while( (read = archiveIS.read(buffer)) > 0 )
-      {
-         bos.write(buffer, 0, read);
-      }
-      archiveIS.close();
-      bos.close();
-
-      // Return the file url to the extracted jar
-      return archiveFile.toURL();
-   }
-
-
-   /**
-    * A simple jar-like tool used for testing.  It's actually faster than 
-    * jar, though doesn't sipport as many options.
-    */
-   public static void main(String[] args) throws Exception
-   {
-      if (args.length == 0)
-      {
-         System.out.println("usage: <x or c> <jar-archive> <files...>");
-         System.exit(0);
-      }
-      if (args[0].equals("x"))
-      {
-         BufferedInputStream in = new BufferedInputStream(new FileInputStream(args[1]));
-         File dest = new File(args[2]);
-         unjar(in, dest);
-      }
-      else if (args[0].equals("c"))
-      {
-         BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(args[1]));
-         File[] src = new File[args.length - 2];
-         for (int i = 0; i < src.length; i++)
-         {
-            src[i] = new File(args[2 + i]);
-         }
-         jar(out, src);
-      }
-      else
-      {
-         System.out.println("Need x or c as first argument");
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/JarUtils.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/JarUtils.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>File related classes.</p>
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/file/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/file/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/GUID.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/GUID.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/GUID.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,172 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.id;
-
-/**
- * A globally unique identifier (globally across a cluster of virtual 
- * machines).
- *
- * <p>The identifier is composed of:
- * <ol>
- *    <li>The VMID for the virtual machine.</li>
- *    <li>A UID to provide uniqueness over a VMID.</li>
- * </ol>
- *
- * <pre>
- *    [ address ] - [ process id ] - [ time ] - [ counter ] - [ time ] - [ counter ]
- *                                   |------- UID --------|   |------- UID --------|
- *    |---------------------- VMID -----------------------|
- * </pre>
- *
- * @see VMID
- * @see UID
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class GUID
-   implements ID, Comparable
-{
-   /** The serial version id, @since 1.6 */
-   static final long serialVersionUID = 3289509836244263718L;
-   /** The virtual machine identifier */
-   protected final VMID vmid;
-
-   /** The unique identifier */
-   protected final UID uid;
-
-   /** The hash code of this GUID */
-   protected final int hashCode;
-
-   /**
-    * Construct a new GUID.
-    */
-   public GUID() {
-      this.vmid = VMID.getInstance();
-      this.uid = new UID();
-
-      // generate a hash code for this GUID
-      int code = vmid.hashCode();
-      code ^= uid.hashCode();
-      hashCode = code;
-   }
-
-   /**
-    * Copy a GUID.
-    *
-    * @param guid    GUID to copy.
-    */
-   protected GUID(final GUID guid) {
-      this.vmid = guid.vmid;
-      this.uid = guid.uid;
-      this.hashCode = guid.hashCode;
-   }
-
-   /**
-    * Get the VMID portion of this GUID.
-    *
-    * @return  The VMID portion of this GUID.
-    */
-   public final VMID getVMID() {
-      return vmid;
-   }
-
-   /**
-    * Get the UID portion of this GUID.
-    *
-    * @return  The UID portion of this GUID.
-    */
-   public final UID getUID() {
-      return uid;
-   }
-   
-   /**
-    * Return a string representation of this GUID.
-    *
-    * @return  A string representation of this GUID.
-    */
-   public String toString() {
-      return vmid.toString() + "-" + uid.toString();
-   }
-
-   /**
-    * Return the hash code of this GUID.
-    *
-    * @return  The hash code of this GUID.
-    */
-   public int hashCode() {
-      return hashCode;
-   }
-
-   /**
-    * Check if the given object is equal to this GUID.
-    *
-    * <p>A GUID is equal to another GUID if the VMID and UID portions are
-    *    equal.
-    *
-    * @param obj  Object to test equality with.
-    * @return     True if object is equal to this GUID.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         GUID guid = (GUID)obj;
-
-         return 
-            guid.vmid.equals(vmid) &&
-            guid.uid.equals(uid);
-      }
-
-      return false;
-   }
-
-   /**
-    * Returns a copy of this GUID.
-    *
-    * @return  A copy of this GUID.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-
-   /**
-    * Returns a GUID as a string.
-    *
-    * @return  GUID as a string.
-    */
-   public static String asString() {
-      return new GUID().toString();
-   }
-
-   public int compareTo(Object o)
-   {
-      GUID guid = (GUID)o;
-      return this.toString().compareTo(guid.toString());
-   }
-   
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/GUID.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/GUID.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/ID.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/ID.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/ID.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.id;
-
-import java.io.Serializable;
-
-/**
- * A tagging interface for an identifier.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface ID
-   extends Serializable, Cloneable
-{
-   // empty
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/ID.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/ID.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/SerialVersion.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/SerialVersion.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/SerialVersion.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,75 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.id;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Serialization version compatibility mode constants.<p>
- *
- * Contains static constants and attributes to help with serialization
- * versioning.<p>
- * 
- * Set the system property <pre>org.jboss.j2ee.LegacySerialization</pre>
- * to serialization compatibility with jboss-4.0.1 and earlier. The
- * serialVersionUID values were synched with the j2ee 1.4 ri classes and
- * explicitly set in jboss-4.0.2 which is what
- *
- * @author  <a href="mailto:Adrian.Brock at JBoss.com">Adrian Brock</a>.
- * @version $Revision$
- */
-public class SerialVersion
-{
-   // Static --------------------------------------------------------
-
-   /** Legacy, jboss-4.0.1 through jboss-4.0.0 */
-   public static final int LEGACY = 0;
-
-   /** The serialization compatible with Sun's RI, jboss-4.0.2+ */
-   public static final int JBOSS_402 = 1;
-
-   /**
-    * The serialization version to use
-    */
-   public static int version = JBOSS_402;
-
-   /** Determine the serialization version */
-   static
-   {
-      AccessController.doPrivileged(new PrivilegedAction()
-      {
-         public Object run()
-         {
-            try
-            {
-               if (System.getProperty("org.jboss.j2ee.LegacySerialization") != null)
-                  version = LEGACY;
-            }
-            catch (Throwable ignored)
-            {
-            }
-            return null;
-         }
-      });
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/SerialVersion.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/SerialVersion.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/UID.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/UID.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/UID.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,161 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.id;
-
-import EDU.oswego.cs.dl.util.concurrent.SynchronizedLong;
-
-/**
- * A unique identifier (uniqueness only guarantied inside of the virtual
- * machine in which it was created).
- *
- * <p>The identifier is composed of:
- * <ol>
- *    <li>A long generated from the current system time (in milliseconds).</li>
- *    <li>A long generated from a counter (which is the number of UID objects
- *        that have been created durring the life of the executing virtual
- *        machine).</li>
- * </ol>
- *
- * <pre>
- *    [ time ] - [ counter ]
- * </pre>
- *
- * <p>Numbers are converted to radix(Character.MAX_RADIX) when converting
- *    to strings.
- *
- * <p>This <i>should</i> provide adequate uniqueness for most purposes.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class UID
-   implements ID
-{
-   private static final long serialVersionUID = -8093336932569424512L;
-
-   /** A counter for generating identity values */
-   protected static final SynchronizedLong COUNTER = new SynchronizedLong(0);
-
-   /** The time portion of the UID */
-   protected final long time;
-
-   /** The identity portion of the UID */
-   protected final long id;
-
-   /**
-    * Construct a new UID.
-    */
-   public UID() {
-      time = System.currentTimeMillis();
-      id = COUNTER.increment();
-   }
-
-   /**
-    * Copy a UID.
-    */
-   protected UID(final UID uid) {
-      time = uid.time;
-      id = uid.id;
-   }
-
-   /**
-    * Get the time portion of this UID.
-    *
-    * @return  The time portion of this UID.
-    */
-   public final long getTime() {
-      return time;
-   }
-
-   /**
-    * Get the identity portion of this UID.
-    *
-    * @return  The identity portion of this UID.
-    */
-   public final long getID() {
-      return id;
-   }
-
-   /**
-    * Return a string representation of this UID.
-    *
-    * @return  A string representation of this UID.
-    */
-   public String toString() {
-      return
-         Long.toString(time, Character.MAX_RADIX) +
-         "-" +
-         Long.toString(id, Character.MAX_RADIX);
-   }
-
-   /**
-    * Return the hash code of this UID.
-    *
-    * @return  The hash code of this UID.
-    */
-   public int hashCode() {
-      return (int)id;
-   }
-
-   /**
-    * Checks if the given object is equal to this UID.
-    *
-    * @param obj     Object to test equality with.
-    * @return        True if object is equal to this UID.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         UID uid = (UID)obj;
-
-         return
-            uid.time == time &&
-            uid.id == id;
-      }
-
-      return false;
-   }
-
-   /**
-    * Returns a copy of this UID.
-    *
-    * @return  A copy of this UID.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-
-   /**
-    * Returns a UID as a string.
-    *
-    * @return  UID as a string.
-    */
-   public static String asString() {
-      return new UID().toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/UID.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/UID.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/VMID.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/VMID.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/VMID.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,260 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.id;
-
-import java.net.InetAddress;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Arrays;
-
-import org.jboss.util.HashCode;
-import org.jboss.util.platform.PID;
-
-/**
- * An object that uniquely identifies a virtual machine.
- *
- * <p>The identifier is composed of:
- * <ol>
- *    <li>The Internet address of the physical machine.</li>
- *    <li>The process identifier of the virtual machine.</li>
- *    <li>A UID to guarantee uniqness across multipule virtual
- *        machines on the same physical machine.</li>
- * </ol>
- *
- * <pre>
- *    [ address ] - [ process id ] - [ time ] - [ counter ]
- *                                   |------- UID --------|
- * </pre>
- *
- * <p>Numbers are converted to radix(Character.MAX_RADIX) when converting
- *    to strings.
- *
- * @see UID
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class VMID
-   implements ID
-{
-   /** The address of the current virtual machine */
-   protected final byte[] address;
-
-   /** The process identifier of the current virtual machine */
-   protected final PID pid;
-
-   /** A unique identifier to ensure uniqueness across the host machine */
-   protected final UID uid;
-
-   /** The hash code of this VMID */
-   protected final int hashCode;
-
-   /**
-    * Construct a new VMID.
-    *
-    * @param address    The address of the current virtual machine.
-    * @param pid        Process identifier.
-    * @param uid        Unique identifier.
-    *
-    * @see #getInstance()  For getting a VMID instance reference.
-    */
-   protected VMID(final byte[] address, final PID pid, final UID uid) {
-      this.address = address;
-      this.pid = pid;
-      this.uid = uid;
-
-      // generate a hashCode for this VMID
-      int code = pid.hashCode();
-      code ^= uid.hashCode();
-      code ^= HashCode.generate(address);
-      hashCode = code;
-   }
-
-   /**
-    * Copy a VMID.
-    *
-    * @param vmid    VMID to copy.
-    */
-   protected VMID(final VMID vmid) {
-      this.address = vmid.address;
-      this.pid = vmid.pid;
-      this.uid = vmid.uid;
-      this.hashCode = vmid.hashCode;
-   }
-
-   /**
-    * Get the address portion of this VMID.
-    *
-    * @return  The address portion of this VMID.
-    */
-   public final byte[] getAddress() {
-      return address;
-   }
-
-   /**
-    * Get the process identifier portion of this VMID.
-    *
-    * @return  The process identifier portion of this VMID.
-    */
-   public final PID getProcessID() {
-      return pid;
-   }
-
-   /**
-    * Get the UID portion of this VMID.
-    *
-    * @return  The UID portion of this VMID.
-    */
-   public final UID getUID() {
-      return uid;
-   }
-
-   /**
-    * Return a string representation of this VMID.
-    *
-    * @return  A string representation of this VMID.
-    */
-   public String toString() {
-      StringBuffer buff = new StringBuffer();
-      
-      for (int i=0; i<address.length; i++) {
-         int n = (int) (address[i] & 0xFF);
-         buff.append(Integer.toString(n, Character.MAX_RADIX));
-      }
-
-      buff.append("-").append(pid.toString(Character.MAX_RADIX));
-      buff.append("-").append(uid);
-
-      return buff.toString();
-   }
-
-   /**
-    * Return the hash code of this VMID.
-    *
-    * @return  The hash code of this VMID.
-    */
-   public final int hashCode() {
-      return hashCode;
-   }
-
-   /**
-    * Check if the given object is equal to this VMID.
-    *
-    * <p>A VMID is equals to another VMID if the address,
-    *    process identifer and UID portions are equal.
-    *
-    * @param obj     Object to test equality with.
-    * @return        True if object is equals to this VMID.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         VMID vmid = (VMID)obj;
-         return 
-            Arrays.equals(vmid.address, address) &&
-            vmid.pid.equals(pid) &&
-            vmid.uid.equals(uid);
-      }
-
-      return false;
-   }
-
-   /**
-    * Returns a copy of this VMID.
-    *
-    * @return  A copy of this VMID.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-
-   /**
-    * Returns a VMID as a string.
-    *
-    * @return  VMID as a string.
-    */
-   public static String asString() {
-      return getInstance().toString();
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Instance Access                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /** The single instance of VMID for the running Virtual Machine */
-   private static VMID instance = null;
-
-   /**
-    * Get the VMID for the current virtual machine.
-    *
-    * @return  Virtual machine identifier.
-    *
-    */
-   public synchronized static VMID getInstance() {
-      if (instance == null) {
-         instance = create();
-      }
-      return instance;
-   }
-
-   /** 
-    * The address used when conventional methods fail to return the address
-    * of the current machine.
-    */
-   public static final byte[] UNKNOWN_HOST = { 0, 0, 0, 0 };
-
-   /**
-    * Return the current host internet address.
-    */
-   private static byte[] getHostAddress() {
-      return (byte[]) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
-               try {
-                  return InetAddress.getLocalHost().getAddress();
-               }
-               catch (Exception e) {
-                  return UNKNOWN_HOST;
-               }
-            }
-         });
-   }
-
-   /**
-    * Create the VMID for the current virtual mahcine.
-    *
-    * @return  Virtual machine identifer.
-    */
-   private static VMID create() {
-      // get the local internet address for the current host
-      byte[] address = getHostAddress();
-         
-      return new VMID(address, PID.getInstance(), new UID());
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/VMID.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/VMID.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Unique and globally unique identifier classes.</p>
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/id/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/id/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/jmx (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/jmx)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/jmx/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/jmx/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/jmx/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Utilities for the <em>Java Management Extentions</em> API.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/jmx/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/jmx/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,98 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.loading;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * A helper for context classloading.<p>
- *
- * When a security manager is installed, the
- * constructor checks for the runtime permissions
- * &quot;getClassLoader&quot;
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- */
-public class ContextClassLoader
-{
-   /**
-    * Retrieve a classloader permission
-    */
-   public static final RuntimePermission GETCLASSLOADER = new RuntimePermission("getClassLoader");
-
-   /**
-    * Instantiate a new context class loader
-    */
-   public static final NewInstance INSTANTIATOR = new NewInstance();
-
-   /**
-    * Constructor.
-    * 
-    * @throws SecurityException when not authroized to get the context classloader
-    */
-   /*package*/ ContextClassLoader()
-   {
-      SecurityManager manager = System.getSecurityManager();
-      if (manager != null)
-      {
-         manager.checkPermission(GETCLASSLOADER);
-      }
-   }
-
-   /**
-    * Retrieve the context classloader
-    *
-    * @return the context classloader
-    */
-   public ClassLoader getContextClassLoader()
-   {
-      return getContextClassLoader(Thread.currentThread());
-   }
-
-   /**
-    * Retrieve the context classloader for the given thread
-    *
-    * @param thread the thread
-    * @return the context classloader
-    */
-   public ClassLoader getContextClassLoader(final Thread thread)
-   {
-      return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction()
-      {
-         public Object run()
-         {
-            return thread.getContextClassLoader();
-         }
-      });
-   }
-
-   private static class NewInstance
-      implements PrivilegedAction
-   {
-      public Object run()
-      {
-         return new ContextClassLoader();
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoaderSwitcher.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoaderSwitcher.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoaderSwitcher.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,236 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.loading;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * A helper for context classloading switching.<p>
- *
- * When a security manager is installed, the
- * constructor checks for the runtime permissions
- * &quot;getClassLoader&quot; and &quot;setContextClassLoader&quot;.
- * This allows the methods of this class to be used later without
- * having to run in privileged blocks.
- *
- * There are optimized methods to perform the operations within
- * a switch context. This avoids retrieving the current thread
- * on every operation.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- */
-public class ContextClassLoaderSwitcher
-   extends ContextClassLoader
-{
-   /**
-    * Set the context classloader permission
-    */
-   public static final RuntimePermission SETCONTEXTCLASSLOADER = new RuntimePermission("setContextClassLoader");
-
-   /**
-    * Instantiate a new context class loader switcher
-    */
-   public static final NewInstance INSTANTIATOR = new NewInstance();
-
-   /**
-    * Constructor.
-    * @throws SecurityException when not authroized to get/set the context classloader
-    */
-   private ContextClassLoaderSwitcher()
-   {
-      super();
-      SecurityManager manager = System.getSecurityManager();
-      if (manager != null)
-         manager.checkPermission(SETCONTEXTCLASSLOADER);
-   }
-
-   /**
-    * Set the context classloader
-    *
-    * @param the new context classloader
-    */
-   public void setContextClassLoader(final ClassLoader cl)
-   {
-      setContextClassLoader(Thread.currentThread(), cl);
-   }
-
-   /**
-    * Set the context classloader for the given thread
-    *
-    * @param thread the thread
-    * @param the new context classloader
-    */
-   public void setContextClassLoader(final Thread thread, final ClassLoader cl)
-   {
-      AccessController.doPrivileged(new PrivilegedAction()
-      {
-         public Object run()
-         {
-            thread.setContextClassLoader(cl);
-            return null;
-         }
-      });
-   }
-
-   /**
-    * Retrieve a switch context
-    *
-    * @return the switch context
-    */
-   public SwitchContext getSwitchContext()
-   {
-      return new SwitchContext();
-   }
-
-   /**
-    * Retrieve a switch context and set the new context classloader
-    *
-    * @param cl the new classloader
-    * @return the switch context
-    */
-   public SwitchContext getSwitchContext(final ClassLoader cl)
-   {
-      return new SwitchContext(cl);
-   }
-
-   /**
-    * Retrieve a switch context for the classloader of a given class
-    *
-    * @deprecated using a class to determine the classloader is a 
-    *             bad idea, it has the same problems as Class.forName()
-    * @param clazz the class whose classloader should be set
-    *        as the context classloader
-    * @return the switch context
-    */
-   public SwitchContext getSwitchContext(final Class clazz)
-   {
-      return new SwitchContext(clazz.getClassLoader());
-   }
-
-   /**
-    * A helper class to remember the original classloader and
-    * avoid continually retrieveing the current thread.
-    */
-   public class SwitchContext
-   {
-      /**
-       * The original classloader
-       */
-      private ClassLoader origCL;
-
-      /**
-       * The current classloader
-       */
-      private ClassLoader currentCL;
-
-      /**
-       * The current thread
-       */
-      private Thread currentThread;
-
-      private SwitchContext()
-      {
-         currentThread = Thread.currentThread();
-         origCL = getContextClassLoader(currentThread);
-         currentCL = origCL;
-      }
-
-      private SwitchContext(ClassLoader cl)
-      {
-         this();
-         setClassLoader(cl);
-      }
-
-      /**
-       * Retrieve the current thread
-       */
-      public Thread getThread()
-      {
-         return currentThread;
-      }
-
-      /**
-       * Retrieve the original classloader
-       */
-      public ClassLoader getOriginalClassLoader()
-      {
-         return origCL;
-      }
-
-      /**
-       * Retrieve the current classloader
-       * (as set through this class).
-       */
-      public ClassLoader getCurrentClassLoader()
-      {
-         return currentCL;
-      }
-
-      /**
-       * Change the context classloader<p>
-       *
-       * The operation is ignored if the classloader is null
-       * or has not changed
-       *
-       * @param cl the new classloader
-       */
-      public void setClassLoader(ClassLoader cl)
-      {
-         if (cl != null && cl != currentCL)
-         {
-            setContextClassLoader(currentThread, cl);
-            currentCL = cl;
-         }
-      }
-
-      /**
-       * Reset back to the original classloader,
-       * only when it has changed.
-       */
-      public void reset()
-      {
-         if (currentCL != null && currentCL != origCL)
-            setContextClassLoader(currentThread, origCL);
-      }
-
-      /**
-       * Force a reset back to the original classloader,
-       * useful when somebody else might have changed
-       * the thread context classloader so we cannot optimize
-       */
-      public void forceReset()
-      {
-         setContextClassLoader(currentThread, origCL);
-      }
-   }
-
-   private static class NewInstance
-      implements PrivilegedAction
-   {
-      public Object run()
-      {
-         return new ContextClassLoaderSwitcher();
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoaderSwitcher.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/ContextClassLoaderSwitcher.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,97 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.loading;
-
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.URLStreamHandlerFactory;
-
-/**
- * A URL classloader that delegates to its parent, avoiding
- * synchronization.
- *
- * A standard flag is provided so it can be used as a parent class,
- * but later subclassed and to revert to standard class loading
- * if the subclass wants to load classes.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public class DelegatingClassLoader
-   extends URLClassLoader
-{
-   /** The value returned by {@link getURLs}. */
-   public static final URL[] EMPTY_URL_ARRAY = {};
-
-   /** Whether to use standard loading */
-   protected boolean standard = false;
-
-   /**
-    * Constructor
-    *
-    * @param parent the parent classloader, cannot be null.
-    */
-   public DelegatingClassLoader(ClassLoader parent)
-   {
-      super(EMPTY_URL_ARRAY, parent);
-      if (parent == null)
-         throw new IllegalArgumentException("No parent");
-   }
-
-   /**
-    * Constructor
-    *
-    * @param parent, the parent classloader, cannot be null.
-    * @param factory the url stream factory.
-    */
-   public DelegatingClassLoader(ClassLoader parent, URLStreamHandlerFactory factory)
-   {
-      super(EMPTY_URL_ARRAY, parent, factory);
-      if (parent == null)
-         throw new IllegalArgumentException("No parent");
-   }
-
-   /**
-    * Load a class, by asking the parent
-    *
-    * @param className the class name to load
-    * @param resolve whether to link the class
-    * @return the loaded class
-    * @throws ClassNotFoundException when the class could not be found
-    */
-   protected Class loadClass(String className, boolean resolve)
-      throws ClassNotFoundException
-   {
-      // Revert to standard rules
-      if (standard)
-         return super.loadClass(className, resolve);
-
-      // Ask the parent
-      Class clazz = getParent().loadClass(className);
-
-      // Link the class
-      if (resolve)
-         resolveClass(clazz);
-
-      return clazz;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/DelegatingClassLoader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translatable.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/Translatable.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translatable.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.loading;
-
-import java.net.URL;
-
-/** An interface representing class loader like senamics used in the aop
- * layer. Its only purpose was to remove the explicit dependency on the
- * JBoss UCL class loader api, but its existence seems to be a hack that
- * should be removed.
- * 
- * @version $Revision$
- */ 
-public interface Translatable
-{
-   public URL getResourceLocally(String name);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translatable.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/Translatable.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translator.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/Translator.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translator.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,79 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.loading;
-
-import java.security.ProtectionDomain;
-
-/** An interface for transforming byte code before Class creation. This is
- * compatible with the JDK1.5 java.lang.instrument.ClassFileTransformer
- * proposal.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public interface Translator
-{
-   /** Optionally transform the supplied class file and return a new replacement
-    * class file.
-    *
-    * <P> If a transformer has been registered with the class loading layer,
-    * the transformer will be called for every new class definition.
-    * The request for a new class definition is made with
-    * {@link java.lang.ClassLoader#defineClass ClassLoader.defineClass}.
-    * The transformer is called during the processing of the request, before
-    * the class file bytes have been verified or applied.
-    *
-    * <P>
-    * If the implementing method determines that no transformations are needed,
-    * it should return <code>null</code>. Otherwise, it should create a new
-    * byte[] array and copy the input <code>classfileBuffer</code> into it,
-    * along with all desired transformations. The input <code>classfileBuffer</code>
-    * must not be modified.
-    *
-    * @param loader - the defining loader of the class to be transformed, may
-    *    be <code>null</code> if the bootstrap loader
-    * @param className - the fully-qualified name of the class
-    * @param classBeingRedefined - if this is a redefine, the class being
-    *    redefined, otherwise <code>null</code>
-    * @param protectionDomain - the protection domain of the class being
-    *    defined or redefined
-    * @param classfileBuffer - the input byte buffer in class file format - must
-    *    not be modified
-    *
-    * @throws Exception - if the input does not represent a well-formed class file
-    * @return a well-formed class file buffer (the result of the transform), 
-    * or <code>null</code> if no transform is performed.
-    */
-   public byte[] transform(ClassLoader loader,
-      String className,
-      Class classBeingRedefined,
-      ProtectionDomain protectionDomain,
-      byte[] classfileBuffer)
-      throws Exception;
-
-   /** Called to indicate that the ClassLoader is being discarded by the server.
-    * 
-    * @param loader - a class loader that has possibly been used previously
-    *    as an argument to transform.
-    */ 
-   public void unregisterClassLoader(ClassLoader loader);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/loading/Translator.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/loading/Translator.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ENCThreadLocalKey.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming/ENCThreadLocalKey.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ENCThreadLocalKey.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,94 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.naming;
-
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.Reference;
-import javax.naming.RefAddr;
-import javax.naming.LinkRef;
-import javax.naming.spi.ObjectFactory;
-
-import org.jboss.logging.Logger;
-
-/**
- * Return a LinkRef based on a ThreadLocal key.
- *
- * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
- * @version $Revision$
- */
-public class ENCThreadLocalKey
-      implements ObjectFactory
-{
-   private static final Logger log = Logger.getLogger(ENCThreadLocalKey.class);
-
-   // We need all the weak maps to make sure everything is released properly
-   // and we don't have any memory leaks
-
-   private final static ThreadLocal key = new ThreadLocal();
-
-   public static void setKey(String tlkey)
-   {
-      key.set(tlkey);
-   }
-
-   public static String getKey()
-   {
-      return (String) key.get();
-   }
-
-   public Object getObjectInstance(Object obj,
-         Name name,
-         Context nameCtx,
-         Hashtable environment)
-         throws Exception
-   {
-      Reference ref = (Reference) obj;
-      String reftype = (String) key.get();
-      boolean trace = log.isTraceEnabled();
-
-      if (reftype == null)
-      {
-         if (trace)
-            log.trace("using default in ENC");
-         reftype = "default";
-      }
-
-      RefAddr addr = ref.get(reftype);
-      if (addr == null)
-      {
-         if (trace)
-            log.trace("using default in ENC");
-         addr = ref.get("default"); // try to get default linking
-      }
-      if (addr != null)
-      {
-         String target = (String) addr.getContent();
-         if (trace)
-            log.trace("found Reference " + reftype + " with content " + target);
-         return new LinkRef(target);
-      }
-      return null;
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ENCThreadLocalKey.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming/ENCThreadLocalKey.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/NonSerializableFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming/NonSerializableFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/NonSerializableFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,251 +0,0 @@
- /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.naming;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.Name;
-import javax.naming.NameAlreadyBoundException;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.RefAddr;
-import javax.naming.StringRefAddr;
-import javax.naming.spi.ObjectFactory;
-
-/** 
- * A utility class that allows one to bind a non-serializable object into a
- * local JNDI context. The binding will only be valid for the lifetime of the
- * VM in which the JNDI InitialContext lives. An example usage code snippet is:
- *
-<pre>
-    // The non-Serializable object to bind
-    Object nonserializable = ...;
-    // An arbitrary key to use in the StringRefAddr. The best key is the jndi
-    // name that the object will be bound under.
-    String key = ...;
-    // This places nonserializable into the NonSerializableFactory hashmap under key
-    NonSerializableFactory.rebind(key, nonserializable);
-
-    Context ctx = new InitialContext();
-    // Bind a reference to nonserializable using NonSerializableFactory as the ObjectFactory
-    String className = nonserializable.getClass().getName();
-    String factory = NonSerializableFactory.class.getName();
-    StringRefAddr addr = new StringRefAddr("nns", key);
-    Reference memoryRef = new Reference(className, addr, factory, null);
-    ctx.rebind(key, memoryRef);
-</pre>
- *
- * Or you can use the {@link #rebind(Context, String, Object)} convenience
- * method to simplify the number of steps to:
- *
-<pre>
-    Context ctx = new InitialContext();
-    // The non-Serializable object to bind
-    Object nonserializable = ...;
-    // The jndiName that the object will be bound into ctx with
-    String jndiName = ...;
-    // This places nonserializable into the NonSerializableFactory hashmap under key
-    NonSerializableFactory.rebind(ctx, jndiName, nonserializable);
-</pre>
- * 
- * To unbind the object, use the following code snippet:
- * 
-<pre>
-	new InitialContext().unbind(key);
-	NonSerializableFactory.unbind(key);
-</pre>
- *
- * @see javax.naming.spi.ObjectFactory
- * @see #rebind(Context, String, Object)
- *
- * @author <a href="mailto:Scott.Stark at jboss.org">Scott Stark</a>.
- * @version $Revision$
-*/
-public class NonSerializableFactory implements ObjectFactory
-{
-    private static Map wrapperMap = Collections.synchronizedMap(new HashMap());
-
-    /** Place an object into the NonSerializableFactory namespace for subsequent
-    access by getObject. There cannot be an already existing binding for key.
-
-    @param key, the name to bind target under. This should typically be the
-    name that will be used to bind target in the JNDI namespace, but it does
-    not have to be.
-    @param target, the non-Serializable object to bind.
-    @throws NameAlreadyBoundException thrown if key already exists in the
-     NonSerializableFactory map
-    */
-    public static synchronized void bind(String key, Object target) throws NameAlreadyBoundException
-    {
-        if( wrapperMap.containsKey(key) == true )
-            throw new NameAlreadyBoundException(key+" already exists in the NonSerializableFactory map");
-        wrapperMap.put(key, target);
-    }
-    /** Place or replace an object in the NonSerializableFactory namespce
-     for subsequent access by getObject. Any existing binding for key will be
-     replaced by target.
-
-    @param key, the name to bind target under. This should typically be the
-    name that will be used to bind target in the JNDI namespace, but it does
-    not have to be.
-    @param target, the non-Serializable object to bind.
-    */
-    public static void rebind(String key, Object target)
-    {
-        wrapperMap.put(key, target);
-    }
-
-    /** Remove a binding from the NonSerializableFactory map.
-
-    @param key, the key into the NonSerializableFactory map to remove.
-    @throws NameNotFoundException thrown if key does not exist in the
-     NonSerializableFactory map
-    */
-    public static void unbind(String key) throws NameNotFoundException
-    {
-        if( wrapperMap.remove(key) == null )
-            throw new NameNotFoundException(key+" was not found in the NonSerializableFactory map");
-    }
-    /** Remove a binding from the NonSerializableFactory map.
-
-    @param name, the name for the key into NonSerializableFactory map to remove.
-     The key is obtained as name.toString().
-    @throws NameNotFoundException thrown if key does not exist in the
-     NonSerializableFactory map
-    */
-    public static void unbind(Name name) throws NameNotFoundException
-    {
-        String key = name.toString();
-        if( wrapperMap.remove(key) == null )
-            throw new NameNotFoundException(key+" was not found in the NonSerializableFactory map");
-    }
-
-    /** Lookup a value from the NonSerializableFactory map.
-    @return the object bound to key is one exists, null otherwise.
-    */
-    public static Object lookup(String key)
-    {
-        Object value = wrapperMap.get(key);
-        return value;
-    }
-    /** Lookup a value from the NonSerializableFactory map.
-    @return the object bound to key is one exists, null otherwise.
-    */
-    public static Object lookup(Name name)
-    {
-        String key = name.toString();
-        Object value = wrapperMap.get(key);
-        return value;
-    }
-
-    /** A convience method that simplifies the process of rebinding a
-        non-zerializable object into a JNDI context.
-
-    @param ctx, the JNDI context to rebind to.
-    @param key, the key to use in both the NonSerializableFactory map and JNDI. It
-        must be a valid name for use in ctx.bind().
-    @param target, the non-Serializable object to bind.
-    @throws NamingException thrown on failure to rebind key into ctx.
-    */
-    public static synchronized void rebind(Context ctx, String key, Object target) throws NamingException
-    {
-        NonSerializableFactory.rebind(key, target);
-        // Bind a reference to target using NonSerializableFactory as the ObjectFactory
-        String className = target.getClass().getName();
-        String factory = NonSerializableFactory.class.getName();
-        StringRefAddr addr = new StringRefAddr("nns", key);
-        Reference memoryRef = new Reference(className, addr, factory, null);
-        ctx.rebind(key, memoryRef);
-    }
-
-   /** A convience method that simplifies the process of rebinding a
-    non-zerializable object into a JNDI context. This version binds the
-    target object into the default IntitialContext using name path.
-
-   @param name, the name to use as JNDI path name. The key into the
-    NonSerializableFactory map is obtained from the toString() value of name.
-    The name parameter cannot be a 0 length name.
-    Any subcontexts between the root and the name must exist.
-   @param target, the non-Serializable object to bind.
-   @throws NamingException thrown on failure to rebind key into ctx.
-   */
-   public static synchronized void rebind(Name name, Object target) throws NamingException
-   {
-      rebind(name, target, false);
-   }
-
-   /** A convience method that simplifies the process of rebinding a
-    non-zerializable object into a JNDI context. This version binds the
-    target object into the default IntitialContext using name path.
-
-   @param name, the name to use as JNDI path name. The key into the
-    NonSerializableFactory map is obtained from the toString() value of name.
-    The name parameter cannot be a 0 length name.
-   @param target, the non-Serializable object to bind.
-   @param createSubcontexts, a flag indicating if subcontexts of name should
-    be created if they do not already exist.
-   @throws NamingException thrown on failure to rebind key into ctx.
-   */
-   public static synchronized void rebind(Name name, Object target,
-      boolean createSubcontexts) throws NamingException
-   {
-       String key = name.toString();
-       InitialContext ctx = new InitialContext();
-       if( createSubcontexts == true && name.size() > 1 )
-       {
-          int size = name.size() - 1;
-          Util.createSubcontext(ctx, name.getPrefix(size));
-       }
-       rebind(ctx, key, target);
-   }
-
-// --- Begin ObjectFactory interface methods
-    /** Transform the obj Reference bound into the JNDI namespace into the
-    actual non-Serializable object.
-
-    @param obj, the object bound in the JNDI namespace. This must be an implementation
-    of javax.naming.Reference with a javax.naming.RefAddr of type "nns" whose
-    content is the String key used to location the non-Serializable object in the 
-    NonSerializableFactory map.
-    @param name, ignored.
-    @param nameCtx, ignored.
-    @param env, ignored.
-
-    @return the non-Serializable object associated with the obj Reference if one
-    exists, null if one does not.
-    */
-    public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable env)
-        throws Exception
-    {	// Get the nns value from the Reference obj and use it as the map key
-        Reference ref = (Reference) obj;
-        RefAddr addr = ref.get("nns");
-        String key = (String) addr.getContent();
-        Object target = wrapperMap.get(key);
-        return target;
-    }
-// --- End ObjectFactory interface methods
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/NonSerializableFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming/NonSerializableFactory.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ReadOnlyContext.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming/ReadOnlyContext.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ReadOnlyContext.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,226 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.util.naming;
-
-import java.util.Hashtable;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.Name;
-import javax.naming.NameParser;
-import javax.naming.NamingEnumeration;
-import javax.naming.OperationNotSupportedException;
-
-/**
- A JNDI context wrapper implementation that delegates read-only methods to
- its delegate Context, and throws OperationNotSupportedException for any
- method with a side-effect.
-
- @author Scott.Stark at jboss.org
- @version $Revision$
- */
-public class ReadOnlyContext implements Context
-{
-   /** The actual context we impose the read-only behavior on */
-   private Context delegate;
-
-   public ReadOnlyContext(Context delegate)
-   {
-      this.delegate = delegate;
-   }
-
-// Supported methods -----------------------------------------------------------
-   public void close()
-      throws NamingException
-   {
-      delegate.close();
-   }
-
-   public String composeName(String name, String prefix)
-      throws NamingException
-   {
-      return delegate.composeName(name, prefix);
-   }
-
-   public Name composeName(Name name, Name prefix)
-      throws NamingException
-   {
-      return delegate.composeName(name, prefix);
-   }
-
-   public String getNameInNamespace()
-      throws NamingException
-   {
-      return delegate.getNameInNamespace();
-   }
-
-   public Hashtable getEnvironment()
-      throws NamingException
-   {
-      return delegate.getEnvironment();
-   }
-
-   public Object lookup(String name)
-      throws NamingException
-   {
-      return delegate.lookup(name);
-   }
-
-   public Object lookupLink(String name)
-      throws NamingException
-   {
-      return delegate.lookupLink(name);
-   }
-
-   public Object lookup(Name name)
-      throws NamingException
-   {
-      return delegate.lookup(name);
-   }
-
-   public Object lookupLink(Name name)
-      throws NamingException
-   {
-      return delegate.lookupLink(name);
-   }
-
-   public NameParser getNameParser(String name)
-      throws NamingException
-   {
-      return delegate.getNameParser(name);
-   }
-
-   public NameParser getNameParser(Name name)
-      throws NamingException
-   {
-      return delegate.getNameParser(name);
-   }
-
-   public NamingEnumeration list(String name)
-      throws NamingException
-   {
-      return delegate.list(name);
-   }
-
-   public NamingEnumeration listBindings(String name)
-      throws NamingException
-   {
-      return delegate.listBindings(name);
-   }
-
-   public NamingEnumeration list(Name name)
-      throws NamingException
-   {
-      return delegate.list(name);
-   }
-
-   public NamingEnumeration listBindings(Name name)
-      throws NamingException
-   {
-      return delegate.listBindings(name);
-   }
-
-// Unsupported methods ---------------------------------------------------------
-
-   public Object addToEnvironment(String propName, Object propVal)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public void bind(String name, Object obj)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-   public void bind(Name name, Object obj)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public Context createSubcontext(String name)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public Context createSubcontext(Name name)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public void destroySubcontext(String name)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public void destroySubcontext(Name name)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public Object removeFromEnvironment(String propName)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public void rebind(String name, Object obj)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public void rebind(Name name, Object obj)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public void rename(String oldName, String newName)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public void rename(Name oldName, Name newName)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-   public void unbind(String name)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-   public void unbind(Name name)
-      throws NamingException
-   {
-      throw new OperationNotSupportedException("This is a read-only Context");
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/ReadOnlyContext.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming/ReadOnlyContext.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/Util.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming/Util.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/Util.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,355 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.naming;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.LinkRef;
-import javax.naming.Name;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
-import org.jboss.logging.Logger;
-
-/** A static utility class for common JNDI operations.
- *
- * @author Scott.Stark at jboss.org
- * @author adrian at jboss.com
- * @version $Revision$
- */
-public class Util
-{
-   private static final Logger log = Logger.getLogger(Util.class);
-
-   /** Create a subcontext including any intermediate contexts.
-    @param ctx, the parent JNDI Context under which value will be bound
-    @param name, the name relative to ctx of the subcontext.
-    @return The new or existing JNDI subcontext
-    @throws javax.naming.NamingException on any JNDI failure
-    */
-   public static Context createSubcontext(Context ctx, String name) throws NamingException
-   {
-      Name n = ctx.getNameParser("").parse(name);
-      return createSubcontext(ctx, n);
-   }
-
-   /** Create a subcontext including any intermediate contexts.
-    @param ctx, the parent JNDI Context under which value will be bound
-    @param name, the name relative to ctx of the subcontext.
-    @return The new or existing JNDI subcontext
-    @throws NamingException on any JNDI failure
-    */
-   public static Context createSubcontext(Context ctx, Name name) throws NamingException
-   {
-      Context subctx = ctx;
-      for (int pos = 0; pos < name.size(); pos++)
-      {
-         String ctxName = name.get(pos);
-         try
-         {
-            subctx = (Context) ctx.lookup(ctxName);
-         }
-         catch (NameNotFoundException e)
-         {
-            subctx = ctx.createSubcontext(ctxName);
-         }
-         // The current subctx will be the ctx for the next name component
-         ctx = subctx;
-      }
-      return subctx;
-   }
-
-   /** Bind val to name in ctx, and make sure that all intermediate contexts exist
-    @param ctx, the parent JNDI Context under which value will be bound
-    @param name, the name relative to ctx where value will be bound
-    @param value, the value to bind.
-    */
-   public static void bind(Context ctx, String name, Object value) throws NamingException
-   {
-      Name n = ctx.getNameParser("").parse(name);
-      bind(ctx, n, value);
-   }
-
-   /** Bind val to name in ctx, and make sure that all intermediate contexts exist
-    @param ctx, the parent JNDI Context under which value will be bound
-    @param name, the name relative to ctx where value will be bound
-    @param value, the value to bind.
-    */
-   public static void bind(Context ctx, Name name, Object value) throws NamingException
-   {
-      int size = name.size();
-      String atom = name.get(size - 1);
-      Context parentCtx = createSubcontext(ctx, name.getPrefix(size - 1));
-      parentCtx.bind(atom, value);
-   }
-
-   /** Rebind val to name in ctx, and make sure that all intermediate contexts exist
-    @param ctx, the parent JNDI Context under which value will be bound
-    @param name, the name relative to ctx where value will be bound
-    @param value, the value to bind.
-    */
-   public static void rebind(Context ctx, String name, Object value) throws NamingException
-   {
-      Name n = ctx.getNameParser("").parse(name);
-      rebind(ctx, n, value);
-   }
-
-   /** Rebind val to name in ctx, and make sure that all intermediate contexts exist
-    @param ctx, the parent JNDI Context under which value will be bound
-    @param name, the name relative to ctx where value will be bound
-    @param value, the value to bind.
-    */
-   public static void rebind(Context ctx, Name name, Object value) throws NamingException
-   {
-      int size = name.size();
-      String atom = name.get(size - 1);
-      Context parentCtx = createSubcontext(ctx, name.getPrefix(size - 1));
-      parentCtx.rebind(atom, value);
-   }
-
-   /** Unbinds a name from ctx, and removes parents if they are empty
-    @param ctx, the parent JNDI Context under which the name will be unbound
-    @param name, The name to unbind
-    */
-   public static void unbind(Context ctx, String name) throws NamingException
-   {
-      unbind(ctx, ctx.getNameParser("").parse(name));
-   }
-
-   /** Unbinds a name from ctx, and removes parents if they are empty
-    @param ctx, the parent JNDI Context under which the name will be unbound
-    @param name, The name to unbind
-    */
-   public static void unbind(Context ctx, Name name) throws NamingException
-   {
-      ctx.unbind(name); //unbind the end node in the name
-      int sz = name.size();
-      // walk the tree backwards, stopping at the domain
-      while (--sz > 0)
-      {
-         Name pname = name.getPrefix(sz);
-         try
-         {
-            ctx.destroySubcontext(pname);
-         }
-         catch (NamingException e)
-         {
-            log.trace("Unable to remove context " + pname, e);
-            break;
-         }
-      }
-   }
-   
-   /**
-    * Lookup an object in the default initial context
-    * 
-    * @param name the name to lookup
-    * @param clazz the expected type
-    * @return the object
-    * @throws Exception for any error
-    */
-   public static Object lookup(String name, Class clazz) throws Exception
-   {
-      InitialContext ctx = new InitialContext();
-      try
-      {
-         return lookup(ctx, name, clazz);
-      }
-      finally
-      {
-         ctx.close();
-      }
-   }
-   
-   /**
-    * Lookup an object in the default initial context
-    * 
-    * @param name the name to lookup
-    * @param clazz the expected type
-    * @return the object
-    * @throws Exception for any error
-    */
-   public static Object lookup(Name name, Class clazz) throws Exception
-   {
-      InitialContext ctx = new InitialContext();
-      try
-      {
-         return lookup(ctx, name, clazz);
-      }
-      finally
-      {
-         ctx.close();
-      }
-   }
-   
-   /**
-    * Lookup an object in the given context
-    * 
-    * @param context the context
-    * @param name the name to lookup
-    * @param clazz the expected type
-    * @return the object
-    * @throws Exception for any error
-    */
-   public static Object lookup(Context context, String name, Class clazz) throws Exception
-   {
-      Object result = context.lookup(name);
-      checkObject(context, name, result, clazz);
-      return result;
-   }
-   
-   /**
-    * Lookup an object in the given context
-    * 
-    * @param context the context
-    * @param name the name to lookup
-    * @param clazz the expected type
-    * @return the object
-    * @throws Exception for any error
-    */
-   public static Object lookup(Context context, Name name, Class clazz) throws Exception
-   {
-      Object result = context.lookup(name);
-      checkObject(context, name.toString(), result, clazz);
-      return result;
-   }
-
-   /**
-    * Create a link
-    * 
-    * @param fromName the from name
-    * @param toName the to name
-    * @throws NamingException for any error
-    */
-   public static void createLinkRef(String fromName, String toName) throws NamingException
-   {
-      InitialContext ctx = new InitialContext();
-      createLinkRef(ctx, fromName, toName);
-   }
-   
-   /**
-    * Create a link
-    * 
-    * @param ctx the context
-    * @param fromName the from name
-    * @param toName the to name
-    * @throws NamingException for any error
-    */
-   public static void createLinkRef(Context ctx, String fromName, String toName) throws NamingException
-   {
-      LinkRef link = new LinkRef(toName);
-      Context fromCtx = ctx;
-      Name name = ctx.getNameParser("").parse(fromName);
-      String atom = name.get(name.size()-1);
-      for(int n = 0; n < name.size()-1; n ++)
-      {
-         String comp = name.get(n);
-         try
-         {
-            fromCtx = (Context) fromCtx.lookup(comp);
-         }
-         catch(NameNotFoundException e)
-         {
-            fromCtx = fromCtx.createSubcontext(comp);
-         }
-      }
-
-      log.debug("atom: " + atom);
-      log.debug("link: " + link);
-      
-      fromCtx.rebind(atom, link);
-
-      log.debug("Bound link " + fromName + " to " + toName);
-   }
-   
-   /**
-    * Remove the link ref
-    *
-    * @param name the name of the link binding
-    * @throws NamingException for any error
-    */
-   public static void removeLinkRef(String name) throws NamingException
-   {
-      InitialContext ctx = new InitialContext();
-      removeLinkRef(ctx, name);
-   }
-   
-   /**
-    * Remove the link ref
-    *
-    * @param ctx the context
-    * @param name the name of the link binding
-    * @throws NamingException for any error
-    */
-   public static void removeLinkRef(Context ctx, String name) throws NamingException
-   {
-      log.debug("Unbinding link " + name);
-      ctx.unbind(name);
-   }
-
-   
-   /**
-    * Checks an object implements the given class
-    * 
-    * @param context the context
-    * @param name the name to lookup
-    * @param object the object
-    * @param clazz the expected type
-    */
-   protected static void checkObject(Context context, String name, Object object, Class clazz) throws Exception
-   {
-      Class objectClass = object.getClass();
-      if (clazz.isAssignableFrom(objectClass) == false)
-      {
-         StringBuffer buffer = new StringBuffer(100);
-         buffer.append("Object at '").append(name);
-         buffer.append("' in context ").append(context.getEnvironment());
-         buffer.append(" is not an instance of ");
-         appendClassInfo(buffer, clazz);
-         buffer.append(" object class is ");
-         appendClassInfo(buffer, object.getClass());
-         throw new ClassCastException(buffer.toString());
-      }
-   }
-   
-   /**
-    * Append Class Info
-    *
-    * @param buffer the buffer to append to
-    * @param clazz the class to describe
-    */
-   protected static void appendClassInfo(StringBuffer buffer, Class clazz)
-   {
-      buffer.append("[class=").append(clazz.getName());
-      buffer.append(" classloader=").append(clazz.getClassLoader());
-      buffer.append(" interfaces={");
-      Class[] interfaces = clazz.getInterfaces();
-      for (int i=0; i<interfaces.length; ++i)
-      {
-         if (i > 0)
-            buffer.append(", ");
-         buffer.append("interface=").append(interfaces[i].getName());
-         buffer.append(" classloader=").append(interfaces[i].getClassLoader());
-      }
-      buffer.append("}]");
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/naming/Util.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/naming/Util.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Utility classes and interfaces.</p>
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/platform)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/Java.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/platform/Java.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/Java.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,144 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.platform;
-
-
-/**
- * Provides common access to specifics about the version of <em>Java</em>
- * that a virtual machine supports.
- *
- * <p>Determines the version of the <em>Java Virtual Machine</em> by checking
- *    for the availablity of version specific classes.<p>
- *
- * <p>Classes are loaded in the following order:
- *    <ol>
- *    <li><tt>java.lang.Enum</tt> was introduced in JDK 1.5</li>
- *    <li><tt>java.lang.StackTraceElement</tt> was introduced in JDK 1.4</li>
- *    <li><tt>java.lang.StrictMath</tt> was introduced in JDK 1.3</li>
- *    <li><tt>java.lang.ThreadLocal</tt> was introduced in JDK 1.2</li>
- *    <li><tt>java.lang.Void</tt> was introduced in JDK 1.1</li>
- *    </ol>
- * </p>
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- */
-public final class Java
-{
-   /** Prevent instantiation */
-   private Java() {}
-
-   /** Java version 1.0 token */
-   public static final int VERSION_1_0 = 0x01;
-
-   /** Java version 1.1 token */
-   public static final int VERSION_1_1 = 0x02;
-
-   /** Java version 1.2 token */
-   public static final int VERSION_1_2 = 0x03;
-
-   /** Java version 1.3 token */
-   public static final int VERSION_1_3 = 0x04;
-
-   /** Java version 1.4 token */
-   public static final int VERSION_1_4 = 0x05;
-   
-   /** Java version 1.5 token */
-   public static final int VERSION_1_5 = 0x06;
-   
-   /** 
-    * Private to avoid over optimization by the compiler.
-    *
-    * @see #getVersion()   Use this method to access this final value.
-    */
-   private static final int VERSION;
-
-   /** Initialize VERSION. */ 
-   static
-   {
-      // default to 1.0
-      int version = VERSION_1_0;
-
-      try
-      {
-         // check for 1.1
-         Class.forName("java.lang.Void");
-         version = VERSION_1_1;
-
-         // check for 1.2
-         Class.forName("java.lang.ThreadLocal");
-         version = VERSION_1_2;
-
-         // check for 1.3
-         Class.forName("java.lang.StrictMath");
-         version = VERSION_1_3;
-
-         // check for 1.4
-         Class.forName("java.lang.StackTraceElement");
-         version = VERSION_1_4;
-         
-         // check for 1.5
-         Class.forName("java.lang.Enum");
-         version = VERSION_1_5;
-      }
-      catch (ClassNotFoundException ignore)
-      {
-      }
-      VERSION = version;
-   }
-
-   /**
-    * Return the version of <em>Java</em> supported by the VM.
-    *
-    * @return  The version of <em>Java</em> supported by the VM.
-    */
-   public static int getVersion()
-   {
-      return VERSION;
-   }
-
-   /**
-    * Returns true if the given version identifer is equal to the
-    * version identifier of the current virtuial machine.
-    *
-    * @param version    The version identifier to check for.
-    * @return           True if the current virtual machine is the same version.
-    */
-   public static boolean isVersion(final int version)
-   {
-      return VERSION == version;
-   }
-
-   /**
-    * Returns true if the current virtual machine is compatible with
-    * the given version identifer.
-    *
-    * @param version    The version identifier to check compatibility of.
-    * @return           True if the current virtual machine is compatible.
-    */
-   public static boolean isCompatible(final int version)
-   {
-      // if our vm is the same or newer then we are compatible
-      return VERSION >= version;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/Java.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/platform/Java.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/PID.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/platform/PID.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/PID.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,149 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.platform;
-
-import java.io.Serializable;
-
-import java.util.Random;
-
-/**
- * Provides access to the process identifier for this virtual machine.
- *
- * <p>Currently does not support native access and generates random numbers
- *    for the process id.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class PID
-   implements Serializable, Cloneable
-{
-   /** The <tt>int</tt> process identifier. */
-   protected final int id;
-
-   /**
-    * Construct a new PID.
-    *
-    * @param id   Process identifier.
-    */
-   protected PID(final int id) {
-      this.id = id;
-   }
-
-   /**
-    * Get the <tt>int</tt> process identifier.
-    *
-    * @return  <tt>int</tt> process identifier.
-    */
-   public final int getID() {
-      return id;
-   }
-
-   /**
-    * Return a string representation of this PID.
-    *
-    * @return  A string representation of this PID.
-    */
-   public String toString() {
-      return String.valueOf(id);
-   }
-
-   /**
-    * Return a string representation of this PID.
-    *
-    * @return  A string representation of this PID.
-    */
-   public String toString(int radix) {
-      return Integer.toString(id, radix);
-   }
-
-   /**
-    * Return the hash code of this PID.
-    *
-    * @return  The hash code of this PID.
-    */
-   public int hashCode() {
-      return id;
-   }
-
-   /**
-    * Check if the given object is equal to this PID.
-    *
-    * @param obj     Object to test equality with.
-    * @return        True if object is equals to this PID.
-    */
-   public boolean equals(final Object obj) {
-      if (obj == this) return true;
-
-      if (obj != null && obj.getClass() == getClass()) {
-         PID pid = (PID)obj;
-         return pid.id == id;
-      }
-
-      return false;
-   }
-
-   /**
-    * Returns a copy of this PID.
-    *
-    * @return  A copy of this PID.
-    */
-   public Object clone() {
-      try {
-         return super.clone();
-      }
-      catch (CloneNotSupportedException e) {
-         throw new InternalError();
-      }
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Instance Access                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /** The single instance of PID for the running Virtual Machine */
-   private static PID instance = null;
-
-   /**
-    * Get the PID for the current virtual machine.
-    *
-    * @return  Process identifier.
-    */
-   public synchronized static PID getInstance() {
-      if (instance == null) {
-         instance = create();
-      }
-      return instance;
-   }
-
-   /**
-    * Create the PID for the current virtual mahcine.
-    *
-    * @return  Process identifier.
-    */
-   private static PID create() {
-      // for now just return a random integer.
-      int random = Math.abs(new Random().nextInt());
-      return new PID(random);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/PID.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/platform/PID.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/platform/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,43 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Platform specific extentions to the <i>Java programming language</i>.</p>
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>Add default implementation for PID that generates psuedo-pid-like
-	  numbers
-      <li>Add native support for PID
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/platform/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/platform/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyAdapter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyAdapter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyAdapter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,50 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-/**
- * An abstract adapter class for receiving bound property events.
- *
- * <p>Methods defined in this class are empty.  This class exists as
- *    as convenience for creating listener objects.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public abstract class BoundPropertyAdapter
-   extends PropertyAdapter
-   implements BoundPropertyListener
-{
-   /**
-    * Notifies that this listener was bound to a property.
-    *
-    * @param map     PropertyMap which contains property bound to.
-    */
-   public void propertyBound(final PropertyMap map) {}
-
-   /**
-    * Notifies that this listener was unbound from a property.
-    *
-    * @param map     PropertyMap which contains property bound to.
-    */
-   public void propertyUnbound(final PropertyMap map) {}
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyAdapter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyAdapter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyListener.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyListener.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyListener.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,65 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-/**
- * The listener interface for receiving bound property events (as well as
- * property events).
- *
- * <p>Classes that are interested in processing a bound property event 
- *    implement this interface, and register instance objects with a given
- *    {@link PropertyMap} or via
- *    {@link PropertyManager#addPropertyListener(PropertyListener)}.
- *
- * <p>Note that this is not the typical listener interface, as it extends
- *    from {@link PropertyListener}, and defines {@link #getPropertyName()}
- *    which is not an event triggered method.  This method serves to instruct
- *    the {@link PropertyMap} the listener is registered with, which property
- *    it will bind to.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface BoundPropertyListener
-   extends PropertyListener
-{
-   /**
-    * Get the property name which this listener is bound to.
-    *
-    * @return  Property name.
-    */
-   String getPropertyName();
-
-   /**
-    * Notifies that this listener was bound to a property.
-    *
-    * @param map     <tt>PropertyMap</tt> which contains property bound to.
-    */
-   void propertyBound(PropertyMap map);
-
-   /**
-    * Notifies that this listener was unbound from a property.
-    *
-    * @param map     <tt>PropertyMap</tt> which contains property bound to.
-    */
-   void propertyUnbound(PropertyMap map);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyListener.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/BoundPropertyListener.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Configurable.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/Configurable.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Configurable.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,39 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-/**
- * An interface that allows for dynamic configuration of instance objects
- * with properties.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface Configurable
-{
-   /**
-    * Configure this object with the given properties.
-    *
-    * @param props   Properties to configure from.
-    */
-   void configure(PropertyMap props);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Configurable.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/Configurable.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/DefaultPropertyReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/DefaultPropertyReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/DefaultPropertyReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,86 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-/**
- * Reads properties from files specified via a system property.
- *
- * <p>Unless otherwise specified, propertie filenames will be read from
- *    the <tt>org.jboss.properties</tt> singleton or array property.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class DefaultPropertyReader
-   extends FilePropertyReader
-{
-   //
-   // Might want to have a org.jboss.properties.property.name or something
-   // property to determine what property name to read from.
-   //
-   // For now just use 'properties'
-   //
-
-   /** Default property name to read filenames from */
-   public static final String DEFAULT_PROPERTY_NAME = "properties";
-
-   /**
-    * Construct a <tt>DefaultPropertyReader</tt> with a specified property 
-    * name.
-    *
-    * @param propertyName    Property name.
-    */
-   public DefaultPropertyReader(final String propertyName) {
-      super(getFilenames(propertyName));
-   }
-
-   /**
-    * Construct a <tt>DefaultPropertyReader</tt>.
-    */
-   public DefaultPropertyReader() {
-      this(DEFAULT_PROPERTY_NAME);
-   }
-   
-   /**
-    * Get an array of filenames to load.
-    *
-    * @param propertyName  Property to read filenames from.
-    * @return              Array of filenames.
-    */
-   public static String[] getFilenames(final String propertyName)
-      throws PropertyException
-   {
-      String filenames[];
-
-      // check for singleton property first
-      Object filename = PropertyManager.getProperty(propertyName);
-      if (filename != null) {
-         filenames = new String[] { String.valueOf(filename) };
-      }
-      else {
-         // if no singleton property exists then look for array props
-         filenames = PropertyManager.getArrayProperty(propertyName);
-      }
-
-      return filenames;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/DefaultPropertyReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/DefaultPropertyReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,175 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import org.jboss.util.FieldInstance;
-import org.jboss.util.NullArgumentException;
-import org.jboss.util.Classes;
-import org.jboss.util.ThrowableHandler;
-import org.jboss.util.propertyeditor.PropertyEditors;
-
-import java.beans.PropertyEditor;
-
-/**
- * Binds property values to class fields.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FieldBoundPropertyListener
-   extends BoundPropertyAdapter
-{
-   /** Property name which we are bound to */
-   protected final String propertyName;
-
-   /** Field instance */
-   protected final FieldInstance fieldInstance;
-
-   /**
-    * Constructs a <tt>FieldBoundPropertyListener</tt>.
-    *
-    * @param instance         Instance object.
-    * @param fieldName        Field name.
-    * @param propertyName     Property to bind to.
-    *
-    * @throws NullArgumentException    Property name is <tt>null</tt>.
-    */
-   public FieldBoundPropertyListener(final Object instance,
-                                     final String fieldName,
-                                     final String propertyName)
-   {
-      if (propertyName == null)
-         throw new NullArgumentException("propertyName");
-      // FieldInstance checks instance & fieldName
-
-      this.propertyName = propertyName;
-
-      try {
-         // construct field instance
-         fieldInstance = new FieldInstance(instance, fieldName);
-         try {
-            fieldInstance.getField().setAccessible(true);
-         }
-         catch (SecurityException e) {
-            ThrowableHandler.add(e);
-         }
-
-         // force the given class to load, so that any CoersionHelpers
-         // that are nested in it are loaded properly
-         Classes.forceLoad(fieldInstance.getField().getType());
-      }
-      catch (NoSuchFieldException e) {
-         throw new PropertyException(e);
-      }
-   }
-
-   /**
-    * Constructs a <tt>FieldBoundPropertyListener</tt>.
-    *
-    * <p>Field name is used for property name.
-    *
-    * @param instance         Instance object.
-    * @param fieldName        Field name.
-    */
-   public FieldBoundPropertyListener(final Object instance,
-                                     final String fieldName)
-   {
-      this(instance, fieldName, fieldName);
-   }
-
-   /**
-    * Get the property name which this listener is bound to.
-    *
-    * @return     Property name.
-    */
-   public final String getPropertyName() {
-      return propertyName;
-   }
-
-   /**
-    * Filter the property value prior to coercing and binding to field.
-    *
-    * <p>Allows instance to filter values prior to object coercion and
-    *    field binding.
-    *
-    * @param value   Property value.
-    */
-   public String filterValue(String value) {
-      return value;
-   }
-
-   /**
-    * Coerce and set specified value to field.
-    *
-    * @param value   Field value.
-    *
-    * @throws PropertyException     Failed to set field value.
-    */
-   protected void setFieldValue(String value) {
-      try {
-         // filter property value
-         value = filterValue(value);
-
-         // coerce value to field type
-         Class type = fieldInstance.getField().getType();
-         PropertyEditor editor = PropertyEditors.findEditor(type);
-         editor.setAsText(value);
-         Object coerced = editor.getValue();
-
-         // bind value to field
-         fieldInstance.set(coerced);
-      }
-      catch (IllegalAccessException e) {
-         throw new PropertyException(e);
-      }
-   }
-
-   /**
-    * Notifies that a property has been added.
-    *
-    * @param event   Property event.
-    */
-   public void propertyAdded(final PropertyEvent event) {
-      setFieldValue(event.getPropertyValue());
-   }
-
-   /**
-    * Notifies that a property has changed
-    *
-    * @param event   Property event
-    */
-   public void propertyChanged(final PropertyEvent event) {
-      setFieldValue(event.getPropertyValue());
-   }
-
-   /**
-    * Notifies that this listener was bound to a property.
-    *
-    * @param map     PropertyMap which contains property bound to.
-    */
-   public void propertyBound(final PropertyMap map) {
-      // only set the field if the map contains the property already
-      if (map.containsProperty(propertyName)) {
-         setFieldValue(map.getProperty(propertyName));
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FilePropertyReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/FilePropertyReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FilePropertyReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,124 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.util.Properties;
-import java.util.Map;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-
-import org.jboss.util.NullArgumentException;
-
-/**
- * Reads properties from one or more files.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FilePropertyReader
-   implements PropertyReader
-{
-   /** Array of filenames to load properties from */
-   protected String[] filenames;
-
-   /**
-    * Construct a FilePropertyReader with an array of filenames
-    * to read from.
-    *
-    * @param filenames  Filenames to load properties from
-    */
-   public FilePropertyReader(String[] filenames) {
-      if (filenames == null)
-         throw new NullArgumentException("filenames");
-
-      this.filenames = filenames;
-   }
-
-   /**
-    * Construct a FilePropertyReader with a single filename to read from.
-    *
-    * @param filename   Filename to load properties from
-    */
-   public FilePropertyReader(String filename) {
-      this(new String[] { filename });
-   }
-
-   /**
-    * Get an input stream for the given filename.
-    *
-    * @param filename   File name to get input stream for.
-    * @return           Input stream for file.
-    *
-    * @throws IOException  Failed to get input stream for file.
-    */
-   protected InputStream getInputStream(String filename) throws IOException {
-      File file = new File(filename);
-      return new FileInputStream(file);
-   }
-
-   /**
-    * Load properties from a file into a properties map.
-    *
-    * @param props      Properties map to load properties into.
-    * @param filename   Filename to read properties from.
-    *
-    * @throws IOException              Failed to load properties from filename.
-    * @throws IllegalArgumentException Filename is invalid.
-    */
-   protected void loadProperties(Properties props, String filename)
-      throws IOException
-   {
-      if (filename == null)
-         throw new NullArgumentException("filename");
-      if (filename.equals(""))
-         throw new IllegalArgumentException("filename");
-
-      InputStream in = new BufferedInputStream(getInputStream(filename));
-      props.load(in);
-      in.close();
-   }
-
-   /**
-    * Read properties from each specified filename
-    *
-    * @return  Read properties
-    *
-    * @throws PropertyException    Failed to read properties.
-    * @throws IOException          I/O error while reading properties.
-    */
-   public Map readProperties()
-      throws PropertyException, IOException
-   {
-      Properties props = new Properties();
-      
-      // load each specified property file
-      for (int i=0; i<filenames.length; i++) {
-         loadProperties(props, filenames[i]);
-      }
-
-      return props;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/FilePropertyReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/FilePropertyReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/MethodBoundPropertyListener.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/MethodBoundPropertyListener.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/MethodBoundPropertyListener.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,204 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.beans.PropertyEditor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.jboss.util.ThrowableHandler;
-import org.jboss.util.propertyeditor.PropertyEditors;
-
-/**
- * Binds property values to class methods.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class MethodBoundPropertyListener
-   extends BoundPropertyAdapter
-{
-   /** Property name which we are bound to */
-   protected final String propertyName;
-
-   /** Instance object that contains setter method */
-   protected final Object instance;
-
-   /** Property setter method */
-   protected final Method setter;
-
-   /** Property descriptor */
-   protected final PropertyDescriptor descriptor;
-
-   /**
-    * Construct a MethodBoundPropertyListener.
-    *
-    * @param instance         Instance object that contains setter method.
-    * @param propertyName     The name of the property which will be bound.
-    * @param beanPropertyName The name of the property setter method.
-    *
-    * @throws PropertyException
-    */
-   public MethodBoundPropertyListener(final Object instance,
-                                      final String propertyName,
-                                      final String beanPropertyName)
-   {
-      this.instance = instance;
-      this.propertyName = propertyName;
-
-      try {
-         descriptor = getPropertyDescriptor(beanPropertyName);
-         if (descriptor == null) {
-            throw new PropertyException
-               ("missing method for: " + beanPropertyName);
-         }
-
-         setter = descriptor.getWriteMethod();
-         if (setter == null) {
-            throw new PropertyException
-               ("missing setter method for: " + beanPropertyName);
-         }
-         try {
-            setter.setAccessible(true);
-         }
-         catch (SecurityException e) {
-            ThrowableHandler.add(e);
-         }
-      }
-      catch (IntrospectionException e) {
-         throw new PropertyException(e);
-      }
-   }
-
-   /**
-    * Get the <tt>PropertyDescriptor</tt> for the given bean property name.
-    *
-    * @param beanPropertyName    Bean property name.
-    * @return                    <tt>PropertyDescriptor</tt>.
-    */
-   private PropertyDescriptor getPropertyDescriptor(final String beanPropertyName)
-      throws IntrospectionException
-   {
-      Class instanceType = instance.getClass();
-      BeanInfo beanInfo = Introspector.getBeanInfo(instanceType);
-      PropertyDescriptor descriptors[] = beanInfo.getPropertyDescriptors();
-      PropertyDescriptor descriptor = null;
-
-      for (int i=0; i<descriptors.length; i++) {
-         if (descriptors[i].getName().equals(beanPropertyName)) {
-            descriptor = descriptors[i];
-            break;
-         }
-      }
-
-      return descriptor;
-   }
-
-   /**
-    * Construct a MethodBoundPropertyListener.
-    *
-    * @param instance         Instance object that contains setter method.
-    * @param propertyName     The name of the property which will be bound.
-    */
-   public MethodBoundPropertyListener(final Object instance,
-                                      final String propertyName)
-   {
-      this(instance, propertyName, propertyName);
-   }
-
-   /**
-    * Get the property name which this listener is bound to.
-    *
-    * @return     Property name.
-    */
-   public final String getPropertyName() {
-      return propertyName;
-   }
-
-   /**
-    * Coerce and invoke the property setter method on the instance.
-    *
-    * @param value   Method value.
-    *
-    * @throws PropertyException     Failed to invoke setter method.
-    */
-   protected void invokeSetter(String value) {
-      try {
-         // coerce value to field type
-         Class type = descriptor.getPropertyType();
-         PropertyEditor editor = PropertyEditors.findEditor(type);
-         editor.setAsText(value);
-         Object coerced = editor.getValue();
-         // System.out.println("type: " + type);
-         // System.out.println("coerced: " + coerced);
-
-         // invoke the setter method
-         setter.invoke(instance, new Object[] { coerced });
-      }
-      catch (InvocationTargetException e) {
-         Throwable target = e.getTargetException();
-         if (target instanceof PropertyException) {
-            throw (PropertyException)target;
-         }
-         else {
-            throw new PropertyException(target);
-         }
-      }
-      catch (Exception e) {
-         throw new PropertyException(e);
-      }
-   }
-
-   /**
-    * Notifies that a property has been added.
-    *
-    * @param event   Property event.
-    */
-   public void propertyAdded(final PropertyEvent event) {
-      invokeSetter(event.getPropertyValue());
-   }
-
-   /**
-    * Notifies that a property has changed.
-    *
-    * @param event   Property event.
-    */
-   public void propertyChanged(final PropertyEvent event) {
-      invokeSetter(event.getPropertyValue());
-   }
-
-   /**
-    * Notifies that this listener was bound to a property.
-    *
-    * @param map     PropertyMap which contains property bound to.
-    */
-   public void propertyBound(final PropertyMap map) {
-      // only set the field if the map contains the property already
-      if (map.containsProperty(propertyName)) {
-         invokeSetter(map.getProperty(propertyName));
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/MethodBoundPropertyListener.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/MethodBoundPropertyListener.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Property.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/Property.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Property.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,193 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Provides shorter method names for working with the {@link PropertyManager}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:adrian at jboss.com">Adrian Brock</a>
- */
-public final class Property
-{
-   /** Platform dependent line separator. */
-   public static String LINE_SEPARATOR;
-
-   /** Platform dependant file separator. */
-   public static String FILE_SEPARATOR;
-
-   /** Platform dependant path separator. */
-   public static String PATH_SEPARATOR;
-   
-   static
-   {
-      PrivilegedAction action = new PrivilegedAction()
-      {
-         public Object run()
-         {
-            LINE_SEPARATOR = Property.get("line.separator");
-            FILE_SEPARATOR = Property.get("file.separator");
-            PATH_SEPARATOR = Property.get("path.separator");
-            return null;
-         }
-      };
-      AccessController.doPrivileged(action);
-   }
-   
-   /**
-    * Add a property listener
-    *
-    * @param listener   Property listener to add
-    */
-   public static void addListener(PropertyListener listener)
-   {
-      PropertyManager.addPropertyListener(listener);
-   }
-
-   /**
-    * Add an array of property listeners
-    *
-    * @param listeners     Array of property listeners to add
-    */
-   public static void addListeners(PropertyListener[] listeners)
-   {
-      PropertyManager.addPropertyListeners(listeners);
-   }
-
-   /**
-    * Remove a property listener
-    *
-    * @param listener   Property listener to remove
-    * @return           True if listener was removed
-    */
-   public static boolean removeListener(PropertyListener listener)
-   {
-      return PropertyManager.removePropertyListener(listener);
-   }
-
-   /**
-    * Set a property
-    *
-    * @param name    Property name
-    * @param value   Property value
-    * @return        Previous property value or null
-    */
-   public static String set(String name, String value)
-   {
-      return PropertyManager.setProperty(name, value);
-   }
-
-   /**
-    * Remove a property
-    *
-    * @param name    Property name
-    * @return        Removed property value or null
-    */
-   public static String remove(String name)
-   {
-      return PropertyManager.getProperty(name);
-   }
-
-   /**
-    * Get a property
-    *
-    * @param name          Property name
-    * @param defaultValue  Default property value
-    * @return              Property value or default
-    */
-   public static String get(String name, String defaultValue)
-   {
-      return PropertyManager.getProperty(name, defaultValue);
-   }
-
-   /**
-    * Get a property
-    *
-    * @param name       Property name
-    * @return           Property value or null
-    */
-   public static String get(String name)
-   {
-      return PropertyManager.getProperty(name);
-   }
-
-   /**
-    * Get an array style property
-    * 
-    * @param base          Base property name
-    * @param defaultValues Default property values
-    * @return              Array of property values or default
-    */
-   public static String[] getArray(String base, String[] defaultValues)
-   {
-      return PropertyManager.getArrayProperty(base, defaultValues);
-   }
-
-   /**
-    * Get an array style property
-    *
-    * @param name       Property name
-    * @return           Array of property values or empty array
-    */
-   public static String[] getArray(String name)
-   {
-      return PropertyManager.getArrayProperty(name);
-   }
-
-   /**
-    * Check if a property of the given name exists.
-    *
-    * @param name    Property name
-    * @return        True if property exists
-    */
-   public static boolean exists(String name)
-   {
-      return PropertyManager.containsProperty(name);
-   }
-
-   /**
-    * Get a property group for the given property base
-    *
-    * @param basename   Base property name
-    * @return           Property group
-    */
-   public static PropertyGroup getGroup(String basename)
-   {
-      return PropertyManager.getPropertyGroup(basename);
-   }
-
-   /**
-    * Get a property group for the given property base at the given index
-    *
-    * @param basename   Base property name
-    * @param index      Array property index
-    * @return           Property group
-    */
-   public static PropertyGroup getGroup(String basename, int index)
-   {
-      return PropertyManager.getPropertyGroup(basename, index);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/Property.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/Property.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyAdapter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyAdapter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyAdapter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,56 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-/**
- * An abstract adapter class for receving property events.
- *
- * <p>Methods defined in this class are empty.  This class exists as
- *    as convenience for creating listener objects.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public abstract class PropertyAdapter
-   implements PropertyListener
-{
-   /**
-    * Notifies that a property was added.
-    *
-    * @param event   Property event.
-    */
-   public void propertyAdded(final PropertyEvent event) {}
-
-   /**
-    * Notifies that a property was removed.
-    *
-    * @param event   Property event.
-    */
-   public void propertyRemoved(final PropertyEvent event) {}
-
-   /**
-    * Notifies that a property has changed.
-    *
-    * @param event   Property event.
-    */
-   public void propertyChanged(final PropertyEvent event) {}
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyAdapter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyAdapter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyContainer.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyContainer.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyContainer.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,159 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.util.Properties;
-
-/**
- * Provides helper methods for working with instance or class properties.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class PropertyContainer
-   extends PropertyMap
-{
-   /** The group name for this container. */
-   protected String groupname = "<unknown>";
-
-   /**
-    * Initialize the container with a property group.
-    *
-    * @param group  Properties.
-    */
-   public PropertyContainer(final Properties props) {
-      super(props);
-   }
-
-   /**
-    * Initialize the container with a property group of the given name.
-    *
-    * @param groupname  Property group name.
-    */
-   public PropertyContainer(final String groupname) {
-      this(Property.getGroup(groupname));
-      this.groupname = groupname;
-   }
-
-   /**
-    * Initialize the container with a property group of the given class name.
-    *
-    * @param type    The class whos name will be the property group name.
-    */
-   public PropertyContainer(final Class type) {
-      this(type.getName());
-   }
-   
-   /**
-    * Creates a {@link FieldBoundPropertyListener} for the field and
-    * property name and adds it the underlying property group.
-    *
-    * @param name          The field name to bind values to.
-    * @param propertyName  The property name to bind to.
-    *
-    * @throws IllegalArgumentException    Field of property name is null or 
-    *                                     empty.
-    */
-   protected void bindField(final String name, final String propertyName) {
-      if (name == null || name.equals(""))
-         throw new IllegalArgumentException("name");
-      if (propertyName == null || propertyName.equals(""))
-         throw new IllegalArgumentException("propertyName");
-
-      addPropertyListener
-         (new FieldBoundPropertyListener(this, name, propertyName));
-   }
-
-   /**
-    * Creates a {@link FieldBoundPropertyListener} for the field and
-    * property name and adds it the underlying property group.
-    *
-    * @param name    The field name and property to bind values to.
-    *
-    * @throws IllegalArgumentException    Field of property name is null or 
-    *                                     empty.
-    */
-   protected void bindField(final String name) {
-      bindField(name, name);
-   }
-
-   /**
-    * Creates a {@link MethodBoundPropertyListener} for the method and
-    * property name and adds it the underlying property group.
-    *
-    * @param name          The method name to bind values to.
-    * @param propertyName  The property name to bind to.
-    *
-    * @throws IllegalArgumentException    Method of property name is null or 
-    *                                     empty.
-    */
-   protected void bindMethod(final String name, final String propertyName) {
-      if (name == null || name.equals(""))
-         throw new IllegalArgumentException("name");
-      if (propertyName == null || propertyName.equals(""))
-         throw new IllegalArgumentException("propertyName");
-
-      addPropertyListener //                opposite of field bound =(
-         (new MethodBoundPropertyListener(this, propertyName, name));
-   }
-
-   /**
-    * Creates a {@link MethodBoundPropertyListener} for the method and
-    * property name and adds it the underlying property group.
-    *
-    * @param name    The method name and property to bind values to.
-    *
-    * @throws IllegalArgumentException    Method of property name is null or 
-    *                                     empty.
-    */
-   protected void bindMethod(final String name) {
-      bindMethod(name, name);
-   }
-
-   private String makeName(final String name) {
-      return groupname + "." + name;
-   }
-
-   protected void throwException(final String name) 
-      throws PropertyException
-   {
-      throw new PropertyException(makeName(name));
-   }
-
-   protected void throwException(final String name, final String msg) 
-      throws PropertyException
-   {
-      throw new PropertyException(makeName(name) + ": " + msg);
-   }
-
-   protected void throwException(final String name, final String msg, final Throwable nested)
-      throws PropertyException
-   {
-      throw new PropertyException(makeName(name) + ": " + msg, nested);
-   }
-
-   protected void throwException(final String name, final Throwable nested)
-      throws PropertyException
-   {
-      throw new PropertyException(makeName(name), nested);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyContainer.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyContainer.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyError.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyError.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyError.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,72 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import org.jboss.util.NestedError;
-
-/**
- * Thrown to indicate a fatal problem with the property system.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class PropertyError
-   extends NestedError
-{
-   /**
-    * Construct a <tt>PropertyError</tt> with the specified detail 
-    * message.
-    *
-    * @param msg  Detail message.
-    */
-   public PropertyError(String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <tt>PropertyError</tt> with the specified detail 
-    * message and nested <tt>Throwable</tt>.
-    *
-    * @param msg     Detail message.
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public PropertyError(String msg, Throwable nested) {
-      super(msg, nested);
-   }
-
-   /**
-    * Construct a <tt>PropertyError</tt> with the specified
-    * nested <tt>Throwable</tt>.
-    *
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public PropertyError(Throwable nested) {
-      super(nested);
-   }
-
-   /**
-    * Construct a <tt>PropertyError</tt> with no detail.
-    */
-   public PropertyError() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyError.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyError.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyEvent.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyEvent.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyEvent.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,107 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.util.EventObject;
-
-import org.jboss.util.NullArgumentException;
-
-/**
- * A property event.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class PropertyEvent
-   extends EventObject
-{
-   /** Property name. */
-   protected final String name;
-
-   /** Property value. */
-   protected final String value;
-
-   /**
-    * Construct a new <tt>PropertyEvent</tt>.
-    *
-    * @param source  The source of the event.
-    * @param name    The property name effected.
-    * @param value   The value of the property effected.
-    *
-    * @throws NullArgumentException    Name or source is <tt>null</tt>.
-    */
-   public PropertyEvent(final Object source,
-                        final String name,
-                        final String value)
-   {
-      super(source);
-
-      if (name == null)
-         throw new NullArgumentException("name");
-      // value can be null
-
-      this.name = name;
-      this.value = value;
-   }
-
-   /**
-    * Construct a new <tt>PropertyEvent</tt>.
-    *
-    * @param source  The source of the event.
-    * @param name    The property name effected.
-    *
-    * @throws NullArgumentException    Name or source is <tt>null</tt>.
-    */
-   public PropertyEvent(Object source, String name) {
-      this(source, name, null);
-   }
-
-   /**
-    * Get the name of the property that is effected.
-    *
-    * @return     Property name.
-    */
-   public final String getPropertyName() {
-      return name;
-   }
-
-   /**
-    * Get the value of the property that is effected.
-    *
-    * @return  The value of the property that is effected or <tt>null</tt>.
-    */
-   public final String getPropertyValue() {
-      return value;
-   }
-
-   /**
-    * Return a string representation of this event.
-    *
-    * @return  A string representation of this event.
-    */
-   public String toString() {
-      return super.toString() + 
-         "{ name=" + name +
-         ", value=" + value +
-         " }";
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyEvent.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyEvent.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,73 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import org.jboss.util.NestedRuntimeException;
-
-/**
- * This exception is thrown to indicate a non-fatal problem with the 
- * property system.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class PropertyException
-   extends NestedRuntimeException
-{
-   /**
-    * Construct a <tt>PropertyException</tt> with the specified detail 
-    * message.
-    *
-    * @param msg  Detail message.
-    */
-   public PropertyException(String msg) {
-      super(msg);
-   }
-
-   /**
-    * Construct a <tt>PropertyException</tt> with the specified detail 
-    * message and nested <tt>Throwable</tt>.
-    *
-    * @param msg     Detail message.
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public PropertyException(String msg, Throwable nested) {
-      super(msg, nested);
-   }
-
-   /**
-    * Construct a <tt>PropertyException</tt> with the specified
-    * nested <tt>Throwable</tt>.
-    *
-    * @param nested  Nested <tt>Throwable</tt>.
-    */
-   public PropertyException(Throwable nested) {
-      super(nested);
-   }
-
-   /**
-    * Construct a <tt>PropertyException</tt> with no detail.
-    */
-   public PropertyException() {
-      super();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyGroup.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyGroup.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyGroup.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,305 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.util.Properties;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.Set;
-import java.util.Iterator;
-
-import org.jboss.util.NullArgumentException;
-
-/**
- * This is a helper class to access a group of properties with out having to
- * refer to their full names.
- *
- * <p>This class needs more work to be fully functional.  It should suffice
- *    for adding property listeners and getting/setting property values,
- *    but other activies might not work out so well.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:adrian at jboss.com">Adrian Brock</a>
- */
-public class PropertyGroup extends PropertyMap
-{    
-   /** Serial version uid */
-   private static final long serialVersionUID = -2557641199743063159L;
-   /** Base property name */
-   protected final String basename;
-
-   /**
-    * Construct a <tt>PropertyGroup</tt>.
-    *
-    * @param basename   Base property name.
-    * @param container  Property container.
-    *
-    * @throws NullArgumentException    Basename is <tt>null</tt>.
-    */
-   public PropertyGroup(final String basename, final Properties container)
-   {
-      super(container);
-
-      if (basename == null)
-         throw new NullArgumentException("basename");
-
-      this.basename = basename;
-   }
-
-   /**
-    * Get the base property name for this group.
-    *
-    * @return  Base property name.
-    */
-   public final String getBaseName()
-   {
-      return basename;
-   }
-
-   /**
-    * Make a fully qualified property name.
-    *
-    * @param suffix  Property name suffix.
-    */
-   private String makePropertyName(final String suffix)
-   {
-      return basename + PropertyMap.PROPERTY_NAME_SEPARATOR + suffix;
-   }
-
-   /**
-    * Make a fully qualified property name.
-    *
-    * @param suffix  Property name suffix.
-    */
-   private String makePropertyName(final Object suffix)
-   {
-      return makePropertyName(String.valueOf(suffix));
-   }
-
-   /**
-    * Check if this <tt>PropertyMap</tt> contains a given property name.
-    *
-    * @param name    Property name.
-    * @return        True if property map or defaults contains key.
-    */
-   public boolean containsKey(final Object name)
-   {
-      if (name == null)
-         throw new NullArgumentException("name");
-
-      return super.containsKey(makePropertyName(name));
-   }
-
-   /**
-    * Set a property.
-    *
-    * @param name    Property name.
-    * @param value   Property value.
-    * @return        Previous property value or <tt>null</tt>.
-    */
-   public Object put(final Object name, final Object value)
-   {
-      if (name == null)
-         throw new NullArgumentException("name");
-
-      return super.put(makePropertyName(name), value);
-   }
-
-   /**
-    * Get a property
-    *
-    * @param name    Property name.
-    * @return        Property value or <tt>null</tt>.
-    */
-   public Object get(final Object name)
-   {
-      if (name == null)
-         throw new NullArgumentException("name");
-
-      return super.get(makePropertyName(name));
-   }
-
-   /**
-    * Remove a property.
-    *
-    * @param name    Property name.
-    * @return        Removed property value.
-    */
-   public Object remove(final Object name)
-   {
-      if (name == null)
-         throw new NullArgumentException("name");
-
-      return super.remove(makePropertyName(name));
-   }
-
-   /**
-    * Returns an entry set for all properties in this group.
-    *
-    * <p>
-    * This is currently ver inefficient, but should get the
-    * job done for now.
-    */
-   public Set entrySet()
-   {
-      final Set superSet = super.entrySet(true);
-
-      return new java.util.AbstractSet()
-      {
-         private boolean isInGroup(Map.Entry entry)
-         {
-            String key = (String) entry.getKey();
-            return key.startsWith(basename);
-         }
-
-         public int size()
-         {
-            Iterator iter = superSet.iterator();
-            int count = 0;
-            while (iter.hasNext())
-            {
-               Map.Entry entry = (Map.Entry) iter.next();
-               if (isInGroup(entry))
-               {
-                  count++;
-               }
-            }
-
-            return count;
-         }
-
-         public Iterator iterator()
-         {
-            return new Iterator()
-            {
-               private Iterator iter = superSet.iterator();
-
-               private Object next;
-
-               public boolean hasNext()
-               {
-                  if (next != null)
-                     return true;
-
-                  while (next == null)
-                  {
-                     if (iter.hasNext())
-                     {
-                        Map.Entry entry = (Map.Entry) iter.next();
-                        if (isInGroup(entry))
-                        {
-                           next = entry;
-                           return true;
-                        }
-                     }
-                     else
-                     {
-                        break;
-                     }
-                  }
-
-                  return false;
-               }
-
-               public Object next()
-               {
-                  if (next == null)
-                     throw new java.util.NoSuchElementException();
-
-                  Object obj = next;
-                  next = null;
-
-                  return obj;
-               }
-
-               public void remove()
-               {
-                  iter.remove();
-               }
-            };
-         }
-      };
-   }
-
-   /**
-    * Add a bound property listener.
-    *
-    * <p>Generates a fully qualified property name and adds the listener
-    *    under that name.
-    *
-    * @param listener   Bound property listener to add.
-    */
-   protected void addPropertyListener(final BoundPropertyListener listener)
-   {
-      // get the bound property name
-      String name = makePropertyName(listener.getPropertyName());
-
-      // get the bound listener list for the property
-      List list = (List) boundListeners.get(name);
-
-      // if list is null, then add a new list
-      if (list == null)
-      {
-         list = new ArrayList();
-         boundListeners.put(name, list);
-      }
-
-      // if listener is not in the list already, then add it
-      if (!list.contains(listener))
-      {
-         list.add(listener);
-         // notify listener that is is bound
-         listener.propertyBound(this);
-      }
-   }
-
-   /**
-    * Remove a bound property listener.
-    *
-    * <p>Generates a fully qualified property name and removes the listener
-    *    under that name.
-    *
-    * @param listener   Bound property listener to remove.
-    * @return           True if listener was removed.
-    */
-   protected boolean removePropertyListener(final BoundPropertyListener listener)
-   {
-      // get the bound property name
-      String name = makePropertyName(listener.getPropertyName());
-
-      // get the bound listener list for the property
-      List list = (List) boundListeners.get(name);
-      boolean removed = false;
-      if (list != null)
-      {
-         removed = list.remove(listener);
-
-         // notify listener that is was unbound
-         if (removed)
-            listener.propertyUnbound(this);
-      }
-
-      return removed;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyGroup.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyGroup.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyListener.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyListener.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyListener.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,59 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.util.EventListener;
-
-/**
- * The listener interface for receiving property events.
- *
- * <p>Classes that are interested in processing a property event implement
- *    this interface, and register instance objects with a given PropertyMap
- *    or the PropertyManager via <code>addPropertyListener()</code>.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface PropertyListener
-   extends EventListener
-{
-   /**
-    * Notifies that a property was added
-    *
-    * @param event   Property event
-    */
-   void propertyAdded(PropertyEvent event);
-
-   /**
-    * Notifies that a property was removed
-    *
-    * @param event   Property event
-    */
-   void propertyRemoved(PropertyEvent event);
-
-   /**
-    * Notifies that a property has changed
-    *
-    * @param event   Property event
-    */
-   void propertyChanged(PropertyEvent event);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyListener.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyListener.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyManager.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyManager.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyManager.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,353 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Map;
-import java.util.Iterator;
-
-import java.io.IOException;
-
-import org.jboss.util.ThrowableHandler;
-
-/**
- * A more robust replacement of <tt>java.lang.System</tt> for property
- * access.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:adrian at jboss.com">Adrian Brock</a>
- */
-public final class PropertyManager
-{
-   /** Property reader list property name */
-   public static final String READER_PROPERTY_NAME = "org.jboss.util.property.reader";
-
-   /** Token which specifies the default property reader */
-   public static final String DEFAULT_PROPERTY_READER_TOKEN = "DEFAULT";
-
-   /** The default property reader name array */
-   private static final String[] DEFAULT_PROPERTY_READERS = { DEFAULT_PROPERTY_READER_TOKEN };
-
-   /** Default property container */
-   private static PropertyMap props;
-
-   /**
-    * Do not allow instantiation of this class.
-    */
-   private PropertyManager()
-   {
-   }
-
-   /**
-    * Initialize the property system.
-    */
-   static
-   {
-      // construct default property container and initialze from system props
-      props = new PropertyMap();
-      PrivilegedAction action = new PrivilegedAction()
-      {
-         public Object run()
-         {
-            props.putAll(System.getProperties());
-
-            // replace system props to enable notifications via System.setProperty()
-            System.setProperties(props);
-
-            // load properties from initial property readers
-            String[] readerNames = getArrayProperty(READER_PROPERTY_NAME, DEFAULT_PROPERTY_READERS);
-
-            // construct each source and read its properties
-            for (int i = 0; i < readerNames.length; i++)
-            {
-               try
-               {
-                  if (readerNames[i].equals(DEFAULT_PROPERTY_READER_TOKEN))
-                  {
-                     load(new DefaultPropertyReader());
-                  }
-                  else
-                  {
-                     load(readerNames[i]);
-                  }
-               }
-               catch (IOException e)
-               {
-                  ThrowableHandler.add(e);
-               }
-            }
-            return null;
-         }
-      };
-      AccessController.doPrivileged(action);
-   }
-
-   /**
-    * Get the default <tt>PropertyMap</tt>.
-    *
-    * @return  Default <tt>PropertyMap</tt>.
-    */
-   public static PropertyMap getDefaultPropertyMap()
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      return props;
-   }
-
-   /**
-    * Add a property listener.
-    *
-    * @param listener   Property listener to add.
-    */
-   public static void addPropertyListener(final PropertyListener listener)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      props.addPropertyListener(listener);
-   }
-
-   /**
-    * Add an array of property listeners.
-    *
-    * @param listeners     Array of property listeners to add.
-    */
-   public static void addPropertyListeners(final PropertyListener[] listeners)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      props.addPropertyListeners(listeners);
-   }
-
-   /**
-    * Remove a property listener.
-    *
-    * @param listener   Property listener to remove.
-    * @return           True if listener was removed.
-    */
-   public static boolean removePropertyListener(final PropertyListener listener)
-   {
-      return props.removePropertyListener(listener);
-   }
-
-   /**
-    * Load properties from a map.
-    *
-    * @param prefix  Prefix to append to all map keys (or <tt>null</tt>).
-    * @param map     Map containing properties to load.
-    */
-   public static void load(final String prefix, final Map map) throws PropertyException
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      props.load(prefix, map);
-   }
-
-   /**
-    * Load properties from a map.
-    *
-    * @param map  Map containing properties to load.
-    */
-   public static void load(final Map map) throws PropertyException, IOException
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      props.load(map);
-   }
-
-   /**
-    * Load properties from a <tt>PropertyReader</tt>.
-    *
-    * @param reader  <tt>PropertyReader</tt> to read properties from.
-    */
-   public static void load(final PropertyReader reader) throws PropertyException, IOException
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      props.load(reader);
-   }
-
-   /**
-    * Load properties from a <tt>PropertyReader</tt> specifed by the 
-    * given class name.
-    *
-    * @param classname     Class name of a <tt>PropertyReader</tt> to 
-    *                      read from.
-    */
-   public static void load(final String classname) throws PropertyException, IOException
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      props.load(classname);
-   }
-
-   /**
-    * Set a property.
-    *
-    * @param name    Property name.
-    * @param value   Property value.
-    * @return        Previous property value or <tt>null</tt>.
-    */
-   public static String setProperty(final String name, final String value)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertyAccess(name);
-      return (String) props.setProperty(name, value);
-   }
-
-   /**
-    * Remove a property.
-    *
-    * @param name    Property name.
-    * @return        Removed property value or <tt>null</tt>.
-    */
-   public static String removeProperty(final String name)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertyAccess(name);
-      return props.removeProperty(name);
-   }
-
-   /**
-    * Get a property.
-    *
-    * @param name          Property name.
-    * @param defaultValue  Default property value.
-    * @return              Property value or default.
-    */
-   public static String getProperty(final String name, final String defaultValue)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertyAccess(name);
-      return props.getProperty(name, defaultValue);
-   }
-
-   /**
-    * Get a property.
-    *
-    * @param name       Property name.
-    * @return           Property value or <tt>null</tt>.
-    */
-   public static String getProperty(final String name)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertyAccess(name);
-      return props.getProperty(name);
-   }
-
-   /**
-    * Get an array style property.
-    * 
-    * @param base             Base property name.
-    * @param defaultValues    Default property values.
-    * @return                 Array of property values or default.
-    */
-   public static String[] getArrayProperty(final String base, final String[] defaultValues)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      return props.getArrayProperty(base, defaultValues);
-   }
-
-   /**
-    * Get an array style property.
-    *
-    * @param name       Property name.
-    * @return           Array of property values or empty array.
-    */
-   public static String[] getArrayProperty(final String name)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertyAccess(name);
-      return props.getArrayProperty(name);
-   }
-
-   /**
-    * Return an iterator over all contained property names.
-    *
-    * @return     Property name iterator.
-    */
-   public static Iterator names()
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      return props.names();
-   }
-
-   /**
-    * Check if this map contains a given property.
-    *
-    * @param name    Property name.
-    * @return        True if contains property.
-    */
-   public static boolean containsProperty(final String name)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertyAccess(name);
-      return props.containsProperty(name);
-   }
-
-   /**
-    * Get a property group for the given property base.
-    *
-    * @param basename   Base property name.
-    * @return           Property group.
-    */
-   public static PropertyGroup getPropertyGroup(final String basename)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      return props.getPropertyGroup(basename);
-   }
-
-   /**
-    * Get a property group for the given property base at the given index.
-    *
-    * @param basename   Base property name.
-    * @param index      Array property index.
-    * @return           Property group.
-    */
-   public static PropertyGroup getPropertyGroup(final String basename, final int index)
-   {
-      SecurityManager sm = System.getSecurityManager();
-      if (sm != null)
-         sm.checkPropertiesAccess();
-      return props.getPropertyGroup(basename, index);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyManager.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyManager.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyMap.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyMap.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyMap.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,776 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.List;
-import java.util.LinkedList;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Collections;
-import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.ldap.LdapContext;
-
-import org.jboss.util.NullArgumentException;
-
-/**
- * A replacement for the standard <code>java.util.Properties</code>
- * class which adds, among others, property event capabilities.
- *
- * @todo consider moving the JNDI property handling to a InitialContextFactoryBuilder
- * 
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author Scott.Stark at jboss.org
- * @author  <a href="mailto:adrian at jboss.com">Adrian Brock</a>
- */
-public class PropertyMap extends Properties
-{
-   /** Serial version uid */
-   private static final long serialVersionUID = 8747802918099008518L;
-
-   /** Property name separator */
-   public static final String PROPERTY_NAME_SEPARATOR = ".";
-
-   /** Empty array property */
-   public static final String[] EMPTY_ARRAY_PROPERTY = new String[0];
-
-   /** Property listener list */
-   protected transient List unboundListeners;
-
-   /** Bound property name -> listener list map */
-   protected transient Map boundListeners;
-
-   /**
-    * This map avoids heavy contention for the properties that JNDI looks
-    * up everytime a new InitialContext instance is created. Once the container is
-    * up and running getProperty calls other than for the JNDI property are very rare,
-    * so the double lookup is not much of a performance problem.
-    * If at all possible, this class should be read-only and use no locks at all.
-    */
-   private transient Map jndiMap;
-   private final static Object NULL_VALUE = new Object();
-
-   /**
-    * Construct a PropertyMap with default properties.
-    *
-    * @param defaults   Default properties.
-    */
-   public PropertyMap(Properties defaults)
-   {
-      super(defaults);
-      init();
-   }
-
-   /**
-    * Construct a PropertyMap.
-    */
-   public PropertyMap()
-   {
-      this(null);
-   }
-
-   /** Initialized listener lists and the JNDI properties cache map
-    */
-   private void init()
-   {
-      unboundListeners = Collections.synchronizedList(new ArrayList());
-      boundListeners = Collections.synchronizedMap(new HashMap());
-      jndiMap = new HashMap();
-
-      PrivilegedAction action = new PrivilegedAction()
-      {
-         public Object run()
-         {
-            Object value = System.getProperty(Context.PROVIDER_URL);
-            if (value == null) value = NULL_VALUE;
-            jndiMap.put(Context.PROVIDER_URL, value);
-
-            value = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
-            if (value == null) value = NULL_VALUE;
-            jndiMap.put(Context.INITIAL_CONTEXT_FACTORY, value);
-
-            value = System.getProperty(Context.OBJECT_FACTORIES);
-            if (value == null) value = NULL_VALUE;
-            jndiMap.put(Context.OBJECT_FACTORIES, value);
-
-            value = System.getProperty(Context.URL_PKG_PREFIXES);
-            if (value == null) value = NULL_VALUE;
-            jndiMap.put(Context.URL_PKG_PREFIXES, value);
-
-            value = System.getProperty(Context.STATE_FACTORIES);
-            if (value == null) value = NULL_VALUE;
-            jndiMap.put(Context.STATE_FACTORIES, value);
-
-            value = System.getProperty(Context.DNS_URL);
-            if (value == null) value = NULL_VALUE;
-            jndiMap.put(Context.DNS_URL, value);
-
-            value = System.getProperty(LdapContext.CONTROL_FACTORIES);
-            if (value == null) value = NULL_VALUE;
-            jndiMap.put(LdapContext.CONTROL_FACTORIES, value);
-            return null;
-         }
-      };
-      AccessController.doPrivileged(action);
-   }
-
-   /** Called by setProperty to update the jndiMap cache values.
-    * @param name the property name
-    * @param value the property value
-    */ 
-   private void updateJndiCache(String name, String value)
-   {
-      if( name == null )
-         return;
-
-      boolean isJndiProperty = name.equals(Context.PROVIDER_URL)
-         || name.equals(Context.INITIAL_CONTEXT_FACTORY)
-         || name.equals(Context.OBJECT_FACTORIES)
-         || name.equals(Context.URL_PKG_PREFIXES)
-         || name.equals(Context.STATE_FACTORIES)
-         || name.equals(Context.DNS_URL)
-         || name.equals(LdapContext.CONTROL_FACTORIES)
-      ;
-      if( isJndiProperty == true )
-         jndiMap.put(name, value);
-   }
-
-   /**
-    * Set a property.
-    *
-    * @param name    Property name.
-    * @param value   Property value.
-    * @return        Previous property value or null.
-    */
-   public Object put(Object name, Object value)
-   {
-      if (name == null)
-         throw new NullArgumentException("name");
-      // value can be null
-
-      // check if this is a new addition or not prior to updating the hash
-      boolean add = !containsKey(name);
-      Object prev = super.put(name, value);
-
-      PropertyEvent event =
-         new PropertyEvent(this, name.toString(), value.toString());
-
-      // fire propertyAdded or propertyChanged
-      if (add)
-      {
-         firePropertyAdded(event);
-      }
-      else
-      {
-         firePropertyChanged(event);
-      }
-
-      return prev;
-   }
-
-   /**
-    * Remove a property.
-    *
-    * @param name    Property name.
-    * @return        Removed property value.
-    */
-   public Object remove(Object name)
-   {
-      if (name == null)
-         throw new NullArgumentException("name");
-
-      // check if there is a property with this name
-      boolean contains = containsKey(name);
-      Object value = null;
-
-      if (contains)
-      {
-         value = super.remove(name);
-         if (defaults != null)
-         {
-            Object obj = defaults.remove(name);
-            if (value == null)
-            {
-               value = obj;
-            }
-         }
-         // Remove any JNDI property value
-         jndiMap.remove(name);
-
-         PropertyEvent event = new PropertyEvent(this, name.toString(), value.toString());
-         firePropertyRemoved(event);
-      }
-
-      return value;
-   }
-
-   /**
-    * Returns a set of keys for all entries in this group and optionally
-    * all of the keys in the defaults map.
-    */
-   public Set keySet(final boolean includeDefaults)
-   {
-      if (includeDefaults)
-      {
-         Set set = new HashSet();
-         set.addAll(defaults.keySet());
-         set.addAll(super.keySet());
-         return Collections.synchronizedSet(set);
-      }
-
-      return super.keySet();
-   }
-
-   /**
-    * Returns a set of entrys for all entries in this group and optionally
-    * all of the entrys in the defaults map.
-    */
-   public Set entrySet(final boolean includeDefaults)
-   {
-      if (includeDefaults)
-      {
-         Set set = new HashSet();
-         set.addAll(defaults.entrySet());
-         set.addAll(super.entrySet());
-         return Collections.synchronizedSet(set);
-      }
-
-      return super.entrySet();
-   }   
-
-   /**
-    * Add a property listener.
-    *
-    * @param listener   Property listener to add.
-    */
-   public void addPropertyListener(PropertyListener listener)
-   {
-      if (listener == null)
-         throw new NullArgumentException("listener");
-
-      if (listener instanceof BoundPropertyListener)
-      {
-         addPropertyListener((BoundPropertyListener) listener);
-      }
-      else
-      {
-         // only add the listener if it is not in the list already
-         if (!unboundListeners.contains(listener))
-            unboundListeners.add(listener);
-      }
-   }
-
-   /**
-    * Add a bound property listener.
-    *
-    * @param listener   Bound property listener to add.
-    */
-   protected void addPropertyListener(BoundPropertyListener listener)
-   {
-      // get the bound property name
-      String name = listener.getPropertyName();
-
-      // get the bound listener list for the property
-      List list = (List) boundListeners.get(name);
-      
-      // if list is null, then add a new list
-      if (list == null)
-      {
-         list = Collections.synchronizedList(new ArrayList());
-         boundListeners.put(name, list);
-      }
-      
-      // if listener is not in the list already, then add it
-      if (!list.contains(listener))
-      {
-         list.add(listener);
-         // notify listener that is is bound
-         listener.propertyBound(this);
-      }
-   }
-
-   /**
-    * Add an array of property listeners.
-    *
-    * @param listeners     Array of property listeners to add.
-    */
-   public void addPropertyListeners(PropertyListener[] listeners)
-   {
-      if (listeners == null)
-         throw new NullArgumentException("listeners");
-
-      for (int i = 0; i < listeners.length; i++)
-      {
-         addPropertyListener(listeners[i]);
-      }
-   }
-
-   /**
-    * Remove a property listener.
-    *
-    * @param listener   Property listener to remove.
-    * @return           True if listener was removed.
-    */
-   public boolean removePropertyListener(PropertyListener listener)
-   {
-      if (listener == null)
-         throw new NullArgumentException("listener");
-
-      boolean removed = false;
-      if (listener instanceof BoundPropertyListener)
-      {
-         removed = removePropertyListener((BoundPropertyListener) listener);
-      }
-      else
-      {
-         removed = unboundListeners.remove(listener);
-      }
-
-      return removed;
-   }
-
-   /**
-    * Remove a bound property listener.
-    *
-    * @param listener   Bound property listener to remove.
-    * @return           True if listener was removed.
-    */
-   protected boolean removePropertyListener(BoundPropertyListener listener)
-   {
-      // get the bound property name
-      String name = listener.getPropertyName();
-      
-      // get the bound listener list for the property
-      List list = (List) boundListeners.get(name);
-      boolean removed = false;
-      if (list != null)
-      {
-         removed = list.remove(listener);
-         
-         // notify listener that is was unbound
-         if (removed) listener.propertyUnbound(this);
-      }
-      return removed;
-   }
-
-   /**
-    * Fire a property added event to the given list of listeners.
-    *
-    * @param list    Listener list.
-    * @param event   Property event.
-    */
-   private void firePropertyAdded(List list, PropertyEvent event)
-   {
-      if (list == null) return;
-
-      int size = list.size();
-      for (int i = 0; i < size; i++)
-      {
-         PropertyListener listener = (PropertyListener) list.get(i);
-         listener.propertyAdded(event);
-      }
-   }
-
-   /**
-    * Fire a property added event to all registered listeners.
-    *
-    * @param event   Property event.
-    */
-   protected void firePropertyAdded(PropertyEvent event)
-   {
-      // fire all bound listeners (if any) first
-      if (boundListeners != null)
-      {
-         List list = (List) boundListeners.get(event.getPropertyName());
-         if (list != null)
-         {
-            firePropertyAdded(list, event);
-         }
-      }
-
-      // next fire all unbound listeners
-      firePropertyAdded(unboundListeners, event);
-   }
-
-   /**
-    * Fire a property removed event to the given list of listeners.
-    *
-    * @param list    Listener list.
-    * @param event   Property event.
-    */
-   private void firePropertyRemoved(List list, PropertyEvent event)
-   {
-      if (list == null) return;
-
-      int size = list.size();
-      for (int i = 0; i < size; i++)
-      {
-         PropertyListener listener = (PropertyListener) list.get(i);
-         listener.propertyRemoved(event);
-      }
-   }
-
-   /**
-    * Fire a property removed event to all registered listeners.
-    *
-    * @param event   Property event.
-    */
-   protected void firePropertyRemoved(PropertyEvent event)
-   {
-      // fire all bound listeners (if any) first
-      if (boundListeners != null)
-      {
-         List list = (List) boundListeners.get(event.getPropertyName());
-         if (list != null)
-         {
-            firePropertyRemoved(list, event);
-         }
-      }
-
-      // next fire all unbound listeners
-      firePropertyRemoved(unboundListeners, event);
-   }
-
-   /**
-    * Fire a property changed event to the given list of listeners.
-    *
-    * @param list    Listener list.
-    * @param event   Property event.
-    */
-   private void firePropertyChanged(List list, PropertyEvent event)
-   {
-      if (list == null) return;
-
-      int size = list.size();
-      for (int i = 0; i < size; i++)
-      {
-         PropertyListener listener = (PropertyListener) list.get(i);
-         listener.propertyChanged(event);
-      }
-   }
-
-   /**
-    * Fire a property changed event to all listeners.
-    *
-    * @param event   Property event.
-    */
-   protected void firePropertyChanged(PropertyEvent event)
-   {
-      // fire all bound listeners (if any) first
-      if (boundListeners != null)
-      {
-         List list = (List) boundListeners.get(event.getPropertyName());
-         if (list != null)
-         {
-            firePropertyChanged(list, event);
-         }
-      }
-
-      // next fire all unbound listeners
-      firePropertyChanged(unboundListeners, event);
-   }
-
-   /**
-    * Make a optionaly prefixed property name.
-    *
-    * @param base    Base property name.
-    * @param prefix  Optional prefix (can be null).
-    * @return        Property name.
-    */
-   protected String makePrefixedPropertyName(String base, String prefix)
-   {
-      String name = base;
-
-      if (prefix != null)
-      {
-         StringBuffer buff = new StringBuffer(base);
-         if (prefix != null)
-         {
-            buff.insert(0, PROPERTY_NAME_SEPARATOR);
-            buff.insert(0, prefix);
-         }
-         return buff.toString();
-      }
-
-      return name;
-   }
-
-   /**
-    * Load properties from a map.
-    *
-    * @param prefix  Prefix to append to all map keys (or null).
-    * @param map     Map containing properties to load.
-    */
-   public void load(String prefix, Map map) throws PropertyException
-   {
-      // prefix can be null
-      if (map == null)
-         throw new NullArgumentException("map");
-
-      // set properties for each key in map
-      Iterator iter = map.keySet().iterator();
-      while (iter.hasNext())
-      {
-         // make a string key with optional prefix
-         String key = String.valueOf(iter.next());
-         String name = makePrefixedPropertyName(key, prefix);
-         String value = String.valueOf(map.get(name));
-
-         // set the property
-         setProperty(name, value);
-      }
-   }
-
-   /**
-    * Load properties from a map.
-    *
-    * @param map  Map containing properties to load.
-    */
-   public void load(Map map) throws PropertyException
-   {
-      load(null, map);
-   }
-
-   /**
-    * Load properties from a PropertyReader.
-    *
-    * @param reader  PropertyReader to read properties from.
-    */
-   public void load(PropertyReader reader) throws PropertyException, IOException
-   {
-      if (reader == null)
-         throw new NullArgumentException("reader");
-
-      load(reader.readProperties());
-   }
-
-   /**
-    * Load properties from a PropertyReader specifed by the given class name.
-    *
-    * @param className     Class name of a PropertyReader to read from.
-    */
-   public void load(String className) throws PropertyException, IOException
-   {
-      if (className == null)
-         throw new NullArgumentException("className");
-
-      PropertyReader reader = null;
-
-      try
-      {
-         Class type = Class.forName(className);
-         reader = (PropertyReader) type.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new PropertyException(e);
-      }
-         
-      // load the properties from the source
-      load(reader);
-   }
-
-   /**
-    * Set a property.
-    *
-    * <p>Returns Object instead of String due to limitations with
-    *    <code>java.util.Properties</code>.
-    *
-    * @param name    Property name.
-    * @param value   Property value.
-    * @return        Previous property value or null.
-    */
-   public Object setProperty(String name, String value)
-   {
-      updateJndiCache(name, value);
-      return put(name, value);
-   }
-
-   public String getProperty(String name)
-   {
-      Object value = jndiMap.get(name);
-      if (value != null)
-      {
-         // key was in the map
-         return (value == NULL_VALUE) ? null : (String) value;
-      }
-      return super.getProperty(name);
-   }
-
-   /**
-    * Remove a property.
-    *
-    * @param name    Property name.
-    * @return        Removed property value or null.
-    */
-   public String removeProperty(String name)
-   {
-      return (String) remove(name);
-   }
-
-
-   /**
-    * Make an indexed property name.
-    *
-    * @param base    Base property name.
-    * @param index   Property index.
-    * @return        Indexed property name.
-    */
-   protected String makeIndexPropertyName(String base, int index)
-   {
-      return base + PROPERTY_NAME_SEPARATOR + index;
-   }
-
-   /**
-    * Get an array style property.
-    *
-    * <p>Array properties are specified as:
-    *    <code>base_property_name.<b>INDEX</b>.
-    *
-    * <p>Indexes begin with zero and must be contiguous.  A break in
-    *    continuity signals the end of the array.
-    * 
-    * @param base          Base property name.
-    * @param defaultValues Default property values.
-    * @return              Array of property values or default.
-    */
-   public String[] getArrayProperty(String base, String[] defaultValues)
-   {
-      if (base == null)
-         throw new NullArgumentException("base");
-
-      // create a new list to store indexed values into
-      List list = new LinkedList();
-
-      int i = 0;
-      while (true)
-      {
-         // make the index property name
-         String name = makeIndexPropertyName(base, i);
-
-         // see if there is a value for this property
-         String value = getProperty(name);
-
-         if (value != null)
-         {
-            list.add(value);
-         }
-         else if (i >= 0)
-         {
-            break; // no more index properties
-         }
-
-         i++;
-      }
-
-      String values[] = defaultValues;
-
-      // if the list is not empty, then return it as an array
-      if (list.size() != 0)
-      {
-         values = (String[]) list.toArray(new String[list.size()]);
-      }
-
-      return values;
-   }
-
-   /**
-    * Get an array style property.
-    *
-    * @param name       Property name.
-    * @return           Array of property values or empty array.
-    */
-   public String[] getArrayProperty(String name)
-   {
-      return getArrayProperty(name, EMPTY_ARRAY_PROPERTY);
-   }
-
-   /**
-    * Return an iterator over all contained property names.
-    *
-    * @return     Property name iterator.
-    */
-   public Iterator names()
-   {
-      return keySet().iterator();
-   }
-
-   /**
-    * Check if this map contains a given property.
-    *
-    * @param name    Property name.
-    * @return        True if contains property.
-    */
-   public boolean containsProperty(String name)
-   {
-      return containsKey(name);
-   }
-
-   /**
-    * Get a property group for the given property base.
-    *
-    * @param basename   Base property name.
-    * @return           Property group.
-    */
-   public PropertyGroup getPropertyGroup(String basename)
-   {
-      return new PropertyGroup(basename, this);
-   }
-
-   /**
-    * Get a property group for the given property base at the given index.
-    *
-    * @param basename   Base property name.
-    * @param index      Array property index.
-    * @return           Property group.
-    */
-   public PropertyGroup getPropertyGroup(String basename, int index)
-   {
-      String name = makeIndexPropertyName(basename, index);
-      return getPropertyGroup(name);
-   }
-
-   private void readObject(ObjectInputStream stream)
-      throws IOException, ClassNotFoundException
-   {
-      // reset the listener lists
-      init();
-
-      stream.defaultReadObject();
-   }
-
-   private void writeObject(ObjectOutputStream stream)
-      throws IOException
-   {
-      stream.defaultWriteObject();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyMap.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyMap.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,46 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property;
-
-import java.util.Map;
-
-import java.io.IOException;
-
-/**
- * Iterface used to allow a <tt>PropertyMap</tt> to read property definitions 
- * in an implementation independent fashion.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public interface PropertyReader
-{
-   /**
-    * Read a map of properties from this input source.
-    *
-    * @return  Read properties map.
-    *
-    * @throws PropertyException    Failed to read properties.
-    * @throws IOException          I/O error while reading properties.
-    */
-   Map readProperties() throws PropertyException, IOException;
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/PropertyReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/PropertyReader.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/jmx)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValue.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValue.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValue.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,141 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property.jmx;
-
-import org.jboss.logging.Logger;
-
-/**
- * A helper for setting system properties based on class availablity.<p>
- *
- * It has a static method and an MBean wrapper for dynamic configuration.<p>
- *
- * The class is first checked for availablity before setting the system
- * property.
-
- * @jmx.mbean
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:Adrian.Brock at HappeningTimes.com">Adrian Brock</a>
- */
-public class SystemPropertyClassValue
-   implements SystemPropertyClassValueMBean
-{
-   public static final Logger log = Logger.getLogger(SystemPropertyClassValue.class);
-
-   /** Property name. */
-   protected String property;
-
-   /** Class Name. */
-   protected String className;
-
-   /**
-    * Constructor.
-    */
-   public SystemPropertyClassValue()
-   {
-   }
-
-   /**
-    * The system property value
-    *
-    * @jmx.managed-attribute
-    */
-   public String getProperty()
-   {
-      return property;
-   }
-
-   /**
-    * The system property value
-    *
-    * @jmx.managed-attribute
-    */
-   public void setProperty(String property)
-   {
-      this.property = property;
-   }
-
-   /**
-    * The class name to use a value for the system property
-    * when it is available
-    *
-    * @jmx.managed-attribute
-    */
-   public String getClassName()
-   {
-      return className;
-   }
-
-   /**
-    * The class name to use a value for the system property
-    * when it is available
-    *
-    * @jmx.managed-attribute
-    */
-   public void setClassName(String className)
-   {
-      this.className = className;
-   }
-
-   /**
-    * JBoss lifecycle
-    *
-    * @jmx.managed-operation
-    */
-   public void create()
-   {
-      Throwable error = setSystemPropertyClassValue(property, className);
-      if (error != null)
-         log.trace("Error loading class " + className + " property " + property + " not set.", error);
-   }
-
-   /**
-    * Sets the system property to a class when the class is available.
-    *
-    * @param property the property to set
-    * @param className the class to set as the properties value
-    * @return any error loading the class
-    * @exception IllegalArgumentException for a null or empty parameter
-    */
-   public static Throwable setSystemPropertyClassValue(String property, String className)
-   {
-      // Validation
-      if (property == null || property.trim().length() == 0)
-         throw new IllegalArgumentException("Null or empty property");
-      if (className == null || className.trim().length() == 0)
-         throw new IllegalArgumentException("Null or empty class name");
-
-      // Is the class available?
-      try
-      {
-         Thread.currentThread().getContextClassLoader().loadClass(className);
-      }
-      catch (Throwable problem)
-      {
-         return problem;
-      }
-
-      // The class is there, set the property.
-      System.setProperty(property, className);
-      return null;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValue.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValue.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValueMBean.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValueMBean.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValueMBean.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,54 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.property.jmx;
-
-/**
- * MBean interface.
- */
-public interface SystemPropertyClassValueMBean {
-
-   /**
-    * The system property value
-    */
-  java.lang.String getProperty() ;
-
-   /**
-    * The system property value
-    */
-  void setProperty(java.lang.String property) ;
-
-   /**
-    * The class name to use a value for the system property when it is available
-    */
-  java.lang.String getClassName() ;
-
-   /**
-    * The class name to use a value for the system property when it is available
-    */
-  void setClassName(java.lang.String className) ;
-
-   /**
-    * JBoss lifecycle
-    */
-  void create() ;
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValueMBean.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/jmx/SystemPropertyClassValueMBean.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,67 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>An advanced property access, managment and notification system.</p>
-
-    <p>This system provides some helpful additions to the standard Java
-       property system.  Some of these features include:
-      <ul>
-        <li>Events</li>
-        <li>Convenience Grouping</li>
-        <li>Array Properties</li>
-      </ul>
-    </p>
-
-    <p>
-      Aims to provide a <i>JavaBeans</i> style api for accessing properties
-      in a simple, powerful and consistent fashion.
-    </p>
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>Re-design storeage of properties; making them more tree-like</li>
-      <li>Re-design property binding events; probably force use of a 
-	  PropertyContainer sub-class or another <i>JavaBeans</i> like
-	  object</li>
-      <li>Move back to planet57.core?</li>
-      <li>Allow reading properties from a URL</li>
-      <li>Read properties correctly with win32 or unix style pathing</li>
-      <li>Create a property parser framework</li>
-      <li>Add an XML property parser</li>
-      <li>Add property map support and general configuration objects access.
-	  This will allow property.foo to be mapped to com.whatever.class.</li>
-      <li>Allow configuration objects to take more than one property group name,
-	  using the order for precidence.</li>
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/property/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/property/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BigDecimalEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BigDecimalEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BigDecimalEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,45 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.math.BigDecimal;
-
-/**
- * A property editor for {@link java.math.BigDecimal}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
- */
-public class BigDecimalEditor extends TextPropertyEditorSupport
-{
-   /**
-    * Returns a BigDecimal for the input object converted to a string.
-    *
-    * @return a BigDecimal object
-    *
-    */
-   public Object getValue()
-   {
-      return new BigDecimal(getAsText());
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BigDecimalEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BigDecimalEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BlockingModeEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BlockingModeEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BlockingModeEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,46 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import org.jboss.util.threadpool.BlockingMode;
-
-/**
- * A property editor for {@link org.jboss.util.threadpool.BlockingMode} enum.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class BlockingModeEditor extends TextPropertyEditorSupport
-{
-   /**
-    * Returns a BlockingMode for the input object converted to a string.
-    *
-    * @return a BlockingMode enum instance
-    *
-    */
-   public Object getValue()
-   {
-      String text = getAsText();
-      BlockingMode mode = BlockingMode.toBlockingMode(text);
-      return mode;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BlockingModeEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BlockingModeEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BooleanEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BooleanEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BooleanEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,55 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-/** A property editor for {@link java.lang.Boolean}.
- *
- * @version $Revision$
- * @author Scott.Stark at jboss.org
- */
-public class BooleanEditor extends PropertyEditorSupport
-{
-   private static final String[] BOOLEAN_TAGS = {"true", "false"};
-
-   /** Map the argument text into Boolean.TRUE or Boolean.FALSE
-    using Boolean.valueOf.
-    */
-   public void setAsText(final String text)
-   {
-      if (PropertyEditors.isNull(text))
-      {
-         setValue(null);
-         return;
-      }
-      Object newValue = Boolean.valueOf(text);
-      setValue(newValue);
-   }
-
-   /**
-    @return the values {"true", "false"}
-    */
-   public String[] getTags()
-   {
-      return BOOLEAN_TAGS;
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BooleanEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/BooleanEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteArrayEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteArrayEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteArrayEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,45 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/** A property editor for byte[].
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class ByteArrayEditor extends PropertyEditorSupport
-{
-   /** Map the argument text into and Byte using Byte.decode.
-    */
-   public void setAsText(final String text)
-   {
-      if (PropertyEditors.isNull(text, false, false))
-      {
-         setValue(null);
-         return;
-      }
-      Object newValue = text.getBytes();
-      setValue(newValue);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteArrayEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteArrayEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,44 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/** A property editor for {@link java.lang.Byte}.
- *
- * @version $Revision$
- */
-public class ByteEditor extends PropertyEditorSupport
-{
-   /** Map the argument text into and Byte using Byte.decode.
-    */
-   public void setAsText(final String text)
-   {
-      if (PropertyEditors.isNull(text))
-      {
-         setValue(null);
-         return;
-      }
-      Object newValue = Byte.decode(text);
-      setValue(newValue);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ByteEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/CharacterEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/CharacterEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/CharacterEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/**
- * A property editor for {@link java.lang.Character}.
- *
- * @todo REVIEW: look at possibly parsing escape sequences?
- * @version $Revision$
- * @author adrian at jboss.org
- */
-public class CharacterEditor extends PropertyEditorSupport
-{
-   public void setAsText(final String text)
-   {
-      if (PropertyEditors.isNull(text))
-      {
-         setValue(null);
-         return;
-      }
-      if (text.length() != 1)
-         throw new IllegalArgumentException("Too many (" + text.length() + ") characters: '" + text + "'"); 
-      Object newValue = new Character(text.charAt(0));
-      setValue(newValue);
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/CharacterEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/CharacterEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassArrayEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassArrayEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassArrayEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.propertyeditor;
-
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import java.beans.PropertyEditorSupport;
-
-/** A property editor for Class[].
- *
- * @version $Revision$
- * @author Scott.Stark at jboss.org
- */
-public class ClassArrayEditor extends PropertyEditorSupport
-{
-   /** Build a Class[] from a comma/whitespace seperated list of classes
-    * @param text - the class name list
-    */
-   public void setAsText(final String text) throws IllegalArgumentException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      StringTokenizer tokenizer = new StringTokenizer(text, ", \t\r\n");
-      ArrayList classes = new ArrayList();
-      while( tokenizer.hasMoreTokens() == true )
-      {
-         String name = tokenizer.nextToken();
-         try
-         {
-            Class c = loader.loadClass(name);
-            classes.add(c);
-         }
-         catch(ClassNotFoundException e)
-         {
-            throw new IllegalArgumentException("Failed to find class: "+name);
-         }
-      }
-
-      Class[] theValue = new Class[classes.size()];
-      classes.toArray(theValue);
-      setValue(theValue);
-   }
-
-   /**
-    * @return a comma seperated string of the class array
-    */
-   public String getAsText()
-   {
-      Class[] theValue = (Class[]) getValue();
-      StringBuffer text = new StringBuffer();
-      int length = theValue == null ? 0 : theValue.length;
-      for(int n = 0; n < length; n ++)
-      {
-         text.append(theValue[n].getName());
-         text.append(',');
-      }
-      // Remove the trailing ','
-      text.setLength(text.length()-1);
-      return text.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassArrayEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassArrayEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,56 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import org.jboss.util.NestedRuntimeException;
-
-/**
- * A property editor for {@link java.lang.Class}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class ClassEditor extends TextPropertyEditorSupport
-{
-   /**
-    * Returns a Class for the input object converted to a string.
-    *
-    * @return a Class object
-    *
-    * @throws NestedRuntimeException   Failed to create Class instance.
-    */
-   public Object getValue()
-   {
-      try
-      {
-         ClassLoader loader = Thread.currentThread().getContextClassLoader();
-         String classname = getAsText();
-         Class type = loader.loadClass(classname);
-
-         return type;
-      }
-      catch (Exception e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ClassEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DateEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DateEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DateEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,155 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.jboss.util.NestedRuntimeException;
-
-/**
- * A property editor for {@link java.util.Date}.
- *
- * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
- * @author <a href="mailto:scott.stark at jboss.org">Scott Stark</a>
- * @author <a href="mailto:adrian.brock at jboss.org">Adrian Brock</a>
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @version <tt>$Revision$</tt>
- */
-public class DateEditor extends PropertyEditorSupport
-{
-   /** The formats to use when parsing the string date */
-   private static DateFormat[] formats;
-   static
-   {
-      initialize();
-   }
-
-   /**
-    * Setup the parsing formats. Offered as a separate static method to allow
-    * testing of locale changes, since SimpleDateFormat will use the default
-    * locale upon construction. Should not be normally used!
-    */
-   public static void initialize()
-   {
-      PrivilegedAction action = new PrivilegedAction()
-      {
-         public Object run()
-         {
-            String defaultFormat = System.getProperty("org.jboss.util.propertyeditor.DateEditor.format",
-                  "MMM d, yyyy");
-            formats = new DateFormat[]
-            {
-               new SimpleDateFormat(defaultFormat),
-               // Tue Jan 04 00:00:00 PST 2005
-               new SimpleDateFormat("EEE MMM d HH:mm:ss z yyyy"),
-               // Wed, 4 Jul 2001 12:08:56 -0700
-               new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z")
-            };
-            return null;
-         }
-      };
-      AccessController.doPrivileged(action);      
-   }
-
-   /** Keep the text version of the date */
-   private String text;
-   
-   /**
-    * Sets directly the java.util.Date value
-    * 
-    * @param value a java.util.Date
-    */
-   public void setValue(Object value)
-   {
-      if (value instanceof Date)
-      {
-         text = null;
-         super.setValue(value);
-      }
-      else
-      {
-         throw new IllegalArgumentException("setValue() expected java.util.Date value, got "
-               + value.getClass().getName());
-      }
-   }
-   
-   /**
-    * Parse the text into a java.util.Date by trying
-    * one by one the registered DateFormat(s).
-    * 
-    * @param text the string date
-    */
-   public void setAsText(String text)
-   {
-      ParseException pe = null;
-      
-      for (int i = 0; i < formats.length; i++)
-      {
-         try
-         {
-            // try to parse the date
-            DateFormat df = formats[i];
-            Date date = df.parse(text);
-            
-            // store the date in both forms
-            this.text = text;
-            super.setValue(date);
-            
-            // done
-            return;
-         }
-         catch (ParseException e)
-         {
-            // remember the last seen exception
-            pe = e;
-         }
-      }
-      // couldn't parse
-      throw new NestedRuntimeException(pe);
-   }
-
-   /**
-    * Returns either the cached string date, or the stored
-    * java.util.Date instance formated to string using the
-    * last of the registered DateFormat(s) 
-    * 
-    * @return date as string
-    */
-   public String getAsText()
-   {
-      if (text == null)
-      {
-         DateFormat df = formats[formats.length - 1];
-         Date date = (Date)getValue();
-         text = df.format(date);
-      }
-      return text;
-   }
-   
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DateEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DateEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DocumentEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DocumentEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DocumentEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,91 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-import java.io.IOException;
-import java.io.StringReader;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.util.xml.DOMWriter;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * A property editor for {@link org.w3c.dom.Document}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:eross at noderunner.net">Elias Ross</a>
- */
-public class DocumentEditor extends PropertyEditorSupport
-{
-   /**
-    * Returns the property as a String.
-    *
-    * @throws NestedRuntimeException  conversion exception occured
-    */
-   public String getAsText()
-   {
-      return DOMWriter.printNode((Node)getValue(), false);
-   }
-
-   /**
-    * Sets as an Document created by a String.
-    *
-    * @throws NestedRuntimeException  A parse exception occured
-    */
-   public void setAsText(String text)
-   {
-      setValue(getAsDocument(text));
-   }
-
-   protected Document getAsDocument(String text)
-   {
-      try
-      {
-         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-         DocumentBuilder db = dbf.newDocumentBuilder();
-         StringReader sr = new StringReader(text);
-         InputSource is = new InputSource(sr);
-         Document d = db.parse(is);
-         return d;
-      }
-      catch (ParserConfigurationException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-      catch (SAXException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-      catch (IOException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DocumentEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DocumentEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DoubleEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DoubleEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DoubleEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/**
- * A property editor for {@link Integer}.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class DoubleEditor extends PropertyEditorSupport
-{
-   /**
-    * Map the argument text into and Integer using Integer.valueOf.
-    */
-   public void setAsText(final String text)
-   {
-      if (PropertyEditors.isNull(text))
-      {
-         setValue(null);
-         return;
-      }
-      Object newValue = Double.valueOf(text);
-      setValue(newValue);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DoubleEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/DoubleEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ElementEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ElementEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ElementEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,44 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import org.w3c.dom.Document;
-
-/**
- * A property editor for {@link org.w3c.dom.Element}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:eross at noderunner.net">Elias Ross</a>
- */
-public class ElementEditor extends DocumentEditor
-{
-   /**
-    * Sets as an Element created by a String.
-    *
-    * @throws NestedRuntimeException  A parse exception occured
-    */
-   public void setAsText(String text)
-   {
-      Document d = getAsDocument(text);
-      setValue(d.getDocumentElement());
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ElementEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ElementEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FileEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FileEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FileEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,55 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.jboss.util.NestedRuntimeException;
-
-/**
- * A property editor for {@link java.io.File}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FileEditor extends TextPropertyEditorSupport
-{
-   /**
-    * Returns a URL for the input object converted to a string.
-    *
-    * @return a URL object
-    *
-    * @throws NestedRuntimeException   An IOException occured.
-    */
-   public Object getValue()
-   {
-      try
-      {
-         return new File(getAsText()).getCanonicalFile();
-      }
-      catch (IOException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FileEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FileEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FloatEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FloatEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FloatEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/**
- * A property editor for {@link Integer}.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class FloatEditor extends PropertyEditorSupport
-{
-   /**
-    * Map the argument text into and Integer using Integer.valueOf.
-    */
-   public void setAsText(final String text)
-   {
-      Object newValue = Float.valueOf(text);
-      setValue(newValue);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FloatEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/FloatEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/InetAddressEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/InetAddressEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/InetAddressEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,67 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.util.StringPropertyReplacer;
-
-/**
- * A property editor for {@link java.net.InetAddress}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:Adrian.Brock at HappeningTimes.com">Adrian Brock</a>
- */
-public class InetAddressEditor extends TextPropertyEditorSupport
-{
-   /**
-    * Returns a InetAddress for the input object converted to a string.
-    *
-    * @return an InetAddress
-    *
-    * @throws NestedRuntimeException   An UnknownHostException occured.
-    */
-   public Object getValue()
-   {
-      try
-      {
-         String text = getAsText();
-         if (text == null)
-         {
-            return null;
-         }
-         if (text.startsWith("/"))
-         {
-            // seems like localhost sometimes will look like:
-            // /127.0.0.1 and the getByNames barfs on the slash - JGH
-            text = text.substring(1);
-         }
-         return InetAddress.getByName(StringPropertyReplacer.replaceProperties(text));
-      }
-      catch (UnknownHostException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/InetAddressEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/InetAddressEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntArrayEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntArrayEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntArrayEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,65 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-import java.util.StringTokenizer;
-
-/**
- * A property editor for int[].
- *
- * @version <tt>$Revision$</tt>
- */
-public class IntArrayEditor extends PropertyEditorSupport
-{
-   /** Build a int[] from comma or eol seperated elements
-    *
-    */
-   public void setAsText(final String text)
-   {
-      StringTokenizer stok = new StringTokenizer(text, ",\r\n");
-      int[] theValue = new int[stok.countTokens()];
-      int i = 0;
-      while (stok.hasMoreTokens())
-      {
-         theValue[i++] = Integer.decode(stok.nextToken()).intValue();
-      }
-      setValue(theValue);
-   }
-
-   /**
-    * @return a comma seperated string of the array elements
-    */
-   public String getAsText()
-   {
-      int[] theValue = (int[]) getValue();
-      StringBuffer text = new StringBuffer();
-      int length = theValue == null ? 0 : theValue.length;
-      for(int n = 0; n < length; n ++)
-      {
-         if (n > 0)
-            text.append(',');
-         text.append(theValue[n]);
-      }
-      return text.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntArrayEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntArrayEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntegerEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntegerEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntegerEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,45 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/** A property editor for {@link java.lang.Integer}.
- *
- * @version $Revision$
- * @author Scott.Stark at jboss.org
- */
-public class IntegerEditor extends PropertyEditorSupport
-{
-   /** Map the argument text into and Integer using Integer.decode.
-    */
-   public void setAsText(final String text)
-   {
-      if (PropertyEditors.isNull(text))
-      {
-         setValue(null);
-         return;
-      }
-      Object newValue = Integer.decode(text);
-      setValue(newValue);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntegerEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/IntegerEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/LongEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/LongEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/LongEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/**
- * A property editor for {@link Integer}.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class LongEditor extends PropertyEditorSupport
-{
-   /**
-    * Map the argument text into and Integer using Integer.valueOf.
-    */
-   public void setAsText(final String text)
-   {
-      if (PropertyEditors.isNull(text))
-      {
-         setValue(null);
-         return;
-      }
-      Object newValue = Long.valueOf(text);
-      setValue(newValue);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/LongEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/LongEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertiesEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertiesEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertiesEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,106 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.util.StringPropertyReplacer;
-
-/**
- * A property editor for {@link java.util.Properties}.
- *
- * @author Jason Dillon
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class PropertiesEditor extends PropertyEditorSupport
-{
-
-   /**
-    * To be consistent with the Properties.load and .store methods.
-    */
-   private static final String ENC = "ISO-8859-1";
-
-   /**
-    * Initializes a Properties object with text value
-    * interpretted as a .properties file contents. This replaces any
-    * references of the form ${x} with the corresponding system property. 
-    *
-    * @return a Properties object
-    *
-    * @throws NestedRuntimeException  An IOException occured.
-    */
-   public void setAsText(String propsText)
-   {
-      try
-      {
-         // Load the current key=value properties into a Properties object
-         Properties rawProps = new Properties(System.getProperties());
-         ByteArrayInputStream bais = new ByteArrayInputStream(propsText.getBytes(ENC));
-         rawProps.load(bais);
-         // Now go through the rawProps and replace any ${x} refs
-         Properties props = new Properties();
-         Iterator keys = rawProps.keySet().iterator();
-         while( keys.hasNext() )
-         {
-            String key = (String) keys.next();
-            String value = rawProps.getProperty(key);
-            String value2 = StringPropertyReplacer.replaceProperties(value, rawProps);
-            props.setProperty(key, value2);
-         }
-         rawProps.clear();
-
-         setValue(props);
-      }
-      catch (IOException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-   }
-
-   /**
-    * Returns the properties as text.
-    */
-   public String getAsText()
-   {
-      try
-      {
-         ByteArrayOutputStream baos = new ByteArrayOutputStream();
-         Properties p = (Properties)getValue();
-         p.store(baos, null);
-         return baos.toString(ENC);
-      }
-      catch (IOException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertiesEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertiesEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertyEditors.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertyEditors.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertyEditors.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,450 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.propertyeditor;
-
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.beans.PropertyEditor;
-import java.beans.PropertyEditorManager;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.Classes;
-
-/**
- * A collection of PropertyEditor utilities. Provides the same interface
- * as PropertyEditorManager plus more...
- *
- * <p>Installs the default PropertyEditors.
- *
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:scott.stark at jboss.org">Scott Stark</a>
- * @version <tt>$Revision$</tt>
- */
-public class PropertyEditors
-{
-   /** The Logger object */
-   private static Logger log = Logger.getLogger(PropertyEditors.class);
-
-   /** The null string */
-   private static final String NULL = "null";
-   
-   /** Whether we handle nulls */
-   private static boolean disableIsNull = false;
-   
-   /** Whether or not initialization of the editor search path has been done */
-   private static boolean initialized = false;
-   
-   static
-   {
-      init();
-   }
-
-   /** 
-    * Augment the PropertyEditorManager search path to incorporate the JBoss
-    * specific editors by appending the org.jboss.util.propertyeditor package
-    * to the PropertyEditorManager editor search path.
-    */
-   public synchronized static void init()
-   {
-      if( initialized == false )
-      {
-         AccessController.doPrivileged(Initialize.instance);
-         initialized = true;
-      }
-   }
-
-   /**
-    * Whether a string is interpreted as the null value,
-    * including the empty string.
-    * 
-    * @param value the value
-    * @return true when the string has the value null
-    */
-   public static final boolean isNull(final String value)
-   {
-      return isNull(value, true, true);
-   }
-
-   /**
-    * Whether a string is interpreted as the null value
-    * 
-    * @param value the value
-    * @param trim whether to trim the string
-    * @param empty whether to include the empty string as null
-    * @return true when the string has the value null
-    */
-   public static final boolean isNull(final String value, final boolean trim, final boolean empty)
-   {
-      // For backwards compatibility
-      if (disableIsNull)
-         return false;
-      // No value?
-      if (value == null)
-         return true;
-      // Trim the text when requested
-      String trimmed = trim ? value.trim() : value;
-      // Is the empty string null?
-      if (empty && trimmed.length() == 0)
-         return true;
-      // Just check it.
-      return NULL.equalsIgnoreCase(trimmed);
-   }
-
-   /**
-    * Will the standard editors return null from their
-    * {@link PropertyEditor#setAsText(String)} method for non-primitive targets?
-    *
-    * @return True if nulls can be returned; false otherwise.
-    */
-   public static boolean isNullHandlingEnabled()
-   {
-      return !disableIsNull;
-   }
-   
-   /**
-    * Locate a value editor for a given target type.
-    *
-    * @param type   The class of the object to be edited.
-    * @return       An editor for the given type or null if none was found.
-    */
-   public static PropertyEditor findEditor(final Class type)
-   {
-      return PropertyEditorManager.findEditor(type);
-   }
-
-   /**
-    * Locate a value editor for a given target type.
-    *
-    * @param typeName    The class name of the object to be edited.
-    * @return            An editor for the given type or null if none was found.
-    */
-   public static PropertyEditor findEditor(final String typeName)
-      throws ClassNotFoundException
-   {
-      // see if it is a primitive type first
-      Class type = Classes.getPrimitiveTypeForName(typeName);
-      if (type == null)
-      {
-         // nope try look up
-         ClassLoader loader = Thread.currentThread().getContextClassLoader();
-         type = loader.loadClass(typeName);
-      }
-
-      return PropertyEditorManager.findEditor(type);
-   }
-
-   /**
-    * Get a value editor for a given target type.
-    *
-    * @param type    The class of the object to be edited.
-    * @return        An editor for the given type.
-    *
-    * @throws RuntimeException   No editor was found.
-    */
-   public static PropertyEditor getEditor(final Class type)
-   {
-      PropertyEditor editor = findEditor(type);
-      if (editor == null)
-      {
-         throw new RuntimeException("No property editor for type: " + type);
-      }
-
-      return editor;
-   }
-
-   /**
-    * Get a value editor for a given target type.
-    *
-    * @param typeName    The class name of the object to be edited.
-    * @return            An editor for the given type.
-    *
-    * @throws RuntimeException   No editor was found.
-    */
-   public static PropertyEditor getEditor(final String typeName)
-      throws ClassNotFoundException
-   {
-      PropertyEditor editor = findEditor(typeName);
-      if (editor == null)
-      {
-         throw new RuntimeException("No property editor for type: " + typeName);
-      }
-
-      return editor;
-   }
-
-   /**
-    * Register an editor class to be used to editor values of a given target class.
-    *
-    * @param type         The class of the objetcs to be edited.
-    * @param editorType   The class of the editor.
-    */
-   public static void registerEditor(final Class type, final Class editorType)
-   {
-      PropertyEditorManager.registerEditor(type, editorType);
-   }
-
-   /**
-    * Register an editor class to be used to editor values of a given target class.
-    *
-    * @param typeName         The classname of the objetcs to be edited.
-    * @param editorTypeName   The class of the editor.
-    */
-   public static void registerEditor(final String typeName,
-                                     final String editorTypeName)
-      throws ClassNotFoundException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      Class type = loader.loadClass(typeName);
-      Class editorType = loader.loadClass(editorTypeName);
-
-      PropertyEditorManager.registerEditor(type, editorType);
-   }
-
-   /** Convert a string value into the true value for typeName using the
-    * PropertyEditor associated with typeName.
-    *
-    * @param text the string represention of the value. This is passed to
-    * the PropertyEditor.setAsText method.
-    * @param typeName the fully qualified class name of the true value type
-    * @return the PropertyEditor.getValue() result
-    * @exception ClassNotFoundException thrown if the typeName class cannot
-    *    be found
-    * @exception IntrospectionException thrown if a PropertyEditor for typeName
-    *    cannot be found
-    */
-   public static Object convertValue(String text, String typeName)
-         throws ClassNotFoundException, IntrospectionException
-   {
-      // see if it is a primitive type first
-      Class typeClass = Classes.getPrimitiveTypeForName(typeName);
-      if (typeClass == null)
-      {
-         ClassLoader loader = Thread.currentThread().getContextClassLoader();
-         typeClass = loader.loadClass(typeName);
-      }
-
-      PropertyEditor editor = PropertyEditorManager.findEditor(typeClass);
-      if (editor == null)
-      {
-         throw new IntrospectionException
-               ("No property editor for type=" + typeClass);
-      }
-
-      editor.setAsText(text);
-      return editor.getValue();
-   }
-
-   /**
-    * This method takes the properties found in the given beanProps
-    * to the bean using the property editor registered for the property.
-    * Any property in beanProps that does not have an associated java bean
-    * property will result in an IntrospectionException. The string property
-    * values are converted to the true java bean property type using the
-    * java bean PropertyEditor framework. If a property in beanProps does not
-    * have a PropertyEditor registered it will be ignored.
-    *
-    * @param bean - the java bean instance to apply the properties to
-    * @param beanProps - map of java bean property name to property value.
-    * @throws IntrospectionException thrown on introspection of bean and if
-    *    a property in beanProps does not map to a property of bean.
-    */
-   public static void mapJavaBeanProperties(Object bean, Properties beanProps)
-      throws IntrospectionException
-   {
-      mapJavaBeanProperties(bean, beanProps, true);
-   }
-
-   /**
-    * This method takes the properties found in the given beanProps
-    * to the bean using the property editor registered for the property.
-    * Any property in beanProps that does not have an associated java bean
-    * property will result in an IntrospectionException. The string property
-    * values are converted to the true java bean property type using the
-    * java bean PropertyEditor framework. If a property in beanProps does not
-    * have a PropertyEditor registered it will be ignored.
-    *
-    * @param bean - the java bean instance to apply the properties to
-    * @param beanProps - map of java bean property name to property value.
-    * @param isStrict - indicates if should throw exception if bean property can not
-    * be matched.  True for yes, false for no.
-    * @throws IntrospectionException thrown on introspection of bean and if
-    *    a property in beanProps does not map to a property of bean.
-    */
-   public static void mapJavaBeanProperties(Object bean, Properties beanProps, boolean isStrict)
-      throws IntrospectionException
-   {
-
-      HashMap propertyMap = new HashMap();
-      BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass());
-      PropertyDescriptor[] props = beanInfo.getPropertyDescriptors();
-      for (int p = 0; p < props.length; p++)
-      {
-         String fieldName = props[p].getName();
-         propertyMap.put(fieldName, props[p]);
-      }
-
-      boolean trace = log.isTraceEnabled();
-      Iterator keys = beanProps.keySet().iterator();
-      if( trace )
-         log.trace("Mapping properties for bean: "+bean);
-      while( keys.hasNext() )
-      {
-         String name = (String) keys.next();
-         String text = beanProps.getProperty(name);
-         PropertyDescriptor pd = (PropertyDescriptor) propertyMap.get(name);
-         if (pd == null)
-         {
-            /* Try the property name with the first char uppercased to handle
-            a property name like dLQMaxResent whose expected introspected
-            property name would be DLQMaxResent since the JavaBean
-            Introspector would view setDLQMaxResent as the setter for a
-            DLQMaxResent property whose Introspector.decapitalize() method
-            would also return "DLQMaxResent".
-            */
-            if (name.length() > 1)
-            {
-               char first = name.charAt(0);
-               String exName = Character.toUpperCase(first) + name.substring(1);
-               pd = (PropertyDescriptor) propertyMap.get(exName);
-               
-               // Be lenient and check the other way around, e.g. ServerName -> serverName
-               if (pd == null)
-               {
-                  exName = Character.toLowerCase(first) + name.substring(1);
-                  pd = (PropertyDescriptor) propertyMap.get(exName);
-               }
-            }
-
-            if (pd == null)
-            {
-               if (isStrict)
-               {
-                  String msg = "No property found for: "+name+" on JavaBean: "+bean;
-                  throw new IntrospectionException(msg);
-               }
-               else
-               {
-                  // since is not strict, ignore that this property was not found
-                  continue;
-               }
-            }
-         }
-         Method setter = pd.getWriteMethod();
-         if( trace )
-            log.trace("Property editor found for: "+name+", editor: "+pd+", setter: "+setter);
-         if (setter != null)
-         {
-            Class ptype = pd.getPropertyType();
-            PropertyEditor editor = PropertyEditorManager.findEditor(ptype);
-            if (editor == null)
-            {
-               if( trace )
-                  log.trace("Failed to find property editor for: "+name);
-            }
-            try
-            {
-               editor.setAsText(text);
-               Object args[] = {editor.getValue()};
-               setter.invoke(bean, args);
-            }
-            catch (Exception e)
-            {
-               if( trace )
-                  log.trace("Failed to write property", e);
-            }
-         }
-      }
-   }
-
-   /**
-    * Gets the package names that will be searched for property editors.
-    *
-    * @return   The package names that will be searched for property editors.
-    */
-   public String[] getEditorSearchPath()
-   {
-      return PropertyEditorManager.getEditorSearchPath();
-   }
-
-   /**
-    * Sets the package names that will be searched for property editors.
-    *
-    * @param path   The serach path.
-    */
-   public void setEditorSearchPath(final String[] path)
-   {
-      PropertyEditorManager.setEditorSearchPath(path);
-   }
-
-   private static class Initialize implements PrivilegedAction
-   {
-      static Initialize instance = new Initialize(); 
-
-      public Object run()
-      {
-         String[] currentPath = PropertyEditorManager.getEditorSearchPath();
-         int length = currentPath != null ? currentPath.length : 0;
-         String[] newPath = new String[length+2];
-         System.arraycopy(currentPath, 0, newPath, 2, length);
-         // Put the JBoss editor path first
-         // The default editors are not very flexible
-         newPath[0] = "org.jboss.util.propertyeditor";
-         newPath[1] = "org.jboss.mx.util.propertyeditor";
-         PropertyEditorManager.setEditorSearchPath(newPath);
-   
-         /* Register the editor types that will not be found using the standard
-         class name to editor name algorithm. For example, the type String[] has
-         a name '[Ljava.lang.String;' which does not map to a XXXEditor name.
-         */
-         Class strArrayType = String[].class;
-         PropertyEditorManager.registerEditor(strArrayType, StringArrayEditor.class);
-         Class clsArrayType = Class[].class;
-         PropertyEditorManager.registerEditor(clsArrayType, ClassArrayEditor.class);
-         Class intArrayType = int[].class;
-         PropertyEditorManager.registerEditor(intArrayType, IntArrayEditor.class);
-         Class byteArrayType = byte[].class;
-         PropertyEditorManager.registerEditor(byteArrayType, ByteArrayEditor.class);
-   
-         // There is no default char editor.
-         PropertyEditorManager.registerEditor(Character.TYPE, CharacterEditor.class);
-         
-         try
-         {
-            if (System.getProperty("org.jboss.util.property.disablenull") != null)
-               disableIsNull = true;
-         }
-         catch (Throwable ignored)
-         {
-            log.trace("Error retrieving system property org.jboss.util.property.diablenull", ignored);
-         }
-         return null;
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertyEditors.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/PropertyEditors.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ShortEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ShortEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ShortEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,46 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/** A property editor for {@link java.lang.Short}.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class ShortEditor extends PropertyEditorSupport
-{
-   /** Map the argument text into and Short using Short.decode.
-    */
-   public void setAsText(final String text)
-   {
-      if (PropertyEditors.isNull(text))
-      {
-         setValue(null);
-         return;
-      }
-      Object newValue = Short.decode(text);
-      setValue(newValue);
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ShortEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/ShortEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringArrayEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringArrayEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringArrayEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,110 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-/**
- * A property editor for String[]. The text format of a string array is a
- * comma or \n, \r seperated list with \, representing an escaped comma to
- * include in the string element.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author Scott.Stark at jboss.org
- */
-public class StringArrayEditor
-   extends PropertyEditorSupport
-{
-   Pattern commaDelim = Pattern.compile("','|[^,\r\n]+");
-
-   static String[] parseList(String text)
-   {
-      ArrayList list = new ArrayList();
-      StringBuffer tmp = new StringBuffer();
-      for(int n = 0; n < text.length(); n ++)
-      {
-         char c = text.charAt(n);
-         switch( c)
-         {
-            case '\\':
-               tmp.append(c);
-               if( n < text.length() && text.charAt(n+1) == ',' )
-               {
-                  tmp.setCharAt(tmp.length()-1, ',');
-                  n ++;
-               }               
-               break;
-            case ',':
-            case '\n':
-            case '\r':
-               if( tmp.length() > 0 )
-                  list.add(tmp.toString());
-               tmp.setLength(0);
-               break;
-            default:
-               tmp.append(c);
-               break;
-         }
-      }
-      if( tmp.length() > 0 )
-         list.add(tmp.toString());
-
-      String[] x = new String[list.size()];
-      list.toArray(x);
-      return x;
-   }
-
-   /** Build a String[] from comma or eol seperated elements with a \,
-    * representing a ',' to include in the current string element.
-    *
-    */
-   public void setAsText(final String text)
-   {
-      String[] theValue = parseList(text);
-      setValue(theValue);
-   }
-
-   /**
-    * @return a comma seperated string of the array elements
-    */
-   public String getAsText()
-   {
-      String[] theValue = (String[]) getValue();
-      StringBuffer text = new StringBuffer();
-      int length = theValue == null ? 0 : theValue.length;
-      for(int n = 0; n < length; n ++)
-      {
-         String s = theValue[n];
-         if( s.equals(",") )
-            text.append('\\');
-         text.append(s);
-         text.append(',');
-      }
-      // Remove the trailing ','
-      if( text.length() > 0 )
-         text.setLength(text.length()-1);
-      return text.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringArrayEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringArrayEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/**
- * A property editor for {@link java.lang.String}.
- * 
- * It is really a no-op but it is hoped to provide
- * slightly better performance, by avoiding the continuous
- * lookup/failure of a property editor for plain Strings
- * within the org.jboss.util.propertyeditor package,
- * before falling back to the jdk provided String editor.
- *
- * @author <a href="dimitris at jboss.org">Dimitris Andreadis</a>
- * @version $Revision$
- */
-public class StringEditor extends PropertyEditorSupport
-{
-   /**
-    * Keep the provided String as is.
-    */
-   public void setAsText(String text)
-   {
-      setValue(text);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/StringEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/TextPropertyEditorSupport.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/TextPropertyEditorSupport.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/TextPropertyEditorSupport.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,53 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.beans.PropertyEditorSupport;
-
-/**
- * A property editor support class for textual properties.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class TextPropertyEditorSupport extends PropertyEditorSupport
-{
-   protected TextPropertyEditorSupport(final Object source)
-   {
-      super(source);
-   }
-
-   protected TextPropertyEditorSupport()
-   {
-      super();
-   }
-   
-   /**
-    * Sets the property value by parsing a given String.
-    *
-    * @param text  The string to be parsed.
-    */
-   public void setAsText(final String text)
-   {
-      setValue(text);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/TextPropertyEditorSupport.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/TextPropertyEditorSupport.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URIEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URIEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URIEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,56 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.jboss.util.NestedRuntimeException;
-
-/**
- * A property editor for {@link java.net.URI}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- */
-public class URIEditor extends TextPropertyEditorSupport
-{
-   /**
-    * Returns a URI for the input object converted to a string.
-    *
-    * @return a URI object
-    *
-    * @throws NestedRuntimeException   An MalformedURLException occured.
-    */
-   public Object getValue()
-   {
-      try
-      {
-         // TODO - more strict checking, like URLEditor
-         return new URI(getAsText());
-      }
-      catch (URISyntaxException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URIEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URIEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URLEditor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URLEditor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URLEditor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,55 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.propertyeditor;
-
-import java.net.MalformedURLException;
-
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.util.Strings;
-
-/**
- * A property editor for {@link java.net.URL}.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class URLEditor extends TextPropertyEditorSupport
-{
-   /**
-    * Returns a URL for the input object converted to a string.
-    *
-    * @return a URL object
-    *
-    * @throws NestedRuntimeException   An MalformedURLException occured.
-    */
-   public Object getValue()
-   {
-      try
-      {
-         return Strings.toURL(getAsText());
-      }
-      catch (MalformedURLException e)
-      {
-         throw new NestedRuntimeException(e);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URLEditor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/URLEditor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Property editors for use with <em>java.beans.PropertyEditorManager</em>.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/propertyeditor/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/IllegalTransitionException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/IllegalTransitionException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/IllegalTransitionException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.state;
-
-/** An exception thrown when an invalid transition is attempted from a state.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class IllegalTransitionException extends Exception
-{
-   public IllegalTransitionException(String msg)
-   {
-      super(msg);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/IllegalTransitionException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/IllegalTransitionException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/State.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/State.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/State.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.state;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Iterator;
-
-/** The respresentation of a state in a state machine.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class State
-{
-   /** The name of the state */
-   private String name;
-   /** HashMap<String, Transition> */
-   private HashMap allowedTransitions = new HashMap();
-   /** Arbitrary state data */
-   private Object data;
-
-   public State(String name)
-   {
-      this(name, null);
-   }
-   public State(String name, Map transitions)
-   {
-      this.name = name;
-      if( transitions != null )
-      {
-         allowedTransitions.putAll(transitions);
-      }
-   }
-
-   /** Get the state name.
-    * @return the name of the state.
-    */ 
-   public String getName()
-   {
-      return name;
-   }
-
-   public Object getData()
-   {
-      return data;
-   }
-   public void setData(Object data)
-   {
-      this.data = data;
-   }
-
-   /** An accept state is indicated by no transitions
-    * @return true if this is an accept state, false otherwise.
-    */ 
-   public boolean isAcceptState()
-   {
-      return allowedTransitions.size() == 0;
-   }
-
-   /** Add a transition to the allowed transition map.
-    * 
-    * @param transition
-    * @return this to allow chained addTransition calls
-    */ 
-   public State addTransition(Transition transition)
-   {
-      allowedTransitions.put(transition.getName(), transition);
-      return this;
-   }
-   
-   /** Lookup an allowed transition given its name.
-    * 
-    * @param name - the name of a valid transition from this state.
-    * @return the valid transition if it exists, null otherwise.
-    */ 
-   public Transition getTransition(String name)
-   {
-      Transition t = (Transition) allowedTransitions.get(name);
-      return t;
-   }
-
-   /** Get the Map<String, Transition> of allowed transitions for this state.
-    * @return the allowed transitions map.
-    */ 
-   public Map getTransitions()
-   {
-      return allowedTransitions;
-   }
-
-   public String toString()
-   {
-      StringBuffer tmp = new StringBuffer("State(name=");
-      tmp.append(name);
-      tmp.append("\n");
-      Iterator i = allowedTransitions.entrySet().iterator();
-      while( i.hasNext() )
-      {
-         Map.Entry e = (Map.Entry) i.next();
-         tmp.append("\t on: ");
-         tmp.append(e.getKey());
-         Transition t = (Transition) e.getValue();
-         tmp.append(" go to: ");
-         tmp.append(t.getTarget().getName());
-         tmp.append('\n');
-      }
-      tmp.append(')');
-      return tmp.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/State.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/State.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/StateMachine.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/StateMachine.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/StateMachine.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,157 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.state;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Iterator;
-import org.jboss.logging.Logger;
-
-/** The representation of a finite state machine.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class StateMachine implements Cloneable
-{
-   private static Logger log = Logger.getLogger(StateMachine.class);
-   /** A description of the state machine */
-   private String description;
-   /** The set of states making up the state machine */
-   private HashSet states;
-   /** The starting state */
-   private State startState;
-   /** The current state of the state machine */
-   private State currentState;
-
-   /** Create a state machine given its states and start state.
-    * 
-    * @param states - Set<State> for the state machine
-    * @param startState - the starting state
-    */ 
-   public StateMachine(Set states, State startState)
-   {
-      this(states, startState, null);
-   }
-   /** Create a state machine given its states and start state.
-    * 
-    * @param states - Set<State> for the state machine
-    * @param startState - the starting state
-    * @param description - an optional description of the state machine
-    */ 
-   public StateMachine(Set states, State startState, String description)
-   {
-      this.states = new HashSet(states);
-      this.startState = startState;
-      this.currentState = startState;
-      this.description = description;
-   }
-
-   /** Make a copy of the StateMachine maintaining the current state.
-    * 
-    * @return a copy of the StateMachine.
-    */ 
-   public Object clone()
-   {
-      StateMachine clone = new StateMachine(states, startState, description);
-      clone.currentState = currentState;
-      return clone;
-   }
-
-   /** Get the state machine description.
-    * @return an possibly null description.
-    */ 
-   public String getDescription()
-   {
-      return description;
-   }
-
-   /** Get the current state of the state machine.
-    * @return the current state.
-    */ 
-   public State getCurrentState()
-   {
-      return currentState;
-   }
-
-   /** Get the start state of the state machine.
-    * @return the start state.
-    */ 
-   public State getStartState()
-   {
-      return startState;
-   }
-
-   /** Get the states of the state machine.
-    * @return the machine states.
-    */ 
-   public Set getStates()
-   {
-      return states;
-   }
-
-   /** Transition to the next state given the name of a valid transition.
-    * @param actionName - the name of transition that is valid for the
-    * current state. 
-    * @return
-    * @throws IllegalTransitionException
-    */ 
-   public State nextState(String actionName)
-      throws IllegalTransitionException
-   {
-      Transition t = currentState.getTransition(actionName);
-      if( t == null )
-      {
-         String msg = "No transition for action: '" + actionName
-            + "' from state: '" + currentState.getName() + "'";
-         throw new IllegalTransitionException(msg);
-      }
-      State nextState = t.getTarget();
-      log.trace("nextState("+actionName+") = "+nextState);
-      currentState = nextState;
-      return currentState;
-   }
-
-   /** Reset the state machine back to the start state
-    * 
-    * @return the start state
-    */ 
-   public State reset()
-   {
-      this.currentState = startState;
-      return currentState;
-   }
-
-   public String toString()
-   {
-      StringBuffer tmp = new StringBuffer("StateMachine[:\n");
-      tmp.append("\tCurrentState: "+currentState.getName());
-      tmp.append('\n');
-      Iterator i = states.iterator();
-      while( i.hasNext() )
-      {
-         tmp.append(i.next());
-      }
-      tmp.append(']');
-      return tmp.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/StateMachine.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/StateMachine.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/Transition.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/Transition.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/Transition.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.state;
-
-/** A representation of a transition from a state to another state.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class Transition
-{
-   private String name;
-   private State target;
-
-   public Transition(String name, State target)
-   {
-      this.name = name;
-      this.target = target;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-   
-   public State getTarget()
-   {
-      return target;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/Transition.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/Transition.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/xml (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/xml)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/xml/StateMachineParser.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/xml/StateMachineParser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/xml/StateMachineParser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,146 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.state.xml;
-
-import java.net.URL;
-import java.util.Iterator;
-import java.util.HashMap;
-import java.util.HashSet;
-
-import org.dom4j.io.SAXReader;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.state.StateMachine;
-import org.jboss.util.state.State;
-import org.jboss.util.state.Transition;
-
-/** Parse an xml representation of a state machine. A sample document is:
- 
-<state-machine description="JACC PolicyConfiguration States">
-   <state name="open">
-      <transition name="inService" target="open" />
-      <transition name="getContextID" target="open" />
-      <transition name="getPolicyConfiguration" target="open" />
-      <transition name="addToRole" target="open" />
-      <transition name="removeRole" target="open" />
-      <transition name="addToExcludedPolicy" target="open" />
-      <transition name="removeExcludedPolicy" target="open" />
-      <transition name="addToUncheckedPolicy" target="open" />
-      <transition name="removeUncheckedPolicy" target="open" />
-      <transition name="linkConfiguration" target="open" />
-      <transition name="commit" target="inService" />
-      <transition name="delete" target="deleted" />
-   </state>
-   <state name="inService">
-      <transition name="getPolicyConfiguration" target="open" />
-      <transition name="getContextID" target="inService" />
-      <transition name="inService" target="inService" />
-      <transition name="delete" target="deleted" />
-   </state>
-   <state name="deleted" isStartState="true">
-      <transition name="getPolicyConfiguration" target="open" />
-      <transition name="delete" target="deleted" />      
-      <transition name="inService" target="deleted" />
-      <transition name="getContextID" target="deleted" />
-   </state>
-</state-machine>
-
- @author Scott.Stark at jboss.org
- @version $Revision$
- */
-public class StateMachineParser
-{
-   private static Logger log = Logger.getLogger(StateMachineParser.class);
-
-   /**
-    * 
-    * @param source
-    * @return
-    * @throws DocumentException
-    */ 
-   public StateMachine parse(URL source) throws DocumentException
-   {
-      SAXReader reader = new SAXReader();
-      Document document = reader.read(source);
-      Element root = document.getRootElement();
-      String description = root.attributeValue("description");
-      Iterator i = root.elementIterator();
-      HashMap nameToStateMap = new HashMap();
-      HashMap nameToTransitionsMap = new HashMap();
-      HashSet states = new HashSet();
-      State startState = null;
-      while( i.hasNext() )
-      {
-         Element stateElement = (Element) i.next();
-         String stateName = stateElement.attributeValue("name");
-         State s = new State(stateName);
-         states.add(s);
-         nameToStateMap.put(stateName, s);
-         HashMap transitions = new HashMap();
-         Iterator it = stateElement.elementIterator();
-         while( it.hasNext() )
-         {
-            Element transElement = (Element) it.next();
-            String name = transElement.attributeValue("name");
-            String targetName = transElement.attributeValue("target");
-            transitions.put(name, targetName);
-         }
-         nameToTransitionsMap.put(stateName, transitions);
-         if( Boolean.valueOf(stateElement.attributeValue("isStartState")) == Boolean.TRUE )
-            startState = s;
-      }
-
-      // Resolve all transition targets
-      Iterator transitions = nameToTransitionsMap.keySet().iterator();
-      StringBuffer resolveFailed = new StringBuffer();
-      while( transitions.hasNext() )
-      {
-         String stateName = (String) transitions.next();
-         State s = (State) nameToStateMap.get(stateName);
-         HashMap stateTransitions = (HashMap) nameToTransitionsMap.get(stateName);
-         Iterator it = stateTransitions.keySet().iterator();
-         while( it.hasNext() )
-         {
-            String name = (String) it.next();
-            String targetName = (String) stateTransitions.get(name);
-            State target = (State) nameToStateMap.get(targetName);
-            if( target == null )
-            {
-               String msg = "Failed to resolve target state: "+targetName+" for transition: "+name;
-               resolveFailed.append(msg);
-               log.debug(msg);
-            }
-            Transition t = new Transition(name, target);
-            s.addTransition(t);
-         }
-      }
-
-      if( resolveFailed.length() > 0 )
-         throw new DocumentException("Failed to resolve transition targets: "+resolveFailed);
-
-      StateMachine sm = new StateMachine(states, startState, description);
-      return sm;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/state/xml/StateMachineParser.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/state/xml/StateMachineParser.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/CRLFPrintWriter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/CRLFPrintWriter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/CRLFPrintWriter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,87 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.stream;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.OutputStream;
-import java.io.InterruptedIOException;
-import java.io.Writer;
-
-/**
- * A <tt>PrintWriter</tt> that ends lines with a carriage return-line feed 
- * (<tt>CRLF</tt>).
- *
- * <h3>Concurrency</h3>
- * This class is <b>as</b> synchronized as <tt>PrintWriter</tt>.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class CRLFPrintWriter
-   extends PrintWriter
-{
-   protected boolean autoFlush = false;
-
-   public CRLFPrintWriter(final Writer out) {
-      super(out);
-   }
-
-   public CRLFPrintWriter(final Writer out, final boolean autoFlush) {
-      super(out, autoFlush);
-      this.autoFlush = autoFlush;
-   }
-
-   public CRLFPrintWriter(final OutputStream out) {
-      super(out);
-   }
-
-   public CRLFPrintWriter(final OutputStream out, final boolean autoFlush) {
-      super(out, autoFlush);
-      this.autoFlush = autoFlush;
-   }
-
-   protected void ensureOpen() throws IOException {
-      if (out == null)
-         throw new IOException("Stream closed");
-   }
-
-   public void println() {
-      try {
-         synchronized (lock) {
-            ensureOpen();
-
-            out.write("\r\n");
-
-            if (autoFlush) {
-               out.flush();
-            }
-         }
-      }
-      catch (InterruptedIOException e) {
-         Thread.currentThread().interrupt();
-      }
-      catch (IOException e) {
-         setError();
-      }
-   }      
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/CRLFPrintWriter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/CRLFPrintWriter.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/IMarshalledValue.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/IMarshalledValue.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/IMarshalledValue.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,33 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-
-package org.jboss.util.stream;
-
-import java.io.IOException;
-
-/**
- * Tag interface for MarshalledValues
- * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
- */
-public interface IMarshalledValue {
-    public Object get() throws IOException, ClassNotFoundException;
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/IMarshalledValue.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/IMarshalledValue.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedInputStream.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedInputStream.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedInputStream.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,115 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.stream;
-
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * A buffered input stream that notifies every "chunk"
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:Adrian at jboss.org">Adrian Brock</a>
- */
-public class NotifyingBufferedInputStream
-   extends BufferedInputStream
-{
-   /**
-    * The number of bytes between notifications
-    */
-   int chunkSize;
-
-   /**
-    * The number of bytes read in the current chunk
-    */
-   int chunk = 0;
-
-   /**
-    * The listener notified every chunk
-    */
-   StreamListener listener;
-
-   /**
-    * Construct a notifying buffered inputstream.
-    * The listener is notified once every chunk.
-    *
-    * @param is the input stream to be buffered
-    * @param size the buffer size
-    * @param chunkSize the chunk size
-    * @param listener the listener to notify
-    * @exception IllegalArgumentException for a size <= 0 or chunkSize <= size
-    */
-   public NotifyingBufferedInputStream(InputStream is, int size, int chunkSize, StreamListener listener)
-   {
-      super(is, size);
-      if (chunkSize <= size)
-         throw new IllegalArgumentException("chunkSize must be bigger than the buffer");
-      this.chunkSize = chunkSize;
-      this.listener = listener;
-   }
-
-   public void setStreamListener(StreamListener listener)
-   {
-      this.listener = listener;
-   }
-
-   public int read()
-      throws IOException
-   {
-      int result = super.read();
-      if (result == -1)
-         return result;
-      checkNotification(result);
-      return result;
-   }
-
-   public int read(byte[] b, int off, int len)
-      throws IOException
-   {
-      int result = super.read(b, off, len);
-      if (result == -1)
-         return result;
-      checkNotification(result);
-      return result;
-   }
-
-   /**
-    * Checks whether a notification is required and
-    * notifies as appropriate
-    *
-    * @param result the number of bytes read
-    */
-   public void checkNotification(int result)
-   {
-      // Is a notification required?
-      chunk += result;
-      if (chunk >= chunkSize)
-      {
-         if (listener != null)
-            listener.onStreamNotification(this, chunk);
-
-         // Start a new chunk
-         chunk = 0;
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedInputStream.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedInputStream.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedOutputStream.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedOutputStream.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedOutputStream.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,108 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.stream;
-
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * A buffered output stream that notifies every "chunk"
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:Adrian at jboss.org">Adrian Brock</a>
- */
-public class NotifyingBufferedOutputStream
-   extends BufferedOutputStream
-{
-   /**
-    * The number of bytes between notifications
-    */
-   int chunkSize;
-
-   /**
-    * The number of bytes written in the current chunk
-    */
-   int chunk = 0;
-
-   /**
-    * The listener notified every chunk
-    */
-   StreamListener listener;
-
-   /**
-    * Construct a notifying buffered outputstream.<br>
-    * The listener is notified once every chunk.
-    *
-    * @param os the output stream to be buffered
-    * @param size the buffer size
-    * @param chunkSize the chunk size
-    * @exception IllegalArgumentException for a size <= 0 or chunkSize <= size or a null listener
-    */
-   public NotifyingBufferedOutputStream(OutputStream os, int size, int chunkSize, StreamListener listener)
-   {
-      super(os, size);
-      if (chunkSize <= size)
-         throw new IllegalArgumentException("chunkSize must be bigger than the buffer");
-      this.chunkSize = chunkSize;
-      this.listener = listener;
-   }
-
-   public void setStreamListener(StreamListener listener)
-   {
-      this.listener = listener;
-   }
-
-   public void write(int b)
-      throws IOException
-   {
-      super.write(b);
-      checkNotification(1);
-   }
-
-   public void write(byte[] b, int off, int len)
-      throws IOException
-   {
-      super.write(b, off, len);
-      checkNotification(len);
-   }
-
-   /**
-    * Checks whether a notification is required and
-    * notifies as appropriate
-    *
-    * @param result the number of bytes written
-    */
-   public void checkNotification(int result)
-   {
-      // Is a notification required?
-      chunk += result;
-      if (chunk >= chunkSize)
-      {
-         if (listener != null)
-            listener.onStreamNotification(this, chunk);
-
-         // Start a new chunk
-         chunk = 0;
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedOutputStream.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/NotifyingBufferedOutputStream.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/StreamListener.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/StreamListener.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/StreamListener.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,39 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.stream;
-
-/**
- * A stream listener
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:Adrian at jboss.org">Adrian Brock</a>
- */
-public interface StreamListener
-{
-   /**
-    * Invoked by notifiying streams
-    *
-    * @param source the stream
-    * @param size the number of bytes since the last notification
-    */
-   void onStreamNotification(Object source, int size);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/StreamListener.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/StreamListener.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/Streams.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/Streams.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/Streams.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,453 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.stream;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-
-import org.jboss.logging.Logger;
-
-/**
- * A collection of stream related utility methods.
- *
- * <p>Exceptions that are thrown and not explicitly declared are ignored.
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public final class Streams
-{
-   private static final Logger log = Logger.getLogger(Streams.class);
-   
-   /////////////////////////////////////////////////////////////////////////
-   //                               Closing                               //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Attempt to close an <tt>InputStream</tt>.
-    *
-    * @param stream  <tt>InputStream</tt> to attempt to close.
-    * @return        <tt>True</tt> if stream was closed (or stream was null),
-    *                or <tt>false</tt> if an exception was thrown.
-    */
-   public static boolean close(final InputStream stream) {
-      // do not attempt to close null stream, but return sucess
-      if (stream == null) {
-         return true;
-      }
-      
-      boolean success = true;
-
-      try {
-         stream.close();
-      }
-      catch (IOException e) {
-         success = false;
-      }
-
-      return success;
-   }
-
-   /**
-    * Attempt to close an <tt>OutputStream</tt>.
-    *
-    * @param stream  <tt>OutputStream</tt> to attempt to close.
-    * @return        <tt>True</tt> if stream was closed (or stream was null),
-    *                or <tt>false</tt> if an exception was thrown.
-    */
-   public static boolean close(final OutputStream stream) {
-      // do not attempt to close null stream, but return sucess
-      if (stream == null) {
-         return true;
-      }
-
-      boolean success = true;
-
-      try {
-         stream.close();
-      }
-      catch (IOException e) {
-         success = false;
-      }
-
-      return success;
-   }
-
-   /**
-    * Attempt to close an <tt>InputStream</tt> or <tt>OutputStream</tt>.
-    *
-    * @param stream  Stream to attempt to close.
-    * @return        <tt>True</tt> if stream was closed (or stream was null),
-    *                or <tt>false</tt> if an exception was thrown.
-    *
-    * @throws IllegalArgumentException    Stream is not an <tt>InputStream</tt>
-    *                                     or <tt>OuputStream</tt>.
-    */
-   public static boolean close(final Object stream) {
-      boolean success = false;
-
-      if (stream instanceof InputStream) {
-         success = close((InputStream)stream);
-      }
-      else if (stream instanceof OutputStream) {
-         success = close((OutputStream)stream);
-      }
-      else {
-         throw new IllegalArgumentException
-            ("stream is not an InputStream or OutputStream");
-      }
-
-      return success;
-   }
-
-   /**
-    * Attempt to close an array of <tt>InputStream</tt>s.
-    *
-    * @param streams Array of <tt>InputStream</tt>s to attempt to close.
-    * @return        <tt>True</tt> if all streams were closed, or <tt>false</tt>
-    *                if an exception was thrown.
-    */
-   public static boolean close(final InputStream[] streams) {
-      boolean success = true;
-
-      for (int i=0; i<streams.length; i++) {
-         boolean rv = close(streams[i]);
-         if (!rv) success = false;
-      }
-
-      return success;
-   }
-
-   /**
-    * Attempt to close an array of <tt>OutputStream</tt>s.
-    *
-    * @param streams Array of <tt>OutputStream</tt>s to attempt to close.
-    * @return        <tt>True</tt> if all streams were closed, or <tt>false</tt>
-    *                if an exception was thrown.
-    */
-   public static boolean close(final OutputStream[] streams) {
-      boolean success = true;
-
-      for (int i=0; i<streams.length; i++) {
-         boolean rv = close(streams[i]);
-         if (!rv) success = false;
-      }
-
-      return success;
-   }
-
-   /**
-    * Attempt to close an array of <tt>InputStream</tt>a and/or 
-    * <tt>OutputStream</tt>s.
-    *
-    * @param streams Array of streams to attempt to close.
-    * @return        <tt>True</tt> if all streams were closed, or <tt>false</tt>
-    *                if an exception was thrown.
-    *
-    * @throws IllegalArgumentException    Stream is not an <tt>InputStream</tt>
-    *                                     or <tt>OuputStream</tt>.  Closing 
-    *                                     stops at the last valid stream
-    *                                     object in this case.
-    */
-   public static boolean close(final Object[] streams) {
-      boolean success = true;
-
-      for (int i=0; i<streams.length; i++) {
-         boolean rv = close(streams[i]);
-         if (!rv) success = false;
-      }
-
-      return success;
-   }
-
-   /**
-    * Attempt to flush and close an <tt>OutputStream</tt>.
-    *
-    * @param stream  <tt>OutputStream</tt> to attempt to flush and close.
-    * @return        <tt>True</tt> if stream was flushed and closed, or
-    *                <tt>false</tt> if an exception was thrown.
-    */
-   public static boolean fclose(final OutputStream stream) {
-       return flush(stream) && close(stream);
-   }
-
-   /**
-    * Attempt to flush and close an array of <tt>OutputStream</tt>s.
-    *
-    * @param streams  <tt>OutputStream</tt>s to attempt to flush and close.
-    * @return         <tt>True</tt> if all streams were flushed and closed, 
-    *                 or <tt>false</tt> if an exception was thrown.
-    */
-   public static boolean fclose(final OutputStream[] streams) {
-      boolean success = true;
-
-      for (int i=0; i<streams.length; i++) {
-         boolean rv = fclose(streams[i]); 
-         if (!rv) success = false;
-      }
-
-      return success;
-   }
-    
-
-   /////////////////////////////////////////////////////////////////////////
-   //                                Flushing                             //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Attempt to flush an <tt>OutputStream</tt>.
-    *
-    * @param stream  <tt>OutputStream</tt> to attempt to flush.
-    * @return        <tt>True</tt> if stream was flushed (or stream was null),
-    *                or <tt>false</tt> if an exception was thrown.
-    */
-   public static boolean flush(final OutputStream stream) {
-      // do not attempt to close null stream, but return sucess
-      if (stream == null) {
-         return true;
-      }
-      
-      boolean success = true;
-
-      try {
-         stream.flush();
-      }
-      catch (IOException e) {
-         success = false;
-      }
-
-      return success;
-   }
-
-   /**
-    * Attempt to flush an array of <tt>OutputStream</tt>s.
-    *
-    * @param streams <tt>OutputStream</tt>s to attempt to flush.
-    * @return        <tt>True</tt> if all streams were flushed, or <tt>false</tt>
-    *                 if an exception was thrown.
-    */
-   public static boolean flush(final OutputStream[] streams) {
-      boolean success = true;
-
-      for (int i=0; i<streams.length; i++) {
-         boolean rv = flush(streams[i]);
-         if (!rv) success = false;
-      }
-
-      return success;
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                                  Misc                               //
-   /////////////////////////////////////////////////////////////////////////
-
-   /** The default buffer size that will be used for buffered operations. */
-   public static final int DEFAULT_BUFFER_SIZE = 2048;
-
-   /**
-    * Copy all of the bytes from the input stream to the output stream.
-    *
-    * @param input   Stream to read bytes from.
-    * @param output  Stream to write bytes to.
-    * @param buffer  The buffer to use while copying.
-    * @return        The total number of bytes copied.
-    *
-    * @throws IOException  Failed to copy bytes.
-    */
-   public static long copy(final InputStream input, 
-                           final OutputStream output, 
-                           final byte buffer[])
-      throws IOException
-   {
-      long total = 0;
-      int read;
-
-      boolean trace = log.isTraceEnabled();
-      if (trace) {
-         log.trace("copying " + input + " to " + output + " with buffer size: " + buffer.length);
-      }
-      
-      while ((read = input.read(buffer)) != -1) {
-         output.write(buffer, 0, read);
-         total += read;
-
-         if (trace) {
-            log.trace("bytes read: " + read + "; total bytes read: " + total);
-         }
-      }
-
-      return total;
-   }
-
-   /**
-    * Copy all of the bytes from the input stream to the output stream.
-    *
-    * @param input   Stream to read bytes from.
-    * @param output  Stream to write bytes to.
-    * @param size    The size of the buffer to use while copying.
-    * @return        The total number of bytes copied.
-    *
-    * @throws IOException  Failed to copy bytes.
-    */
-   public static long copy(final InputStream input, 
-                           final OutputStream output, 
-                           final int size)
-      throws IOException
-   {
-      return copy(input, output, new byte[size]);
-   }
-
-   /**
-    * Copy all of the bytes from the input stream to the output stream.
-    *
-    * @param input   Stream to read bytes from.
-    * @param output  Stream to write bytes to.
-    * @return        The total number of bytes copied.
-    *
-    * @throws IOException  Failed to copy bytes.
-    */
-   public static long copy(final InputStream input, 
-                           final OutputStream output)
-      throws IOException
-   {
-      return copy(input, output, DEFAULT_BUFFER_SIZE);
-   }
-
-   /**
-    * Copy all of the bytes from the input stream to the output stream
-    * wrapping streams in buffers as needed.
-    *
-    * @param input   Stream to read bytes from.
-    * @param output  Stream to write bytes to.
-    * @return        The total number of bytes copied.
-    *
-    * @throws IOException  Failed to copy bytes.
-    */
-   public static long copyb(InputStream input, 
-                            OutputStream output)
-      throws IOException
-   {
-      if (!(input instanceof BufferedInputStream)) {
-         input = new BufferedInputStream(input);
-      }
-      
-      if (!(output instanceof BufferedOutputStream)) {
-         output = new BufferedOutputStream(output);
-      }
-
-      long bytes = copy(input, output, DEFAULT_BUFFER_SIZE);
-
-      output.flush();
-
-      return bytes;
-   }
-   
-   /**
-    * Copy a limited number of bytes from the input stream to the 
-    * output stream.
-    *
-    * @param input   Stream to read bytes from.
-    * @param output  Stream to write bytes to.
-    * @param buffer  The buffer to use while copying.
-    * @param length  The maximum number of bytes to copy.
-    * @return        The total number of bytes copied.
-    *
-    * @throws IOException  Failed to copy bytes.
-    */
-   public static long copySome(final InputStream input, 
-                               final OutputStream output, 
-                               final byte buffer[],
-                               final long length)
-      throws IOException
-   {
-      long total = 0;
-      int read;
-      int readLength;
-
-      boolean trace = log.isTraceEnabled();
-      
-      // setup the initial readLength, if length is less than the buffer
-      // size, then we only want to read that much
-      readLength = Math.min((int)length, buffer.length);
-      if (trace) {
-         log.trace("initial read length: " + readLength);
-      }
-
-      while (readLength != 0 && (read = input.read(buffer, 0, readLength)) != -1) 
-      {
-         if (trace) log.trace("read bytes: " + read);
-         output.write(buffer, 0, read);
-         total += read;
-         if (trace) log.trace("total bytes read: " + total);
-
-         // update the readLength
-         readLength = Math.min((int)(length - total), buffer.length);
-         if (trace) log.trace("next read length: " + readLength);
-      }
-
-      return total;
-   }
-
-   /**
-    * Copy a limited number of bytes from the input stream to the 
-    * output stream.
-    *
-    * @param input   Stream to read bytes from.
-    * @param output  Stream to write bytes to.
-    * @param size    The size of the buffer to use while copying.
-    * @param length  The maximum number of bytes to copy.
-    * @return        The total number of bytes copied.
-    *
-    * @throws IOException  Failed to copy bytes.
-    */
-   public static long copySome(final InputStream input, 
-                               final OutputStream output, 
-                               final int size,
-                               final long length)
-      throws IOException
-   {
-      return copySome(input, output, new byte[size], length);
-   }
-
-   /**
-    * Copy a limited number of bytes from the input stream to the 
-    * output stream.
-    *
-    * @param input   Stream to read bytes from.
-    * @param output  Stream to write bytes to.
-    * @param length  The maximum number of bytes to copy.
-    * @return        The total number of bytes copied.
-    *
-    * @throws IOException  Failed to copy bytes.
-    */
-   public static long copySome(final InputStream input, 
-                               final OutputStream output, 
-                               final long length)
-      throws IOException
-   {
-      return copySome(input, output, DEFAULT_BUFFER_SIZE, length);
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/Streams.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/Streams.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Stream related classes.</p>
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/stream/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/stream/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicTaskWrapper.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicTaskWrapper.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicTaskWrapper.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,433 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-import org.jboss.logging.Logger;
-
-/**
- * A wrapper for the task.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public class BasicTaskWrapper implements TaskWrapper
-{
-   /** The log */
-   private static final Logger log = Logger.getLogger(BasicTaskWrapper.class);
-
-   /** The task has not been accepted */
-   public static final int TASK_NOT_ACCEPTED = 0;
-
-   /** The task has been accepted */
-   public static final int TASK_ACCEPTED = 1;
-
-   /** The task has been started */
-   public static final int TASK_STARTED = 2;
-
-   /** The task has completed */
-   public static final int TASK_COMPLETED = 3;
-
-   /** The task was rejected */
-   public static final int TASK_REJECTED = -1;
-
-   /** The task has been stopped */
-   public static final int TASK_STOPPED = -2;
-
-   /** The state of the task */
-   private int state = TASK_NOT_ACCEPTED;
-
-   /** The state lock */
-   private Object stateLock = new Object();
-
-   /** The task */
-   private Task task;
-
-   /** The task as a string */
-   private String taskString;
-
-   /** The start time */
-   private long startTime;
-
-   /** The start timeout */
-   private long startTimeout;
-
-   /** The completion timeout */
-   private long completionTimeout;
-
-   /** The priority */
-   private int priority;
-
-   /** The wait type */
-   private int waitType;
-
-   /** The thread */
-   private Thread runThread;
-
-   /**
-    * Create a task wrapper without a task
-    */
-   protected BasicTaskWrapper()
-   {
-   }
-
-   /**
-    * Create a new task wrapper
-    *
-    * @param task the task
-    * @throws IllegalArgumentException for a null task
-    */
-   public BasicTaskWrapper(Task task)
-   {
-      setTask(task);
-   }
-
-   public int getTaskWaitType()
-   {
-      return waitType;
-   }
-
-   public int getTaskPriority()
-   {
-      return priority;
-   }
-
-   public long getTaskStartTimeout()
-   {
-      return startTimeout;
-   }
-
-   public long getTaskCompletionTimeout()
-   {
-      return completionTimeout;
-   }
-
-   public void acceptTask()
-   {
-      synchronized (stateLock)
-      {
-         // Not in a valid state
-         if (state != TASK_NOT_ACCEPTED)
-            return;
-      }
-
-      // Accept the task
-      if (taskAccepted())
-         state = TASK_ACCEPTED;
-      else
-         state = TASK_REJECTED;
-
-      // Notify the waiting task
-      synchronized (stateLock)
-      {
-         stateLock.notifyAll();
-      }
-   }
-
-   public void rejectTask(RuntimeException e)
-   {
-      synchronized (stateLock)
-      {
-         state = TASK_REJECTED;
-         stateLock.notifyAll();
-      }
-      taskRejected(e);
-   }
-
-   public boolean isComplete()
-   {
-      return state == TASK_COMPLETED;
-   }
-
-   public void stopTask()
-   {
-      boolean started;
-      synchronized (stateLock)
-      {
-         started = (state == TASK_STARTED);
-         state = TASK_STOPPED;
-      }
-      if (started)
-      {
-         // Interrupt the run thread if its not null
-         if( runThread != null )
-         {
-            runThread.interrupt();
-         }
-         taskStop();
-      }
-      else if( runThread != null && runThread.isInterrupted() )
-      {
-         /* If the thread has not been returned after being interrupted, then
-         use the deprecated stop method to try to force the thread abort.
-         */
-         runThread.stop();
-      }
-   }
-
-   public void waitForTask()
-   {
-      switch (waitType)
-      {
-         case Task.WAIT_FOR_START:
-         {
-            boolean interrupted = false;
-            synchronized (stateLock)
-            {
-               while (state == TASK_NOT_ACCEPTED || state == TASK_ACCEPTED)
-               {
-                  try
-                  {
-                     stateLock.wait();
-                  }
-                  catch (InterruptedException e)
-                  {
-                     interrupted = true;
-                  }
-               }
-               if (interrupted)
-                  Thread.currentThread().interrupt();
-               return;
-            }
-         }
-         default:
-         {
-            return;
-         }
-      }
-   }
-
-   /**
-    * Called by the thread pool executor
-    */ 
-   public void run()
-   {
-      // Get the execution thread
-      this.runThread = Thread.currentThread();
-
-      // Check for a start timeout
-      long runTime = getElapsedTime();
-      if (startTimeout > 0l && runTime >= startTimeout)
-      {
-         taskRejected(new StartTimeoutException("Start Timeout exceeded for task " + taskString));
-         return;
-      }
-
-      // We are about to start, check for a stop
-      boolean stopped = false;
-      synchronized (stateLock)
-      {
-         if (state == TASK_STOPPED)
-         {
-            stopped = true;
-         }
-         else
-         {
-            state = TASK_STARTED;
-            taskStarted();
-            if (waitType == Task.WAIT_FOR_START)
-               stateLock.notifyAll();
-         }
-      }
-      if (stopped)
-      {
-         taskRejected(new TaskStoppedException("Task stopped for task " + taskString));
-         return;
-      }
-
-      // Run the task
-      Throwable throwable = null;
-      try
-      {
-         task.execute();
-      }
-      catch (Throwable t)
-      {
-         throwable = t;
-      }
-
-      // It is complete
-      taskCompleted(throwable);
-
-      // We are completed
-      synchronized (stateLock)
-      {
-         state = TASK_COMPLETED;
-         if (waitType == Task.WAIT_FOR_COMPLETE)
-            stateLock.notifyAll();
-      }
-   }
-
-   /**
-    * Set thetask for this wrapper
-    *
-    * @param task the task
-    */
-   protected void setTask(Task task)
-   {
-      if (task == null)
-         throw new IllegalArgumentException("Null task");
-      this.task = task;
-      this.taskString = task.toString();
-      this.startTime = System.currentTimeMillis();
-      this.waitType = task.getWaitType();
-      this.priority = task.getPriority();
-      this.startTimeout = task.getStartTimeout();
-      this.completionTimeout = task.getCompletionTimeout();
-   }
-
-   /**
-    * Notify the task it has been accepted
-    *
-    * @return true when the notification succeeds, false otherwise
-    */
-   protected boolean taskAccepted()
-   {
-      try
-      {
-         task.accepted(getElapsedTime());
-         return true;
-      }
-      catch (Throwable t)
-      {
-         log.warn("Unexpected error during 'accepted' for task: " + taskString, t);
-         return false;
-      }
-   }
-
-   /**
-    * Notify the task it has been rejected
-    *
-    * @param e any error associated with the rejection
-    * @return true when the notification succeeds, false otherwise
-    */
-   protected boolean taskRejected(RuntimeException e)
-   {
-      try
-      {
-         task.rejected(getElapsedTime(), e);
-         return true;
-      }
-      catch (Throwable t)
-      {
-         log.warn("Unexpected error during 'rejected' for task: " + taskString, t);
-         if (e != null)
-            log.warn("Original reason for rejection of task: " + taskString, e);
-         return false;
-      }
-   }
-
-   /**
-    * Notify the task it has started
-    *
-    * @return true when the notification succeeds, false otherwise
-    */
-   protected boolean taskStarted()
-   {
-      try
-      {
-         task.started(getElapsedTime());
-         return true;
-      }
-      catch (Throwable t)
-      {
-         log.warn("Unexpected error during 'started' for task: " + taskString, t);
-         return false;
-      }
-   }
-
-   /**
-    * Notify the task it has completed
-    *
-    * @param throwable any throwable associated with the completion
-    * @return true when the notification succeeds, false otherwise
-    */
-   protected boolean taskCompleted(Throwable throwable)
-   {
-      try
-      {
-         task.completed(getElapsedTime(), throwable);
-         return true;
-      }
-      catch (Throwable t)
-      {
-         log.warn("Unexpected error during 'completed' for task: " + taskString, t);
-         if (throwable != null)
-            log.warn("Original error during 'run' for task: " + taskString, throwable);
-         return false;
-      }
-   }
-
-   /**
-    * Stop the task
-    *
-    * @return true when the notification succeeds, false otherwise
-    */
-   protected boolean taskStop()
-   {
-      try
-      {
-         task.stop();
-         return true;
-      }
-      catch (Throwable t)
-      {
-         log.warn("Unexpected error during 'stop' for task: " + taskString, t);
-         return false;
-      }
-   }
-
-   /**
-    * Calculate the elapsed time since the task was started
-    *
-    * @return the elapsed time in millis
-    */
-   protected long getElapsedTime()
-   {
-      return System.currentTimeMillis() - startTime;
-   }
-   
-   /**
-    * Get the state as a string
-    * 
-    * @return the state string
-    */
-   protected String getStateString()
-   {
-      switch (state)
-      {
-         case TASK_NOT_ACCEPTED:
-            return "NOT_ACCEPTED";
-         case TASK_REJECTED:
-            return "REJECTED";
-         case TASK_ACCEPTED:
-            return "ACCEPTED";
-         case TASK_STARTED:
-            return "STARTED";
-         case TASK_STOPPED:
-            return "STOPPED";
-         case TASK_COMPLETED:
-            return "COMPLETED";
-         default:
-            return "???";
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicTaskWrapper.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicTaskWrapper.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPool.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPool.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPool.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,619 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.jboss.util.collection.WeakValueHashMap;
-import org.jboss.logging.Logger;
-
-import EDU.oswego.cs.dl.util.concurrent.BoundedLinkedQueue;
-import EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean;
-import EDU.oswego.cs.dl.util.concurrent.SynchronizedInt;
-import EDU.oswego.cs.dl.util.concurrent.ThreadFactory;
-import EDU.oswego.cs.dl.util.concurrent.Heap;
-
-/**
- * A basic thread pool.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class BasicThreadPool implements ThreadPool, BasicThreadPoolMBean
-{
-   // Constants -----------------------------------------------------
-
-   /** The jboss thread group */
-   private static final ThreadGroup JBOSS_THREAD_GROUP = new ThreadGroup("JBoss Pooled Threads");
-
-   /** The thread groups */
-   private static final Map threadGroups = Collections.synchronizedMap(new WeakValueHashMap());
-
-   /** The internal pool number */
-   private static final SynchronizedInt lastPoolNumber = new SynchronizedInt(0);
-
-   private static Logger log = Logger.getLogger(BasicThreadPool.class);
-
-   // Attributes ----------------------------------------------------
-
-   /** The thread pool name */
-   private String name;
-
-   /** The internal pool number */
-   private int poolNumber;
-
-   /** The blocking mode */
-   private BlockingMode blockingMode = BlockingMode.ABORT;
-
-   /** The pooled executor */
-   private MinPooledExecutor executor;
-
-   /** The queue */
-   private BoundedLinkedQueue queue;
-
-   /** The thread group */
-   private ThreadGroup threadGroup;
-
-   /** The last thread number */
-   private SynchronizedInt lastThreadNumber = new SynchronizedInt(0);
-
-   /** Has the pool been stopped? */
-   private SynchronizedBoolean stopped = new SynchronizedBoolean(false);
-   /** The Heap<TimeoutInfo> of tasks ordered by their completion timeout */
-   private Heap tasksWithTimeouts = new Heap(13);
-   /** The task completion timeout monitor runnable */
-   private TimeoutMonitor timeoutTask;
-   /** The trace level logging flag */
-   private boolean trace;
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   /**
-    * Create a new thread pool
-    */
-   public BasicThreadPool()
-   {
-      this("ThreadPool");
-   }
-
-   /**
-    * Create a new thread pool with a default queue size of 1024, max pool
-    * size of 100, min pool size of 4, and a keep alive of 60 seconds.
-    *
-    * @param name the pool name
-    */
-   public BasicThreadPool(String name)
-   {
-      this(name, JBOSS_THREAD_GROUP);
-   }
-
-   /**
-    * Create a new thread pool with a default queue size of 1024, max pool
-    * size of 100, min pool size of 4, and a keep alive of 60 seconds.
-    *
-    * @param name the pool name
-    * @param threadGroup threadGroup
-    */
-   public BasicThreadPool(String name, ThreadGroup threadGroup)
-   {
-      trace = log.isTraceEnabled();
-      ThreadFactory factory = new ThreadPoolThreadFactory();
-
-      queue = new BoundedLinkedQueue(1024);
-
-      executor = new MinPooledExecutor(queue, 100);
-      executor.setMinimumPoolSize(4);
-      executor.setKeepAliveTime(60 * 1000);
-      executor.setThreadFactory(factory);
-      executor.abortWhenBlocked();
-
-      poolNumber = lastPoolNumber.increment();
-      setName(name);
-      this.threadGroup = threadGroup;
-   }
-
-   // Public --------------------------------------------------------
-
-   // ThreadPool ----------------------------------------------------
-
-   public void stop(boolean immediate)
-   {
-      log.debug("stop, immediate="+immediate);
-      stopped.set(true);
-      if (immediate)
-         executor.shutdownNow();
-      else
-         executor.shutdownAfterProcessingCurrentlyQueuedTasks();
-   }
-
-   public void waitForTasks() throws InterruptedException
-   {
-      executor.awaitTerminationAfterShutdown();
-   }
-   public void waitForTasks(long maxWaitTime) throws InterruptedException
-   {
-      executor.awaitTerminationAfterShutdown(maxWaitTime);
-   }
-
-   public void runTaskWrapper(TaskWrapper wrapper)
-   {
-      if( trace )
-         log.trace("runTaskWrapper, wrapper="+wrapper);
-      if (stopped.get())
-      {
-         wrapper.rejectTask(new ThreadPoolStoppedException("Thread pool has been stopped"));
-         return;
-      }
-
-      wrapper.acceptTask();
-
-      long completionTimeout = wrapper.getTaskCompletionTimeout();
-      TimeoutInfo info = null;
-      if( completionTimeout > 0 )
-      {
-         checkTimeoutMonitor();
-         // Install the task in the
-         info = new TimeoutInfo(wrapper, completionTimeout);
-         tasksWithTimeouts.insert(info);
-      }
-      int waitType = wrapper.getTaskWaitType();
-      switch (waitType)
-      {
-         case Task.WAIT_FOR_COMPLETE:
-         {
-            executeOnThread(wrapper);
-            break;
-         }
-         default:
-         {
-            execute(wrapper);
-         }
-      }
-      waitForTask(wrapper);
-   }
-
-   public void runTask(Task task)
-   {
-      BasicTaskWrapper wrapper = new BasicTaskWrapper(task);
-      runTaskWrapper(wrapper);
-   }
-
-   public void run(Runnable runnable)
-   {
-      run(runnable, 0, 0);
-   }
-
-   public void run(Runnable runnable, long startTimeout, long completeTimeout)
-   {
-      RunnableTaskWrapper wrapper = new RunnableTaskWrapper(runnable, startTimeout, completeTimeout);
-      runTaskWrapper(wrapper);      
-   }
-
-   public ThreadGroup getThreadGroup()
-   {
-      return threadGroup;
-   }
-
-   // ThreadPoolMBean implementation --------------------------------
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public int getPoolNumber()
-   {
-      return poolNumber;
-   }
-
-   public String getThreadGroupName()
-   {
-      return threadGroup.getName();
-   }
-
-   public void setThreadGroupName(String threadGroupName)
-   {
-      ThreadGroup group;
-      synchronized(threadGroups)
-      {
-         group = (ThreadGroup) threadGroups.get(threadGroupName);
-         if (group == null)
-         {
-            group = new ThreadGroup(JBOSS_THREAD_GROUP, threadGroupName);
-            threadGroups.put(threadGroupName, group);
-         }
-      }
-      threadGroup = group;
-   }
-
-   public int getQueueSize()
-   {
-      return queue.size();
-   }
-
-   public int getMaximumQueueSize()
-   {
-      return queue.capacity();
-   }
-
-   public void setMaximumQueueSize(int size)
-   {
-      queue.setCapacity(size);
-   }
-
-   public int getPoolSize()
-   {
-      return executor.getPoolSize();
-   }
-
-   public int getMinimumPoolSize()
-   {
-      return executor.getMinimumPoolSize();
-   }
-
-   public void setMinimumPoolSize(int size)
-   {
-      synchronized (executor)
-      {
-         executor.setKeepAliveSize(size);
-         // Don't let the min size > max size
-         if (executor.getMaximumPoolSize() < size)
-         {
-            executor.setMinimumPoolSize(size);
-            executor.setMaximumPoolSize(size);
-         }
-      }
-   }
-
-   public int getMaximumPoolSize()
-   {
-      return executor.getMaximumPoolSize();
-   }
-   
-   public void setMaximumPoolSize(int size)
-   {
-      synchronized (executor)
-      {
-         executor.setMinimumPoolSize(size);
-         executor.setMaximumPoolSize(size);
-         // Don't let the min size > max size
-         if (executor.getKeepAliveSize() > size)
-            executor.setKeepAliveSize(size);
-      }
-   }
-
-   public long getKeepAliveTime()
-   {
-      return executor.getKeepAliveTime();
-   }
-
-   public void setKeepAliveTime(long time)
-   {
-      executor.setKeepAliveTime(time);
-   }
-
-   public BlockingMode getBlockingMode()
-   {
-      return blockingMode;
-   }
-
-   public void setBlockingMode(BlockingMode mode)
-   {
-      blockingMode = mode;
-      
-      if( blockingMode == BlockingMode.RUN )
-      {
-         executor.runWhenBlocked();
-      }
-      else if( blockingMode == BlockingMode.WAIT )
-      {
-         executor.waitWhenBlocked();
-      }
-      else if( blockingMode == BlockingMode.DISCARD )
-      {
-         executor.discardWhenBlocked();
-      }
-      else if( blockingMode == BlockingMode.DISCARD_OLDEST )
-      {
-         executor.discardOldestWhenBlocked();
-      }
-      else if( blockingMode == BlockingMode.ABORT )
-      {
-         executor.abortWhenBlocked();
-      }
-      else
-      {
-         throw new IllegalArgumentException("Failed to recognize mode: "+mode);
-      }
-   }
-
-   /**
-    * For backward compatibility with the previous string based mode
-    * @param name - the string form of the mode enum
-    */ 
-   public void setBlockingMode(String name)
-   {
-      blockingMode = BlockingMode.toBlockingMode(name);
-      if( blockingMode == null )
-         blockingMode = BlockingMode.ABORT;
-   }
-
-   /**
-    * For backward compatibility with the previous string based mode
-    * This is needed for microcontainer as it gets confused with overloaded
-    * setters.
-    * @param name - the string form of the mode enum
-    */
-   public void setBlockingModeString(String name)
-   {
-      blockingMode = BlockingMode.toBlockingMode(name);
-      if( blockingMode == null )
-         blockingMode = BlockingMode.ABORT;
-   }
-
-   public ThreadPool getInstance()
-   {
-      return this;
-   }
-
-   public void stop()
-   {
-      stop(false);
-   }
-
-   // Object overrides ----------------------------------------------
-
-   public String toString()
-   {
-      return name + '(' + poolNumber + ')';
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   /**
-    * Execute a task on the same thread
-    *
-    * @param wrapper the task wrapper
-    */
-   protected void executeOnThread(TaskWrapper wrapper)
-   {
-      if( trace )
-         log.trace("executeOnThread, wrapper="+wrapper);
-      wrapper.run();
-   }
-
-   /**
-    * Execute a task
-    *
-    * @param wrapper the task wrapper
-    */
-   protected void execute(TaskWrapper wrapper)
-   {
-      if( trace )
-         log.trace("execute, wrapper="+wrapper);
-      try
-      {
-         executor.execute(wrapper);
-      }
-      catch (Throwable t)
-      {
-         wrapper.rejectTask(new ThreadPoolFullException(t.toString()));
-      }
-   }
-
-   /**
-    * Wait for a task
-    *
-    * @param wrapper the task wrapper
-    */
-   protected void waitForTask(TaskWrapper wrapper)
-   {
-      wrapper.waitForTask();
-   }
-
-   /**
-    * Used to lazily create the task completion timeout thread and monitor
-    */ 
-   protected synchronized void checkTimeoutMonitor()
-   {
-      if( timeoutTask == null )
-         timeoutTask = new TimeoutMonitor(name, log);      
-   }
-   protected TimeoutInfo getNextTimeout()
-   {
-      TimeoutInfo info = (TimeoutInfo) this.tasksWithTimeouts.extract();
-      return info;
-   }
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-
-   /**
-    * A factory for threads
-    */
-   private class ThreadPoolThreadFactory implements ThreadFactory
-   {
-      public Thread newThread(Runnable runnable)
-      {
-         String threadName = BasicThreadPool.this.toString() + "-" + lastThreadNumber.increment();
-         Thread thread = new Thread(threadGroup, runnable, threadName);
-         thread.setDaemon(true);
-         return thread;
-      }
-   }
-
-   /** An encapsulation of a task and its completion timeout
-    */ 
-   private static class TimeoutInfo implements Comparable
-   {
-      long start;
-      long timeoutMS;
-      TaskWrapper wrapper;
-      boolean firstStop;
-      TimeoutInfo(TaskWrapper wrapper, long timeout)
-      {
-         this.start = System.currentTimeMillis();
-         this.timeoutMS = start + timeout;
-         this.wrapper = wrapper;
-      }
-      public void setTimeout(long timeout)
-      {
-         this.start = System.currentTimeMillis();
-         this.timeoutMS = start + timeout;         
-      }
-      /** Order TimeoutInfo based on the timestamp at which the task needs to
-       * be completed by.
-       * @param o a TimeoutInfo
-       * @return the diff between this timeoutMS and the argument timeoutMS
-       */ 
-      public int compareTo(Object o)
-      {
-         TimeoutInfo ti = (TimeoutInfo) o;
-         long to0 = timeoutMS;
-         long to1 = ti.timeoutMS;
-         int diff = (int) (to0 - to1);
-         return diff;
-      }
-      TaskWrapper getTaskWrapper()
-      {
-         return wrapper;
-      }
-      public long getTaskCompletionTimeout()
-      {
-         return wrapper.getTaskCompletionTimeout();
-      }
-      /** Get the time remaining to the complete timeout timestamp in MS.
-       * @param now - the current System.currentTimeMillis value
-       * @return the time remaining to the complete timeout timestamp in MS.
-       */ 
-      public long getTaskCompletionTimeout(long now)
-      {
-         return timeoutMS - now;
-      }
-      /** Invoke stopTask on the wrapper and indicate whether this was the first
-       * time the task has been notified to stop.
-       * @return true if this is the first stopTask, false on the second.
-       */ 
-      public boolean stopTask()
-      {
-         wrapper.stopTask();
-         boolean wasFirstStop = firstStop == false;
-         firstStop = true;
-         return wasFirstStop;
-      }
-   }
-   /**
-    * The monitor runnable which validates that threads are completing within
-    * the task completion timeout limits.
-    */ 
-   private class TimeoutMonitor implements Runnable
-   {
-      final Logger log;
-      TimeoutMonitor(String name, Logger log)
-      {
-         this.log = log;
-         Thread t = new Thread(this, name+" TimeoutMonitor");
-         t.setDaemon(true);
-         t.start();
-      }
-      /** The monitor thread loops until the pool is shutdown. It waits for
-       * tasks with completion timeouts and sleeps until the next completion
-       * timeout and then interrupts the associated task thread, and invokes
-       * stopTask on the TaskWrapper. A new timeout check is then inserted with
-       * a 1 second timeout to validate that the TaskWrapper has exited the
-       * run method. If it has not, then the associated task thread is stopped
-       * using the deprecated Thread.stop method since this is the only way to
-       * abort a thread that is in spin loop for example.
-       * 
-       * @todo this is not responsive to new tasks with timeouts smaller than
-       * the current shortest completion expiration. We probably should interrupt
-       * the thread on each insertion into the timeout heap to ensure better
-       * responsiveness.
-       */ 
-      public void run()
-      {
-         boolean isStopped = stopped.get();
-         while( isStopped == false )
-         {
-            boolean trace = log.isTraceEnabled();
-            try
-            {
-               TimeoutInfo info = getNextTimeout();
-               if( info != null )
-               {
-                  long now = System.currentTimeMillis();
-                  long timeToTimeout = info.getTaskCompletionTimeout(now);
-                  if( timeToTimeout > 0 )
-                  {
-                     if( trace )
-                     {
-                        log.trace("Will check wrapper="+info.getTaskWrapper()
-                           +" after "+timeToTimeout);
-                     }
-                     Thread.sleep(timeToTimeout);
-                  }
-                  // Check the status of the task
-                  TaskWrapper wrapper = info.getTaskWrapper();
-                  if( wrapper.isComplete() == false )
-                  {
-                     if( trace )
-                        log.trace("Failed completion check for wrapper="+wrapper);
-                     if( info.stopTask() == true )
-                     {
-                        // Requeue the TimeoutInfo to see that the task exits run
-                        info.setTimeout(1000);
-                        tasksWithTimeouts.insert(info);
-                        if( trace )
-                           log.trace("Rescheduled completion check for wrapper="+wrapper);
-                     }
-                  }
-               }
-               else
-               {
-                  Thread.sleep(1000);
-               }
-            }
-            catch(InterruptedException e)
-            {
-               log.debug("Timeout monitor has been interrupted", e);
-            }
-            catch(Throwable e)
-            {
-               log.debug("Timeout monitor saw unexpected error", e);               
-            }
-            isStopped = stopped.get();            
-         }
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPool.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPool.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPoolMBean.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPoolMBean.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPoolMBean.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,105 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * Management interface for the thread pool.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public interface BasicThreadPoolMBean extends ThreadPoolMBean
-{
-   // Constants -----------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   /**
-    * Get the current queue size
-   *
-    * @return the queue size
-    */
-   int getQueueSize();
-
-   /**
-    * Get the maximum queue size
-    *
-    * @return the maximum queue size
-    */
-   int getMaximumQueueSize();
-
-   /**
-    * Set the maximum queue size
-    *
-    * @param size the new maximum queue size
-    */
-   void setMaximumQueueSize(int size);
-
-   /**
-    * @return the blocking mode
-    */
-   BlockingMode getBlockingMode();
-   
-   /** Set the behavior of the pool when a task is added and the queue is full.
-    * The mode string indicates one of the following modes:
-    * abort - a RuntimeException is thrown
-    * run - the calling thread executes the task
-    * wait - the calling thread blocks until the queue has room
-    * discard - the task is silently discarded without being run
-    * discardOldest - check to see if a task is about to complete and enque
-    *    the new task if possible, else run the task in the calling thread
-    * 
-    * @param mode one of run, wait, discard, discardOldest or abort without
-    *    regard to case.
-    */ 
-   void setBlockingMode(BlockingMode mode);
-
-   /**
-    * Retrieve the thread group name
-    *
-    * @return the thread group name
-    */
-   String getThreadGroupName();
-
-   /**
-    * Set the thread group name
-    *
-    * @param threadGroupName - the thread group name
-    */
-   void setThreadGroupName(String threadGroupName);
-
-   /**
-    * Get the keep alive time
-    *
-    * @return the keep alive time
-    */
-   long getKeepAliveTime();
-
-   /**
-    * Set the keep alive time
-    *
-    * @param time the keep alive time
-    */
-   void setKeepAliveTime(long time);
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPoolMBean.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/BasicThreadPoolMBean.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BlockingMode.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/BlockingMode.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BlockingMode.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,148 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-import java.io.Serializable;
-import java.io.ObjectStreamException;
-
-/** A type-safe enum for the BasicThreadPool blocking mode.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class BlockingMode implements Serializable
-{
-   /** @since 1.0 */
-   private static final long serialVersionUID = -9102277941374138830L;
-
-   public static final int RUN_TYPE = 0;
-   public static final int WAIT_TYPE = 1;
-   public static final int DISCARD_TYPE = 2;
-   public static final int DISCARD_OLDEST_TYPE = 3;
-   public static final int ABORT_TYPE = 4;
-
-   /** Set the policy for blocked execution to be that the current thread
-      executes the command if there are no available threads in the pool.
-    */
-   public static final BlockingMode RUN = new BlockingMode("run", RUN_TYPE);
-   /** Set the policy for blocked execution to be to wait until a thread
-    * is available, unless the pool has been shut down, in which case
-    * the action is discarded.
-    */ 
-   public static final BlockingMode WAIT = new BlockingMode("wait", WAIT_TYPE);
-   /** Set the policy for blocked execution to be to return without
-    * executing the request.
-    */ 
-   public static final BlockingMode DISCARD = new BlockingMode("discard", DISCARD_TYPE);
-   /** Set the policy for blocked execution to be to discard the oldest
-    * unhandled request
-    */ 
-   public static final BlockingMode DISCARD_OLDEST =
-      new BlockingMode("discardOldest", DISCARD_OLDEST_TYPE);
-   /** Set the policy for blocked execution to be to throw an AbortWhenBlocked
-    * (a subclass of RuntimeException).
-    */
-   public static final BlockingMode ABORT = new BlockingMode("abort", ABORT_TYPE);
-
-   /** The string form of the enum */
-   private final transient String name;
-   /** The enum manifest constant */
-   private final int type;
-
-   /** A utility method to convert a string name to a BlockingMode
-    * @param name
-    * @return The associated BlockingMode constant if name is valid, null otherwise
-    */ 
-   public static final BlockingMode toBlockingMode(String name)
-   {
-      BlockingMode mode = null;
-      if( name == null )
-      {
-         mode = null;
-      }
-      else if( name.equalsIgnoreCase("run") )
-      {
-         mode = RUN;
-      }
-      else if( name.equalsIgnoreCase("wait") )
-      {
-         mode = WAIT;
-      }
-      else if( name.equalsIgnoreCase("discard") )
-      {
-         mode = DISCARD;
-      }
-      else if( name.equalsIgnoreCase("discardOldest") )
-      {
-         mode = DISCARD_OLDEST;
-      }
-      else if( name.equalsIgnoreCase("abort") )
-      {
-         mode = ABORT;
-      }
-      return mode;
-   }
-
-   private BlockingMode(String name, int type)
-   {
-      this.name = name;
-      this.type = type;
-   }
-
-   public String toString()
-   {
-      return name;
-   }
-
-   /**
-    * Overriden to return the indentity instance of BlockingMode based on the
-    * stream type int value. This ensures that BlockingMode enums can be
-    * compared using ==.
-    * 
-    * @return The BlockingMode instance for the XXX_TYPE int.
-    * @throws ObjectStreamException
-    */ 
-   Object readResolve() throws ObjectStreamException
-   {
-      // Replace the marshalled instance type with the local instance
-      BlockingMode mode = ABORT;
-      switch( type )
-      {
-         case RUN_TYPE:
-            mode = RUN;
-            break;
-         case WAIT_TYPE:
-            mode = RUN;
-            break;
-         case DISCARD_TYPE:
-            mode = RUN;
-            break;
-         case DISCARD_OLDEST_TYPE:
-            mode = RUN;
-            break;
-         case ABORT_TYPE:
-            mode = RUN;
-            break;
-      }
-      return mode;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/BlockingMode.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/BlockingMode.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/MinPooledExecutor.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/MinPooledExecutor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/MinPooledExecutor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,135 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-import EDU.oswego.cs.dl.util.concurrent.PooledExecutor;
-import EDU.oswego.cs.dl.util.concurrent.Channel;
-
-/** A pooled executor where the minimum pool size threads are kept alive. This
-is needed in order for the waitWhenBlocked option to work because of a
-race condition inside the Executor. The race condition goes something like:
-
-RT - Requesting Thread wanting to use the pool
-LT - Last Thread in the pool
-
-RT: Check there are enough free threads to process,
-   yes LT is there, so no need to create a new thread.
-LT: Times out on the keep alive, LT is destroyed.
-RT: Try to execute, blocks because there are no available threads.
-   In fact, the pool is now empty which the executor mistakenly
-   inteprets as all of them being in use.
-
-Doug Lea says he isn't going to fix. In fact, the version in j2se 
-1.5 doesn't have this option. In order for this to work, the min pool
-size must be > 0.
-
- at author Scott.Stark at jboss.org
- at author adrian at jboss.org
- at version $Revision$
- */
-public class MinPooledExecutor extends PooledExecutor
-{
-   // Constants -----------------------------------------------------
-
-
-   // Attributes ----------------------------------------------------
-
-   /** The number of threads to keep alive threads */
-   protected int keepAliveSize;
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   /**
-    * Construct a new executor
-    * 
-    * @param poolSize the maximum pool size
-    */
-   public MinPooledExecutor(int poolSize)
-   {
-      super(poolSize);
-   }
-   
-   /**
-    * Construct a new executor
-    * 
-    * @param channel the queue for any requests
-    * @param poolSize the maximum pool size
-    */
-   public MinPooledExecutor(Channel channel, int poolSize)
-   {
-      super(channel, poolSize);
-   }
-
-   // Public --------------------------------------------------------
-
-   /**
-    * @return the number of threads to keep alive
-    */
-   public int getKeepAliveSize()
-   {
-      return keepAliveSize;
-   }
-
-   /**
-    * @param keepAliveSize the number of threads to keep alive
-    */
-   public void setKeepAliveSize(int keepAliveSize)
-   {
-      this.keepAliveSize = keepAliveSize;
-   }
-
-   // PooledExecutor overrides --------------------------------------
-   
-   protected Runnable getTask() throws InterruptedException
-   {
-      Runnable task = super.getTask();
-      while (task == null && keepAlive())
-      {
-         task = super.getTask();
-      }
-      return task;
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   /**
-    * We keep alive unless we are told to shutdown
-    * or there are more than keepAliveSize threads in the pool
-    *
-    * @return whether to keep alive
-    */
-   protected synchronized boolean keepAlive()
-   {
-      if (shutdown_)
-         return false;
-
-      return poolSize_ <= keepAliveSize;
-   }
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/MinPooledExecutor.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/MinPooledExecutor.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/RunnableTaskWrapper.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/RunnableTaskWrapper.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/RunnableTaskWrapper.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,166 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-import org.jboss.logging.Logger;
-
-/**
- * Makes a runnable a task.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public class RunnableTaskWrapper implements TaskWrapper
-{
-   // Constants -----------------------------------------------------
-
-   /** The log */
-   private static final Logger log = Logger.getLogger(RunnableTaskWrapper.class);
-
-   // Attributes ----------------------------------------------------
-
-   /** The runnable */
-   private Runnable runnable;
-   private boolean started;
-   private Thread runThread;
-   /** The start timeout */
-   private long startTimeout;
-   /** The completion timeout */
-   private long completionTimeout;
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   /**
-    * Create a new RunnableTaskWrapper
-    *
-    * @param runnable the runnable
-    * @throws IllegalArgumentException for a null runnable
-    */
-   public RunnableTaskWrapper(Runnable runnable)
-   {
-      this(runnable, 0, 0);
-   }
-   public RunnableTaskWrapper(Runnable runnable, long startTimeout, long completeTimeout)
-   {
-      if (runnable == null)
-         throw new IllegalArgumentException("Null runnable");
-      this.runnable = runnable;
-      this.startTimeout = startTimeout;
-      this.completionTimeout = completeTimeout;
-   }
-
-   // Public --------------------------------------------------------
-
-   // TaskWrapper implementation ---------------------------------------
-
-   public int getTaskWaitType()
-   {
-      return Task.WAIT_NONE;
-   }
-
-   public int getTaskPriority()
-   {
-      return Thread.NORM_PRIORITY;
-   }
-
-   public long getTaskStartTimeout()
-   {
-      return startTimeout;
-   }
-
-   public long getTaskCompletionTimeout()
-   {
-      return completionTimeout;
-   }
-
-   public void acceptTask()
-   {
-      // Nothing to do
-   }
-
-   public void rejectTask(RuntimeException t)
-   {
-      throw t;
-   }
-
-   public void stopTask()
-   {
-      boolean trace = log.isTraceEnabled();
-      // Interrupt the run thread if its not null
-      if( runThread != null && runThread.isInterrupted() == false )
-      {
-         runThread.interrupt();
-         if( trace )
-            log.trace("stopTask, interrupted thread="+runThread);
-      }
-      else if( runThread != null )
-      {
-         /* If the thread has not been returned after being interrupted, then
-         use the deprecated stop method to try to force the thread abort.
-         */
-         runThread.stop();
-         if( trace )
-            log.trace("stopTask, stopped thread="+runThread);
-      }
-   }
-
-   public void waitForTask()
-   {
-      // Nothing to do
-   }
-
-   public boolean isComplete()
-   {
-      return started == true && runThread == null;
-   }
-   // Runnable implementation ---------------------------------------
-
-   public void run()
-   {
-      boolean trace = log.isTraceEnabled();
-      try
-      {
-         if( trace )
-            log.trace("Begin run, wrapper="+this);
-         runThread = Thread.currentThread();
-         started = true;
-         runnable.run();
-         runThread = null;
-         if( trace )
-            log.trace("End run, wrapper="+this);
-      }
-      catch (Throwable t)
-      {
-         log.warn("Unhandled throwable for runnable: " + runnable, t);
-      }
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/RunnableTaskWrapper.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/RunnableTaskWrapper.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/StartTimeoutException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/StartTimeoutException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/StartTimeoutException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,68 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * The start timeout was exceeded.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public class StartTimeoutException extends RuntimeException
-{
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   /**
-    * Create a new StartTimeoutException
-    */
-   public StartTimeoutException()
-   {
-      super();
-   }
-
-   /**
-    * Create a new StartTimeoutException
-    *
-    * @param message the message
-    */
-   public StartTimeoutException(String message)
-   {
-      super(message);
-   }
-
-   // Public --------------------------------------------------------
-
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/StartTimeoutException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/StartTimeoutException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/Task.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/Task.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/Task.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,114 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * A task for a thread pool.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public interface Task
-{
-   // Constants -----------------------------------------------------
-
-   /** Don't wait for task */
-   static final int WAIT_NONE = 0;
-
-   /** Synchronized start, wait for task to start */
-   static final int WAIT_FOR_START = 1;
-
-   /** Synchronized task, wait for task to complete */
-   static final int WAIT_FOR_COMPLETE = 2;
-
-   // Public --------------------------------------------------------
-
-   /**
-    * Get the type of wait
-    *
-    * @return the wait type
-    */
-   int getWaitType();
-
-   /**
-    * The priority of the task
-    *
-    * @return the task priority
-    */
-   int getPriority();
-
-   /**
-    * The time before the task must be accepted
-    *
-    * @return the start timeout
-    */
-   long getStartTimeout();
-
-   /**
-    * The time before the task must be completed
-    *
-    * @return the completion timeout
-    */
-   long getCompletionTimeout();
-
-   /**
-    * Execute the task
-    */
-   void execute();
-
-   /**
-    * Invoked by the threadpool when it wants to stop the task
-    */
-   void stop();
-
-   /**
-    * The task has been accepted
-    *
-    * @param time the time taken to accept the task
-    */
-   void accepted(long time);
-
-   /**
-    * The task has been rejected
-    *
-    * @param time the time taken to reject the task
-    * @param throwable any error associated with the rejection
-    */
-   void rejected(long time, Throwable t);
-
-   /**
-    * The task has been started
-    *
-    * @param time the time taken to start the task
-    */
-   void started(long time);
-
-   /**
-    * The task has been completed
-    *
-    * @param time the time taken to reject the task
-    * @param throwable any error associated with the completion
-    */
-   void completed(long time, Throwable t);
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/Task.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/Task.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskStoppedException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskStoppedException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskStoppedException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,68 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * The task was stopped.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public class TaskStoppedException extends RuntimeException
-{
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   /**
-    * Create a new TaskStoppedException
-    */
-   public TaskStoppedException()
-   {
-      super();
-   }
-
-   /**
-    * Create a new TaskStoppedException
-    *
-    * @param message the message
-    */
-   public TaskStoppedException(String message)
-   {
-      super(message);
-   }
-
-   // Public --------------------------------------------------------
-
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskStoppedException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskStoppedException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskWrapper.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskWrapper.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskWrapper.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,89 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * A task wrapper for a thread pool.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public interface TaskWrapper extends Runnable
-{
-   // Constants -----------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   /**
-    * Get the type of wait
-    *
-    * @return the wait type
-    */
-   int getTaskWaitType();
-
-   /**
-    * The priority of the task
-    *
-    * @return the task priority
-    */
-   int getTaskPriority();
-
-   /**
-    * The time before the task must be accepted
-    *
-    * @return the start timeout
-    */
-   long getTaskStartTimeout();
-
-   /**
-    * The time before the task must be completed
-    *
-    * @return the completion timeout
-    */
-   long getTaskCompletionTimeout();
-
-   /**
-    * Wait according the wait type
-    */
-   void waitForTask();
-
-   /**
-    * Invoked by the threadpool when it wants to stop the task
-    */
-   void stopTask();
-
-   /**
-    * The task has been accepted
-    *
-    */
-   void acceptTask();
-
-   /**
-    * The task has been rejected
-    *
-    * @param e any error associated with the rejection
-    */
-   void rejectTask(RuntimeException e);
-
-   // Inner classes -------------------------------------------------
-   boolean isComplete();
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskWrapper.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/TaskWrapper.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPool.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPool.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPool.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,88 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * A thread pool.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public interface ThreadPool
-{
-   // Constants -----------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   /**
-    * Stop the pool
-    *
-    * @param immediate whether to shutdown immediately
-    */
-   public void stop(boolean immediate);
-
-   /** Wait on the queued tasks to complete. This can only be called after
-    * after stop.
-    * 
-    * @throws InterruptedException
-    */ 
-   public void waitForTasks() throws InterruptedException;
-
-   /** Wait on the queued tasks to complete upto maxWaitTime milliseconds. This
-    * can only be called after after stop.
-    * 
-    * @param maxWaitTime
-    * @throws InterruptedException
-    */ 
-   public void waitForTasks(long maxWaitTime) throws InterruptedException;
-
-   /**
-    * Run a task wrapper
-    *
-    * @param wrapper the task wrapper
-    */
-   public void runTaskWrapper(TaskWrapper wrapper);
-
-   /**
-    * Run a task
-    *
-    * @param task the task
-    * @throws IllegalArgumentException for a null task
-    */
-   public void runTask(Task task);
-
-   /**
-    * Run a runnable
-    *
-    * @param runnable the runnable
-    * @throws IllegalArgumentException for a null runnable
-    */
-   public void run(Runnable runnable);
-
-   /**
-    * 
-    * @param runnable
-    * @param startTimeout
-    * @param completeTimeout
-    */ 
-   public void run(Runnable runnable, long startTimeout, long completeTimeout);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPool.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPool.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolFullException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolFullException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolFullException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,68 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * The thread pool is full.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public class ThreadPoolFullException extends RuntimeException
-{
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   /**
-    * Create a new ThreadPoolFullException
-    */
-   public ThreadPoolFullException()
-   {
-      super();
-   }
-
-   /**
-    * Create a new ThreadPoolFullException
-    *
-    * @param message the message
-    */
-   public ThreadPoolFullException(String message)
-   {
-      super(message);
-   }
-
-   // Public --------------------------------------------------------
-
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolFullException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolFullException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolMBean.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolMBean.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolMBean.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,96 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * Management interface for the thread pool.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public interface ThreadPoolMBean
-{
-   // Constants -----------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   /**
-    * Get the thread pool name
-    *
-    * @return the thread pool name
-    */
-   String getName();
-
-   /**
-    * Set the thread pool name
-    *
-    * @param name the name
-    */
-   void setName(String name);
-
-   /**
-    * Get the internal pool number
-    *
-    * @return the internal pool number
-    */
-   int getPoolNumber();
-
-   /**
-    * Get the minimum pool size
-    *
-    * @return the minimum pool size
-    */
-   int getMinimumPoolSize();
-
-   /**
-    * Set the minimum pool size
-    *
-    * @param size the minimum pool size
-    */
-   void setMinimumPoolSize(int size);
-
-   /**
-    * Get the maximum pool size
-    *
-    * @return the maximum pool size
-    */
-   int getMaximumPoolSize();
-
-   /**
-    * Set the maximum pool size
-    *
-    * @param size the maximum pool size
-    */
-   void setMaximumPoolSize(int size);
-
-   /**
-    * Get the instance
-    */
-   ThreadPool getInstance();
-
-   /**
-    * Stop the thread pool
-    */
-   void stop();
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolMBean.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolMBean.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolStoppedException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolStoppedException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolStoppedException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,68 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.threadpool;
-
-/**
- * The thread pool was stopped.
- *
- * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
- * @version $Revision$
- */
-public class ThreadPoolStoppedException extends RuntimeException
-{
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   /**
-    * Create a new ThreadPoolStoppedException
-    */
-   public ThreadPoolStoppedException()
-   {
-      super();
-   }
-
-   /**
-    * Create a new ThreadPoolStoppedException
-    *
-    * @param message the message
-    */
-   public ThreadPoolStoppedException(String message)
-   {
-      super(message);
-   }
-
-   // Public --------------------------------------------------------
-
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolStoppedException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/threadpool/ThreadPoolStoppedException.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,757 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.timeout;
-
-import org.jboss.util.JBossStringBuilder;
-
-import EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean;
-
-/**
- * HashedTimeoutPriorityQueueImpl.
- *
- *  This is a balanced binary tree. If nonempty, the root is at index 1,
- *  and all nodes are at indices 1..size. Nodes with index greater than
- *  size are null. Index 0 is never used.
- *  Children of the node at index <code>j</code> are at <code>j*2</code>
- *  and <code>j*2+1</code>. The children of a node always fire the timeout
- *  no earlier than the node.
- *
- *
- *  Or, more formally:
- *
- *  Only indices <code>1</code>..<code>size</code> of this array are used.
- *  All other indices contain the null reference.
- *  This array represent a balanced binary tree.
- *
- *  If <code>size</code> is <code>0</code> the tree is empty, otherwise
- *  the root of the tree is at index <code>1</code>.
- *
- *  Given an arbitrary node at index <code>n</code> that is not the root
- *  node, the parent node of <code>n</code> is at index <code>n/2</code>.
- *
- *  Given an arbitrary node at index <code>n</code>; if
- *  <code>2*n <= size</code> the node at <code>n</code> has its left child
- *  at index <code>2*n</code>, otherwise the node at <code>n</code> has
- *  no left child.
- *
- *  Given an arbitrary node at index <code>n</code>; if
- *  <code>2*n+1 <= size</code> the node at <code>n</code> has its right child
- *  at index <code>2*n+1</code>, otherwise the node at <code>n</code> has
- *  no right child.
- *
- *  The priority function is called T. Given a node <code>n</code>,
- *  <code>T(n)</code> denotes the absolute time (in milliseconds since
- *  the epoch) that the timeout for node <code>n</code> should happen.
- *  Smaller values of <code>T</code> means higher priority.
- *
- *  The tree satisfies the following invariant:
- *  <i>
- *  For any node <code>n</code> in the tree:
- *  If node <code>n</code> has a left child <code>l</code>,
- *  <code>T(n) <= T(l)</code>.
- *  If node <code>n</code> has a right child <code>r</code>,
- *  <code>T(n) <= T(r)</code>.
- *  </i>
- *
- *
- *  The invariant may be temporarily broken while executing synchronized
- *  on <code>this</code> instance, but is always reestablished before
- *  leaving the synchronized code.
- *
- *  The node at index <code>1</code> is always the first node to timeout,
- *  as can be deduced from the invariant.
- *
- *  For the following algorithm pseudocode, the operation
- *  <code>swap(n,m)</code> denotes the exchange of the nodes at indices
- *  <code>n</code> and <code>m</code> in the tree.
- *
- *  Insertion of a new node happend as follows:
- *  <pre>
- *    IF size = q.length THEN
- *      "expand q array to be larger";
- *    ENDIF
- *    size <- size + 1;
- *    q[size] <- "new node";
- *    n <- size;
- *    WHILE n > 1 AND T(n/2) > T(n) DO
- *      swap(n/2, n);
- *      n <- n/2;
- *    ENDWHILE
- *  </pre>
- *  Proof that this insertion algorithm respects the invariant is left to
- *  the interested reader.
- *
- *  The removal algorithm is a bit more complicated. To remove the node
- *  at index <code>n</code>:
- *  <pre>
- *    swap(n, size);
- *    size <- size - 1;
- *    IF n > 1 AND T(n/2) > T(n) THEN
- *      WHILE n > 1 AND T(n/2) > T(n) DO
- *        swap(n/2, n);
- *        n <- n/2;
- *      ENDWHILE
- *    ELSE
- *      WHILE 2*n <= size DO
- *        IF 2*n+1 <= size THEN
- *          // Both children present
- *          IF T(2*n) <= T(2*n+1) THEN
- *            IF T(n) <= T(2*n) THEN
- *              EXIT;
- *            ENDIF
- *            swap(n, 2*n);
- *            n <- 2*n;
- *          ELSE
- *            IF T(n) <= T(2*n+1) THEN
- *              EXIT;
- *            ENDIF
- *            swap(n, 2*n+1);
- *            n <- 2*n+1;
- *          ENDIF
- *        ELSE
- *          // Only left child, right child not present.
- *          IF T(n) <= T(2*n) THEN
- *            EXIT;
- *          ENDIF
- *          swap(n, 2*n);
- *          n <- 2*n;
- *        ENDIF
- *      ENDWHILE
- *    ENDIF
- *  </pre>
- *  Proof that this removal algorithm respects the invariant is left to
- *  the interested reader. Really, I am not going to prove it here.
- *
- *  If you are interested, you can find this data structure and its
- *  associated operations in most textbooks on algorithmics.
- *
- *  @see checkTree
- * 
- * @author <a href="osh at sparre.dk">Ole Husgaard</a>
- * @author <a href="dimitris at jboss.org">Dimitris Andreadis</a>
- * @author <a href="genman at maison-otaku.net">Elias Ross</a>  
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class HashedTimeoutPriorityQueueImpl implements TimeoutPriorityQueue
-{
-   //  Code commented out with the mark "INV:" are runtime checks
-   //  of invariants that are not needed for a production system.
-   //  For problem solving, you can remove these comments.
-   //  Multithreading notes:
-   //
-   //  While a TimeoutImpl is enqueued, its index field contains the index
-   //  of the instance in the queue; that is, for 1 <= n <= size,
-   //  q[n].index = n.
-   //  Modifications of an enqueued TimeoutImpl instance may only happen
-   //  in code synchronized on the TimeoutFactory instance that has it
-   //  enqueued.
-   //  Modifications on the priority queue may only happen while running in
-   //  code synchronized on the TimeoutFactory instance that holds the queue.
-   //  When a TimeoutImpl instance is no longer enqueued, its index field
-   //  changes to one of the negative constants declared in the TimeoutImpl
-   //  class.
-   //
-   //  Cancellation may race with the timeout.
-   //  To avoid problems with this, the TimeoutImpl index field is set to
-   //  TimeoutImpl.TIMEOUT when the TimeoutImpl is taken out of the queue.
-   //  Finally the index field is set to TimeoutImpl.DONE, and
-   //  the TimeoutImpl instance is discarded.
-
-   /** The lock object */
-   private Object topLock = new Object();
-
-   /** The top element */
-   private TimeoutExtImpl top;
-   
-   /** The hashed queues */
-   private InternalPriorityQueue[] queues;
-
-   private SynchronizedBoolean cancelled = new SynchronizedBoolean(false);
-   
-   /**
-    * Create a new TimeoutPriorityQueueImpl.
-    */
-   public HashedTimeoutPriorityQueueImpl()
-   {
-      queues = new InternalPriorityQueue[40];
-      for (int i = 0; i < queues.length; ++ i)
-         queues[i] = new InternalPriorityQueue();
-   }
-
-   public TimeoutExt offer(long time, TimeoutTarget target)
-   {
-      if (cancelled.get())
-         throw new IllegalStateException("TimeoutPriorityQueue has been cancelled");
-      if (time < 0)
-         throw new IllegalArgumentException("Negative time");
-      if (target == null)
-         throw new IllegalArgumentException("Null timeout target");
-
-      TimeoutExtImpl timeout = new TimeoutExtImpl();
-      timeout.time = time;
-      timeout.target = target;
-      int index = timeout.hashCode() % queues.length;
-      return queues[index].offer(timeout);
-   }
-
-   public TimeoutExt take()
-   {
-      return poll(-1);
-   }
-
-   public TimeoutExt poll()
-   {
-      return poll(1);
-   }
-   
-   public TimeoutExt poll(long wait)
-   {
-      long endWait = -1;
-      if (wait > 0)
-         endWait = System.currentTimeMillis() + wait;
-      // Look for work
-      synchronized (topLock)
-      {
-         while (cancelled.get() == false && (wait >= 0 || endWait == -1))
-         {
-            if (top == null)
-            {
-               try
-               {
-                  if (endWait == -1)
-                     topLock.wait();
-                  else
-                     topLock.wait(wait);
-               }
-               catch (InterruptedException ex)
-               {
-               }
-            }
-            else
-            {
-               long now = System.currentTimeMillis();
-               if (top.time > now)
-               {
-                  long waitForFirst = top.time - now;
-                  if (endWait != -1 && waitForFirst > wait)
-                     waitForFirst = wait;
-                  try
-                  {
-                     topLock.wait(waitForFirst);
-                  }
-                  catch (InterruptedException ex)
-                  {
-                  }
-               }
-               if (cancelled.get() == false && top != null && top.time <= System.currentTimeMillis())
-               {
-                  TimeoutExtImpl result = top;
-                  result.queue = null;
-                  result.index = TimeoutExtImpl.TIMEOUT;
-                  top = null;
-                  recalculateTop(false);
-                  return result;
-               }
-            }
-            if (endWait != -1)
-               wait = endWait - System.currentTimeMillis();
-         }
-      }
-      return null;
-   }
-   
-   public TimeoutExt peek()
-   {
-      synchronized (topLock)
-      {
-         return top;
-      }
-   }
-
-   public boolean remove(TimeoutExt timeout)
-   {
-      TimeoutExtImpl timeoutImpl = (TimeoutExtImpl) timeout;
-      
-      // Fast way of doing it
-      InternalPriorityQueue queue = timeoutImpl.queue;
-      if (queue != null && queue.remove(timeoutImpl))
-         return true;
-
-      synchronized (topLock)
-      {
-         // Check the top element
-         if (top == timeout)
-         {
-            top.done();
-            top = null;
-            recalculateTop(true);
-            return true;
-         }
-         
-         // Double check, it might have been the top then
-         // just got moved back into the queue
-         queue = timeoutImpl.queue;
-         if (queue != null)
-            return queue.remove(timeoutImpl);
-      }
-      return false;
-   }
-
-   public void clear()
-   {
-      synchronized (topLock)
-      {
-         if (cancelled.get())
-            return;
-         
-         // cleanup queues
-         for (int i = 1; i < queues.length; ++i)
-            queues[i].clear();
-
-         // cleanup the top
-         top = cleanupTimeoutExtImpl(top);
-      }
-   }
-
-   public void cancel()
-   {
-      synchronized (topLock)
-      {
-         if (cancelled.get())
-            return;
-
-         clear();
-         topLock.notifyAll();
-      }
-   }
-
-   public int size()
-   {
-      int size = 0; 
-      if (top != null)
-         size =1;
-      for (int i = 0; i < queues.length; ++i)
-         size += queues[i].size();
-      return size;
-   }
-   
-   /**
-    * Whether the queue is cancelled
-    * 
-    * @return true when cancelled
-    */
-   public boolean isCancelled()
-   {
-      return cancelled.get();
-   }
-
-   private void recalculateTop(boolean notify)
-   {
-      for (int i = 0; i < queues.length; ++i)
-         queues[i].compareAndSwapWithTop(notify);
-   }
-
-   /**
-    * Recursive cleanup of a TimeoutImpl
-    * 
-    * @return null
-    */
-   private TimeoutExtImpl cleanupTimeoutExtImpl(TimeoutExtImpl timeout)
-   {
-      if (timeout != null)
-         timeout.target = null;
-      return null;
-   }
-
-   /**
-    * Debugging helper.
-    */
-   private void assertExpr(boolean expr)
-   {
-      if (!expr)
-         throw new IllegalStateException("***** assert failed *****");
-   }
-
-   /**
-    * Internal priority queue
-    */
-   private class InternalPriorityQueue
-   {
-      /** The lock object */
-      private Object lock = new Object();
-
-      /** The size of the timeout queue. */
-      private int size;
-
-      /** The timeouts */
-      private TimeoutExtImpl[] queue;
-
-      /**
-       * Create a new InternalPriorityQueue.
-       */
-      InternalPriorityQueue()
-      {
-         queue = new TimeoutExtImpl[16];
-         size = 0;
-      }
-
-      TimeoutExt offer(TimeoutExtImpl timeout)
-      {
-         boolean checkTop = false;
-         synchronized (lock)
-         {
-            // INV: checkTree();
-            // INV: assertExpr(size < queue.length);
-            if (++size == queue.length)
-            {
-               TimeoutExtImpl[] newQ = new TimeoutExtImpl[2 * queue.length];
-               System.arraycopy(queue, 0, newQ, 0, queue.length);
-               queue = newQ;
-            }
-            // INV: assertExpr(size < queue.length);
-            // INV: assertExpr(queue[size] == null);
-            queue[size] = timeout;
-            timeout.queue = this;
-            timeout.index = size;
-            normalizeUp(size);
-            if (timeout.index == 1)
-               checkTop = true;
-            // INV: checkTree();
-         }
-         if (checkTop)
-         {
-            synchronized (topLock)
-            {
-               compareAndSwapWithTop(true);
-            }
-         }
-         return timeout;
-      }
-
-      boolean compareAndSwapWithTop(boolean notify)
-      {
-         synchronized (lock)
-         {
-            if (size == 0)
-               return false;
-
-            if (top == null)
-            {
-               top = removeNode(1);
-               top.queue = null;
-               top.index = TimeoutExtImpl.TOP;
-               if (notify)
-                  topLock.notify();
-               return top != null;
-            }
-            
-            if (top.time > queue[1].time)
-            {
-               TimeoutExtImpl temp = top;
-               top = queue[1];
-               top.queue = null;
-               top.index = TimeoutExtImpl.TOP;
-               queue[1] = temp;
-               temp.queue = this;
-               temp.index = 1;
-               if (size > 1)
-                  normalizeDown(1);
-               if (notify)
-                  topLock.notify();
-            }
-         }
-         return false;
-      }
-      
-      boolean remove(TimeoutExt timeout)
-      {
-         synchronized (lock)
-         {
-            TimeoutExtImpl timeoutImpl = (TimeoutExtImpl) timeout;
-            if (timeoutImpl.queue == this && timeoutImpl.index > 0)
-            {
-               // Active timeout, remove it.
-               // INV: assertExpr(queue[timeoutImpl.index] == timeout);
-               // INV: checkTree();
-               removeNode(timeoutImpl.index);
-               // INV: checkTree();
-               timeoutImpl.queue = null;
-               timeoutImpl.index = TimeoutExtImpl.DONE;
-
-               // execution cancelled
-               return true;
-            }
-            else
-            {
-               // has already been executed (DONE) or
-               // is currently executing (TIMEOUT)
-               return false;
-            }
-         }
-      }
-
-      public void clear()
-      {
-         synchronized (lock)
-         {
-            if (cancelled.get())
-               return;
-
-            // cleanup queue
-            for (int i = 1; i <= size; ++i)
-               queue[i] = cleanupTimeoutExtImpl(queue[i]);
-         }
-      }
-
-      public void cancel()
-      {
-         synchronized (lock)
-         {
-            if (cancelled.get())
-               return;
-            clear();
-         }
-      }
-
-      public int size()
-      {
-         return size;
-      }
-
-      /**
-       *  A new node has been added at index <code>index</code>.
-       *  Normalize the tree by moving the new node up the tree.
-       *
-       *  @return true if the tree was modified.
-       */
-      private boolean normalizeUp(int index)
-      {
-         // INV: assertExpr(index > 0);
-         // INV: assertExpr(index <= size);
-         // INV: assertExpr(queue[index] != null);
-         if (index == 1)
-            return false; // at root
-         boolean ret = false;
-         long t = queue[index].time;
-         int p = index >> 1;
-         while (queue[p].time > t)
-         {
-            // INV: assertExpr(queue[index].time == t);
-            swap(p, index);
-            ret = true;
-            if (p == 1)
-               break; // at root
-            index = p;
-            p >>= 1;
-         }
-         return ret;
-      }
-      
-      void normalizeDown(int index)
-      {
-         long t = queue[index].time;
-         int c = index << 1;
-         while (c <= size)
-         {
-            // INV: assertExpr(q[index].time == t);
-            TimeoutExtImpl l = queue[c];
-            // INV: assertExpr(l != null);
-            // INV: assertExpr(l.index == c);
-            if (c + 1 <= size)
-            {
-               // two children, swap with smallest
-               TimeoutExtImpl r = queue[c + 1];
-               // INV: assertExpr(r != null);
-               // INV: assertExpr(r.index == c+1);
-               if (l.time <= r.time)
-               {
-                  if (t <= l.time)
-                     break; // done
-                  swap(index, c);
-                  index = c;
-               }
-               else
-               {
-                  if (t <= r.time)
-                     break; // done
-                  swap(index, c + 1);
-                  index = c + 1;
-               }
-            }
-            else
-            { // one child
-               if (t <= l.time)
-                  break; // done
-               swap(index, c);
-               index = c;
-            }
-            c = index << 1;
-         }
-      }
-
-      /**
-       * Swap two nodes in the tree.
-       * 
-       * @param a the first index
-       * @param b the second index
-       */
-      private void swap(int a, int b)
-      {
-         // INV: assertExpr(a > 0);
-         // INV: assertExpr(a <= size);
-         // INV: assertExpr(b > 0);
-         // INV: assertExpr(b <= size);
-         // INV: assertExpr(queue[a] != null);
-         // INV: assertExpr(queue[b] != null);
-         // INV: assertExpr(queue[a].index == a);
-         // INV: assertExpr(queue[b].index == b);
-         TimeoutExtImpl temp = queue[a];
-         queue[a] = queue[b];
-         queue[a].index = a;
-         queue[b] = temp;
-         queue[b].index = b;
-      }
-
-      /**
-       * Remove a node from the tree and normalize.
-       *
-       * @param index the index in the queue
-       * @return the removed node.
-       */
-      private TimeoutExtImpl removeNode(int index)
-      {
-         // INV: assertExpr(index > 0);
-         // INV: assertExpr(index <= size);
-         TimeoutExtImpl res = queue[index];
-         // INV: assertExpr(res != null);
-         // INV: assertExpr(res.index == index);
-         if (index == size)
-         {
-            --size;
-            queue[index] = null;
-            return res;
-         }
-         swap(index, size); // Exchange removed node with last leaf node
-         --size;
-         // INV: assertExpr(res.index == size + 1);
-         queue[res.index] = null;
-         if (normalizeUp(index))
-            return res; // Node moved up, so it shouldn't move down
-         normalizeDown(index);
-         return res;
-      }
-
-      /**
-       * Check invariants of the queue.
-       */
-      void checkTree()
-      {
-         assertExpr(size >= 0);
-         assertExpr(size < queue.length);
-         assertExpr(queue[0] == null);
-         if (size > 0)
-         {
-            assertExpr(queue[1] != null);
-            assertExpr(queue[1].index == 1);
-            assertExpr(queue[1].queue == this);
-            for (int i = 2; i <= size; ++i)
-            {
-               assertExpr(queue[i] != null);
-               assertExpr(queue[i].index == i);
-               assertExpr(queue[i].queue == this);
-               assertExpr(queue[i >> 1].time <= queue[i].time); // parent fires first
-            }
-            for (int i = size + 1; i < queue.length; ++i)
-               assertExpr(queue[i] == null);
-         }
-      }
-      
-   }
-   
-   /**
-    *  Our private Timeout implementation.
-    */
-   private class TimeoutExtImpl implements TimeoutExt
-   {
-      /** Top */
-      static final int TOP = 0;
-
-      /** Done */
-      static final int DONE = -1;
-
-      /** In timeout */
-      static final int TIMEOUT = -2;
-
-      /** The internal priority queue */
-      InternalPriorityQueue queue;
-      
-      /** Index in the queue */
-      int index;
-
-      /** Time of the timeout */
-      long time;
-
-      /** The timeout target */
-      TimeoutTarget target;
-
-      public long getTime()
-      {
-         return time;
-      }
-
-      public TimeoutTarget getTimeoutTarget()
-      {
-         return target;
-      }
-
-      public void done()
-      {
-         queue = null;
-         index = DONE;
-      }
-      
-      public boolean cancel()
-      {
-         return remove(this);
-      }
-   }
-   
-   public String dump()
-   {
-      JBossStringBuilder buffer = new JBossStringBuilder();
-      buffer.append("TOP=");
-      if (top == null)
-         buffer.append("null");
-      else
-         buffer.append(top.time);
-      buffer.append(" size=").append(size()).append('\n');
-      for (int i = 0; i < queues.length; ++i)
-      {
-         buffer.append(i).append("=");
-         for (int j = 1; j <= queues[i].size; ++j)
-            buffer.append(queues[i].queue[j].time).append(',');
-         buffer.append('\n');
-      }
-      return buffer.toString();
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/HashedTimeoutPriorityQueueImpl.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/Timeout.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/Timeout.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/Timeout.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.timeout;
-
-/**
- * The public interface of timeouts.
- *   
- * @author <a href="osh at sparre.dk">Ole Husgaard</a>
- * @version $Revision$
-*/
-public interface Timeout
-{
-   /**
-    * Cancel this timeout.
-    *
-    * It is guaranteed that on return from this method this timer is
-    * no longer active. This means that either it has been cancelled and
-    * the timeout will not happen, or (in case of late cancel) the
-    * timeout has happened and the timeout callback function has returned.
-    *
-    * On return from this method this instance should no longer be
-    * used. The reason for this is that an implementation may reuse
-    * cancelled timeouts, and at return the instance may already be
-    * in use for another timeout.
-    */
-   public boolean cancel();
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/Timeout.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/Timeout.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutExt.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutExt.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutExt.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,48 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.util.timeout;
-
-/**
- * Timeout Extension.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public interface TimeoutExt extends Timeout
-{
-   /**
-    * Get the target of this timeout
-    * 
-    * @return the target
-    */
-   TimeoutTarget getTimeoutTarget();
-   
-   /**
-    * Get the time of this timeout
-    */
-   long getTime();
-   
-   /**
-    * Mark the work as done
-    */
-   void done();
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutExt.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutExt.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutFactory.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,296 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.timeout;
-
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.util.ThrowableHandler;
-import org.jboss.util.threadpool.BasicThreadPool;
-import org.jboss.util.threadpool.BlockingMode;
-import org.jboss.util.threadpool.ThreadPool;
-
-import EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean;
-
-/**
- * The timeout factory.
- *
- * @author <a href="osh at sparre.dk">Ole Husgaard</a>
- * @author <a href="dimitris at jboss.org">Dimitris Andreadis</a>
- * @author <a href="genman at maison-otaku.net">Elias Ross</a>  
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class TimeoutFactory
-{
-   /** The priority queue property */
-   private static final String priorityQueueProperty = TimeoutPriorityQueue.class.getName();
-
-   /** The priority queue default */
-   private static final String priorityQueueName = TimeoutPriorityQueueImpl.class.getName();
-   
-   /** Our singleton instance */
-   private static TimeoutFactory singleton;
-   
-   /** Number of TimeoutFactories created */
-   private static int timeoutFactoriesCount = 0;
-   
-   /** The priority queue class */
-   private static Class priorityQueueClass;
-   
-   /** The default threadpool used to execute timeouts */
-   private static BasicThreadPool DEFAULT_TP = new BasicThreadPool("Timeouts");
-   static
-   {
-      DEFAULT_TP.setBlockingMode(BlockingMode.RUN);
-
-      String priorityQueueClassName = priorityQueueName;
-      ClassLoader cl = TimeoutFactory.class.getClassLoader();
-      try
-      {
-         priorityQueueClassName = System.getProperty(priorityQueueProperty, priorityQueueName);
-         cl = Thread.currentThread().getContextClassLoader();
-      }
-      catch (Exception ignored)
-      {
-      }
-      
-      try
-      {
-         priorityQueueClass = cl.loadClass(priorityQueueClassName);
-      }
-      catch (Exception e)
-      {
-         throw new NestedRuntimeException(e.toString(), e);
-      }
-   }
-
-   /** Used for graceful exiting */
-   private SynchronizedBoolean cancelled = new SynchronizedBoolean(false);
-   
-   /** The daemon thread that dequeues timeouts tasks and issues
-       them for execution to the thread pool */ 
-   private Thread workerThread;
-   
-   /** Per TimeoutFactory thread pool used to execute timeouts */
-   private ThreadPool threadPool;
-   
-   /** The priority queue */
-   private TimeoutPriorityQueue queue;
-
-   /** Lazy constructions of the TimeoutFactory singleton */
-   public synchronized static TimeoutFactory getSingleton()
-   {
-      if (singleton == null)
-      {
-         singleton = new TimeoutFactory(DEFAULT_TP);
-      }
-      return singleton;
-   }
-   
-   /**
-    *  Schedules a new timeout using the singleton TimeoutFactory
-    */
-   static public Timeout createTimeout(long time, TimeoutTarget target)
-   {
-      return getSingleton().schedule(time, target);
-   }
-   
-   /**
-    * Constructs a new TimeoutFactory that uses the provided ThreadPool
-    */
-   public TimeoutFactory(ThreadPool threadPool)
-   {
-      this.threadPool = threadPool;
-      try
-      {
-         queue = (TimeoutPriorityQueue) priorityQueueClass.newInstance(); 
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("Cannot instantiate " + priorityQueueClass,e);
-      }
-      
-      // setup the workerThread
-      workerThread = new Thread("TimeoutFactory-" + timeoutFactoriesCount++)
-      {
-         public void run()
-         {
-            doWork();
-         }
-      };
-      workerThread.setDaemon(true);
-      workerThread.start();
-   }
-   
-   /**
-    * Constructs a new TimeoutFactory that uses the default thread pool
-    */
-   public TimeoutFactory()
-   {
-      this(DEFAULT_TP);
-   }
-   
-   /**
-    * Schedules a new timeout.
-    * 
-    * @param time absolute time
-    * @param target target to fire
-    */
-   public Timeout schedule(long time, TimeoutTarget target)
-   {
-      if (cancelled.get())
-         throw new IllegalStateException("TimeoutFactory has been cancelled");      
-      if (time < 0)
-         throw new IllegalArgumentException("Negative time");
-      if (target == null)
-         throw new IllegalArgumentException("Null timeout target");
-
-      return queue.offer(time, target);
-   }
-   
-   /**
-    * Schedules a new timeout.
-    * 
-    * @param time absolute time
-    * @param run runnable to run
-    */
-   public Timeout schedule(long time, Runnable run)
-   {
-      return schedule(time, new TimeoutTargetImpl(run));
-   }
-   
-   /**
-    * Cancels all submitted tasks, stops the worker
-    * thread and clean-ups everything except for the
-    * thread pool. Scheduling new timeouts after cancel
-    * is called results in a IllegalStateException.
-    */
-   public void cancel()
-   {
-      // obviously the singleton TimeoutFactory cannot
-      // be cancelled since its reference is not accessible
-      
-      // let the worker thread cleanup
-      if (cancelled.set(true) == false);
-      {
-         // Cancel the priority queue
-         queue.cancel();
-      }
-   }
-   
-   /**
-    * Returns true if the TimeoutFactory has been cancelled,
-    * false if it is operational (i.e. accepts timeout schedules).
-    */
-   public boolean isCancelled()
-   {
-      return cancelled.get();
-   }
-
-   /**
-    *  Timeout worker method.
-    */
-   private void doWork()
-   {
-      while (cancelled.get() == false)
-      {
-         TimeoutExt work = queue.take();
-         // Do work, if any
-         if (work != null)
-         {
-            // Wrap the TimeoutExt with a runnable that invokes the target callback
-            TimeoutWorker worker = new TimeoutWorker(work);
-            try
-            {
-               threadPool.run(worker);
-            }
-            catch (Throwable t)
-            {
-               // protect the worker thread from pool enqueue errors
-               ThrowableHandler.add(ThrowableHandler.Type.ERROR, t);
-            }
-            synchronized (work)
-            {
-               work.done();
-            }            
-         }
-      }
-      
-      // TimeoutFactory was cancelled
-      queue.cancel();
-   }
-   
-   /**
-    *  A runnable that fires the timeout callback
-    */
-   private static class TimeoutWorker implements Runnable
-   {
-      private TimeoutExt work;
-
-      /**
-       *  Create a new instance.
-       *
-       *  @param work The timeout that should be fired.
-       */
-      TimeoutWorker(TimeoutExt work)
-      {
-         this.work = work;
-      }
-
-      /**
-       *  Override to fire the timeout.
-       */
-      public void run()
-      {
-         try
-         {
-            work.getTimeoutTarget().timedOut(work);
-         }
-         catch (Throwable t)
-         {
-            // protect the thread pool thread from receiving this error
-            ThrowableHandler.add(ThrowableHandler.Type.ERROR, t);
-         }
-         synchronized (work)
-         {
-            work.done();
-         }
-      }
-   }
-   
-   /**
-    * Simple TimeoutTarget implementation that wraps a Runnable
-    */
-   private static class TimeoutTargetImpl implements TimeoutTarget
-   {
-      Runnable runnable;
-      
-      TimeoutTargetImpl(Runnable runnable)
-      {
-         this.runnable = runnable;
-      }
-      
-      public void timedOut(Timeout ignored)
-      {
-         runnable.run();
-      }
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutFactory.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutFactory.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueue.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueue.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueue.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,95 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.util.timeout;
-
-/**
- * TimeoutPriorityQueue.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public interface TimeoutPriorityQueue
-{
-   /**
-    * Add a timeout to the queue
-    * 
-    * @param time the time of the timeout
-    * @param target the timeout target
-    * @return timeout when it was added to the queue, false otherwise
-    */
-   TimeoutExt offer(long time, TimeoutTarget target);
-   
-   /**
-    * Take a timeout when it times out
-    * 
-    * @return the top the queue or null if the queue is cancelled
-    */
-   TimeoutExt take();
-   
-   /**
-    * Retrieves and removes the top of the queue if it times out
-    * or null if there is no such element
-    * 
-    * @return the top the queue or null if the queue is empty
-    */
-   TimeoutExt poll();
-   
-   /**
-    * Retrieves and removes the top of the queue if it times out
-    * or null if there is no such element
-    * 
-    * @param wait how to long to wait in milliseconds
-    *        if the queue is empty
-    * @return the top of the queue or null if the queue is empty
-    */
-   TimeoutExt poll(long wait);
-   
-   /**
-    * Retrieves but does not remove the top of the queue
-    * or null if there is no such element
-    * 
-    * @return the top of the queue or null if the queue is empty
-    */
-   TimeoutExt peek();
-   
-   /**
-    * Removes the passed timeout from the queue
-    * 
-    * @return true when the timeout was removed
-    */
-   boolean remove(TimeoutExt timeout);
-   
-   /**
-    * Clears the queue
-    */
-   void clear();
-   
-   /**
-    * Cancels the queue
-    */
-   void cancel();
-   
-   /**
-    * The size of the queue
-    */
-   int size();
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueue.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueue.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueueImpl.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueueImpl.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueueImpl.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,571 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.timeout;
-
-/**
- * TimeoutPriorityQueueImpl.
- *
- *  This is a balanced binary tree. If nonempty, the root is at index 1,
- *  and all nodes are at indices 1..size. Nodes with index greater than
- *  size are null. Index 0 is never used.
- *  Children of the node at index <code>j</code> are at <code>j*2</code>
- *  and <code>j*2+1</code>. The children of a node always fire the timeout
- *  no earlier than the node.
- *
- *
- *  Or, more formally:
- *
- *  Only indices <code>1</code>..<code>size</code> of this array are used.
- *  All other indices contain the null reference.
- *  This array represent a balanced binary tree.
- *
- *  If <code>size</code> is <code>0</code> the tree is empty, otherwise
- *  the root of the tree is at index <code>1</code>.
- *
- *  Given an arbitrary node at index <code>n</code> that is not the root
- *  node, the parent node of <code>n</code> is at index <code>n/2</code>.
- *
- *  Given an arbitrary node at index <code>n</code>; if
- *  <code>2*n <= size</code> the node at <code>n</code> has its left child
- *  at index <code>2*n</code>, otherwise the node at <code>n</code> has
- *  no left child.
- *
- *  Given an arbitrary node at index <code>n</code>; if
- *  <code>2*n+1 <= size</code> the node at <code>n</code> has its right child
- *  at index <code>2*n+1</code>, otherwise the node at <code>n</code> has
- *  no right child.
- *
- *  The priority function is called T. Given a node <code>n</code>,
- *  <code>T(n)</code> denotes the absolute time (in milliseconds since
- *  the epoch) that the timeout for node <code>n</code> should happen.
- *  Smaller values of <code>T</code> means higher priority.
- *
- *  The tree satisfies the following invariant:
- *  <i>
- *  For any node <code>n</code> in the tree:
- *  If node <code>n</code> has a left child <code>l</code>,
- *  <code>T(n) <= T(l)</code>.
- *  If node <code>n</code> has a right child <code>r</code>,
- *  <code>T(n) <= T(r)</code>.
- *  </i>
- *
- *
- *  The invariant may be temporarily broken while executing synchronized
- *  on <code>this</code> instance, but is always reestablished before
- *  leaving the synchronized code.
- *
- *  The node at index <code>1</code> is always the first node to timeout,
- *  as can be deduced from the invariant.
- *
- *  For the following algorithm pseudocode, the operation
- *  <code>swap(n,m)</code> denotes the exchange of the nodes at indices
- *  <code>n</code> and <code>m</code> in the tree.
- *
- *  Insertion of a new node happend as follows:
- *  <pre>
- *    IF size = q.length THEN
- *      "expand q array to be larger";
- *    ENDIF
- *    size <- size + 1;
- *    q[size] <- "new node";
- *    n <- size;
- *    WHILE n > 1 AND T(n/2) > T(n) DO
- *      swap(n/2, n);
- *      n <- n/2;
- *    ENDWHILE
- *  </pre>
- *  Proof that this insertion algorithm respects the invariant is left to
- *  the interested reader.
- *
- *  The removal algorithm is a bit more complicated. To remove the node
- *  at index <code>n</code>:
- *  <pre>
- *    swap(n, size);
- *    size <- size - 1;
- *    IF n > 1 AND T(n/2) > T(n) THEN
- *      WHILE n > 1 AND T(n/2) > T(n) DO
- *        swap(n/2, n);
- *        n <- n/2;
- *      ENDWHILE
- *    ELSE
- *      WHILE 2*n <= size DO
- *        IF 2*n+1 <= size THEN
- *          // Both children present
- *          IF T(2*n) <= T(2*n+1) THEN
- *            IF T(n) <= T(2*n) THEN
- *              EXIT;
- *            ENDIF
- *            swap(n, 2*n);
- *            n <- 2*n;
- *          ELSE
- *            IF T(n) <= T(2*n+1) THEN
- *              EXIT;
- *            ENDIF
- *            swap(n, 2*n+1);
- *            n <- 2*n+1;
- *          ENDIF
- *        ELSE
- *          // Only left child, right child not present.
- *          IF T(n) <= T(2*n) THEN
- *            EXIT;
- *          ENDIF
- *          swap(n, 2*n);
- *          n <- 2*n;
- *        ENDIF
- *      ENDWHILE
- *    ENDIF
- *  </pre>
- *  Proof that this removal algorithm respects the invariant is left to
- *  the interested reader. Really, I am not going to prove it here.
- *
- *  If you are interested, you can find this data structure and its
- *  associated operations in most textbooks on algorithmics.
- *
- *  @see checkTree
- * 
- * @author <a href="osh at sparre.dk">Ole Husgaard</a>
- * @author <a href="dimitris at jboss.org">Dimitris Andreadis</a>
- * @author <a href="genman at maison-otaku.net">Elias Ross</a>  
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class TimeoutPriorityQueueImpl implements TimeoutPriorityQueue
-{
-   //  Code commented out with the mark "INV:" are runtime checks
-   //  of invariants that are not needed for a production system.
-   //  For problem solving, you can remove these comments.
-   //  Multithreading notes:
-   //
-   //  While a TimeoutImpl is enqueued, its index field contains the index
-   //  of the instance in the queue; that is, for 1 <= n <= size,
-   //  q[n].index = n.
-   //  Modifications of an enqueued TimeoutImpl instance may only happen
-   //  in code synchronized on the TimeoutFactory instance that has it
-   //  enqueued.
-   //  Modifications on the priority queue may only happen while running in
-   //  code synchronized on the TimeoutFactory instance that holds the queue.
-   //  When a TimeoutImpl instance is no longer enqueued, its index field
-   //  changes to one of the negative constants declared in the TimeoutImpl
-   //  class.
-   //
-   //  Cancellation may race with the timeout.
-   //  To avoid problems with this, the TimeoutImpl index field is set to
-   //  TimeoutImpl.TIMEOUT when the TimeoutImpl is taken out of the queue.
-   //  Finally the index field is set to TimeoutImpl.DONE, and
-   //  the TimeoutImpl instance is discarded.
-
-   /** The lock object */
-   private Object lock = new Object();
-
-   /** The size of the timeout queue. */
-   private int size;
-
-   /** The timeouts */
-   private TimeoutExtImpl[] queue;
-
-   /**
-    * Create a new TimeoutPriorityQueueImpl.
-    */
-   public TimeoutPriorityQueueImpl()
-   {
-      queue = new TimeoutExtImpl[16];
-      size = 0;
-   }
-
-   public TimeoutExt offer(long time, TimeoutTarget target)
-   {
-      if (queue == null)
-         throw new IllegalStateException("TimeoutPriorityQueue has been cancelled");
-      if (time < 0)
-         throw new IllegalArgumentException("Negative time");
-      if (target == null)
-         throw new IllegalArgumentException("Null timeout target");
-
-      synchronized (lock)
-      {
-         // INV: checkTree();
-         // INV: assertExpr(size < queue.length);
-         if (++size == queue.length)
-         {
-            TimeoutExtImpl[] newQ = new TimeoutExtImpl[2 * queue.length];
-            System.arraycopy(queue, 0, newQ, 0, queue.length);
-            queue = newQ;
-         }
-         // INV: assertExpr(size < queue.length);
-         // INV: assertExpr(queue[size] == null);
-         TimeoutExtImpl timeout;
-         timeout = queue[size] = new TimeoutExtImpl();
-         timeout.index = size;
-         timeout.time = time;
-         timeout.target = target;
-         normalizeUp(size);
-         if (timeout.index == 1)
-            lock.notify();
-         // INV: checkTree();
-         return timeout;
-      }
-   }
-
-   public TimeoutExt take()
-   {
-      return poll(-1);
-   }
-
-   public TimeoutExt poll()
-   {
-      return poll(1);
-   }
-
-   public TimeoutExt poll(long wait)
-   {
-      long endWait = -1;
-      if (wait > 0)
-         endWait = System.currentTimeMillis() + wait;
-      // Look for work
-      synchronized (lock)
-      {
-         while (queue != null && (wait >= 0 || endWait == -1))
-         {
-            if (size == 0)
-            {
-               try
-               {
-                  if (endWait == -1)
-                     lock.wait();
-                  else
-                     lock.wait(wait);
-               }
-               catch (InterruptedException ex)
-               {
-               }
-            }
-            else
-            {
-               long now = System.currentTimeMillis();
-               if (queue[1].time > now)
-               {
-                  long waitForFirst = queue[1].time - now;
-                  if (endWait != -1 && waitForFirst > wait)
-                     waitForFirst = wait;
-                  try
-                  {
-                     lock.wait(waitForFirst);
-                  }
-                  catch (InterruptedException ex)
-                  {
-                  }
-               }
-               if (size > 0 && queue != null && queue[1].time <= System.currentTimeMillis())
-               {
-                  TimeoutExtImpl result = removeNode(1);
-                  result.index = TimeoutExtImpl.TIMEOUT;
-                  return result;
-               }
-            }
-            if (endWait != -1)
-               wait = endWait - System.currentTimeMillis();
-         }
-      }
-      return null;
-   }
-
-   public TimeoutExt peek()
-   {
-      synchronized (lock)
-      {
-         if (size > 0)
-            return queue[1];
-         else
-            return null;
-      }
-   }
-
-   public boolean remove(TimeoutExt timeout)
-   {
-      TimeoutExtImpl timeoutImpl = (TimeoutExtImpl) timeout;
-      synchronized (lock)
-      {
-         if (timeoutImpl.index > 0)
-         {
-            // Active timeout, remove it.
-            // INV: assertExpr(queue[timeoutImpl.index] == timeout);
-            // INV: checkTree();
-            removeNode(timeoutImpl.index);
-            // INV: checkTree();
-            timeoutImpl.index = TimeoutExtImpl.DONE;
-
-            // execution cancelled
-            return true;
-         }
-         else
-         {
-            // has already been executed (DONE) or
-            // is currently executing (TIMEOUT)
-            return false;
-         }
-      }
-   }
-
-   public void clear()
-   {
-      synchronized (lock)
-      {
-         if (queue == null)
-            return;
-
-         // cleanup queue
-         for (int i = 1; i <= size; ++i)
-            queue[i] = cleanupTimeoutExtImpl(queue[i]);
-      }
-   }
-
-   public void cancel()
-   {
-      synchronized (lock)
-      {
-         if (queue == null)
-            return;
-         clear();
-         queue = null;
-         size = 0;
-         lock.notifyAll();
-      }
-   }
-
-   public int size()
-   {
-      return size;
-   }
-   
-   /**
-    * Whether the queue is cancelled
-    * 
-    * @return true when cancelled
-    */
-   public boolean isCancelled()
-   {
-      return queue == null;
-   }
-
-   /**
-    *  A new node has been added at index <code>index</code>.
-    *  Normalize the tree by moving the new node up the tree.
-    *
-    *  @return true if the tree was modified.
-    */
-   private boolean normalizeUp(int index)
-   {
-      // INV: assertExpr(index > 0);
-      // INV: assertExpr(index <= size);
-      // INV: assertExpr(queue[index] != null);
-      if (index == 1)
-         return false; // at root
-      boolean ret = false;
-      long t = queue[index].time;
-      int p = index >> 1;
-      while (queue[p].time > t)
-      {
-         // INV: assertExpr(queue[index].time == t);
-         swap(p, index);
-         ret = true;
-         if (p == 1)
-            break; // at root
-         index = p;
-         p >>= 1;
-      }
-      return ret;
-   }
-
-   /**
-    * Swap two nodes in the tree.
-    * 
-    * @param a the first index
-    * @param b the second index
-    */
-   private void swap(int a, int b)
-   {
-      // INV: assertExpr(a > 0);
-      // INV: assertExpr(a <= size);
-      // INV: assertExpr(b > 0);
-      // INV: assertExpr(b <= size);
-      // INV: assertExpr(queue[a] != null);
-      // INV: assertExpr(queue[b] != null);
-      // INV: assertExpr(queue[a].index == a);
-      // INV: assertExpr(queue[b].index == b);
-      TimeoutExtImpl temp = queue[a];
-      queue[a] = queue[b];
-      queue[a].index = a;
-      queue[b] = temp;
-      queue[b].index = b;
-   }
-
-   /**
-    * Remove a node from the tree and normalize.
-    *
-    * @param index the index in the queue
-    * @return the removed node.
-    */
-   private TimeoutExtImpl removeNode(int index)
-   {
-      // INV: assertExpr(index > 0);
-      // INV: assertExpr(index <= size);
-      TimeoutExtImpl res = queue[index];
-      // INV: assertExpr(res != null);
-      // INV: assertExpr(res.index == index);
-      if (index == size)
-      {
-         --size;
-         queue[index] = null;
-         return res;
-      }
-      swap(index, size); // Exchange removed node with last leaf node
-      --size;
-      // INV: assertExpr(res.index == size + 1);
-      queue[res.index] = null;
-      if (normalizeUp(index))
-         return res; // Node moved up, so it shouldn't move down
-      long t = queue[index].time;
-      int c = index << 1;
-      while (c <= size)
-      {
-         // INV: assertExpr(q[index].time == t);
-         TimeoutExtImpl l = queue[c];
-         // INV: assertExpr(l != null);
-         // INV: assertExpr(l.index == c);
-         if (c + 1 <= size)
-         {
-            // two children, swap with smallest
-            TimeoutExtImpl r = queue[c + 1];
-            // INV: assertExpr(r != null);
-            // INV: assertExpr(r.index == c+1);
-            if (l.time <= r.time)
-            {
-               if (t <= l.time)
-                  break; // done
-               swap(index, c);
-               index = c;
-            }
-            else
-            {
-               if (t <= r.time)
-                  break; // done
-               swap(index, c + 1);
-               index = c + 1;
-            }
-         }
-         else
-         { // one child
-            if (t <= l.time)
-               break; // done
-            swap(index, c);
-            index = c;
-         }
-         c = index << 1;
-      }
-      return res;
-   }
-
-   /**
-    * Recursive cleanup of a TimeoutImpl
-    * 
-    * @return null
-    */
-   private TimeoutExtImpl cleanupTimeoutExtImpl(TimeoutExtImpl timeout)
-   {
-      if (timeout != null)
-         timeout.target = null;
-      return null;
-   }
-
-   /**
-    * Check invariants of the queue.
-    */
-   void checkTree()
-   {
-      assertExpr(size >= 0);
-      assertExpr(size < queue.length);
-      assertExpr(queue[0] == null);
-      if (size > 0)
-      {
-         assertExpr(queue[1] != null);
-         assertExpr(queue[1].index == 1);
-         for (int i = 2; i <= size; ++i)
-         {
-            assertExpr(queue[i] != null);
-            assertExpr(queue[i].index == i);
-            assertExpr(queue[i >> 1].time <= queue[i].time); // parent fires first
-         }
-         for (int i = size + 1; i < queue.length; ++i)
-            assertExpr(queue[i] == null);
-      }
-   }
-
-   /**
-    * Debugging helper.
-    */
-   private void assertExpr(boolean expr)
-   {
-      if (!expr)
-         throw new IllegalStateException("***** assert failed *****");
-   }
-
-   /**
-    *  Our private Timeout implementation.
-    */
-   private class TimeoutExtImpl implements TimeoutExt
-   {
-      /** Done */
-      static final int DONE = -1;
-
-      /** In timeout */
-      static final int TIMEOUT = -2;
-
-      /** Index in the queue */
-      int index;
-
-      /** Time of the timeout */
-      long time;
-
-      /** The timeout target */
-      TimeoutTarget target;
-
-      public long getTime()
-      {
-         return time;
-      }
-
-      public TimeoutTarget getTimeoutTarget()
-      {
-         return target;
-      }
-
-      public void done()
-      {
-         index = DONE;
-      }
-      
-      public boolean cancel()
-      {
-         return remove(this);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueueImpl.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutPriorityQueueImpl.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutTarget.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutTarget.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutTarget.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.timeout;
-
-/**
- * The interface of objects that can receive timeouts.
- *   
- * @author <a href="osh at sparre.dk">Ole Husgaard</a>
- * @version $Revision$
-*/
-public interface TimeoutTarget
-{
-   /**
-    *  The timeout callback function is invoked when the timeout expires.
-    */
-   public void timedOut(Timeout timeout);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutTarget.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/TimeoutTarget.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Timeout utilties.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/timeout/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/timeout/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/CatalogLocation.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/CatalogLocation.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/CatalogLocation.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,225 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.xml;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.apache.log4j.Logger;
-import org.jboss.util.xml.catalog.CatalogManager;
-import org.jboss.util.xml.catalog.Resolver;
-import org.xml.sax.InputSource;
-
-/**
- * 
- * A ThreadSpecificCatalogs class maintains all catalogfiles <code>catolog.xml</code> found in the
- * <code>Thread.currentThread().getContextClassLoader()</code>.  
- * 
- * @author <a href="wiesed at gmail.com">Daniel Wiese</a>
- * @version $Revision$
- */
-public class CatalogLocation
-{
-
-   private static Logger log = Logger.getLogger(CatalogLocation.class);
-
-   /** 
-    * The catalog is assembled by taking into account all accessible resources whose name is 
-    * META-INF/jax-ws-catalog.xml. Each resource MUST be a valid entity catalog according to the XML Catalogs
-    */
-   private static final String[] catalogFilesNames =
-   {"META-INF/jax-ws-catalog.xml", "WEB-INF/jax-ws-catalog.xml", "jax-ws-catalog.xml"};
-
-   private final Resolver catologResolver;
-   
-   private final URL location;
-
-   private boolean isLastEntityResolved = false;
-
-   static
-   {
-      // If the source document contains "oasis-xml-catalog" processing instructions,
-      // should they be used?
-      System.setProperty("xml.catalog.allowPI", "true");
-      //Which identifier is preferred, "public" or "system"?
-      System.setProperty("xml.catalog.prefer", "public");
-      //If non-zero, the Catalog classes will print informative and debugging messages.
-      //The higher the number, the more messages.
-      System.setProperty("xml.catalog.verbosity", "0");
-   }
-
-   /**
-    * Create a new CatalogLocation.
-    * @param url - the location of the catalog xml file
-    * @throws IOException if the catalog files cannot be loaded
-    */
-   public CatalogLocation(URL url) throws IOException
-   {
-      catologResolver = new Resolver();
-      catologResolver.setCatalogManager(CatalogManager.getStaticManager());
-      catologResolver.setupReaders();
-      catologResolver.parseCatalog(url);
-      this.location=url;
-   }
-
-   /**
-    * Tries to resolve the entity using the thread specific catolog resolvers
-    * 
-    * @param publicId - Public ID of DTD, or null if it is a schema
-    * @param systemId - the system ID of DTD or Schema
-    * @return InputSource of entity
-    * @throws MalformedURLException - if the url is wrong
-    * @throws IOException - error reading the local file
-    */
-   public InputSource resolveEntity(String publicId, String systemId) throws MalformedURLException, IOException
-   {
-      String resolvedURI = catologResolver.resolveSystem(systemId);
-
-      if (resolvedURI == null)
-      {
-         resolvedURI = catologResolver.resolvePublic(publicId, systemId);
-      }
-
-      if (resolvedURI != null)
-      {
-         final InputSource is = new InputSource();
-         is.setPublicId(publicId);
-         is.setSystemId(systemId);
-         is.setByteStream(this.loadResource(resolvedURI));
-         this.isLastEntityResolved = true;
-         return is;
-      }
-      else
-      {
-         //resource could�t be resloved
-         this.isLastEntityResolved = false;
-         return null;
-      }
-   }
-
-   /**
-    * Seach the path for oasis catalog files. The classpath of
-    * <code>Thread.currentThread().getContextClassLoader()</code>
-    * is used for the lookup.
-    * @return the url where the <code>jax-ws-catalog.xml</code> is located
-    * @throws IOException if the catalog files cannot be loaded
-    *
-    */
-   public static URL lookupCatalogFiles() throws IOException
-   {
-      URL url = null;
-      //JAXWS-2.-0 spec, Line 27:the current context class loader MUST be used to
-      //retrieve all the resources with the specified name
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
-      for (int i = 0; i < catalogFilesNames.length; i++)
-      {
-         url = loader.getResource(catalogFilesNames[i]);
-         //use the first hit
-         if (url != null)
-         {
-            break;
-         }
-      }
-
-      return url;
-   }
-
-   /**
-    * Returns the boolean value to inform id DTD was found in the XML file or not
-    *
-    *
-    * @return boolean - true if DTD was found in XML
-    */
-   public boolean isEntityResolved()
-   {
-      return this.isLastEntityResolved;
-   }
-
-   /**
-    * 
-    * Loads the resolved resource.
-    * 
-    * @param resolvedURI - the full qualified URI of the resoved local ressource
-    * @return - the inputstram represnting this resource
-    * @throws IOException - if the resource cannot be opened
-    */
-   private InputStream loadResource(String resolvedURI) throws IOException
-   {
-      try
-      {
-         final URI toLoad = new URI(resolvedURI);
-         InputStream inputStream = null;
-         if (toLoad != null)
-         {
-            try
-            {
-               inputStream = new FileInputStream(new File(toLoad));
-            }
-            catch (IOException e)
-            {
-               log.error("Failed to open url stream", e);
-               throw e;
-            }
-         }
-         return inputStream;
-      }
-      catch (URISyntaxException e)
-      {
-         log.error("The URI (" + resolvedURI + ") is malfomed");
-         throw new IOException("The URI (" + resolvedURI + ") is malfomed");
-      }
-   }
-
-   /**
-    * To catalog locations are qual if the location is equal.
-    * @param other - the catlog location to compare
-    * @return true if equal
-    */
-   public boolean equals(Object other)
-   {
-     boolean back=false;
-      if (other!=null && other instanceof CatalogLocation){
-         final CatalogLocation otherC=(CatalogLocation)other;
-         back=this.location.equals(otherC.location);
-      }
-      
-      return back;
-   }
-
-   /**
-    * Two catalog locations have the same hash code if the location is equal.
-    * @return - the hash code
-    */
-   public int hashCode()
-   {
-      return this.location.hashCode();
-   }
-   
-   
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/CatalogLocation.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/CatalogLocation.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,466 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.xml;
-
-import org.jboss.logging.Logger;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * DOM2 utilites
- *
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public final class DOMUtils
-{
-    private static Logger log = Logger.getLogger(DOMUtils.class);
-
-    // All elements created by the same thread are created by the same builder and belong to the same doc
-    private static ThreadLocal documentThreadLocal = new ThreadLocal();
-    private static ThreadLocal builderThreadLocal = new ThreadLocal() {
-        protected Object initialValue() {
-            try
-            {
-                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-                factory.setValidating(false);
-                factory.setNamespaceAware(true);
-                DocumentBuilder builder = factory.newDocumentBuilder();
-                builder.setEntityResolver(new JBossEntityResolver());
-                return builder;
-            }
-            catch (ParserConfigurationException e)
-            {
-                throw new RuntimeException("Failed to create DocumentBuilder", e);
-            }
-        }
-    };
-
-    // Hide the constructor
-    private DOMUtils()
-    {
-    }
-
-    /** Initialise the the DocumentBuilder
-     */
-    public static DocumentBuilder getDocumentBuilder()
-    {
-        DocumentBuilder builder = (DocumentBuilder)builderThreadLocal.get();
-        return builder;
-    }
-
-    /** Parse the given XML string and return the root Element
-     */
-    public static Element parse(String xmlString) throws IOException
-    {
-        try
-        {
-            return parse(new ByteArrayInputStream(xmlString.getBytes("UTF-8")));
-        }
-        catch (IOException e)
-        {
-            log.error("Cannot parse: " + xmlString);
-            throw e;
-        }
-    }
-
-    /** Parse the given XML stream and return the root Element
-     */
-    public static Element parse(InputStream xmlStream) throws IOException
-    {
-        try
-        {
-            Document doc = getDocumentBuilder().parse(xmlStream);
-            Element root = doc.getDocumentElement();
-            return root;
-        }
-        catch (SAXException e)
-        {
-            throw new IOException(e.toString());
-        }
-    }
-
-    /** Create an Element for a given name
-     */
-    public static Element createElement(String localPart)
-    {
-        Document doc = getOwnerDocument();
-        log.trace("createElement {}" + localPart);
-        return doc.createElement(localPart);
-    }
-
-    /** Create an Element for a given name and prefix
-     */
-    public static Element createElement(String localPart, String prefix)
-    {
-        Document doc = getOwnerDocument();
-        log.trace("createElement {}" + prefix + ":" + localPart);
-        return doc.createElement(prefix + ":" + localPart);
-    }
-
-    /** Create an Element for a given name, prefix and uri
-     */
-    public static Element createElement(String localPart, String prefix, String uri)
-    {
-        Document doc = getOwnerDocument();
-        if (prefix == null || prefix.length() == 0)
-        {
-            log.trace("createElement {" + uri + "}" + localPart);
-            return doc.createElementNS(uri, localPart);
-        }
-        else
-        {
-            log.trace("createElement {" + uri + "}" + prefix + ":" + localPart);
-            return doc.createElementNS(uri, prefix + ":" + localPart);
-        }
-    }
-
-    /** Create an Element for a given QName
-     */
-    public static Element createElement(QName qname)
-    {
-        return createElement(qname.getLocalPart(), qname.getPrefix(), qname.getNamespaceURI());
-    }
-
-    /** Create a org.w3c.dom.Text node
-     */
-    public static Text createTextNode(String value)
-    {
-        Document doc = getOwnerDocument();
-        return doc.createTextNode(value);
-    }
-
-    /** Get the qname of the given node.
-     */
-    public static QName getElementQName(Element el)
-    {
-        String qualifiedName = el.getNodeName();
-        return resolveQName(el, qualifiedName);
-    }
-
-    /** Transform the giveen qualified name into a QName
-     */
-    public static QName resolveQName(Element el, String qualifiedName)
-    {
-        QName qname;
-        String prefix = "";
-        String namespaceURI = "";
-        String localPart = qualifiedName;
-
-        int colIndex = qualifiedName.indexOf(":");
-        if (colIndex > 0)
-        {
-            prefix = qualifiedName.substring(0, colIndex);
-            localPart = qualifiedName.substring(colIndex + 1);
-
-            if ("xmlns".equals(prefix))
-            {
-                namespaceURI = "URI:XML_PREDEFINED_NAMESPACE";
-            }
-            else
-            {
-                Element nsElement = el;
-                while (namespaceURI.equals("") && nsElement != null)
-                {
-                    namespaceURI = nsElement.getAttribute("xmlns:" + prefix);
-                    if (namespaceURI.equals(""))
-                        nsElement = getParentElement(nsElement);
-                }
-            }
-
-            if (namespaceURI.equals(""))
-                throw new IllegalArgumentException("Cannot find namespace uri for: " + qualifiedName);
-        }
-
-        qname = new QName(namespaceURI, localPart, prefix);
-        return qname;
-    }
-
-    /** Get the value from the given attribute
-     *
-     * @return null if the attribute value is empty or the attribute is not present
-     */
-    public static String getAttributeValue(Element el, String attrName)
-    {
-        return getAttributeValue(el, new QName(attrName));
-    }
-
-    /** Get the value from the given attribute
-     *
-     * @return null if the attribute value is empty or the attribute is not present
-     */
-    public static String getAttributeValue(Element el, QName attrName)
-    {
-        String attr = null;
-        if ("".equals(attrName.getNamespaceURI()))
-            attr = el.getAttribute(attrName.getLocalPart());
-        else attr = el.getAttributeNS(attrName.getNamespaceURI(), attrName.getLocalPart());
-
-        if ("".equals(attr))
-            attr = null;
-
-        return attr;
-    }
-
-    /** Get the qname value from the given attribute
-     */
-    public static QName getAttributeValueAsQName(Element el, String attrName)
-    {
-        return getAttributeValueAsQName(el, new QName(attrName));
-
-    }
-
-    /** Get the qname value from the given attribute
-     */
-    public static QName getAttributeValueAsQName(Element el, QName attrName)
-    {
-        QName qname = null;
-
-        String qualifiedName = getAttributeValue(el, attrName);
-        if (qualifiedName != null)
-        {
-            qname = resolveQName(el, qualifiedName);
-        }
-
-        return qname;
-    }
-
-    /** Get the boolean value from the given attribute
-     */
-    public static boolean getAttributeValueAsBoolean(Element el, String attrName)
-    {
-        return getAttributeValueAsBoolean(el, new QName(attrName));
-    }
-
-    /** Get the boolean value from the given attribute
-     */
-    public static boolean getAttributeValueAsBoolean(Element el, QName attrName)
-    {
-        String attrVal = getAttributeValue(el, attrName);
-        boolean ret = "true".equalsIgnoreCase(attrVal) || "1".equalsIgnoreCase(attrVal);
-        return ret;
-    }
-
-    /** Get the integer value from the given attribute
-     */
-    public static Integer getAttributeValueAsInteger(Element el, String attrName)
-    {
-        return getAttributeValueAsInteger(el, new QName(attrName));
-    }
-
-    /** Get the integer value from the given attribute
-     */
-    public static Integer getAttributeValueAsInteger(Element el, QName attrName)
-    {
-        String attrVal = getAttributeValue(el, attrName);
-        return (attrVal != null ? new Integer(attrVal) : null);
-    }
-
-    /** Get the attributes as Map<QName, String>
-     */
-    public static Map getAttributes(Element el)
-    {
-        Map attmap = new HashMap();
-        NamedNodeMap attribs = el.getAttributes();
-        for (int i = 0; i < attribs.getLength(); i++)
-        {
-            Attr attr = (Attr)attribs.item(i);
-            String name = attr.getName();
-            QName qname = resolveQName(el, name);
-            String value = attr.getNodeValue();
-            attmap.put(qname, value);
-        }
-        return attmap;
-    }
-
-    /** Copy attributes between elements
-     */
-    public static void copyAttributes(Element destElement, Element srcElement)
-    {
-        NamedNodeMap attribs = srcElement.getAttributes();
-        for (int i = 0; i < attribs.getLength(); i++)
-        {
-            Attr attr = (Attr)attribs.item(i);
-            destElement.setAttributeNS(attr.getNamespaceURI(), attr.getName(), attr.getNodeValue());
-        }
-    }
-
-    /** True if the node has child elements
-     */
-    public static boolean hasChildElements(Node node)
-    {
-        NodeList nlist = node.getChildNodes();
-        for (int i = 0; i < nlist.getLength(); i++)
-        {
-            Node child = nlist.item(i);
-            if (child.getNodeType() == Node.ELEMENT_NODE)
-                return true;
-        }
-        return false;
-    }
-
-    /** Gets child elements
-     */
-    public static Iterator getChildElements(Node node)
-    {
-        ArrayList list = new ArrayList();
-        NodeList nlist = node.getChildNodes();
-        for (int i = 0; i < nlist.getLength(); i++)
-        {
-            Node child = nlist.item(i);
-            if (child.getNodeType() == Node.ELEMENT_NODE)
-                list.add(child);
-        }
-        return list.iterator();
-    }
-
-    /** Get the concatenated text content, or null.
-     */
-    public static String getTextContent(Node node)
-    {
-        boolean hasTextContent = false;
-        StringBuffer buffer = new StringBuffer();
-        NodeList nlist = node.getChildNodes();
-        for (int i = 0; i < nlist.getLength(); i++)
-        {
-            Node child = nlist.item(i);
-            if (child.getNodeType() == Node.TEXT_NODE)
-            {
-                buffer.append(child.getNodeValue());
-                hasTextContent = true;
-            }
-        }
-        return (hasTextContent ? buffer.toString() : null);
-    }
-
-    /** Gets the first child element
-     */
-    public static Element getFirstChildElement(Node node)
-    {
-        return getFirstChildElementIntern(node, null);
-    }
-
-    /** Gets the first child element for a given local name without namespace
-     */
-    public static Element getFirstChildElement(Node node, String nodeName)
-    {
-        return getFirstChildElementIntern(node, new QName(nodeName));
-    }
-
-    /** Gets the first child element for a given qname
-     */
-    public static Element getFirstChildElement(Node node, QName nodeName)
-    {
-        return getFirstChildElementIntern(node, nodeName);
-    }
-
-    private static Element getFirstChildElementIntern(Node node, QName nodeName)
-    {
-        Element childElement = null;
-        Iterator it = getChildElementsIntern(node, nodeName);
-        if (it.hasNext())
-        {
-            childElement = (Element)it.next();
-        }
-        return childElement;
-    }
-
-    /** Gets the child elements for a given local name without namespace
-     */
-    public static Iterator getChildElements(Node node, String nodeName)
-    {
-        return getChildElementsIntern(node, new QName(nodeName));
-    }
-
-    /** Gets the child element for a given qname
-     */
-    public static Iterator getChildElements(Node node, QName nodeName)
-    {
-        return getChildElementsIntern(node, nodeName);
-    }
-
-    private static Iterator getChildElementsIntern(Node node, QName nodeName)
-    {
-        ArrayList list = new ArrayList();
-        NodeList nlist = node.getChildNodes();
-        for (int i = 0; i < nlist.getLength(); i++)
-        {
-            Node child = nlist.item(i);
-            if (child.getNodeType() == Node.ELEMENT_NODE)
-            {
-                if (nodeName == null)
-                {
-                    list.add(child);
-                }
-                else
-                {
-                    QName qname;
-                    if (nodeName.getNamespaceURI().length() > 0)
-                    {
-                        qname = new QName(child.getNamespaceURI(), child.getLocalName());
-                    }
-                    else
-                    {
-                        qname = new QName(child.getLocalName());
-                    }
-                    if (qname.equals(nodeName))
-                    {
-                        list.add(child);
-                    }
-                }
-            }
-        }
-        return list.iterator();
-    }
-
-    /** Gets parent element or null if there is none
-     */
-    public static Element getParentElement(Node node)
-    {
-        Node parent = node.getParentNode();
-        return (parent instanceof Element ? (Element)parent : null);
-    }
-
-    /** Get the owner document that is associated with the current thread */
-    public static Document getOwnerDocument()
-    {
-        Document doc = (Document)documentThreadLocal.get();
-        if (doc == null)
-        {
-            doc = getDocumentBuilder().newDocument();
-            documentThreadLocal.set(doc);
-        }
-        return doc;
-    }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java)
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMUtils.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -0,0 +1,492 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.util.xml;
+
+// $Id$
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jboss.logging.Logger;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * DOM2 utilites
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @version $Revision$
+ */
+public final class DOMUtils
+{
+    private static Logger log = Logger.getLogger(DOMUtils.class);
+
+    // All elements created by the same thread are created by the same builder and belong to the same doc
+    private static ThreadLocal documentThreadLocal = new ThreadLocal();
+    private static ThreadLocal builderThreadLocal = new ThreadLocal() {
+        protected Object initialValue() {
+            try
+            {
+                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+                factory.setValidating(false);
+                factory.setNamespaceAware(true);
+                DocumentBuilder builder = factory.newDocumentBuilder();
+                builder.setEntityResolver(new JBossEntityResolver());
+                return builder;
+            }
+            catch (ParserConfigurationException e)
+            {
+                throw new RuntimeException("Failed to create DocumentBuilder", e);
+            }
+        }
+    };
+
+    // Hide the constructor
+    private DOMUtils()
+    {
+    }
+
+    /** Initialise the the DocumentBuilder
+     */
+    public static DocumentBuilder getDocumentBuilder()
+    {
+        DocumentBuilder builder = (DocumentBuilder)builderThreadLocal.get();
+        return builder;
+    }
+
+    /** Parse the given XML string and return the root Element
+     */
+    public static Element parse(String xmlString) throws IOException
+    {
+        try
+        {
+            return parse(new ByteArrayInputStream(xmlString.getBytes("UTF-8")));
+        }
+        catch (IOException e)
+        {
+            log.error("Cannot parse: " + xmlString);
+            throw e;
+        }
+    }
+
+    /** Parse the given XML stream and return the root Element
+     */
+    public static Element parse(InputStream xmlStream) throws IOException
+    {
+        try
+        {
+            Document doc = getDocumentBuilder().parse(xmlStream);
+            Element root = doc.getDocumentElement();
+            return root;
+        }
+        catch (SAXException e)
+        {
+            throw new IOException(e.toString());
+        }
+    }
+
+    /** Parse the given input source and return the root Element
+     */
+    public static Element parse(InputSource source) throws IOException
+    {
+        try
+        {
+            Document doc = getDocumentBuilder().parse(source);
+            Element root = doc.getDocumentElement();
+            return root;
+        }
+        catch (SAXException e)
+        {
+            throw new IOException(e.toString());
+        }
+    }
+
+    /** Create an Element for a given name
+     */
+    public static Element createElement(String localPart)
+    {
+        Document doc = getOwnerDocument();
+        log.trace("createElement {}" + localPart);
+        return doc.createElement(localPart);
+    }
+
+    /** Create an Element for a given name and prefix
+     */
+    public static Element createElement(String localPart, String prefix)
+    {
+        Document doc = getOwnerDocument();
+        log.trace("createElement {}" + prefix + ":" + localPart);
+        return doc.createElement(prefix + ":" + localPart);
+    }
+
+    /** Create an Element for a given name, prefix and uri
+     */
+    public static Element createElement(String localPart, String prefix, String uri)
+    {
+        Document doc = getOwnerDocument();
+        if (prefix == null || prefix.length() == 0)
+        {
+            log.trace("createElement {" + uri + "}" + localPart);
+            return doc.createElementNS(uri, localPart);
+        }
+        else
+        {
+            log.trace("createElement {" + uri + "}" + prefix + ":" + localPart);
+            return doc.createElementNS(uri, prefix + ":" + localPart);
+        }
+    }
+
+    /** Create an Element for a given QName
+     */
+    public static Element createElement(QName qname)
+    {
+        return createElement(qname.getLocalPart(), qname.getPrefix(), qname.getNamespaceURI());
+    }
+
+    /** Create a org.w3c.dom.Text node
+     */
+    public static Text createTextNode(String value)
+    {
+        Document doc = getOwnerDocument();
+        return doc.createTextNode(value);
+    }
+
+    /** Get the qname of the given node.
+     */
+    public static QName getElementQName(Element el)
+    {
+        String qualifiedName = el.getNodeName();
+        return resolveQName(el, qualifiedName);
+    }
+
+    /** Transform the giveen qualified name into a QName
+     */
+    public static QName resolveQName(Element el, String qualifiedName)
+    {
+        QName qname;
+        String prefix = "";
+        String namespaceURI = "";
+        String localPart = qualifiedName;
+
+        int colIndex = qualifiedName.indexOf(":");
+        if (colIndex > 0)
+        {
+            prefix = qualifiedName.substring(0, colIndex);
+            localPart = qualifiedName.substring(colIndex + 1);
+
+            if ("xmlns".equals(prefix))
+            {
+                namespaceURI = "URI:XML_PREDEFINED_NAMESPACE";
+            }
+            else
+            {
+                Element nsElement = el;
+                while (namespaceURI.equals("") && nsElement != null)
+                {
+                    namespaceURI = nsElement.getAttribute("xmlns:" + prefix);
+                    if (namespaceURI.equals(""))
+                        nsElement = getParentElement(nsElement);
+                }
+            }
+
+            if (namespaceURI.equals(""))
+                throw new IllegalArgumentException("Cannot find namespace uri for: " + qualifiedName);
+        }
+
+        qname = new QName(namespaceURI, localPart, prefix);
+        return qname;
+    }
+
+    /** Get the value from the given attribute
+     *
+     * @return null if the attribute value is empty or the attribute is not present
+     */
+    public static String getAttributeValue(Element el, String attrName)
+    {
+        return getAttributeValue(el, new QName(attrName));
+    }
+
+    /** Get the value from the given attribute
+     *
+     * @return null if the attribute value is empty or the attribute is not present
+     */
+    public static String getAttributeValue(Element el, QName attrName)
+    {
+        String attr = null;
+        if ("".equals(attrName.getNamespaceURI()))
+            attr = el.getAttribute(attrName.getLocalPart());
+        else attr = el.getAttributeNS(attrName.getNamespaceURI(), attrName.getLocalPart());
+
+        if ("".equals(attr))
+            attr = null;
+
+        return attr;
+    }
+
+    /** Get the qname value from the given attribute
+     */
+    public static QName getAttributeValueAsQName(Element el, String attrName)
+    {
+        return getAttributeValueAsQName(el, new QName(attrName));
+
+    }
+
+    /** Get the qname value from the given attribute
+     */
+    public static QName getAttributeValueAsQName(Element el, QName attrName)
+    {
+        QName qname = null;
+
+        String qualifiedName = getAttributeValue(el, attrName);
+        if (qualifiedName != null)
+        {
+            qname = resolveQName(el, qualifiedName);
+        }
+
+        return qname;
+    }
+
+    /** Get the boolean value from the given attribute
+     */
+    public static boolean getAttributeValueAsBoolean(Element el, String attrName)
+    {
+        return getAttributeValueAsBoolean(el, new QName(attrName));
+    }
+
+    /** Get the boolean value from the given attribute
+     */
+    public static boolean getAttributeValueAsBoolean(Element el, QName attrName)
+    {
+        String attrVal = getAttributeValue(el, attrName);
+        boolean ret = "true".equalsIgnoreCase(attrVal) || "1".equalsIgnoreCase(attrVal);
+        return ret;
+    }
+
+    /** Get the integer value from the given attribute
+     */
+    public static Integer getAttributeValueAsInteger(Element el, String attrName)
+    {
+        return getAttributeValueAsInteger(el, new QName(attrName));
+    }
+
+    /** Get the integer value from the given attribute
+     */
+    public static Integer getAttributeValueAsInteger(Element el, QName attrName)
+    {
+        String attrVal = getAttributeValue(el, attrName);
+        return (attrVal != null ? new Integer(attrVal) : null);
+    }
+
+    /** Get the attributes as Map<QName, String>
+     */
+    public static Map getAttributes(Element el)
+    {
+        Map attmap = new HashMap();
+        NamedNodeMap attribs = el.getAttributes();
+        for (int i = 0; i < attribs.getLength(); i++)
+        {
+            Attr attr = (Attr)attribs.item(i);
+            String name = attr.getName();
+            QName qname = resolveQName(el, name);
+            String value = attr.getNodeValue();
+            attmap.put(qname, value);
+        }
+        return attmap;
+    }
+
+    /** Copy attributes between elements
+     */
+    public static void copyAttributes(Element destElement, Element srcElement)
+    {
+        NamedNodeMap attribs = srcElement.getAttributes();
+        for (int i = 0; i < attribs.getLength(); i++)
+        {
+            Attr attr = (Attr)attribs.item(i);
+            destElement.setAttributeNS(attr.getNamespaceURI(), attr.getName(), attr.getNodeValue());
+        }
+    }
+
+    /** True if the node has child elements
+     */
+    public static boolean hasChildElements(Node node)
+    {
+        NodeList nlist = node.getChildNodes();
+        for (int i = 0; i < nlist.getLength(); i++)
+        {
+            Node child = nlist.item(i);
+            if (child.getNodeType() == Node.ELEMENT_NODE)
+                return true;
+        }
+        return false;
+    }
+
+    /** Gets child elements
+     */
+    public static Iterator getChildElements(Node node)
+    {
+        ArrayList list = new ArrayList();
+        NodeList nlist = node.getChildNodes();
+        for (int i = 0; i < nlist.getLength(); i++)
+        {
+            Node child = nlist.item(i);
+            if (child.getNodeType() == Node.ELEMENT_NODE)
+                list.add(child);
+        }
+        return list.iterator();
+    }
+
+    /** Get the concatenated text content, or null.
+     */
+    public static String getTextContent(Node node)
+    {
+        boolean hasTextContent = false;
+        StringBuffer buffer = new StringBuffer();
+        NodeList nlist = node.getChildNodes();
+        for (int i = 0; i < nlist.getLength(); i++)
+        {
+            Node child = nlist.item(i);
+            if (child.getNodeType() == Node.TEXT_NODE)
+            {
+                buffer.append(child.getNodeValue());
+                hasTextContent = true;
+            }
+        }
+        return (hasTextContent ? buffer.toString() : null);
+    }
+
+    /** Gets the first child element
+     */
+    public static Element getFirstChildElement(Node node)
+    {
+        return getFirstChildElementIntern(node, null);
+    }
+
+    /** Gets the first child element for a given local name without namespace
+     */
+    public static Element getFirstChildElement(Node node, String nodeName)
+    {
+        return getFirstChildElementIntern(node, new QName(nodeName));
+    }
+
+    /** Gets the first child element for a given qname
+     */
+    public static Element getFirstChildElement(Node node, QName nodeName)
+    {
+        return getFirstChildElementIntern(node, nodeName);
+    }
+
+    private static Element getFirstChildElementIntern(Node node, QName nodeName)
+    {
+        Element childElement = null;
+        Iterator it = getChildElementsIntern(node, nodeName);
+        if (it.hasNext())
+        {
+            childElement = (Element)it.next();
+        }
+        return childElement;
+    }
+
+    /** Gets the child elements for a given local name without namespace
+     */
+    public static Iterator getChildElements(Node node, String nodeName)
+    {
+        return getChildElementsIntern(node, new QName(nodeName));
+    }
+
+    /** Gets the child element for a given qname
+     */
+    public static Iterator getChildElements(Node node, QName nodeName)
+    {
+        return getChildElementsIntern(node, nodeName);
+    }
+
+    private static Iterator getChildElementsIntern(Node node, QName nodeName)
+    {
+        ArrayList list = new ArrayList();
+        NodeList nlist = node.getChildNodes();
+        for (int i = 0; i < nlist.getLength(); i++)
+        {
+            Node child = nlist.item(i);
+            if (child.getNodeType() == Node.ELEMENT_NODE)
+            {
+                if (nodeName == null)
+                {
+                    list.add(child);
+                }
+                else
+                {
+                    QName qname;
+                    if (nodeName.getNamespaceURI().length() > 0)
+                    {
+                        qname = new QName(child.getNamespaceURI(), child.getLocalName());
+                    }
+                    else
+                    {
+                        qname = new QName(child.getLocalName());
+                    }
+                    if (qname.equals(nodeName))
+                    {
+                        list.add(child);
+                    }
+                }
+            }
+        }
+        return list.iterator();
+    }
+
+    /** Gets parent element or null if there is none
+     */
+    public static Element getParentElement(Node node)
+    {
+        Node parent = node.getParentNode();
+        return (parent instanceof Element ? (Element)parent : null);
+    }
+
+    /** Get the owner document that is associated with the current thread */
+    public static Document getOwnerDocument()
+    {
+        Document doc = (Document)documentThreadLocal.get();
+        if (doc == null)
+        {
+            doc = getDocumentBuilder().newDocument();
+            documentThreadLocal.set(doc);
+        }
+        return doc;
+    }
+}

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,498 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation.  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. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:  
- *       "This product includes software developed by the 
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written 
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.jboss.util.xml;
-
-// $Id$
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Traverse a DOM tree in order to print a document that is parsed.
- *
- * @author Andy Clark, IBM
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public class DOMWriter
-{
-   // Print writer
-   private PrintWriter out;
-   // True, if canonical output
-   private boolean canonical;
-   // True, if pretty printing should be used
-   private boolean prettyprint;
-   // True, if the XML declaration should be written
-   private boolean writeXMLDeclaration;
-   // Explicit character set encoding
-   private String charsetName;
-   // indent for the pretty printer
-   private int prettyIndent;
-   // True, if the XML declaration has been written
-   private boolean wroteXMLDeclaration;
-
-   public DOMWriter(Writer w)
-   {
-      this.out = new PrintWriter(w);
-   }
-
-   public DOMWriter(OutputStream stream)
-   {
-      try
-      {
-         this.out = new PrintWriter(new OutputStreamWriter(stream, "UTF-8"));
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         // ignore, UTF-8 should be available
-      }
-   }
-
-   public DOMWriter(OutputStream stream, String charsetName)
-   {
-      try
-      {
-         this.out = new PrintWriter(new OutputStreamWriter(stream, charsetName));
-         this.charsetName = charsetName;
-         this.writeXMLDeclaration = true;
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         throw new IllegalArgumentException("Unsupported encoding: " + charsetName);
-      }
-   }
-
-   /** 
-    * Print a node with explicit prettyprinting.
-    * The defaults for all other DOMWriter properties apply. 
-    *  
-    */
-   public static String printNode(Node node, boolean prettyprint)
-   {
-      StringWriter strw = new StringWriter();
-      new DOMWriter(strw).setPrettyprint(prettyprint).print(node);
-      return strw.toString();
-   }
-
-   public boolean isCanonical()
-   {
-      return canonical;
-   }
-
-   /** 
-    * Set wheter entities should appear in their canonical form.
-    * The default is false.
-    */
-   public DOMWriter setCanonical(boolean canonical)
-   {
-      this.canonical = canonical;
-      return this;
-   }
-
-   public boolean isPrettyprint()
-   {
-      return prettyprint;
-   }
-
-   /** 
-    * Set wheter element should be indented.
-    * The default is false.
-    */
-   public DOMWriter setPrettyprint(boolean prettyprint)
-   {
-      this.prettyprint = prettyprint;
-      return this;
-   }
-
-   public boolean isWriteXMLDeclaration()
-   {
-      return writeXMLDeclaration;
-   }
-
-   /** 
-    * Set wheter the XML declaration should be written.
-    * The default is false.
-    */
-   public DOMWriter setWriteXMLDeclaration(boolean writeXMLDeclaration)
-   {
-      this.writeXMLDeclaration = writeXMLDeclaration;
-      return this;
-   }
-
-   public void print(Node node)
-   {
-      printInternal(node, false);
-   }
-
-   private void printInternal(Node node, boolean indentEndMarker)
-   {
-      // is there anything to do?
-      if (node == null)
-      {
-         return;
-      }
-
-      // JBAS-2117 - Don't skip the DOCUMENT_NODE
-      // if (node instanceof Document) node = ((Document)node).getDocumentElement();
-
-      if (wroteXMLDeclaration == false && writeXMLDeclaration == true && canonical == false)
-      {
-         out.print("<?xml version='1.0'");
-         if (charsetName != null)
-            out.print(" encoding='" + charsetName + "'");
-
-         out.println("?>");
-         wroteXMLDeclaration = true;
-      }
-
-      int type = node.getNodeType();
-      boolean hasChildNodes = node.getChildNodes().getLength() > 0;
-
-      switch (type)
-      {
-         // print document
-         case Node.DOCUMENT_NODE:
-         {
-            NodeList children = node.getChildNodes();
-            for (int iChild = 0; iChild < children.getLength(); iChild++)
-            {
-               printInternal(children.item(iChild), false);
-            }
-            out.flush();
-            break;
-         }
-
-            // print element with attributes
-         case Node.ELEMENT_NODE:
-         {
-            if (prettyprint)
-            {
-               for (int i = 0; i < prettyIndent; i++)
-               {
-                  out.print(' ');
-               }
-               prettyIndent++;
-            }
-
-            out.print('<');
-            out.print(node.getNodeName());
-            Attr attrs[] = sortAttributes(node.getAttributes());
-            for (int i = 0; i < attrs.length; i++)
-            {
-               Attr attr = attrs[i];
-               out.print(' ');
-               out.print(attr.getNodeName());
-               out.print("='");
-               out.print(normalize(attr.getNodeValue()));
-               out.print("'");
-            }
-
-            if (hasChildNodes)
-            {
-               out.print('>');
-            }
-
-            // Find out if the end marker is indented
-            indentEndMarker = isEndMarkerIndented(node);
-
-            if (indentEndMarker)
-            {
-               out.print('\n');
-            }
-
-            NodeList childNodes = node.getChildNodes();
-            int len = childNodes.getLength();
-            for (int i = 0; i < len; i++)
-            {
-               Node childNode = childNodes.item(i);
-               printInternal(childNode, false);
-            }
-            break;
-         }
-
-            // handle entity reference nodes
-         case Node.ENTITY_REFERENCE_NODE:
-         {
-            if (canonical)
-            {
-               NodeList children = node.getChildNodes();
-               if (children != null)
-               {
-                  int len = children.getLength();
-                  for (int i = 0; i < len; i++)
-                  {
-                     printInternal(children.item(i), false);
-                  }
-               }
-            }
-            else
-            {
-               out.print('&');
-               out.print(node.getNodeName());
-               out.print(';');
-            }
-            break;
-         }
-
-            // print cdata sections
-         case Node.CDATA_SECTION_NODE:
-         {
-            if (canonical)
-            {
-               out.print(normalize(node.getNodeValue()));
-            }
-            else
-            {
-               out.print("<![CDATA[");
-               out.print(node.getNodeValue());
-               out.print("]]>");
-            }
-            break;
-         }
-
-            // print text
-         case Node.TEXT_NODE:
-         {
-            String text = normalize(node.getNodeValue());
-            if (prettyprint == false || text.trim().length() > 0)
-               out.print(text);
-            break;
-         }
-
-            // print processing instruction
-         case Node.PROCESSING_INSTRUCTION_NODE:
-         {
-            out.print("<?");
-            out.print(node.getNodeName());
-            String data = node.getNodeValue();
-            if (data != null && data.length() > 0)
-            {
-               out.print(' ');
-               out.print(data);
-            }
-            out.print("?>");
-            break;
-         }
-
-            // print comment
-         case Node.COMMENT_NODE:
-         {
-            for (int i = 0; i < prettyIndent; i++)
-            {
-               out.print(' ');
-            }
-
-            out.print("<!--");
-            String data = node.getNodeValue();
-            if (data != null)
-            {
-               out.print(data);
-            }
-            out.print("-->");
-
-            if (prettyprint)
-            {
-               out.print('\n');
-            }
-
-            break;
-         }
-      }
-
-      if (type == Node.ELEMENT_NODE)
-      {
-         if (prettyprint)
-            prettyIndent--;
-
-         if (hasChildNodes == false)
-         {
-            out.print("/>");
-         }
-         else
-         {
-            if (indentEndMarker)
-            {
-               for (int i = 0; i < prettyIndent; i++)
-               {
-                  out.print(' ');
-               }
-            }
-
-            out.print("</");
-            out.print(node.getNodeName());
-            out.print('>');
-         }
-
-         if (prettyIndent > 0)
-         {
-            out.print('\n');
-         }
-      }
-      out.flush();
-   }
-
-   private boolean isEndMarkerIndented(Node node)
-   {
-      if (prettyprint)
-      {
-         NodeList childNodes = node.getChildNodes();
-         int len = childNodes.getLength();
-         for (int i = 0; i < len; i++)
-         {
-            Node children = childNodes.item(i);
-            if (children.getNodeType() == Node.ELEMENT_NODE)
-            {
-               return true;
-            }
-         }
-      }
-      return false;
-   }
-
-   /** Returns a sorted list of attributes. */
-   private Attr[] sortAttributes(NamedNodeMap attrs)
-   {
-
-      int len = (attrs != null) ? attrs.getLength() : 0;
-      Attr array[] = new Attr[len];
-      for (int i = 0; i < len; i++)
-      {
-         array[i] = (Attr)attrs.item(i);
-      }
-      for (int i = 0; i < len - 1; i++)
-      {
-         String name = array[i].getNodeName();
-         int index = i;
-         for (int j = i + 1; j < len; j++)
-         {
-            String curName = array[j].getNodeName();
-            if (curName.compareTo(name) < 0)
-            {
-               name = curName;
-               index = j;
-            }
-         }
-         if (index != i)
-         {
-            Attr temp = array[i];
-            array[i] = array[index];
-            array[index] = temp;
-         }
-      }
-      return (array);
-   }
-
-   /** Normalizes the given string. */
-   private String normalize(String s)
-   {
-      StringBuffer str = new StringBuffer();
-
-      int len = (s != null) ? s.length() : 0;
-      for (int i = 0; i < len; i++)
-      {
-         char ch = s.charAt(i);
-         switch (ch)
-         {
-            case '<':
-            {
-               str.append("&lt;");
-               break;
-            }
-            case '>':
-            {
-               str.append("&gt;");
-               break;
-            }
-            case '&':
-            {
-               str.append("&amp;");
-               break;
-            }
-            case '"':
-            {
-               str.append("&quot;");
-               break;
-            }
-            case '\r':
-            case '\n':
-            {
-               if (canonical)
-               {
-                  str.append("&#");
-                  str.append(Integer.toString(ch));
-                  str.append(';');
-                  break;
-               }
-               // else, default append char
-            }
-            default:
-            {
-               str.append(ch);
-            }
-         }
-      }
-      return (str.toString());
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java)
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/DOMWriter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -0,0 +1,527 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  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. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written 
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+package org.jboss.util.xml;
+
+// $Id$
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Traverse a DOM tree in order to print a document that is parsed.
+ *
+ * @author Andy Clark, IBM
+ * @author Thomas.Diesler at jboss.org
+ * @version $Revision$
+ */
+public class DOMWriter
+{
+   // Print writer
+   private PrintWriter out;
+   // True, if canonical output
+   private boolean canonical;
+   // True, if pretty printing should be used
+   private boolean prettyprint;
+   // True, if the XML declaration should be written
+   private boolean writeXMLDeclaration;
+   // Explicit character set encoding
+   private String charsetName;
+   // indent for the pretty printer
+   private int prettyIndent;
+   // True, if the XML declaration has been written
+   private boolean wroteXMLDeclaration;
+   // The node that started the write
+   private Node rootNode;
+   
+   public DOMWriter(Writer w)
+   {
+      this.out = new PrintWriter(w);
+   }
+
+   public DOMWriter(OutputStream stream)
+   {
+      try
+      {
+         this.out = new PrintWriter(new OutputStreamWriter(stream, "UTF-8"));
+      }
+      catch (UnsupportedEncodingException e)
+      {
+         // ignore, UTF-8 should be available
+      }
+   }
+
+   public DOMWriter(OutputStream stream, String charsetName)
+   {
+      try
+      {
+         this.out = new PrintWriter(new OutputStreamWriter(stream, charsetName));
+         this.charsetName = charsetName;
+         this.writeXMLDeclaration = true;
+      }
+      catch (UnsupportedEncodingException e)
+      {
+         throw new IllegalArgumentException("Unsupported encoding: " + charsetName);
+      }
+   }
+
+   /** 
+    * Print a node with explicit prettyprinting.
+    * The defaults for all other DOMWriter properties apply. 
+    *  
+    */
+   public static String printNode(Node node, boolean prettyprint)
+   {
+      StringWriter strw = new StringWriter();
+      new DOMWriter(strw).setPrettyprint(prettyprint).print(node);
+      return strw.toString();
+   }
+
+   public boolean isCanonical()
+   {
+      return canonical;
+   }
+
+   /** 
+    * Set wheter entities should appear in their canonical form.
+    * The default is false.
+    */
+   public DOMWriter setCanonical(boolean canonical)
+   {
+      this.canonical = canonical;
+      return this;
+   }
+
+   public boolean isPrettyprint()
+   {
+      return prettyprint;
+   }
+
+   /** 
+    * Set wheter element should be indented.
+    * The default is false.
+    */
+   public DOMWriter setPrettyprint(boolean prettyprint)
+   {
+      this.prettyprint = prettyprint;
+      return this;
+   }
+
+   public boolean isWriteXMLDeclaration()
+   {
+      return writeXMLDeclaration;
+   }
+
+   /** 
+    * Set wheter the XML declaration should be written.
+    * The default is false.
+    */
+   public DOMWriter setWriteXMLDeclaration(boolean writeXMLDeclaration)
+   {
+      this.writeXMLDeclaration = writeXMLDeclaration;
+      return this;
+   }
+
+   public void print(Node node)
+   {
+      rootNode = node;
+      printInternal(node, false);
+   }
+
+   private void printInternal(Node node, boolean indentEndMarker)
+   {
+      // is there anything to do?
+      if (node == null)
+      {
+         return;
+      }
+
+      // JBAS-2117 - Don't skip the DOCUMENT_NODE
+      // if (node instanceof Document) node = ((Document)node).getDocumentElement();
+
+      if (wroteXMLDeclaration == false && writeXMLDeclaration == true && canonical == false)
+      {
+         out.print("<?xml version='1.0'");
+         if (charsetName != null)
+            out.print(" encoding='" + charsetName + "'");
+
+         out.println("?>");
+         wroteXMLDeclaration = true;
+      }
+
+      int type = node.getNodeType();
+      boolean hasChildNodes = node.getChildNodes().getLength() > 0;
+
+      String nodeName = node.getNodeName();
+      switch (type)
+      {
+         // print document
+         case Node.DOCUMENT_NODE:
+         {
+            NodeList children = node.getChildNodes();
+            for (int iChild = 0; iChild < children.getLength(); iChild++)
+            {
+               printInternal(children.item(iChild), false);
+            }
+            out.flush();
+            break;
+         }
+
+         // print element with attributes
+         case Node.ELEMENT_NODE:
+         {
+            Element element = (Element)node;
+            if (prettyprint)
+            {
+               for (int i = 0; i < prettyIndent; i++)
+               {
+                  out.print(' ');
+               }
+               prettyIndent++;
+            }
+
+            out.print('<');
+            out.print(nodeName);
+            
+            String prefix = node.getPrefix();
+            String nsURI = (prefix != null ? getNamespaceURI(prefix, element, rootNode) : null);
+            
+            Attr attrs[] = sortAttributes(node.getAttributes());
+            for (int i = 0; i < attrs.length; i++)
+            {
+               Attr attr = attrs[i];
+               String attrName = attr.getNodeName();
+               String attrValue = normalize(attr.getNodeValue());
+               
+               if (prefix != null && attrName.equals("xmlns:" + prefix))
+                  nsURI = attrValue;
+               
+               out.print(" " + attrName + "='" + attrValue + "'");
+            }
+            
+            // Add missing namespace declaration
+            if (prefix != null && nsURI == null)
+            {
+               nsURI = getNamespaceURI(prefix, element, null);
+               out.print(" xmlns:" + prefix + "='" + nsURI + "'");
+            }
+
+            if (hasChildNodes)
+            {
+               out.print('>');
+            }
+
+            // Find out if the end marker is indented
+            indentEndMarker = isEndMarkerIndented(node);
+
+            if (indentEndMarker)
+            {
+               out.print('\n');
+            }
+
+            NodeList childNodes = node.getChildNodes();
+            int len = childNodes.getLength();
+            for (int i = 0; i < len; i++)
+            {
+               Node childNode = childNodes.item(i);
+               printInternal(childNode, false);
+            }
+            break;
+         }
+
+            // handle entity reference nodes
+         case Node.ENTITY_REFERENCE_NODE:
+         {
+            if (canonical)
+            {
+               NodeList children = node.getChildNodes();
+               if (children != null)
+               {
+                  int len = children.getLength();
+                  for (int i = 0; i < len; i++)
+                  {
+                     printInternal(children.item(i), false);
+                  }
+               }
+            }
+            else
+            {
+               out.print('&');
+               out.print(nodeName);
+               out.print(';');
+            }
+            break;
+         }
+
+            // print cdata sections
+         case Node.CDATA_SECTION_NODE:
+         {
+            if (canonical)
+            {
+               out.print(normalize(node.getNodeValue()));
+            }
+            else
+            {
+               out.print("<![CDATA[");
+               out.print(node.getNodeValue());
+               out.print("]]>");
+            }
+            break;
+         }
+
+            // print text
+         case Node.TEXT_NODE:
+         {
+            String text = normalize(node.getNodeValue());
+            if (prettyprint == false || text.trim().length() > 0)
+               out.print(text);
+            break;
+         }
+
+            // print processing instruction
+         case Node.PROCESSING_INSTRUCTION_NODE:
+         {
+            out.print("<?");
+            out.print(nodeName);
+            String data = node.getNodeValue();
+            if (data != null && data.length() > 0)
+            {
+               out.print(' ');
+               out.print(data);
+            }
+            out.print("?>");
+            break;
+         }
+
+            // print comment
+         case Node.COMMENT_NODE:
+         {
+            for (int i = 0; i < prettyIndent; i++)
+            {
+               out.print(' ');
+            }
+
+            out.print("<!--");
+            String data = node.getNodeValue();
+            if (data != null)
+            {
+               out.print(data);
+            }
+            out.print("-->");
+
+            if (prettyprint)
+            {
+               out.print('\n');
+            }
+
+            break;
+         }
+      }
+
+      if (type == Node.ELEMENT_NODE)
+      {
+         if (prettyprint)
+            prettyIndent--;
+
+         if (hasChildNodes == false)
+         {
+            out.print("/>");
+         }
+         else
+         {
+            if (indentEndMarker)
+            {
+               for (int i = 0; i < prettyIndent; i++)
+               {
+                  out.print(' ');
+               }
+            }
+
+            out.print("</");
+            out.print(nodeName);
+            out.print('>');
+         }
+
+         if (prettyIndent > 0)
+         {
+            out.print('\n');
+         }
+      }
+      out.flush();
+   }
+
+   private String getNamespaceURI(String prefix, Element element, Node stopNode)
+   {
+      Node parent = element.getParentNode();
+      String nsURI = element.getAttribute("xmlns:" + prefix);
+      if (nsURI.length() == 0 && element != stopNode && parent instanceof Element)
+         return getNamespaceURI(prefix, (Element)parent, stopNode);
+
+      return (nsURI.length() > 0 ? nsURI : null);
+   }
+
+   private boolean isEndMarkerIndented(Node node)
+   {
+      if (prettyprint)
+      {
+         NodeList childNodes = node.getChildNodes();
+         int len = childNodes.getLength();
+         for (int i = 0; i < len; i++)
+         {
+            Node children = childNodes.item(i);
+            if (children.getNodeType() == Node.ELEMENT_NODE)
+            {
+               return true;
+            }
+         }
+      }
+      return false;
+   }
+
+   /** Returns a sorted list of attributes. */
+   private Attr[] sortAttributes(NamedNodeMap attrs)
+   {
+
+      int len = (attrs != null) ? attrs.getLength() : 0;
+      Attr array[] = new Attr[len];
+      for (int i = 0; i < len; i++)
+      {
+         array[i] = (Attr)attrs.item(i);
+      }
+      for (int i = 0; i < len - 1; i++)
+      {
+         String name = array[i].getNodeName();
+         int index = i;
+         for (int j = i + 1; j < len; j++)
+         {
+            String curName = array[j].getNodeName();
+            if (curName.compareTo(name) < 0)
+            {
+               name = curName;
+               index = j;
+            }
+         }
+         if (index != i)
+         {
+            Attr temp = array[i];
+            array[i] = array[index];
+            array[index] = temp;
+         }
+      }
+      return (array);
+   }
+
+   /** Normalizes the given string. */
+   private String normalize(String s)
+   {
+      StringBuffer str = new StringBuffer();
+
+      int len = (s != null) ? s.length() : 0;
+      for (int i = 0; i < len; i++)
+      {
+         char ch = s.charAt(i);
+         switch (ch)
+         {
+            case '<':
+            {
+               str.append("&lt;");
+               break;
+            }
+            case '>':
+            {
+               str.append("&gt;");
+               break;
+            }
+            case '&':
+            {
+               str.append("&amp;");
+               break;
+            }
+            case '"':
+            {
+               str.append("&quot;");
+               break;
+            }
+            case '\r':
+            case '\n':
+            {
+               if (canonical)
+               {
+                  str.append("&#");
+                  str.append(Integer.toString(ch));
+                  str.append(';');
+                  break;
+               }
+               // else, default append char
+            }
+            default:
+            {
+               str.append(ch);
+            }
+         }
+      }
+      return (str.toString());
+   }
+}
\ No newline at end of file

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,531 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.xml;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Collections;
-import java.util.Map;
-
-import org.jboss.logging.Logger;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
-
-/**
- * Local entity resolver to handle standard J2EE DTDs and Schemas as well as JBoss
- * specific DTDs.
- * <p/>
- * Function boolean isEntityResolved() is here to avoid validation errors in
- * descriptors that do not have a DOCTYPE declaration.
- *
- * @author Scott.Stark at jboss.org
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public class JBossEntityResolver implements EntityResolver
-{
-   private static final Logger log = Logger.getLogger(JBossEntityResolver.class);
-
-   /** A class wide Map<String, String> of publicId/systemId to dtd/xsd file */
-   private static Map entities = new ConcurrentReaderHashMap();
-   /** A class flag indicating whether an attempt to resolve a systemID as a
-    non-file URL should produce a warning rather than a trace level log msg.
-    */
-   private static boolean warnOnNonFileURLs;
-
-   private boolean entityResolved = false;
-   /** A local entities map that overrides the class level entities */
-   private Map localEntities;
-
-   static
-   {
-      AccessController.doPrivileged(new PrivilegedAction()
-      {
-         public Object run()
-         {
-            warnOnNonFileURLs = new Boolean(System.getProperty("org.jboss.resolver.warning", "false")).booleanValue();
-            return null;
-         }
-      });
-      registerEntity("http://java.sun.com/xml/ns/j2ee/application_1_4.xsd", "application_1_4.xsd");
-      registerEntity("http://java.sun.com/xml/ns/javaee/application_5.xsd", "application_5.xsd");
-      registerEntity("http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd", "application-client_1_4.xsd");
-      registerEntity("http://java.sun.com/xml/ns/javaee/application-client_5.xsd", "application-client_5.xsd");
-      registerEntity("http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd", "connector_1_5.xsd");
-      registerEntity("http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd", "ejb-jar_2_1.xsd");
-      registerEntity("http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd", "j2ee_1_4.xsd");
-      registerEntity("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", "web-app_2_4.xsd");
-      registerEntity("http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd", "web-app_2_5.xsd");
-      registerEntity("http://schemas.xmlsoap.org/soap/encoding/", "soap-encoding_1_1.xsd");
-      registerEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd", "j2ee_web_services_client_1_1.xsd");
-      registerEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd", "j2ee_web_services_1_1.xsd");
-      registerEntity("http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd", "j2ee_jaxrpc_mapping_1_1.xsd");
-      registerEntity("http://www.w3.org/2001/xml.xsd", "xml.xsd");
-      registerEntity("http://www.w3.org/2005/05/xmlmime", "xml-media-types.xsd");
-
-      // ejb related
-      registerEntity("-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN", "ejb-jar.dtd");
-      registerEntity("-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN", "ejb-jar_2_0.dtd");
-      // ear stuff
-      registerEntity("-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN", "application_1_2.dtd");
-      registerEntity("-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN", "application_1_3.dtd");
-      registerEntity("-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN", "application-client_1_3.dtd");
-      // connector descriptors
-      registerEntity("-//Sun Microsystems, Inc.//DTD Connector 1.0//EN", "connector_1_0.dtd");
-      // war meta-data
-      registerEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", "web-app_2_2.dtd");
-      registerEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", "web-app_2_3.dtd");
-      // jboss-specific
-      registerEntity("-//JBoss//DTD J2EE Application 1.3//EN", "jboss-app_3_0.dtd");
-      registerEntity("-//JBoss//DTD J2EE Application 1.3V2//EN", "jboss-app_3_2.dtd");
-      registerEntity("-//JBoss//DTD J2EE Application 1.4//EN", "jboss-app_4_0.dtd");
-      registerEntity("-//JBoss//DTD JAWS//EN", "jaws.dtd");
-      registerEntity("-//JBoss//DTD JAWS 2.4//EN", "jaws_2_4.dtd");
-      registerEntity("-//JBoss//DTD JAWS 3.0//EN", "jaws_3_0.dtd");
-      registerEntity("-//JBoss//DTD JBOSS//EN", "jboss.dtd");
-      registerEntity("-//JBoss//DTD JBOSS 2.4//EN", "jboss_2_4.dtd");
-      registerEntity("-//JBoss//DTD JBOSS 3.0//EN", "jboss_3_0.dtd");
-      registerEntity("-//JBoss//DTD JBOSS 3.2//EN", "jboss_3_2.dtd");
-      registerEntity("-//JBoss//DTD JBOSS 4.0//EN", "jboss_4_0.dtd");
-      registerEntity("-//JBoss//DTD JBOSS 5.0//EN", "jboss_5_0.dtd");
-      registerEntity("-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN", "jbosscmp-jdbc_3_0.dtd");
-      registerEntity("-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN", "jbosscmp-jdbc_3_2.dtd");
-      registerEntity("-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN", "jbosscmp-jdbc_4_0.dtd");
-      registerEntity("-//JBoss//DTD Web Application 2.2//EN", "jboss-web.dtd");
-      registerEntity("-//JBoss//DTD Web Application 2.3//EN", "jboss-web_3_0.dtd");
-      registerEntity("-//JBoss//DTD Web Application 2.3V2//EN", "jboss-web_3_2.dtd");
-      registerEntity("-//JBoss//DTD Web Application 2.4//EN", "jboss-web_4_0.dtd");
-      registerEntity("-//JBoss//DTD Web Application 5.0//EN", "jboss-web_5_0.dtd");
-      registerEntity("-//JBoss//DTD Application Client 3.2//EN", "jboss-client_3_2.dtd");
-      registerEntity("-//JBoss//DTD Application Client 4.0//EN", "jboss-client_4_0.dtd");
-      registerEntity("-//JBoss//DTD Application Client 5.0//EN", "jboss-client_5_0.dtd");
-      registerEntity("-//JBoss//DTD MBean Service 3.2//EN", "jboss-service_3_2.dtd");
-      registerEntity("-//JBoss//DTD MBean Service 4.0//EN", "jboss-service_4_0.dtd");
-      registerEntity("-//JBoss//DTD JBOSS XMBEAN 1.0//EN", "jboss_xmbean_1_0.dtd");
-      registerEntity("-//JBoss//DTD JBOSS XMBEAN 1.1//EN", "jboss_xmbean_1_1.dtd");
-      registerEntity("-//JBoss//DTD JBOSS XMBEAN 1.2//EN", "jboss_xmbean_1_2.dtd");
-      registerEntity("-//JBoss//DTD JBOSS Security Config 3.0//EN", "security_config.dtd");
-      registerEntity("-//JBoss//DTD JBOSS JCA Config 1.0//EN", "jboss-ds_1_0.dtd");
-      registerEntity("-//JBoss//DTD JBOSS JCA Config 1.5//EN", "jboss-ds_1_5.dtd");
-      registerEntity("http://www.jboss.org/j2ee/schema/security-config_4_0.xsd", "security-config_4_0.xsd");
-      registerEntity("urn:jboss:aop-deployer", "aop-deployer_1_1.xsd");
-      registerEntity("urn:jboss:aop-beans:1.0", "aop-beans_1_0.xsd");
-      registerEntity("urn:jboss:bean-deployer", "bean-deployer_1_0.xsd");
-      registerEntity("urn:jboss:bean-deployer:2.0", "bean-deployer_2_0.xsd");
-      registerEntity("urn:jboss:javabean:1.0", "javabean_1_0.xsd");
-      registerEntity("urn:jboss:security-config:4.1", "security-config_4_1.xsd");
-      registerEntity("urn:jboss:security-config:5.0", "security-config_5_0.xsd");
-      registerEntity("urn:jboss:jndi-binding-service:1.0", "jndi-binding-service_1_0.xsd");
-      registerEntity("urn:jboss:jbossws-config:5.0", "jbossws-config_1_0.xsd");
-      registerEntity("urn:jboss:user-roles:1.0", "user-roles_1_0.xsd");
-      // xml
-      registerEntity("-//W3C//DTD/XMLSCHEMA 200102//EN", "XMLSchema.dtd");
-      registerEntity("http://www.w3.org/2001/XMLSchema.dtd", "XMLSchema.dtd");
-      registerEntity("datatypes", "datatypes.dtd"); // This dtd doesn't have a publicId - see XMLSchema.dtd
-      registerEntity("http://www.w3.org/XML/1998/namespace", "xml.xsd");
-
-      //ejb3 + jee5 related
-      registerEntity("http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd", "ejb-jar_3_0.xsd");
-      registerEntity("http://java.sun.com/xml/ns/javaee/javaee_web_services_client_1_2.xsd", "javaee_web_services_client_1_2.xsd");
-      registerEntity("http://java.sun.com/xml/ns/javaee/javaee_5.xsd", "javaee_5.xsd");
-      registerEntity("http://www.jboss.org/j2ee/schema/jboss_5_0.xsd", "jboss_5_0.xsd");
-   }
-
-   /**
-    Obtain a read-only view of the current entity map.
-
-    @return Map<String, String> of the publicID/systemID to dtd/schema file name
-    */
-   public static Map getEntityMap()
-   {
-      return Collections.unmodifiableMap(entities);
-   }
-
-   public static boolean isWarnOnNonFileURLs()
-   {
-      return warnOnNonFileURLs;
-   }
-   public static void setWarnOnNonFileURLs(boolean warnOnNonFileURLs)
-   {
-      JBossEntityResolver.warnOnNonFileURLs = warnOnNonFileURLs;
-   }
-
-   /**
-    * Register the mapping from the public id/system id to the dtd/xsd file
-    * name. This overwrites any existing mapping.
-    *
-    * @param id  the DOCTYPE public id or system id such as
-    * "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
-    * @param dtdFileName the simple dtd/xsd file name, "ejb-jar.dtd"
-    */
-   public static void registerEntity(String id, String dtdFileName)
-   {
-      entities.put(id, dtdFileName);
-   }
-
-   /**
-    * Register the mapping from the public id/system id to the dtd/xsd file
-    * name. This overwrites any existing mapping.
-    *
-    * @param id  the DOCTYPE public id or system id such as
-    * "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
-    * @param dtdOrSchema the simple dtd/xsd file name, "ejb-jar.dtd"
-    */
-   public synchronized void registerLocalEntity(String id, String dtdOrSchema)
-   {
-      if( localEntities == null )
-         localEntities = new ConcurrentReaderHashMap();
-      localEntities.put(id, dtdOrSchema);
-   }
-
-   /**
-    Returns DTD/Schema inputSource. The resolution logic is:
-
-    1. Check the publicId against the current registered values in the class
-    mapping of entity name to dtd/schema file name. If found, the resulting
-    file name is passed to the loadClasspathResource to locate the file as a
-    classpath resource.
-
-    2. Check the systemId against the current registered values in the class
-    mapping of entity name to dtd/schema file name. If found, the resulting
-    file name is passed to the loadClasspathResource to locate the file as a
-    classpath resource.
-
-    3. Strip the systemId name down to the simple file name by removing an URL
-    style path elements (myschemas/x.dtd becomes x.dtd), and call
-    loadClasspathResource to locate the simple file name as a classpath resource.
-
-    4. Attempt to resolve the systemId as a URL from which the schema can be
-    read. If the URL input stream can be opened this returned as the resolved
-    input.
-
-    @param publicId - Public ID of DTD, or null if it is a schema
-    @param systemId - the system ID of DTD or Schema
-    @return InputSource of entity
-    */
-   public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
-   {
-      entityResolved = false;
-
-      // nothing to resolve
-      if( publicId == null && systemId == null )
-         return null;
-
-      boolean trace = log.isTraceEnabled();
-
-      // Look for a registered publicID
-      InputSource inputSource = resolvePublicID(publicId, trace);
-
-      if( inputSource == null )
-      {
-         // Try to resolve the systemID from the registry
-         inputSource = resolveSystemID(systemId, trace);
-      }
-
-      if( inputSource == null )
-      {
-         // Try to resolve the systemID as a classpath reference under dtd or schema
-         inputSource = resolveClasspathName(systemId, trace);
-      }
-
-      if( inputSource == null )
-      {
-         // Try to resolve the systemID as a absolute URL
-         inputSource = resolveSystemIDasURL(systemId, trace);
-      }
-
-      entityResolved = (inputSource != null);
-      
-      if (entityResolved == false)
-         log.debug("Cannot resolve [publicID=" + publicId + ",systemID=" + systemId + "]");
-      
-      return inputSource;
-   }
-
-   /**
-    * Returns the boolean value to inform id DTD was found in the XML file or not
-    *
-    * @todo this is not thread safe and should be removed?
-    *
-    * @return boolean - true if DTD was found in XML
-    */
-   public boolean isEntityResolved()
-   {
-      return entityResolved;
-   }
-
-   /**
-    Load the schema from the class entity to schema file mapping.
-    @see #registerEntity(String, String)
-
-    @param publicId - the public entity name of the schema
-    @param trace - trace level logging flag
-    @return the InputSource for the schema file found on the classpath, null
-      if the publicId is not registered or found.
-    */
-   private InputSource resolvePublicID(String publicId, boolean trace)
-   {
-      if( publicId == null )
-         return null;
-
-      if (trace)
-         log.trace("resolvePublicID, publicId=" + publicId);
-
-      InputSource inputSource = null;
-
-      String filename = null;
-      if( localEntities != null )
-         filename = (String) localEntities.get(publicId);
-      if( filename == null )
-         filename = (String) entities.get(publicId);
-
-      if( filename != null )
-      {
-         if (trace)
-            log.trace("Found entity from publicId=" + publicId + " fileName=" + filename);
-
-         InputStream ins = loadClasspathResource(filename, trace);
-         if( ins != null )
-         {
-            inputSource = new InputSource(ins);
-            inputSource.setPublicId(publicId);
-         }
-         else
-         {
-            log.warn("Cannot load publicId from resource: " + filename);
-         }
-      }
-
-      return inputSource;
-   }
-
-   /**
-    Attempt to use the systemId as a URL from which the schema can be read. This
-    checks to see whether the systemId is a key to an entry in the class
-    entity map.
-
-    @param systemId - the systemId
-    @param trace - trace level logging flag
-    @return the URL InputSource if the URL input stream can be opened, null
-      if the systemId is not a URL or could not be opened.
-    */
-   private InputSource resolveSystemID(String systemId, boolean trace)
-   {
-      if( systemId == null )
-         return null;
-
-      if( trace )
-         log.trace("resolveSystemID, systemId="+systemId);
-
-      InputSource inputSource = null;
-
-      // Try to resolve the systemId as an entity key
-      String filename = null;
-      if( localEntities != null )
-         filename = (String) localEntities.get(systemId);
-      if( filename == null )
-         filename = (String) entities.get(systemId);
-
-      if ( filename != null )
-      {
-         if( trace )
-            log.trace("Found entity systemId=" + systemId + " fileName=" + filename);
-
-         InputStream ins = loadClasspathResource(filename, trace);
-         if( ins != null )
-         {
-            inputSource = new InputSource(ins);
-            inputSource.setSystemId(systemId);
-         }
-         else
-         {
-            log.warn("Cannot load systemId from resource: " + filename);
-         }
-      }
-
-      return inputSource;
-   }
-
-   /**
-   Attempt to use the systemId as a URL from which the schema can be read. This
-   uses the systemID as a URL.
-
-   @param systemId - the systemId
-   @param trace - trace level logging flag
-   @return the URL InputSource if the URL input stream can be opened, null
-     if the systemId is not a URL or could not be opened.
-   */
-  private InputSource resolveSystemIDasURL(String systemId, boolean trace)
-  {
-     if( systemId == null )
-        return null;
-
-     if( trace )
-        log.trace("resolveSystemIDasURL, systemId="+systemId);
-
-     InputSource inputSource = null;
-
-     // Try to use the systemId as a URL to the schema
-      try
-      {
-         if (trace)
-            log.trace("Trying to resolve systemId as a URL");
-         
-         URL url = new URL(systemId);
-         if (warnOnNonFileURLs && url.getProtocol().equalsIgnoreCase("file") == false)
-         {
-            log.warn("Trying to resolve systemId as a non-file URL: " + systemId);
-         }
-
-         InputStream ins = url.openStream();
-         if (ins != null)
-         {
-            inputSource = new InputSource(ins);
-            inputSource.setSystemId(systemId);
-         }         
-         else
-         {
-            log.warn("Cannot load systemId as URL: " + systemId);
-         }
-         
-         if (trace)
-            log.trace("Resolved systemId as a URL");
-      }
-      catch (MalformedURLException ignored)
-      {
-         if (trace)
-            log.trace("SystemId is not a url: " + systemId, ignored);
-      }
-      catch (IOException e)
-      {
-         if (trace)
-            log.trace("Failed to obtain URL.InputStream from systemId: " + systemId, e);
-      }
-      return inputSource;
-  }
-
-   /**
-    Resolve the systemId as a classpath resource. If not found, the
-    systemId is simply used as a classpath resource name.
-
-    @param systemId - the system ID of DTD or Schema
-    @param trace - trace level logging flag
-    @return the InputSource for the schema file found on the classpath, null
-      if the systemId is not registered or found.
-    */
-   private InputSource resolveClasspathName(String systemId, boolean trace)
-   {
-      if( systemId == null )
-         return null;
-
-      if( trace )
-         log.trace("resolveClasspathName, systemId="+systemId);
-      String filename = systemId;
-      // Parse the systemId as a uri to get the final path component
-      try
-      {
-         URI url = new URI(systemId);
-         String path = url.getPath();
-         if( path == null )
-            path = url.getSchemeSpecificPart();
-         int slash = path.lastIndexOf('/');
-         if( slash >= 0 )
-            filename = path.substring(slash + 1);
-         else
-            filename = path;
-
-         if(path.length() == 0)
-            return null;
-
-         if (trace)
-            log.trace("Mapped systemId to filename: " + filename);
-      }
-      catch (URISyntaxException e)
-      {
-         if (trace)
-            log.trace("systemId: is not a URI, using systemId as resource", e);
-      }
-
-      // Resolve the filename as a classpath resource
-      InputStream is = loadClasspathResource(filename, trace);
-      InputSource inputSource = null;
-      if( is != null )
-      {
-         inputSource = new InputSource(is);
-         inputSource.setSystemId(systemId);
-      }
-      return inputSource;
-   }
-
-   /**
-    Look for the resource name on the thread context loader resource path. This
-    first simply tries the resource name as is, and if not found, the resource
-    is prepended with either "dtd/" or "schema/" depending on whether the
-    resource ends in ".dtd" or ".xsd".
-
-    @param resource - the classpath resource name of the schema
-    @param trace - trace level logging flag
-    @return the resource InputStream if found, null if not found.
-    */
-   private InputStream loadClasspathResource(String resource, boolean trace)
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      URL url = loader.getResource(resource);
-      if( url == null )
-      {
-         /* Prefix the simple filename with the schema type patch as this is the
-               naming convention for the jboss bundled schemas.
-            */
-         if( resource.endsWith(".dtd") )
-            resource = "dtd/" + resource;
-         else if( resource.endsWith(".xsd") )
-            resource = "schema/" + resource;
-         url = loader.getResource(resource);
-      }
-
-      InputStream inputStream = null;
-      if( url != null )
-      {
-         if( trace )
-            log.trace(resource+" maps to URL: "+url);
-         try
-         {
-            inputStream = url.openStream();
-         }
-         catch(IOException e)
-         {
-            log.debug("Failed to open url stream", e);
-         }
-      }
-      return inputStream;
-   }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java)
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -0,0 +1,530 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.util.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Collections;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
+
+/**
+ * Local entity resolver to handle standard J2EE DTDs and Schemas as well as JBoss
+ * specific DTDs.
+ * <p/>
+ * Function boolean isEntityResolved() is here to avoid validation errors in
+ * descriptors that do not have a DOCTYPE declaration.
+ *
+ * @author Scott.Stark at jboss.org
+ * @author Thomas.Diesler at jboss.org
+ * @version $Revision$
+ */
+public class JBossEntityResolver implements EntityResolver
+{
+   private static final Logger log = Logger.getLogger(JBossEntityResolver.class);
+
+   /** A class wide Map<String, String> of publicId/systemId to dtd/xsd file */
+   private static Map entities = new ConcurrentReaderHashMap();
+   /** A class flag indicating whether an attempt to resolve a systemID as a
+    non-file URL should produce a warning rather than a trace level log msg.
+    */
+   private static boolean warnOnNonFileURLs;
+
+   private boolean entityResolved = false;
+   /** A local entities map that overrides the class level entities */
+   private Map localEntities;
+
+   static
+   {
+      AccessController.doPrivileged(new PrivilegedAction()
+      {
+         public Object run()
+         {
+            warnOnNonFileURLs = new Boolean(System.getProperty("org.jboss.resolver.warning", "false")).booleanValue();
+            return null;
+         }
+      });
+      registerEntity("http://java.sun.com/xml/ns/j2ee/application_1_4.xsd", "application_1_4.xsd");
+      registerEntity("http://java.sun.com/xml/ns/javaee/application_5.xsd", "application_5.xsd");
+      registerEntity("http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd", "application-client_1_4.xsd");
+      registerEntity("http://java.sun.com/xml/ns/javaee/application-client_5.xsd", "application-client_5.xsd");
+      registerEntity("http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd", "connector_1_5.xsd");
+      registerEntity("http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd", "ejb-jar_2_1.xsd");
+      registerEntity("http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd", "j2ee_1_4.xsd");
+      registerEntity("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd", "web-app_2_4.xsd");
+      registerEntity("http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd", "web-app_2_5.xsd");
+      registerEntity("http://schemas.xmlsoap.org/soap/encoding/", "soap-encoding_1_1.xsd");
+      registerEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd", "j2ee_web_services_client_1_1.xsd");
+      registerEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd", "j2ee_web_services_1_1.xsd");
+      registerEntity("http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd", "j2ee_jaxrpc_mapping_1_1.xsd");
+      registerEntity("http://www.w3.org/2001/xml.xsd", "xml.xsd");
+      registerEntity("http://www.w3.org/2005/05/xmlmime", "xml-media-types.xsd");
+
+      // ejb related
+      registerEntity("-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN", "ejb-jar.dtd");
+      registerEntity("-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN", "ejb-jar_2_0.dtd");
+      // ear stuff
+      registerEntity("-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN", "application_1_2.dtd");
+      registerEntity("-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN", "application_1_3.dtd");
+      registerEntity("-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN", "application-client_1_3.dtd");
+      // connector descriptors
+      registerEntity("-//Sun Microsystems, Inc.//DTD Connector 1.0//EN", "connector_1_0.dtd");
+      // war meta-data
+      registerEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", "web-app_2_2.dtd");
+      registerEntity("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", "web-app_2_3.dtd");
+      // jboss-specific
+      registerEntity("-//JBoss//DTD J2EE Application 1.3//EN", "jboss-app_3_0.dtd");
+      registerEntity("-//JBoss//DTD J2EE Application 1.3V2//EN", "jboss-app_3_2.dtd");
+      registerEntity("-//JBoss//DTD J2EE Application 1.4//EN", "jboss-app_4_0.dtd");
+      registerEntity("-//JBoss//DTD JAWS//EN", "jaws.dtd");
+      registerEntity("-//JBoss//DTD JAWS 2.4//EN", "jaws_2_4.dtd");
+      registerEntity("-//JBoss//DTD JAWS 3.0//EN", "jaws_3_0.dtd");
+      registerEntity("-//JBoss//DTD JBOSS//EN", "jboss.dtd");
+      registerEntity("-//JBoss//DTD JBOSS 2.4//EN", "jboss_2_4.dtd");
+      registerEntity("-//JBoss//DTD JBOSS 3.0//EN", "jboss_3_0.dtd");
+      registerEntity("-//JBoss//DTD JBOSS 3.2//EN", "jboss_3_2.dtd");
+      registerEntity("-//JBoss//DTD JBOSS 4.0//EN", "jboss_4_0.dtd");
+      registerEntity("-//JBoss//DTD JBOSS 5.0//EN", "jboss_5_0.dtd");
+      registerEntity("-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN", "jbosscmp-jdbc_3_0.dtd");
+      registerEntity("-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN", "jbosscmp-jdbc_3_2.dtd");
+      registerEntity("-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN", "jbosscmp-jdbc_4_0.dtd");
+      registerEntity("-//JBoss//DTD Web Application 2.2//EN", "jboss-web.dtd");
+      registerEntity("-//JBoss//DTD Web Application 2.3//EN", "jboss-web_3_0.dtd");
+      registerEntity("-//JBoss//DTD Web Application 2.3V2//EN", "jboss-web_3_2.dtd");
+      registerEntity("-//JBoss//DTD Web Application 2.4//EN", "jboss-web_4_0.dtd");
+      registerEntity("-//JBoss//DTD Web Application 5.0//EN", "jboss-web_5_0.dtd");
+      registerEntity("-//JBoss//DTD Application Client 3.2//EN", "jboss-client_3_2.dtd");
+      registerEntity("-//JBoss//DTD Application Client 4.0//EN", "jboss-client_4_0.dtd");
+      registerEntity("-//JBoss//DTD Application Client 5.0//EN", "jboss-client_5_0.dtd");
+      registerEntity("-//JBoss//DTD MBean Service 3.2//EN", "jboss-service_3_2.dtd");
+      registerEntity("-//JBoss//DTD MBean Service 4.0//EN", "jboss-service_4_0.dtd");
+      registerEntity("-//JBoss//DTD JBOSS XMBEAN 1.0//EN", "jboss_xmbean_1_0.dtd");
+      registerEntity("-//JBoss//DTD JBOSS XMBEAN 1.1//EN", "jboss_xmbean_1_1.dtd");
+      registerEntity("-//JBoss//DTD JBOSS XMBEAN 1.2//EN", "jboss_xmbean_1_2.dtd");
+      registerEntity("-//JBoss//DTD JBOSS Security Config 3.0//EN", "security_config.dtd");
+      registerEntity("-//JBoss//DTD JBOSS JCA Config 1.0//EN", "jboss-ds_1_0.dtd");
+      registerEntity("-//JBoss//DTD JBOSS JCA Config 1.5//EN", "jboss-ds_1_5.dtd");
+      registerEntity("http://www.jboss.org/j2ee/schema/security-config_4_0.xsd", "security-config_4_0.xsd");
+      registerEntity("urn:jboss:aop-deployer", "aop-deployer_1_1.xsd");
+      registerEntity("urn:jboss:aop-beans:1.0", "aop-beans_1_0.xsd");
+      registerEntity("urn:jboss:bean-deployer", "bean-deployer_1_0.xsd");
+      registerEntity("urn:jboss:bean-deployer:2.0", "bean-deployer_2_0.xsd");
+      registerEntity("urn:jboss:javabean:1.0", "javabean_1_0.xsd");
+      registerEntity("urn:jboss:security-config:4.1", "security-config_4_1.xsd");
+      registerEntity("urn:jboss:security-config:5.0", "security-config_5_0.xsd");
+      registerEntity("urn:jboss:jndi-binding-service:1.0", "jndi-binding-service_1_0.xsd");
+      registerEntity("urn:jboss:user-roles:1.0", "user-roles_1_0.xsd");
+      // xml
+      registerEntity("-//W3C//DTD/XMLSCHEMA 200102//EN", "XMLSchema.dtd");
+      registerEntity("http://www.w3.org/2001/XMLSchema.dtd", "XMLSchema.dtd");
+      registerEntity("datatypes", "datatypes.dtd"); // This dtd doesn't have a publicId - see XMLSchema.dtd
+      registerEntity("http://www.w3.org/XML/1998/namespace", "xml.xsd");
+
+      //ejb3 + jee5 related
+      registerEntity("http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd", "ejb-jar_3_0.xsd");
+      registerEntity("http://java.sun.com/xml/ns/javaee/javaee_web_services_client_1_2.xsd", "javaee_web_services_client_1_2.xsd");
+      registerEntity("http://java.sun.com/xml/ns/javaee/javaee_5.xsd", "javaee_5.xsd");
+      registerEntity("http://www.jboss.org/j2ee/schema/jboss_5_0.xsd", "jboss_5_0.xsd");
+   }
+
+   /**
+    Obtain a read-only view of the current entity map.
+
+    @return Map<String, String> of the publicID/systemID to dtd/schema file name
+    */
+   public static Map getEntityMap()
+   {
+      return Collections.unmodifiableMap(entities);
+   }
+
+   public static boolean isWarnOnNonFileURLs()
+   {
+      return warnOnNonFileURLs;
+   }
+   public static void setWarnOnNonFileURLs(boolean warnOnNonFileURLs)
+   {
+      JBossEntityResolver.warnOnNonFileURLs = warnOnNonFileURLs;
+   }
+
+   /**
+    * Register the mapping from the public id/system id to the dtd/xsd file
+    * name. This overwrites any existing mapping.
+    *
+    * @param id  the DOCTYPE public id or system id such as
+    * "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+    * @param dtdFileName the simple dtd/xsd file name, "ejb-jar.dtd"
+    */
+   public static void registerEntity(String id, String dtdFileName)
+   {
+      entities.put(id, dtdFileName);
+   }
+
+   /**
+    * Register the mapping from the public id/system id to the dtd/xsd file
+    * name. This overwrites any existing mapping.
+    *
+    * @param id  the DOCTYPE public id or system id such as
+    * "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
+    * @param dtdOrSchema the simple dtd/xsd file name, "ejb-jar.dtd"
+    */
+   public synchronized void registerLocalEntity(String id, String dtdOrSchema)
+   {
+      if( localEntities == null )
+         localEntities = new ConcurrentReaderHashMap();
+      localEntities.put(id, dtdOrSchema);
+   }
+
+   /**
+    Returns DTD/Schema inputSource. The resolution logic is:
+
+    1. Check the publicId against the current registered values in the class
+    mapping of entity name to dtd/schema file name. If found, the resulting
+    file name is passed to the loadClasspathResource to locate the file as a
+    classpath resource.
+
+    2. Check the systemId against the current registered values in the class
+    mapping of entity name to dtd/schema file name. If found, the resulting
+    file name is passed to the loadClasspathResource to locate the file as a
+    classpath resource.
+
+    3. Strip the systemId name down to the simple file name by removing an URL
+    style path elements (myschemas/x.dtd becomes x.dtd), and call
+    loadClasspathResource to locate the simple file name as a classpath resource.
+
+    4. Attempt to resolve the systemId as a URL from which the schema can be
+    read. If the URL input stream can be opened this returned as the resolved
+    input.
+
+    @param publicId - Public ID of DTD, or null if it is a schema
+    @param systemId - the system ID of DTD or Schema
+    @return InputSource of entity
+    */
+   public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
+   {
+      entityResolved = false;
+
+      // nothing to resolve
+      if( publicId == null && systemId == null )
+         return null;
+
+      boolean trace = log.isTraceEnabled();
+
+      // Look for a registered publicID
+      InputSource inputSource = resolvePublicID(publicId, trace);
+
+      if( inputSource == null )
+      {
+         // Try to resolve the systemID from the registry
+         inputSource = resolveSystemID(systemId, trace);
+      }
+
+      if( inputSource == null )
+      {
+         // Try to resolve the systemID as a classpath reference under dtd or schema
+         inputSource = resolveClasspathName(systemId, trace);
+      }
+
+      if( inputSource == null )
+      {
+         // Try to resolve the systemID as a absolute URL
+         inputSource = resolveSystemIDasURL(systemId, trace);
+      }
+
+      entityResolved = (inputSource != null);
+      
+      if (entityResolved == false)
+         log.debug("Cannot resolve [publicID=" + publicId + ",systemID=" + systemId + "]");
+      
+      return inputSource;
+   }
+
+   /**
+    * Returns the boolean value to inform id DTD was found in the XML file or not
+    *
+    * @todo this is not thread safe and should be removed?
+    *
+    * @return boolean - true if DTD was found in XML
+    */
+   public boolean isEntityResolved()
+   {
+      return entityResolved;
+   }
+
+   /**
+    Load the schema from the class entity to schema file mapping.
+    @see #registerEntity(String, String)
+
+    @param publicId - the public entity name of the schema
+    @param trace - trace level logging flag
+    @return the InputSource for the schema file found on the classpath, null
+      if the publicId is not registered or found.
+    */
+   private InputSource resolvePublicID(String publicId, boolean trace)
+   {
+      if( publicId == null )
+         return null;
+
+      if (trace)
+         log.trace("resolvePublicID, publicId=" + publicId);
+
+      InputSource inputSource = null;
+
+      String filename = null;
+      if( localEntities != null )
+         filename = (String) localEntities.get(publicId);
+      if( filename == null )
+         filename = (String) entities.get(publicId);
+
+      if( filename != null )
+      {
+         if (trace)
+            log.trace("Found entity from publicId=" + publicId + " fileName=" + filename);
+
+         InputStream ins = loadClasspathResource(filename, trace);
+         if( ins != null )
+         {
+            inputSource = new InputSource(ins);
+            inputSource.setPublicId(publicId);
+         }
+         else
+         {
+            log.warn("Cannot load publicId from resource: " + filename);
+         }
+      }
+
+      return inputSource;
+   }
+
+   /**
+    Attempt to use the systemId as a URL from which the schema can be read. This
+    checks to see whether the systemId is a key to an entry in the class
+    entity map.
+
+    @param systemId - the systemId
+    @param trace - trace level logging flag
+    @return the URL InputSource if the URL input stream can be opened, null
+      if the systemId is not a URL or could not be opened.
+    */
+   private InputSource resolveSystemID(String systemId, boolean trace)
+   {
+      if( systemId == null )
+         return null;
+
+      if( trace )
+         log.trace("resolveSystemID, systemId="+systemId);
+
+      InputSource inputSource = null;
+
+      // Try to resolve the systemId as an entity key
+      String filename = null;
+      if( localEntities != null )
+         filename = (String) localEntities.get(systemId);
+      if( filename == null )
+         filename = (String) entities.get(systemId);
+
+      if ( filename != null )
+      {
+         if( trace )
+            log.trace("Found entity systemId=" + systemId + " fileName=" + filename);
+
+         InputStream ins = loadClasspathResource(filename, trace);
+         if( ins != null )
+         {
+            inputSource = new InputSource(ins);
+            inputSource.setSystemId(systemId);
+         }
+         else
+         {
+            log.warn("Cannot load systemId from resource: " + filename);
+         }
+      }
+
+      return inputSource;
+   }
+
+   /**
+   Attempt to use the systemId as a URL from which the schema can be read. This
+   uses the systemID as a URL.
+
+   @param systemId - the systemId
+   @param trace - trace level logging flag
+   @return the URL InputSource if the URL input stream can be opened, null
+     if the systemId is not a URL or could not be opened.
+   */
+  private InputSource resolveSystemIDasURL(String systemId, boolean trace)
+  {
+     if( systemId == null )
+        return null;
+
+     if( trace )
+        log.trace("resolveSystemIDasURL, systemId="+systemId);
+
+     InputSource inputSource = null;
+
+     // Try to use the systemId as a URL to the schema
+      try
+      {
+         if (trace)
+            log.trace("Trying to resolve systemId as a URL");
+         
+         URL url = new URL(systemId);
+         if (warnOnNonFileURLs && url.getProtocol().equalsIgnoreCase("file") == false)
+         {
+            log.warn("Trying to resolve systemId as a non-file URL: " + systemId);
+         }
+
+         InputStream ins = url.openStream();
+         if (ins != null)
+         {
+            inputSource = new InputSource(ins);
+            inputSource.setSystemId(systemId);
+         }         
+         else
+         {
+            log.warn("Cannot load systemId as URL: " + systemId);
+         }
+         
+         if (trace)
+            log.trace("Resolved systemId as a URL");
+      }
+      catch (MalformedURLException ignored)
+      {
+         if (trace)
+            log.trace("SystemId is not a url: " + systemId, ignored);
+      }
+      catch (IOException e)
+      {
+         if (trace)
+            log.trace("Failed to obtain URL.InputStream from systemId: " + systemId, e);
+      }
+      return inputSource;
+  }
+
+   /**
+    Resolve the systemId as a classpath resource. If not found, the
+    systemId is simply used as a classpath resource name.
+
+    @param systemId - the system ID of DTD or Schema
+    @param trace - trace level logging flag
+    @return the InputSource for the schema file found on the classpath, null
+      if the systemId is not registered or found.
+    */
+   private InputSource resolveClasspathName(String systemId, boolean trace)
+   {
+      if( systemId == null )
+         return null;
+
+      if( trace )
+         log.trace("resolveClasspathName, systemId="+systemId);
+      String filename = systemId;
+      // Parse the systemId as a uri to get the final path component
+      try
+      {
+         URI url = new URI(systemId);
+         String path = url.getPath();
+         if( path == null )
+            path = url.getSchemeSpecificPart();
+         int slash = path.lastIndexOf('/');
+         if( slash >= 0 )
+            filename = path.substring(slash + 1);
+         else
+            filename = path;
+
+         if(path.length() == 0)
+            return null;
+
+         if (trace)
+            log.trace("Mapped systemId to filename: " + filename);
+      }
+      catch (URISyntaxException e)
+      {
+         if (trace)
+            log.trace("systemId: is not a URI, using systemId as resource", e);
+      }
+
+      // Resolve the filename as a classpath resource
+      InputStream is = loadClasspathResource(filename, trace);
+      InputSource inputSource = null;
+      if( is != null )
+      {
+         inputSource = new InputSource(is);
+         inputSource.setSystemId(systemId);
+      }
+      return inputSource;
+   }
+
+   /**
+    Look for the resource name on the thread context loader resource path. This
+    first simply tries the resource name as is, and if not found, the resource
+    is prepended with either "dtd/" or "schema/" depending on whether the
+    resource ends in ".dtd" or ".xsd".
+
+    @param resource - the classpath resource name of the schema
+    @param trace - trace level logging flag
+    @return the resource InputStream if found, null if not found.
+    */
+   private InputStream loadClasspathResource(String resource, boolean trace)
+   {
+      ClassLoader loader = Thread.currentThread().getContextClassLoader();
+      URL url = loader.getResource(resource);
+      if( url == null )
+      {
+         /* Prefix the simple filename with the schema type patch as this is the
+               naming convention for the jboss bundled schemas.
+            */
+         if( resource.endsWith(".dtd") )
+            resource = "dtd/" + resource;
+         else if( resource.endsWith(".xsd") )
+            resource = "schema/" + resource;
+         url = loader.getResource(resource);
+      }
+
+      InputStream inputStream = null;
+      if( url != null )
+      {
+         if( trace )
+            log.trace(resource+" maps to URL: "+url);
+         try
+         {
+            inputStream = url.openStream();
+         }
+         catch(IOException e)
+         {
+            log.debug("Failed to open url stream", e);
+         }
+      }
+      return inputStream;
+   }
+
+}

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossErrorHandler.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/JBossErrorHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossErrorHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,126 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.xml;
-
-import javax.xml.transform.ErrorListener;
-import javax.xml.transform.TransformerException;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.JBossStringBuilder;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXParseException;
-
-public class JBossErrorHandler implements ErrorHandler, ErrorListener
-{
-   private static final Logger log =Logger.getLogger(JBossErrorHandler.class);
-   
-   // The xml file being parsed
-   private String fileName;
-   private JBossEntityResolver resolver;
-   private boolean error;
-   
-   public JBossErrorHandler(String fileName, JBossEntityResolver resolver)
-   {
-      this.fileName = fileName;
-      this.resolver = resolver;
-      this.error = false;
-   }
-   
-   public void error(SAXParseException e)
-   {
-      if (resolver == null || resolver.isEntityResolved())
-      {
-         error = true;
-         log.error(formatError("error", e));
-      }
-   }
-   
-   public void fatalError(SAXParseException e)
-   {
-      if (resolver == null || resolver.isEntityResolved())
-      {
-         error = true;
-         log.error(formatError("fatal", e));
-      }
-   }
-   
-   public void warning(SAXParseException e)
-   {
-      if (resolver == null || resolver.isEntityResolved())
-      {
-         error = true;
-         log.error(formatError("warning", e));
-      }
-   }
-   
-   public void error(TransformerException e)
-   {
-      if (resolver == null || resolver.isEntityResolved())
-      {
-         error = true;
-         log.error(formatError("error", e));
-      }
-   }
-   
-   public void fatalError(TransformerException e)
-   {
-      if (resolver == null || resolver.isEntityResolved())
-      {
-         error = true;
-         log.error(formatError("fatal", e));
-      }
-   }
-   
-   public void warning(TransformerException e)
-   {
-      if (resolver == null || resolver.isEntityResolved())
-      {
-         error = true;
-         log.error(formatError("warning", e));
-      }
-   }
-
-   protected String formatError(String context, SAXParseException e)
-   {
-      JBossStringBuilder buffer = new JBossStringBuilder();
-      buffer.append("File ").append(fileName);
-      buffer.append(" process ").append(context);
-      buffer.append(". Line: ").append(e.getLineNumber());
-      buffer.append(". Error message: ").append(e.getMessage());
-      return buffer.toString();
-   }
-
-   protected String formatError(String context, TransformerException e)
-   {
-      JBossStringBuilder buffer = new JBossStringBuilder();
-      buffer.append("File ").append(fileName);
-      buffer.append(" process ").append(context);
-      buffer.append(". Location: ").append(e.getLocationAsString());
-      buffer.append(". Error message: ").append(e.getMessage());
-      return buffer.toString();
-   }
-   
-   public boolean hadError()
-   {
-      return error;
-   }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/JBossErrorHandler.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/JBossErrorHandler.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlHelper.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/XmlHelper.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlHelper.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,233 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.xml;
-
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * A utility class to cover up the rough bits of xml parsing
- *      
- * @author <a href="mailto:chris at kimptoc.net">Chris Kimpton</a>
- * @version $Revision$
- */
-public class XmlHelper
-{
-   public static void write(Writer out, Document dom)
-      throws Exception
-   {
-      new DOMWriter(out).setPrettyprint(true).print(dom);
-   }
-
-   /**
-    * Returns an iterator over the children of the given element with
-    * the given tag name.
-    *
-    * @param element    The parent element
-    * @param tagName    The name of the desired child
-    * @return           An interator of children or null if element is null.
-    */
-   public static Iterator getChildrenByTagName(Element element,
-                                               String tagName)
-   {
-      if (element == null) return null;
-      // getElementsByTagName gives the corresponding elements in the whole 
-      // descendance. We want only children
-
-      NodeList children = element.getChildNodes();
-      ArrayList goodChildren = new ArrayList();
-      for (int i=0; i<children.getLength(); i++) {
-         Node currentChild = children.item(i);
-         if (currentChild.getNodeType() == Node.ELEMENT_NODE && 
-             ((Element)currentChild).getTagName().equals(tagName)) {
-            goodChildren.add((Element)currentChild);
-         }
-      }
-      return goodChildren.iterator();
-   }
-
-   /**
-    * Gets the child of the specified element having the specified unique
-    * name.  If there are more than one children elements with the same name
-    * and exception is thrown.
-    *
-    * @param element    The parent element
-    * @param tagName    The name of the desired child
-    * @return           The named child.
-    *
-    * @throws Exception   Child was not found or was not unique.
-    */
-   public static Element getUniqueChild(Element element, String tagName)
-      throws Exception
-   {
-      Iterator goodChildren = getChildrenByTagName(element, tagName);
-
-      if (goodChildren != null && goodChildren.hasNext()) {
-         Element child = (Element)goodChildren.next();
-         if (goodChildren.hasNext()) {
-            throw new Exception
-               ("expected only one " + tagName + " tag");
-         }
-         return child;
-      } else {
-         throw new Exception
-            ("expected one " + tagName + " tag");
-      }
-   }
-
-   /**
-    * Gets the child of the specified element having the
-    * specified name. If the child with this name doesn't exist
-    * then null is returned instead.
-    *
-    * @param element the parent element
-    * @param tagName the name of the desired child
-    * @return either the named child or null
-    */
-   public static Element getOptionalChild(Element element, String tagName)
-      throws Exception
-   {
-      return getOptionalChild(element, tagName, null);
-   }
-
-   /**
-    * Gets the child of the specified element having the
-    * specified name. If the child with this name doesn't exist
-    * then the supplied default element is returned instead.
-    *
-    * @param element the parent element
-    * @param tagName the name of the desired child
-    * @param defaultElement the element to return if the child
-    *                       doesn't exist
-    * @return either the named child or the supplied default
-    */
-   public static Element getOptionalChild(Element element,
-                                          String tagName,
-                                          Element defaultElement)
-      throws Exception
-   {
-      Iterator goodChildren = getChildrenByTagName(element, tagName);
-
-      if (goodChildren != null && goodChildren.hasNext()) {
-         Element child = (Element)goodChildren.next();
-         if (goodChildren.hasNext()) {
-            throw new Exception
-               ("expected only one " + tagName + " tag");
-         }
-         return child;
-      } else {
-         return defaultElement;
-      }
-   }
-
-   /**
-    * Get the content of the given element.
-    *
-    * @param element    The element to get the content for.
-    * @return           The content of the element or null.
-    */
-   public static String getElementContent(final Element element)
-      throws Exception
-   {
-      return getElementContent(element, null);
-   }
-
-   /**
-    * Get the content of the given element.
-    *
-    * @param element       The element to get the content for.
-    * @param defaultStr    The default to return when there is no content.
-    * @return              The content of the element or the default.
-    */
-   public static String getElementContent(Element element, String defaultStr)
-      throws Exception
-   {
-      if (element == null)
-         return defaultStr;
-
-      NodeList children = element.getChildNodes();
-      String result = "";
-      for (int i = 0; i < children.getLength(); i++)
-      {
-         if (children.item(i).getNodeType() == Node.TEXT_NODE || 
-             children.item(i).getNodeType() == Node.CDATA_SECTION_NODE)
-         {
-            result += children.item(i).getNodeValue();
-         }
-         else if( children.item(i).getNodeType() == Node.COMMENT_NODE )
-         {
-            // Ignore comment nodes
-         }
-      }
-      return result.trim();
-   }
-
-   /**
-    * Macro to get the content of a unique child element.
-    *
-    * @param element    The parent element.
-    * @param tagName    The name of the desired child.
-    * @return           The element content or null.
-    */
-   public static String getUniqueChildContent(Element element,
-                                              String tagName)
-      throws Exception
-   {
-      return getElementContent(getUniqueChild(element, tagName));
-   }
-
-   /**
-    * Macro to get the content of an optional child element.
-    * 
-    * @param element    The parent element.
-    * @param tagName    The name of the desired child.
-    * @return           The element content or null.
-    */
-   public static String getOptionalChildContent(Element element,
-                                                String tagName)
-      throws Exception
-   {
-      return getElementContent(getOptionalChild(element, tagName));
-   }
-
-   public static boolean getOptionalChildBooleanContent(Element element, String name) throws Exception
-   {
-      Element child = getOptionalChild(element, name);
-      if(child != null)
-      {
-         String value = getElementContent(child).toLowerCase();
-         return value.equals("true") || value.equals("yes");
-      }
-
-      return false;
-   }
-
-
-}
-
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlHelper.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/XmlHelper.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlLoadable.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/XmlLoadable.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlLoadable.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,39 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.util.xml;
-
-import org.w3c.dom.Element;
-
-
-/**
- *   <description> 
- *      
- *   @see <related>
- *   @author <a href="mailto:sebastien.alborini at m4x.org">Sebastien Alborini</a>
- *   @version $Revision$
- */
-public interface XmlLoadable
-{
-    
-   // Public --------------------------------------------------------
-   public void importXml(Element element);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/XmlLoadable.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/XmlLoadable.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Catalog.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Catalog.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Catalog.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,2158 +0,0 @@
-// Catalog.java - Represents OASIS Open Catalog files.
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog;
-
-import java.io.IOException;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.io.DataInputStream;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.net.URL;
-import java.net.MalformedURLException;
-import org.jboss.util.xml.catalog.CatalogManager;
-import org.jboss.util.xml.catalog.helpers.PublicId;
-import org.jboss.util.xml.catalog.readers.CatalogReader;
-import org.jboss.util.xml.catalog.readers.OASISXMLCatalogReader;
-import org.jboss.util.xml.catalog.readers.SAXCatalogReader;
-import org.jboss.util.xml.catalog.readers.TR9401CatalogReader;
-
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- * Represents OASIS Open Catalog files.
- *
- * <p>This class implements the semantics of OASIS Open Catalog files
- * (defined by
- * <a href="http://www.oasis-open.org/html/a401.htm">OASIS Technical
- * Resolution 9401:1997 (Amendment 2 to TR 9401)</a>).</p>
- *
- * <p>The primary purpose of the Catalog is to associate resources in the
- * document with local system identifiers. Some entities
- * (document types, XML entities, and notations) have names and all of them
- * can have either public or system identifiers or both. (In XML, only a
- * notation can have a public identifier without a system identifier, but
- * the methods implemented in this class obey the Catalog semantics
- * from the SGML
- * days when system identifiers were optional.)</p>
- *
- * <p>The system identifiers returned by the resolution methods in this
- * class are valid, i.e. usable by, and in fact constructed by, the
- * <tt>java.net.URL</tt> class. Unfortunately, this class seems to behave in
- * somewhat non-standard ways and the system identifiers returned may
- * not be directly usable in a browser or filesystem context.
- *
- * <p>This class recognizes all of the Catalog entries defined in
- * TR9401:1997:</p>
- *
- * <ul>
- * <li><b>BASE</b>
- * changes the base URI for resolving relative system identifiers. The
- * initial base URI is the URI of the location of the catalog (which is,
- * in turn, relative to the location of the current working directory
- * at startup, as returned by the <tt>user.dir</tt> system property).</li>
- * <li><b>CATALOG</b>
- * processes other catalog files. An included catalog occurs logically
- * at the end of the including catalog.</li>
- * <li><b>DELEGATE_PUBLIC</b>
- * specifies alternate catalogs for some public identifiers. The delegated
- * catalogs are not loaded until they are needed, but they are cached
- * once loaded.</li>
- * <li><b>DELEGATE_SYSTEM</b>
- * specifies alternate catalogs for some system identifiers. The delegated
- * catalogs are not loaded until they are needed, but they are cached
- * once loaded.</li>
- * <li><b>DELEGATE_URI</b>
- * specifies alternate catalogs for some URIs. The delegated
- * catalogs are not loaded until they are needed, but they are cached
- * once loaded.</li>
- * <li><b>REWRITE_SYSTEM</b>
- * specifies alternate prefix for a system identifier.</li>
- * <li><b>REWRITE_URI</b>
- * specifies alternate prefix for a URI.</li>
- * <li><b>DOCTYPE</b>
- * associates the names of root elements with URIs. (In other words, an XML
- * processor might infer the doctype of an XML document that does not include
- * a doctype declaration by looking for the DOCTYPE entry in the
- * catalog which matches the name of the root element of the document.)</li>
- * <li><b>DOCUMENT</b>
- * provides a default document.</li>
- * <li><b>DTDDECL</b>
- * recognized and silently ignored. Not relevant for XML.</li>
- * <li><b>ENTITY</b>
- * associates entity names with URIs.</li>
- * <li><b>LINKTYPE</b>
- * recognized and silently ignored. Not relevant for XML.</li>
- * <li><b>NOTATION</b>
- * associates notation names with URIs.</li>
- * <li><b>OVERRIDE</b>
- * changes the override behavior. Initial behavior is set by the
- * system property <tt>xml.catalog.override</tt>. The default initial
- * behavior is 'YES', that is, entries in the catalog override
- * system identifiers specified in the document.</li>
- * <li><b>PUBLIC</b>
- * maps a public identifier to a system identifier.</li>
- * <li><b>SGMLDECL</b>
- * recognized and silently ignored. Not relevant for XML.</li>
- * <li><b>SYSTEM</b>
- * maps a system identifier to another system identifier.</li>
- * <li><b>URI</b>
- * maps a URI to another URI.</li>
- * </ul>
- *
- * <p>Note that BASE entries are treated as described by RFC2396. In
- * particular, this has the counter-intuitive property that after a BASE
- * entry identifing "http://example.com/a/b/c" as the base URI,
- * the relative URI "foo" is resolved to the absolute URI
- * "http://example.com/a/b/foo". You must provide the trailing slash if
- * you do not want the final component of the path to be discarded as a
- * filename would in a URI for a resource: "http://example.com/a/b/c/".
- * </p>
- *
- * <p>Note that subordinate catalogs (all catalogs except the first,
- * including CATALOG and DELEGATE* catalogs) are only loaded if and when
- * they are required.</p>
- *
- * <p>This class relies on classes which implement the CatalogReader
- * interface to actually load catalog files. This allows the catalog
- * semantics to be implemented for TR9401 text-based catalogs, XML
- * catalogs, or any number of other storage formats.</p>
- *
- * <p>Additional catalogs may also be loaded with the
- * {@link #parseCatalog} method.</p>
- * </dd>
- * </dl>
- *
- * <p><b>Change Log:</b></p>
- * <dl>
- * <dt>2.0</dt>
- * <dd><p>Rewrite to use CatalogReaders.</p></dd>
- * <dt>1.1</dt>
- * <dd><p>Allow quoted components in <tt>xml.catalog.files</tt>
- * so that URLs containing colons can be used on Unix.
- * The string passed to <tt>xml.catalog.files</tt> can now have the form:</p>
- * <pre>
- * unquoted-path-with-no-sep-chars:"double-quoted path with or without sep chars":'single-quoted path with or without sep chars'
- * </pre>
- * <p>(Where ":" is the separater character in this example.)</p>
- * <p>If an unquoted path contains an embedded double or single quote
- * character, no special processig is performed on that character. No
- * path can contain separater characters, double, and single quotes
- * simultaneously.</p>
- * <p>Fix bug in calculation of BASE entries: if
- * a catalog contains multiple BASE entries, each is relative to the preceding
- * base, not the default base URI of the catalog.</p>
- * </dd>
- * <dt>1.0.1</dt>
- * <dd><p>Fixed a bug in the calculation of the list of subordinate catalogs.
- * This bug caused an infinite loop where parsing would alternately process
- * two catalogs indefinitely.</p>
- * </dd>
- * </dl>
- *
- * @see CatalogReader
- * @see CatalogEntry
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- *
- * <p>Derived from public domain code originally published by Arbortext,
- * Inc.</p>
- */
-public class Catalog {
-  /** The BASE Catalog Entry type. */
-  public static final int BASE     = CatalogEntry.addEntryType("BASE", 1);
-
-  /** The CATALOG Catalog Entry type. */
-  public static final int CATALOG  = CatalogEntry.addEntryType("CATALOG", 1);
-
-  /** The DOCUMENT Catalog Entry type. */
-  public static final int DOCUMENT = CatalogEntry.addEntryType("DOCUMENT", 1);
-
-  /** The OVERRIDE Catalog Entry type. */
-  public static final int OVERRIDE = CatalogEntry.addEntryType("OVERRIDE", 1);
-
-  /** The SGMLDECL Catalog Entry type. */
-  public static final int SGMLDECL = CatalogEntry.addEntryType("SGMLDECL", 1);
-
-  /** The DELEGATE_PUBLIC Catalog Entry type. */
-  public static final int DELEGATE_PUBLIC = CatalogEntry.addEntryType("DELEGATE_PUBLIC", 2);
-
-  /** The DELEGATE_SYSTEM Catalog Entry type. */
-  public static final int DELEGATE_SYSTEM = CatalogEntry.addEntryType("DELEGATE_SYSTEM", 2);
-
-  /** The DELEGATE_URI Catalog Entry type. */
-  public static final int DELEGATE_URI = CatalogEntry.addEntryType("DELEGATE_URI", 2);
-
-  /** The DOCTYPE Catalog Entry type. */
-  public static final int DOCTYPE  = CatalogEntry.addEntryType("DOCTYPE", 2);
-
-  /** The DTDDECL Catalog Entry type. */
-  public static final int DTDDECL  = CatalogEntry.addEntryType("DTDDECL", 2);
-
-  /** The ENTITY Catalog Entry type. */
-  public static final int ENTITY   = CatalogEntry.addEntryType("ENTITY", 2);
-
-  /** The LINKTYPE Catalog Entry type. */
-  public static final int LINKTYPE = CatalogEntry.addEntryType("LINKTYPE", 2);
-
-  /** The NOTATION Catalog Entry type. */
-  public static final int NOTATION = CatalogEntry.addEntryType("NOTATION", 2);
-
-  /** The PUBLIC Catalog Entry type. */
-  public static final int PUBLIC   = CatalogEntry.addEntryType("PUBLIC", 2);
-
-  /** The SYSTEM Catalog Entry type. */
-  public static final int SYSTEM   = CatalogEntry.addEntryType("SYSTEM", 2);
-
-  /** The URI Catalog Entry type. */
-  public static final int URI      = CatalogEntry.addEntryType("URI", 2);
-
-  /** The REWRITE_SYSTEM Catalog Entry type. */
-  public static final int REWRITE_SYSTEM = CatalogEntry.addEntryType("REWRITE_SYSTEM", 2);
-
-  /** The REWRITE_URI Catalog Entry type. */
-  public static final int REWRITE_URI = CatalogEntry.addEntryType("REWRITE_URI", 2);
-
-  /**
-   * The base URI for relative system identifiers in the catalog.
-   * This may be changed by BASE entries in the catalog.
-   */
-  protected URL base;
-
-  /** The base URI of the Catalog file currently being parsed. */
-  protected URL catalogCwd;
-
-  /** The catalog entries currently known to the system. */
-  protected Vector catalogEntries = new Vector();
-
-  /** The default initial override setting. */
-  protected boolean default_override = true;
-
-  /** The catalog manager in use for this instance. */
-  protected CatalogManager catalogManager = CatalogManager.getStaticManager();
-
-  /**
-   * A vector of catalog files to be loaded.
-   *
-   * <p>This list is initially established by
-   * <code>loadSystemCatalogs</code> when
-   * it parses the system catalog list, but CATALOG entries may
-   * contribute to it during the course of parsing.</p>
-   *
-   * @see #loadSystemCatalogs
-   * @see #localCatalogFiles
-   */
-  protected Vector catalogFiles = new Vector();
-
-  /**
-   * A vector of catalog files constructed during processing of
-   * CATALOG entries in the current catalog.
-   *
-   * <p>This two-level system is actually necessary to correctly implement
-   * the semantics of the CATALOG entry. If one catalog file includes
-   * another with a CATALOG entry, the included catalog logically
-   * occurs <i>at the end</i> of the including catalog, and after any
-   * preceding CATALOG entries. In other words, the CATALOG entry
-   * cannot insert anything into the middle of a catalog file.</p>
-   *
-   * <p>When processing reaches the end of each catalog files, any
-   * elements on this vector are added to the front of the
-   * <code>catalogFiles</code> vector.</p>
-   *
-   * @see #catalogFiles
-   */
-  protected Vector localCatalogFiles = new Vector();
-
-  /**
-   * A vector of Catalogs.
-   *
-   * <p>The semantics of Catalog resolution are such that each
-   * catalog is effectively a list of Catalogs (in other words,
-   * a recursive list of Catalog instances).</p>
-   *
-   * <p>Catalogs that are processed as the result of CATALOG or
-   * DELEGATE* entries are subordinate to the catalog that contained
-   * them, but they may in turn have subordinate catalogs.</p>
-   *
-   * <p>Catalogs are only loaded when they are needed, so this vector
-   * initially contains a list of Catalog filenames (URLs). If, during
-   * processing, one of these catalogs has to be loaded, the resulting
-   * Catalog object is placed in the vector, effectively caching it
-   * for the next query.</p>
-   */
-  protected Vector catalogs = new Vector();
-
-  /**
-   * A vector of DELEGATE* Catalog entries constructed during
-   * processing of the Catalog.
-   *
-   * <p>This two-level system has two purposes; first, it allows
-   * us to sort the DELEGATE* entries by the length of the partial
-   * public identifier so that a linear search encounters them in
-   * the correct order and second, it puts them all at the end of
-   * the Catalog.</p>
-   *
-   * <p>When processing reaches the end of each catalog file, any
-   * elements on this vector are added to the end of the
-   * <code>catalogEntries</code> vector. This assures that matching
-   * PUBLIC keywords are encountered before DELEGATE* entries.</p>
-   */
-  protected Vector localDelegate = new Vector();
-
-  /**
-   * A hash of CatalogReaders.
-   *
-   * <p>This hash maps MIME types to elements in the readerArr
-   * vector. This allows the Catalog to quickly locate the reader
-   * for a particular MIME type.</p>
-   */
-  protected Hashtable readerMap = new Hashtable();
-
-  /**
-   * A vector of CatalogReaders.
-   *
-   * <p>This vector contains all of the readers in the order that they
-   * were added. In the event that a catalog is read from a file, where
-   * the MIME type is unknown, each reader is attempted in turn until
-   * one succeeds.</p>
-   */
-  protected Vector readerArr = new Vector();
-
-  /**
-   * Constructs an empty Catalog.
-   *
-   * <p>The constructor interrogates the relevant system properties
-   * using the default (static) CatalogManager
-   * and initializes the catalog data structures.</p>
-   */
-  public Catalog() {
-    // nop;
-  }
-
-  /**
-   * Constructs an empty Catalog with a specific CatalogManager.
-   *
-   * <p>The constructor interrogates the relevant system properties
-   * using the specified Catalog Manager
-   * and initializes the catalog data structures.</p>
-   */
-  public Catalog(CatalogManager manager) {
-    catalogManager = manager;
-  }
-
-  /**
-   * Return the CatalogManager used by this catalog.
-   *
-   */
-  public CatalogManager getCatalogManager() {
-    return catalogManager;
-  }
-
-  /**
-   * Establish the CatalogManager used by this catalog.
-   *
-   */
-  public void setCatalogManager(CatalogManager manager) {
-    catalogManager = manager;
-  }
-
-  /**
-   * Setup readers.
-   */
-  public void setupReaders() {
-    SAXParserFactory spf = SAXParserFactory.newInstance();
-    spf.setNamespaceAware(true);
-    spf.setValidating(false);
-
-    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
-
-    saxReader.setCatalogParser(null, "XMLCatalog",
-			       "org.apache.xml.resolver.readers.XCatalogReader");
-
-    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
-			       "catalog",
-			       "org.apache.xml.resolver.readers.OASISXMLCatalogReader");
-
-    addReader("application/xml", saxReader);
-
-    TR9401CatalogReader textReader = new TR9401CatalogReader();
-    addReader("text/plain", textReader);
-  }
-
-  /**
-   * Add a new CatalogReader to the Catalog.
-   *
-   * <p>This method allows you to add a new CatalogReader to the
-   * catalog. The reader will be associated with the specified mimeType.
-   * You can only have one reader per mimeType.</p>
-   *
-   * <p>In the absence of a mimeType (e.g., when reading a catalog
-   * directly from a file on the local system), the readers are attempted
-   * in the order that you add them to the Catalog.</p>
-   *
-   * <p>Note that subordinate catalogs (created by CATALOG or
-   * DELEGATE* entries) get a copy of the set of readers present in
-   * the primary catalog when they are created. Readers added subsequently
-   * will not be available. For this reason, it is best to add all
-   * of the readers before the first call to parse a catalog.</p>
-   *
-   * @param mimeType The MIME type associated with this reader.
-   * @param reader The CatalogReader to use.
-   */
-  public void addReader(String mimeType, CatalogReader reader) {
-    if (readerMap.containsKey(mimeType)) {
-      Integer pos = (Integer) readerMap.get(mimeType);
-      readerArr.set(pos.intValue(), reader);
-    } else {
-      readerArr.add(reader);
-      Integer pos = new Integer(readerArr.size()-1);
-      readerMap.put(mimeType, pos);
-    }
-  }
-
-  /**
-   * Copies the reader list from the current Catalog to a new Catalog.
-   *
-   * <p>This method is used internally when constructing a new catalog.
-   * It copies the current reader associations over to the new catalog.
-   * </p>
-   *
-   * @param newCatalog The new Catalog.
-   */
-  protected void copyReaders(Catalog newCatalog) {
-    // Have to copy the readers in the right order...convert hash to arr
-    Vector mapArr = new Vector(readerMap.size());
-
-    // Pad the mapArr out to the right length
-    for (int count = 0; count < readerMap.size(); count++) {
-      mapArr.add(null);
-    }
-
-    Enumeration enumt = readerMap.keys();
-    while (enumt.hasMoreElements()) {
-      String mimeType = (String) enumt.nextElement();
-      Integer pos = (Integer) readerMap.get(mimeType);
-      mapArr.set(pos.intValue(), mimeType);
-    }
-
-    for (int count = 0; count < mapArr.size(); count++) {
-      String mimeType = (String) mapArr.get(count);
-      Integer pos = (Integer) readerMap.get(mimeType);
-      newCatalog.addReader(mimeType,
-			   (CatalogReader)
-			   readerArr.get(pos.intValue()));
-    }
-  }
-
-  /**
-   * Create a new Catalog object.
-   *
-   * <p>This method constructs a new instance of the running Catalog
-   * class (which might be a subtype of org.apache.xml.resolver.Catalog).
-   * All new catalogs are managed by the same CatalogManager.
-   * </p>
-   *
-   * <p>N.B. All Catalog subtypes should call newCatalog() to construct
-   * a new Catalog. Do not simply use "new Subclass()" since that will
-   * confuse future subclasses.</p>
-   */
-  protected Catalog newCatalog() {
-    String catalogClass = this.getClass().getName();
-
-    try {
-      Catalog c = (Catalog) (Class.forName(catalogClass).newInstance());
-      c.setCatalogManager(catalogManager);
-      copyReaders(c);
-      return c;
-    } catch (ClassNotFoundException cnfe) {
-      catalogManager.debug.message(1, "Class Not Found Exception: " + catalogClass);
-    } catch (IllegalAccessException iae) {
-      catalogManager.debug.message(1, "Illegal Access Exception: " + catalogClass);
-    } catch (InstantiationException ie) {
-      catalogManager.debug.message(1, "Instantiation Exception: " + catalogClass);
-    } catch (ClassCastException cce) {
-      catalogManager.debug.message(1, "Class Cast Exception: " + catalogClass);
-    } catch (Exception e) {
-      catalogManager.debug.message(1, "Other Exception: " + catalogClass);
-    }
-
-    Catalog c = new Catalog();
-    c.setCatalogManager(catalogManager);
-    copyReaders(c);
-    return c;
-  }
-
-  /**
-   * Returns the current base URI.
-   */
-  public String getCurrentBase() {
-    return base.toString();
-  }
-
-  /**
-   * Returns the default override setting associated with this
-   * catalog.
-   *
-   * <p>All catalog files loaded by this catalog will have the
-   * initial override setting specified by this default.</p>
-   */
-  public String getDefaultOverride() {
-    if (default_override) {
-      return "yes";
-    } else {
-      return "no";
-    }
-  }
-
-  /**
-   * Load the system catalog files.
-   *
-   * <p>The method adds all of the
-   * catalogs specified in the <tt>xml.catalog.files</tt> property
-   * to the Catalog list.</p>
-   *
-   * @throws MalformedURLException  One of the system catalogs is
-   * identified with a filename that is not a valid URL.
-   * @throws IOException One of the system catalogs cannot be read.
-   */
-  public void loadSystemCatalogs()
-    throws MalformedURLException, IOException {
-
-    Vector catalogs = catalogManager.getCatalogFiles();
-    if (catalogs != null) {
-      for (int count = 0; count < catalogs.size(); count++) {
-	catalogFiles.addElement(catalogs.elementAt(count));
-      }
-    }
-
-    if (catalogFiles.size() > 0) {
-      // This is a little odd. The parseCatalog() method expects
-      // a filename, but it adds that name to the end of the
-      // catalogFiles vector, and then processes that vector.
-      // This allows the system to handle CATALOG entries
-      // correctly.
-      //
-      // In this init case, we take the last element off the
-      // catalogFiles vector and pass it to parseCatalog. This
-      // will "do the right thing" in the init case, and allow
-      // parseCatalog() to do the right thing in the non-init
-      // case. Honest.
-      //
-      String catfile = (String) catalogFiles.lastElement();
-      catalogFiles.removeElement(catfile);
-      parseCatalog(catfile);
-    }
-  }
-
-  /**
-   * Parse a catalog file, augmenting internal data structures.
-   *
-   * @param fileName The filename of the catalog file to process
-   *
-   * @throws MalformedURLException The fileName cannot be turned into
-   * a valid URL.
-   * @throws IOException Error reading catalog file.
-   */
-  public synchronized void parseCatalog(String fileName)
-    throws MalformedURLException, IOException {
-
-    default_override = catalogManager.getPreferPublic();
-    catalogManager.debug.message(4, "Parse catalog: " + fileName);
-
-    // Put the file into the list of catalogs to process...
-    // In all cases except the case when initCatalog() is the
-    // caller, this will be the only catalog initially in the list...
-    catalogFiles.addElement(fileName);
-
-    // Now process all the pending catalogs...
-    parsePendingCatalogs();
-  }
-
-  /**
-   * Parse a catalog file, augmenting internal data structures.
-   *
-   * <p>Catalogs retrieved over the net may have an associated MIME type.
-   * The MIME type can be used to select an appropriate reader.</p>
-   *
-   * @param mimeType The MIME type of the catalog file.
-   * @param is The InputStream from which the catalog should be read
-   *
-   * @throws CatalogException Failed to load catalog
-   * mimeType.
-   * @throws IOException Error reading catalog file.
-   */
-  public synchronized void parseCatalog(String mimeType, InputStream is)
-    throws IOException, CatalogException {
-
-    default_override = catalogManager.getPreferPublic();
-    catalogManager.debug.message(4, "Parse " + mimeType + " catalog on input stream");
-
-    CatalogReader reader = null;
-
-    if (readerMap.containsKey(mimeType)) {
-      int arrayPos = ((Integer) readerMap.get(mimeType)).intValue();
-      reader = (CatalogReader) readerArr.get(arrayPos);
-    }
-
-    if (reader == null) {
-      String msg = "No CatalogReader for MIME type: " + mimeType;
-      catalogManager.debug.message(2, msg);
-      throw new CatalogException(CatalogException.UNPARSEABLE, msg);
-    }
-
-    reader.readCatalog(this, is);
-
-    // Now process all the pending catalogs...
-    parsePendingCatalogs();
-  }
-
-  /**
-   * Parse a catalog document, augmenting internal data structures.
-   *
-   * <p>This method supports catalog files stored in jar files: e.g.,
-   * jar:file:///path/to/filename.jar!/path/to/catalog.xml". That URI
-   * doesn't survive transmogrification through the URI processing that
-   * the parseCatalog(String) performs and passing it as an input stream
-   * doesn't set the base URI appropriately.</p>
-   *
-   * <p>Written by Stefan Wachter (2002-09-26)</p>
-   *
-   * @param aUrl The URL of the catalog document to process
-   *
-   * @throws IOException Error reading catalog file.
-   */
-  public synchronized void parseCatalog(URL aUrl) throws IOException {
-    catalogCwd = aUrl;
-    base = aUrl;
-
-    default_override = catalogManager.getPreferPublic();
-    catalogManager.debug.message(4, "Parse catalog: " + aUrl.toString());
-
-    DataInputStream inStream = null;
-    boolean parsed = false;
-
-    for (int count = 0; !parsed && count < readerArr.size(); count++) {
-      CatalogReader reader = (CatalogReader) readerArr.get(count);
-
-      try {
-      	inStream = new DataInputStream(aUrl.openStream());
-      } catch (FileNotFoundException fnfe) {
-        // No catalog; give up!
-        break;
-      }
-
-      try {
-        reader.readCatalog(this, inStream);
-        parsed=true;
-      } catch (CatalogException ce) {
-        if (ce.getExceptionType() == CatalogException.PARSE_FAILED) {
-          // give up!
-          break;
-        } else {
-          // try again!
-        }
-      }
-
-      try {
-      	inStream.close();
-      } catch (IOException e) {
-      	//nop
-      }
-    }
-
-    if (parsed) parsePendingCatalogs();
-  }
-
-  /**
-   * Parse all of the pending catalogs.
-   *
-   * <p>Catalogs may refer to other catalogs, this method parses
-   * all of the currently pending catalog files.</p>
-   */
-  protected synchronized void parsePendingCatalogs()
-    throws MalformedURLException, IOException {
-
-    if (!localCatalogFiles.isEmpty()) {
-      // Move all the localCatalogFiles into the front of
-      // the catalogFiles queue
-      Vector newQueue = new Vector();
-      Enumeration q = localCatalogFiles.elements();
-      while (q.hasMoreElements()) {
-	newQueue.addElement(q.nextElement());
-      }
-
-      // Put the rest of the catalogs on the end of the new list
-      for (int curCat = 0; curCat < catalogFiles.size(); curCat++) {
-	String catfile = (String) catalogFiles.elementAt(curCat);
-	newQueue.addElement(catfile);
-      }
-
-      catalogFiles = newQueue;
-      localCatalogFiles.clear();
-    }
-
-    // Suppose there are no catalog files to process, but the
-    // single catalog already parsed included some delegate
-    // entries? Make sure they don't get lost.
-    if (catalogFiles.isEmpty() && !localDelegate.isEmpty()) {
-      Enumeration e = localDelegate.elements();
-      while (e.hasMoreElements()) {
-	catalogEntries.addElement(e.nextElement());
-      }
-      localDelegate.clear();
-    }
-
-    // Now process all the files on the catalogFiles vector. This
-    // vector can grow during processing if CATALOG entries are
-    // encountered in the catalog
-    while (!catalogFiles.isEmpty()) {
-      String catfile = (String) catalogFiles.elementAt(0);
-      try {
-	catalogFiles.remove(0);
-      } catch (ArrayIndexOutOfBoundsException e) {
-	// can't happen
-      }
-
-      if (catalogEntries.size() == 0 && catalogs.size() == 0) {
-	// We haven't parsed any catalogs yet, let this
-	// catalog be the first...
-	try {
-	  parseCatalogFile(catfile);
-	} catch (CatalogException ce) {
-	  System.out.println("FIXME: " + ce.toString());
-	}
-      } else {
-	// This is a subordinate catalog. We save its name,
-	// but don't bother to load it unless it's necessary.
-	catalogs.addElement(catfile);
-      }
-
-      if (!localCatalogFiles.isEmpty()) {
-	// Move all the localCatalogFiles into the front of
-	// the catalogFiles queue
-	Vector newQueue = new Vector();
-	Enumeration q = localCatalogFiles.elements();
-	while (q.hasMoreElements()) {
-	  newQueue.addElement(q.nextElement());
-	}
-
-	// Put the rest of the catalogs on the end of the new list
-	for (int curCat = 0; curCat < catalogFiles.size(); curCat++) {
-	  catfile = (String) catalogFiles.elementAt(curCat);
-	  newQueue.addElement(catfile);
-	}
-
-	catalogFiles = newQueue;
-	localCatalogFiles.clear();
-      }
-
-      if (!localDelegate.isEmpty()) {
-	Enumeration e = localDelegate.elements();
-	while (e.hasMoreElements()) {
-	  catalogEntries.addElement(e.nextElement());
-	}
-	localDelegate.clear();
-      }
-    }
-
-    // We've parsed them all, reinit the vector...
-    catalogFiles.clear();
-  }
-
-  /**
-   * Parse a single catalog file, augmenting internal data structures.
-   *
-   * @param fileName The filename of the catalog file to process
-   *
-   * @throws MalformedURLException The fileName cannot be turned into
-   * a valid URL.
-   * @throws IOException Error reading catalog file.
-   */
-  protected synchronized void parseCatalogFile(String fileName)
-    throws MalformedURLException, IOException, CatalogException {
-
-    CatalogEntry entry;
-
-    // The base-base is the cwd. If the catalog file is specified
-    // with a relative path, this assures that it gets resolved
-    // properly...
-    try {
-      // tack on a basename because URLs point to files not dirs
-      String userdir = fixSlashes(System.getProperty("user.dir"));
-      catalogCwd = new URL("file:" + userdir + "/basename");
-    } catch (MalformedURLException e) {
-      String userdir = fixSlashes(System.getProperty("user.dir"));
-      catalogManager.debug.message(1, "Malformed URL on cwd", userdir);
-      catalogCwd = null;
-    }
-
-    // The initial base URI is the location of the catalog file
-    try {
-      base = new URL(catalogCwd, fixSlashes(fileName));
-    } catch (MalformedURLException e) {
-      try {
-	base = new URL("file:" + fixSlashes(fileName));
-      } catch (MalformedURLException e2) {
-	catalogManager.debug.message(1, "Malformed URL on catalog filename",
-		      fixSlashes(fileName));
-	base = null;
-      }
-    }
-
-    catalogManager.debug.message(2, "Loading catalog", fileName);
-    catalogManager.debug.message(4, "Default BASE", base.toString());
-
-    fileName = base.toString();
-
-    DataInputStream inStream = null;
-    boolean parsed = false;
-    boolean notFound = false;
-
-    for (int count = 0; !parsed && count < readerArr.size(); count++) {
-      CatalogReader reader = (CatalogReader) readerArr.get(count);
-
-      try {
-	notFound = false;
-	inStream = new DataInputStream(base.openStream());
-      } catch (FileNotFoundException fnfe) {
-	// No catalog; give up!
-	notFound = true;
-	break;
-      }
-
-      try {
-	reader.readCatalog(this, inStream);
-	parsed = true;
-      } catch (CatalogException ce) {
-	if (ce.getExceptionType() == CatalogException.PARSE_FAILED) {
-	  // give up!
-	  break;
-	} else {
-	  // try again!
-	}
-      }
-
-      try {
-	inStream.close();
-      } catch (IOException e) {
-	//nop
-      }
-    }
-
-    if (!parsed) {
-      if (notFound) {
-	catalogManager.debug.message(3, "Catalog does not exist", fileName);
-      } else {
-	catalogManager.debug.message(1, "Failed to parse catalog", fileName);
-      }
-    }
-  }
-
-  /**
-   * Cleanup and process a Catalog entry.
-   *
-   * <p>This method processes each Catalog entry, changing mapped
-   * relative system identifiers into absolute ones (based on the current
-   * base URI), and maintaining other information about the current
-   * catalog.</p>
-   *
-   * @param entry The CatalogEntry to process.
-   */
-  public void addEntry(CatalogEntry entry) {
-    int type = entry.getEntryType();
-
-    if (type == BASE) {
-      String value = entry.getEntryArg(0);
-      URL newbase = null;
-
-      catalogManager.debug.message(5, "BASE CUR", base.toString());
-      catalogManager.debug.message(4, "BASE STR", value);
-
-      try {
-	value = fixSlashes(value);
-	newbase = new URL(base, value);
-      } catch (MalformedURLException e) {
-	try {
-	  newbase = new URL("file:" + value);
-	} catch (MalformedURLException e2) {
-	  catalogManager.debug.message(1, "Malformed URL on base", value);
-	  newbase = null;
-	}
-      }
-
-      if (newbase != null) {
-	base = newbase;
-      }
-
-      catalogManager.debug.message(5, "BASE NEW", base.toString());
-    } else if (type == CATALOG) {
-      String fsi = makeAbsolute(entry.getEntryArg(0));
-
-      catalogManager.debug.message(4, "CATALOG", fsi);
-
-      localCatalogFiles.addElement(fsi);
-    } else if (type == PUBLIC) {
-      String publicid = PublicId.normalize(entry.getEntryArg(0));
-      String systemid = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, publicid);
-      entry.setEntryArg(1, systemid);
-
-      catalogManager.debug.message(4, "PUBLIC", publicid, systemid);
-
-      catalogEntries.addElement(entry);
-    } else if (type == SYSTEM) {
-      String systemid = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "SYSTEM", systemid, fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == URI) {
-      String uri = normalizeURI(entry.getEntryArg(0));
-      String altURI = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(1, altURI);
-
-      catalogManager.debug.message(4, "URI", uri, altURI);
-
-      catalogEntries.addElement(entry);
-    } else if (type == DOCUMENT) {
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(0)));
-      entry.setEntryArg(0, fsi);
-
-      catalogManager.debug.message(4, "DOCUMENT", fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == OVERRIDE) {
-      catalogManager.debug.message(4, "OVERRIDE", entry.getEntryArg(0));
-
-      catalogEntries.addElement(entry);
-    } else if (type == SGMLDECL) {
-      // meaningless in XML
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(0)));
-      entry.setEntryArg(0, fsi);
-
-      catalogManager.debug.message(4, "SGMLDECL", fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == DELEGATE_PUBLIC) {
-      String ppi = PublicId.normalize(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, ppi);
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DELEGATE_PUBLIC", ppi, fsi);
-
-      addDelegate(entry);
-    } else if (type == DELEGATE_SYSTEM) {
-      String psi = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, psi);
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DELEGATE_SYSTEM", psi, fsi);
-
-      addDelegate(entry);
-    } else if (type == DELEGATE_URI) {
-      String pui = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, pui);
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DELEGATE_URI", pui, fsi);
-
-      addDelegate(entry);
-    } else if (type == REWRITE_SYSTEM) {
-      String psi = normalizeURI(entry.getEntryArg(0));
-      String rpx = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, psi);
-      entry.setEntryArg(1, rpx);
-
-      catalogManager.debug.message(4, "REWRITE_SYSTEM", psi, rpx);
-
-      catalogEntries.addElement(entry);
-    } else if (type == REWRITE_URI) {
-      String pui = normalizeURI(entry.getEntryArg(0));
-      String upx = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, pui);
-      entry.setEntryArg(1, upx);
-
-      catalogManager.debug.message(4, "REWRITE_URI", pui, upx);
-
-      catalogEntries.addElement(entry);
-    } else if (type == DOCTYPE) {
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DOCTYPE", entry.getEntryArg(0), fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == DTDDECL) {
-      // meaningless in XML
-      String fpi = PublicId.normalize(entry.getEntryArg(0));
-      entry.setEntryArg(0, fpi);
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DTDDECL", fpi, fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == ENTITY) {
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "ENTITY", entry.getEntryArg(0), fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == LINKTYPE) {
-      // meaningless in XML
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "LINKTYPE", entry.getEntryArg(0), fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == NOTATION) {
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "NOTATION", entry.getEntryArg(0), fsi);
-
-      catalogEntries.addElement(entry);
-    } else {
-      catalogEntries.addElement(entry);
-    }
-  }
-
-  /**
-   * Handle unknown CatalogEntry types.
-   *
-   * <p>This method exists to allow subclasses to deal with unknown
-   * entry types.</p>
-   */
-  public void unknownEntry(Vector strings) {
-    if (strings != null && strings.size() > 0) {
-      String keyword = (String) strings.elementAt(0);
-      catalogManager.debug.message(2, "Unrecognized token parsing catalog", keyword);
-    }
-  }
-
-  /**
-   * Parse all subordinate catalogs.
-   *
-   * <p>This method recursively parses all of the subordinate catalogs.
-   * If this method does not throw an exception, you can be confident that
-   * no subsequent call to any resolve*() method will either, with two
-   * possible exceptions:</p>
-   *
-   * <ol>
-   * <li><p>Delegated catalogs are re-parsed each time they are needed
-   * (because a variable list of them may be needed in each case,
-   * depending on the length of the matching partial public identifier).</p>
-   * <p>But they are parsed by this method, so as long as they don't
-   * change or disappear while the program is running, they shouldn't
-   * generate errors later if they don't generate errors now.</p>
-   * <li><p>If you add new catalogs with <code>parseCatalog</code>, they
-   * won't be loaded until they are needed or until you call
-   * <code>parseAllCatalogs</code> again.</p>
-   * </ol>
-   *
-   * <p>On the other hand, if you don't call this method, you may
-   * successfully parse documents without having to load all possible
-   * catalogs.</p>
-   *
-   * @throws MalformedURLException The filename (URL) for a
-   * subordinate or delegated catalog is not a valid URL.
-   * @throws IOException Error reading some subordinate or delegated
-   * catalog file.
-   */
-  public void parseAllCatalogs()
-    throws MalformedURLException, IOException {
-
-    // Parse all the subordinate catalogs
-    for (int catPos = 0; catPos < catalogs.size(); catPos++) {
-      Catalog c = null;
-
-      try {
-	c = (Catalog) catalogs.elementAt(catPos);
-      } catch (ClassCastException e) {
-	String catfile = (String) catalogs.elementAt(catPos);
-	c = newCatalog();
-
-	c.parseCatalog(catfile);
-	catalogs.setElementAt(c, catPos);
-	c.parseAllCatalogs();
-      }
-    }
-
-    // Parse all the DELEGATE catalogs
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == DELEGATE_PUBLIC
-	  || e.getEntryType() == DELEGATE_SYSTEM
-	  || e.getEntryType() == DELEGATE_URI) {
-	Catalog dcat = newCatalog();
-	dcat.parseCatalog(e.getEntryArg(1));
-      }
-    }
-  }
-
-
-  /**
-   * Return the applicable DOCTYPE system identifier.
-   *
-   * @param entityName The name of the entity (element) for which
-   * a doctype is required.
-   * @param publicId The nominal public identifier for the doctype
-   * (as provided in the source document).
-   * @param systemId The nominal system identifier for the doctype
-   * (as provided in the source document).
-   *
-   * @return The system identifier to use for the doctype.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveDoctype(String entityName,
-			       String publicId,
-			       String systemId)
-    throws MalformedURLException, IOException {
-    String resolved = null;
-
-    catalogManager.debug.message(3, "resolveDoctype("
-		  +entityName+","+publicId+","+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (publicId != null && publicId.startsWith("urn:publicid:")) {
-      publicId = PublicId.decodeURN(publicId);
-    }
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      if (publicId != null && !publicId.equals(systemId)) {
-	catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
-	systemId = null;
-      } else {
-	publicId = systemId;
-	systemId = null;
-      }
-    }
-
-    if (systemId != null) {
-      // If there's a SYSTEM entry in this catalog, use it
-      resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    if (publicId != null) {
-      // If there's a PUBLIC entry in this catalog, use it
-      resolved = resolveLocalPublic(DOCTYPE,
-				    entityName,
-				    publicId,
-				    systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    // If there's a DOCTYPE entry in this catalog, use it
-    boolean over = default_override;
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-	over = e.getEntryArg(0).equalsIgnoreCase("YES");
-	continue;
-      }
-
-      if (e.getEntryType() == DOCTYPE
-	  && e.getEntryArg(0).equals(entityName)) {
-	if (over || systemId == null) {
-	  return e.getEntryArg(1);
-	}
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(DOCTYPE,
-				      entityName,
-				      publicId,
-				      systemId);
-  }
-
-  /**
-   * Return the applicable DOCUMENT entry.
-   *
-   * @return The system identifier to use for the doctype.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveDocument()
-    throws MalformedURLException, IOException {
-    // If there's a DOCUMENT entry, return it
-
-    catalogManager.debug.message(3, "resolveDocument");
-
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == DOCUMENT) {
-	return e.getEntryArg(1); //FIXME check this
-      }
-    }
-
-    return resolveSubordinateCatalogs(DOCUMENT,
-				      null, null, null);
-  }
-
-  /**
-   * Return the applicable ENTITY system identifier.
-   *
-   * @param entityName The name of the entity for which
-   * a system identifier is required.
-   * @param publicId The nominal public identifier for the entity
-   * (as provided in the source document).
-   * @param systemId The nominal system identifier for the entity
-   * (as provided in the source document).
-   *
-   * @return The system identifier to use for the entity.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveEntity(String entityName,
-			      String publicId,
-			      String systemId)
-    throws MalformedURLException, IOException {
-    String resolved = null;
-
-    catalogManager.debug.message(3, "resolveEntity("
-		  +entityName+","+publicId+","+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (publicId != null && publicId.startsWith("urn:publicid:")) {
-      publicId = PublicId.decodeURN(publicId);
-    }
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      if (publicId != null && !publicId.equals(systemId)) {
-	catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
-	systemId = null;
-      } else {
-	publicId = systemId;
-	systemId = null;
-      }
-    }
-
-    if (systemId != null) {
-      // If there's a SYSTEM entry in this catalog, use it
-      resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    if (publicId != null) {
-      // If there's a PUBLIC entry in this catalog, use it
-      resolved = resolveLocalPublic(ENTITY,
-				    entityName,
-				    publicId,
-				    systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    // If there's a ENTITY entry in this catalog, use it
-    boolean over = default_override;
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-	over = e.getEntryArg(0).equalsIgnoreCase("YES");
-	continue;
-      }
-
-      if (e.getEntryType() == ENTITY
-	  && e.getEntryArg(0).equals(entityName)) {
-	if (over || systemId == null) {
-	  return e.getEntryArg(1);
-	}
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(ENTITY,
-				      entityName,
-				      publicId,
-				      systemId);
-  }
-
-  /**
-   * Return the applicable NOTATION system identifier.
-   *
-   * @param notationName The name of the notation for which
-   * a doctype is required.
-   * @param publicId The nominal public identifier for the notation
-   * (as provided in the source document).
-   * @param systemId The nominal system identifier for the notation
-   * (as provided in the source document).
-   *
-   * @return The system identifier to use for the notation.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveNotation(String notationName,
-				String publicId,
-				String systemId)
-    throws MalformedURLException, IOException {
-    String resolved = null;
-
-    catalogManager.debug.message(3, "resolveNotation("
-		  +notationName+","+publicId+","+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (publicId != null && publicId.startsWith("urn:publicid:")) {
-      publicId = PublicId.decodeURN(publicId);
-    }
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      if (publicId != null && !publicId.equals(systemId)) {
-	catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
-	systemId = null;
-      } else {
-	publicId = systemId;
-	systemId = null;
-      }
-    }
-
-    if (systemId != null) {
-      // If there's a SYSTEM entry in this catalog, use it
-      resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    if (publicId != null) {
-      // If there's a PUBLIC entry in this catalog, use it
-      resolved = resolveLocalPublic(NOTATION,
-				    notationName,
-				    publicId,
-				    systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    // If there's a NOTATION entry in this catalog, use it
-    boolean over = default_override;
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-	over = e.getEntryArg(0).equalsIgnoreCase("YES");
-	continue;
-      }
-
-      if (e.getEntryType() == NOTATION
-	  && e.getEntryArg(0).equals(notationName)) {
-	if (over || systemId == null) {
-	  return e.getEntryArg(1);
-	}
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(NOTATION,
-				      notationName,
-				      publicId,
-				      systemId);
-  }
-
-  /**
-   * Return the applicable PUBLIC or SYSTEM identifier.
-   *
-   * <p>This method searches the Catalog and returns the system
-   * identifier specified for the given system or
-   * public identifiers. If
-   * no appropriate PUBLIC or SYSTEM entry is found in the Catalog,
-   * null is returned.</p>
-   *
-   * @param publicId The public identifier to locate in the catalog.
-   * Public identifiers are normalized before comparison.
-   * @param systemId The nominal system identifier for the entity
-   * in question (as provided in the source document).
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   *
-   * @return The system identifier to use.
-   * Note that the nominal system identifier is not returned if a
-   * match is not found in the catalog, instead null is returned
-   * to indicate that no match was found.
-   */
-  public String resolvePublic(String publicId, String systemId) 
-    throws MalformedURLException, IOException {
-
-    catalogManager.debug.message(3, "resolvePublic("+publicId+","+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (publicId != null && publicId.startsWith("urn:publicid:")) {
-      publicId = PublicId.decodeURN(publicId);
-    }
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      if (publicId != null && !publicId.equals(systemId)) {
-	catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
-	systemId = null;
-      } else {
-	publicId = systemId;
-	systemId = null;
-      }
-    }
-
-    // If there's a SYSTEM entry in this catalog, use it
-    if (systemId != null) {
-      String resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    // If there's a PUBLIC entry in this catalog, use it
-    String resolved = resolveLocalPublic(PUBLIC,
-					 null,
-					 publicId,
-					 systemId);
-    if (resolved != null) {
-      return resolved;
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(PUBLIC,
-				      null,
-				      publicId,
-				      systemId);
-  }
-
-  /**
-   * Return the applicable PUBLIC or SYSTEM identifier.
-   *
-   * <p>This method searches the Catalog and returns the system
-   * identifier specified for the given system or public identifiers.
-   * If no appropriate PUBLIC or SYSTEM entry is found in the Catalog,
-   * delegated Catalogs are interrogated.</p>
-   *
-   * <p>There are four possible cases:</p>
-   *
-   * <ul>
-   * <li>If the system identifier provided matches a SYSTEM entry
-   * in the current catalog, the SYSTEM entry is returned.
-   * <li>If the system identifier is not null, the PUBLIC entries
-   * that were encountered when OVERRIDE YES was in effect are
-   * interrogated and the first matching entry is returned.</li>
-   * <li>If the system identifier is null, then all of the PUBLIC
-   * entries are interrogated and the first matching entry
-   * is returned. This may not be the same as the preceding case, if
-   * some PUBLIC entries are encountered when OVERRIDE NO is in effect. In
-   * XML, the only place where a public identifier may occur without
-   * a system identifier is in a notation declaration.</li>
-   * <li>Finally, if the public identifier matches one of the partial
-   * public identifiers specified in a DELEGATE* entry in
-   * the Catalog, the delegated catalog is interrogated. The first
-   * time that the delegated catalog is required, it will be
-   * retrieved and parsed. It is subsequently cached.
-   * </li>
-   * </ul>
-   *
-   * @param entityType The CatalogEntry type for which this query is
-   * being conducted. This is necessary in order to do the approprate
-   * query on a delegated catalog.
-   * @param entityName The name of the entity being searched for, if
-   * appropriate.
-   * @param publicId The public identifier of the entity in question.
-   * @param systemId The nominal system identifier for the entity
-   * in question (as provided in the source document).
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * delegated catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading delegated catalog file.
-   *
-   * @return The system identifier to use.
-   * Note that the nominal system identifier is not returned if a
-   * match is not found in the catalog, instead null is returned
-   * to indicate that no match was found.
-   */
-  protected synchronized String resolveLocalPublic(int entityType,
-						   String entityName,
-						   String publicId,
-						   String systemId)
-    throws MalformedURLException, IOException {
-
-    // Always normalize the public identifier before attempting a match
-    publicId = PublicId.normalize(publicId);
-
-    // If there's a SYSTEM entry in this catalog, use it
-    if (systemId != null) {
-      String resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    // If there's a PUBLIC entry in this catalog, use it
-    boolean over = default_override;
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-	over = e.getEntryArg(0).equalsIgnoreCase("YES");
-	continue;
-      }
-
-      if (e.getEntryType() == PUBLIC
-	  && e.getEntryArg(0).equals(publicId)) {
-	if (over || systemId == null) {
-	  return e.getEntryArg(1);
-	}
-      }
-    }
-
-    // If there's a DELEGATE_PUBLIC entry in this catalog, use it
-    over = default_override;
-    enumt = catalogEntries.elements();
-    Vector delCats = new Vector();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-	over = e.getEntryArg(0).equalsIgnoreCase("YES");
-	continue;
-      }
-
-      if (e.getEntryType() == DELEGATE_PUBLIC
-	  && (over || systemId == null)) {
-	String p = (String) e.getEntryArg(0);
-	if (p.length() <= publicId.length()
-	    && p.equals(publicId.substring(0, p.length()))) {
-	  // delegate this match to the other catalog
-
-	  delCats.addElement(e.getEntryArg(1));
-	}
-      }
-    }
-
-    if (delCats.size() > 0) {
-      Enumeration enumCats = delCats.elements();
-
-      if (catalogManager.debug.getDebug() > 1) {
-	catalogManager.debug.message(2, "Switching to delegated catalog(s):");
-	while (enumCats.hasMoreElements()) {
-	  String delegatedCatalog = (String) enumCats.nextElement();
-	  catalogManager.debug.message(2, "\t" + delegatedCatalog);
-	}
-      }
-
-      Catalog dcat = newCatalog();
-
-      enumCats = delCats.elements();
-      while (enumCats.hasMoreElements()) {
-	String delegatedCatalog = (String) enumCats.nextElement();
-	dcat.parseCatalog(delegatedCatalog);
-      }
-
-      return dcat.resolvePublic(publicId, null);
-    }
-
-    // Nada!
-    return null;
-  }
-
-  /**
-   * Return the applicable SYSTEM system identifier.
-   *
-   * <p>If a SYSTEM entry exists in the Catalog
-   * for the system ID specified, return the mapped value.</p>
-   *
-   * <p>On Windows-based operating systems, the comparison between
-   * the system identifier provided and the SYSTEM entries in the
-   * Catalog is case-insensitive.</p>
-   *
-   * @param systemId The system ID to locate in the catalog.
-   *
-   * @return The resolved system identifier.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveSystem(String systemId)
-    throws MalformedURLException, IOException {
-
-    catalogManager.debug.message(3, "resolveSystem("+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      return resolvePublic(systemId, null);
-    }
-
-    // If there's a SYSTEM entry in this catalog, use it
-    if (systemId != null) {
-      String resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(SYSTEM,
-				      null,
-				      null,
-				      systemId);
-  }
-
-  /**
-   * Return the applicable SYSTEM system identifier in this
-   * catalog.
-   *
-   * <p>If a SYSTEM entry exists in the catalog file
-   * for the system ID specified, return the mapped value.</p>
-   *
-   * @param systemId The system ID to locate in the catalog
-   *
-   * @return The mapped system identifier or null
-   */
-  protected String resolveLocalSystem(String systemId)
-    throws MalformedURLException, IOException {
-
-    String osname = System.getProperty("os.name");
-    boolean windows = (osname.indexOf("Windows") >= 0);
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == SYSTEM
-	  && (e.getEntryArg(0).equals(systemId)
-	      || (windows
-		  && e.getEntryArg(0).equalsIgnoreCase(systemId)))) {
-	return e.getEntryArg(1);
-      }
-    }
-
-    // If there's a REWRITE_SYSTEM entry in this catalog, use it
-    enumt = catalogEntries.elements();
-    String startString = null;
-    String prefix = null;
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-
-      if (e.getEntryType() == REWRITE_SYSTEM) {
-	String p = (String) e.getEntryArg(0);
-	if (p.length() <= systemId.length()
-	    && p.equals(systemId.substring(0, p.length()))) {
-	  // Is this the longest prefix?
-	  if (startString == null
-	      || p.length() > startString.length()) {
-	    startString = p;
-	    prefix = e.getEntryArg(1);
-	  }
-	}
-      }
-
-      if (prefix != null) {
-	// return the systemId with the new prefix
-	return prefix + systemId.substring(startString.length());
-      }
-    }
-
-    // If there's a DELEGATE_SYSTEM entry in this catalog, use it
-    enumt = catalogEntries.elements();
-    Vector delCats = new Vector();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-
-      if (e.getEntryType() == DELEGATE_SYSTEM) {
-	String p = (String) e.getEntryArg(0);
-	if (p.length() <= systemId.length()
-	    && p.equals(systemId.substring(0, p.length()))) {
-	  // delegate this match to the other catalog
-
-	  delCats.addElement(e.getEntryArg(1));
-	}
-      }
-    }
-
-    if (delCats.size() > 0) {
-      Enumeration enumCats = delCats.elements();
-
-      if (catalogManager.debug.getDebug() > 1) {
-	catalogManager.debug.message(2, "Switching to delegated catalog(s):");
-	while (enumCats.hasMoreElements()) {
-	  String delegatedCatalog = (String) enumCats.nextElement();
-	  catalogManager.debug.message(2, "\t" + delegatedCatalog);
-	}
-      }
-
-      Catalog dcat = newCatalog();
-
-      enumCats = delCats.elements();
-      while (enumCats.hasMoreElements()) {
-	String delegatedCatalog = (String) enumCats.nextElement();
-	dcat.parseCatalog(delegatedCatalog);
-      }
-
-      return dcat.resolveSystem(systemId);
-    }
-
-    return null;
-  }
-
-  /**
-   * Return the applicable URI.
-   *
-   * <p>If a URI entry exists in the Catalog
-   * for the URI specified, return the mapped value.</p>
-   *
-   * <p>URI comparison is case sensitive.</p>
-   *
-   * @param uri The URI to locate in the catalog.
-   *
-   * @return The resolved URI.
-   *
-   * @throws MalformedURLException The system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveURI(String uri)
-    throws MalformedURLException, IOException {
-
-    catalogManager.debug.message(3, "resolveURI("+uri+")");
-
-    uri = normalizeURI(uri);
-
-    if (uri != null && uri.startsWith("urn:publicid:")) {
-      uri = PublicId.decodeURN(uri);
-      return resolvePublic(uri, null);
-    }
-
-    // If there's a URI entry in this catalog, use it
-    if (uri != null) {
-      String resolved = resolveLocalURI(uri);
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(URI,
-				      null,
-				      null,
-				      uri);
-  }
-
-  /**
-   * Return the applicable URI in this catalog.
-   *
-   * <p>If a URI entry exists in the catalog file
-   * for the URI specified, return the mapped value.</p>
-   *
-   * @param uri The URI to locate in the catalog
-   *
-   * @return The mapped URI or null
-   */
-  protected String resolveLocalURI(String uri)
-    throws MalformedURLException, IOException {
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == URI
-	  && (e.getEntryArg(0).equals(uri))) {
-	return e.getEntryArg(1);
-      }
-    }
-
-    // If there's a REWRITE_URI entry in this catalog, use it
-    enumt = catalogEntries.elements();
-    String startString = null;
-    String prefix = null;
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-
-      if (e.getEntryType() == REWRITE_URI) {
-	String p = (String) e.getEntryArg(0);
-	if (p.length() <= uri.length()
-	    && p.equals(uri.substring(0, p.length()))) {
-	  // Is this the longest prefix?
-	  if (startString == null
-	      || p.length() > startString.length()) {
-	    startString = p;
-	    prefix = e.getEntryArg(1);
-	  }
-	}
-      }
-
-      if (prefix != null) {
-	// return the systemId with the new prefix
-	return prefix + uri.substring(startString.length());
-      }
-    }
-
-    // If there's a DELEGATE_URI entry in this catalog, use it
-    enumt = catalogEntries.elements();
-    Vector delCats = new Vector();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-
-      if (e.getEntryType() == DELEGATE_URI) {
-	String p = (String) e.getEntryArg(0);
-	if (p.length() <= uri.length()
-	    && p.equals(uri.substring(0, p.length()))) {
-	  // delegate this match to the other catalog
-
-	  delCats.addElement(e.getEntryArg(1));
-	}
-      }
-    }
-
-    if (delCats.size() > 0) {
-      Enumeration enumCats = delCats.elements();
-
-      if (catalogManager.debug.getDebug() > 1) {
-	catalogManager.debug.message(2, "Switching to delegated catalog(s):");
-	while (enumCats.hasMoreElements()) {
-	  String delegatedCatalog = (String) enumCats.nextElement();
-	  catalogManager.debug.message(2, "\t" + delegatedCatalog);
-	}
-      }
-
-      Catalog dcat = newCatalog();
-
-      enumCats = delCats.elements();
-      while (enumCats.hasMoreElements()) {
-	String delegatedCatalog = (String) enumCats.nextElement();
-	dcat.parseCatalog(delegatedCatalog);
-      }
-
-      return dcat.resolveURI(uri);
-    }
-
-    return null;
-  }
-
-  /**
-   * Search the subordinate catalogs, in order, looking for a match.
-   *
-   * <p>This method searches the Catalog and returns the system
-   * identifier specified for the given entity type with the given
-   * name, public, and system identifiers. In some contexts, these
-   * may be null.</p>
-   *
-   * @param entityType The CatalogEntry type for which this query is
-   * being conducted. This is necessary in order to do the approprate
-   * query on a subordinate catalog.
-   * @param entityName The name of the entity being searched for, if
-   * appropriate.
-   * @param publicId The public identifier of the entity in question
-   * (as provided in the source document).
-   * @param systemId The nominal system identifier for the entity
-   * in question (as provided in the source document). This parameter is
-   * overloaded for the URI entry type.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * delegated catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading delegated catalog file.
-   *
-   * @return The system identifier to use.
-   * Note that the nominal system identifier is not returned if a
-   * match is not found in the catalog, instead null is returned
-   * to indicate that no match was found.
-   */
-  protected synchronized String resolveSubordinateCatalogs(int entityType,
-							   String entityName,
-							   String publicId,
-							   String systemId)
-    throws MalformedURLException, IOException {
-
-    for (int catPos = 0; catPos < catalogs.size(); catPos++) {
-      Catalog c = null;
-
-      try {
-	c = (Catalog) catalogs.elementAt(catPos);
-      } catch (ClassCastException e) {
-	String catfile = (String) catalogs.elementAt(catPos);
-	c = newCatalog();
-
-	try {
-	  c.parseCatalog(catfile);
-	} catch (MalformedURLException mue) {
-	  catalogManager.debug.message(1, "Malformed Catalog URL", catfile);
-	} catch (FileNotFoundException fnfe) {
-	  catalogManager.debug.message(1, "Failed to load catalog, file not found",
-			catfile);
-	} catch (IOException ioe) {
-	  catalogManager.debug.message(1, "Failed to load catalog, I/O error", catfile);
-	}
-
-	catalogs.setElementAt(c, catPos);
-      }
-
-      String resolved = null;
-
-      // Ok, now what are we supposed to call here?
-      if (entityType == DOCTYPE) {
-	resolved = c.resolveDoctype(entityName,
-				    publicId,
-				    systemId);
-      } else if (entityType == DOCUMENT) {
-	resolved = c.resolveDocument();
-      } else if (entityType == ENTITY) {
-	resolved = c.resolveEntity(entityName,
-				   publicId,
-				   systemId);
-      } else if (entityType == NOTATION) {
-	resolved = c.resolveNotation(entityName,
-				     publicId,
-				     systemId);
-      } else if (entityType == PUBLIC) {
-	resolved = c.resolvePublic(publicId, systemId);
-      } else if (entityType == SYSTEM) {
-	resolved = c.resolveSystem(systemId);
-      } else if (entityType == URI) {
-	resolved = c.resolveURI(systemId);
-      }
-
-      if (resolved != null) {
-	return resolved;
-      }
-    }
-
-    return null;
-  }
-
-  // -----------------------------------------------------------------
-
-  /**
-   * Replace backslashes with forward slashes. (URLs always use
-   * forward slashes.)
-   *
-   * @param sysid The input system identifier.
-   * @return The same system identifier with backslashes turned into
-   * forward slashes.
-   */
-  protected String fixSlashes (String sysid) {
-    return sysid.replace('\\', '/');
-  }
-
-  /**
-   * Construct an absolute URI from a relative one, using the current
-   * base URI.
-   *
-   * @param sysid The (possibly relative) system identifier
-   * @return The system identifier made absolute with respect to the
-   * current {@link #base}.
-   */
-  protected String makeAbsolute(String sysid) {
-    URL local = null;
-
-    sysid = fixSlashes(sysid);
-
-    try {
-      local = new URL(base, sysid);
-    } catch (MalformedURLException e) {
-      catalogManager.debug.message(1, "Malformed URL on system identifier", sysid);
-    }
-
-    if (local != null) {
-      return local.toString();
-    } else {
-      return sysid;
-    }
-  }
-
-  /**
-   * Perform character normalization on a URI reference.
-   *
-   * @param uriref The URI reference
-   * @return The normalized URI reference.
-   */
-  protected String normalizeURI(String uriref) {
-    String newRef = "";
-    byte[] bytes;
-
-    if (uriref == null) {
-      return null;
-    }
-
-    try {
-      bytes = uriref.getBytes("UTF-8");
-    } catch (UnsupportedEncodingException uee) {
-      // this can't happen
-      catalogManager.debug.message(1, "UTF-8 is an unsupported encoding!?");
-      return uriref;
-    }
-
-    for (int count = 0; count < bytes.length; count++) {
-      int ch = bytes[count] & 0xFF;
-
-      if ((ch <= 0x20)    // ctrl
-	  || (ch > 0x7F)  // high ascii
-	  || (ch == 0x22) // "
-	  || (ch == 0x3C) // <
-	  || (ch == 0x3E) // >
-	  || (ch == 0x5C) // \
-	  || (ch == 0x5E) // ^
-	  || (ch == 0x60) // `
-	  || (ch == 0x7B) // {
-	  || (ch == 0x7C) // |
-	  || (ch == 0x7D) // }
-	  || (ch == 0x7F)) {
-	newRef += encodedByte(ch);
-      } else {
-	newRef += (char) bytes[count];
-      }
-    }
-
-    return newRef;
-  }
-
-  /**
-   * Perform %-encoding on a single byte.
-   *
-   * @param b The 8-bit integer that represents th byte. (Bytes are signed
-              but encoding needs to look at the bytes unsigned.)
-   * @return The %-encoded string for the byte in question.
-   */
-  protected String encodedByte (int b) {
-    String hex = Integer.toHexString(b).toUpperCase();
-    if (hex.length() < 2) {
-      return "%0" + hex;
-    } else {
-      return "%" + hex;
-    }
-  }
-
-  // -----------------------------------------------------------------
-
-  /**
-   * Add to the current list of delegated catalogs.
-   *
-   * <p>This method always constructs the {@link #localDelegate}
-   * vector so that it is ordered by length of partial
-   * public identifier.</p>
-   *
-   * @param entry The DELEGATE catalog entry
-   */
-  protected void addDelegate(CatalogEntry entry) {
-    int pos = 0;
-    String partial = entry.getEntryArg(0);
-
-    Enumeration local = localDelegate.elements();
-    while (local.hasMoreElements()) {
-      CatalogEntry dpe = (CatalogEntry) local.nextElement();
-      String dp = dpe.getEntryArg(0);
-      if (dp.equals(partial)) {
-	// we already have this prefix
-	return;
-      }
-      if (dp.length() > partial.length()) {
-	pos++;
-      }
-      if (dp.length() < partial.length()) {
-	break;
-      }
-    }
-
-    // now insert partial into the vector at [pos]
-    if (localDelegate.size() == 0) {
-      localDelegate.addElement(entry);
-    } else {
-      localDelegate.insertElementAt(entry, pos);
-    }
-  }
-}
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Catalog.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Catalog.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,286 +0,0 @@
-// CatalogEntry.java - Represents Catalog entries
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-/**
- * Represents a Catalog entry.
- *
- * <p>Instances of this class represent individual entries
- * in a Catalog.</p>
- *
- * <p>Each catalog entry has a unique name and is associated with
- * an arbitrary number of arguments (all strings). For example, the
- * TR9401 catalog entry "PUBLIC" has two arguments, a public identifier
- * and a system identifier. Each entry has a unique numeric type,
- * assigned automatically when the entry type is created.</p>
- *
- * <p>The number and type of catalog entries is maintained
- * <em>statically</em>. Catalog classes, or their subclasses, can add
- * new entry types, but all Catalog objects share the same global pool
- * of types.</p>
- *
- * <p>Initially there are no valid entries.</p>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class CatalogEntry {
-  /** The nextEntry is the ordinal number of the next entry type. */
-  protected static int nextEntry = 0;
-
-  /**
-   * The entryTypes vector maps catalog entry names
-   * (e.g., 'BASE' or 'SYSTEM') to their type (1, 2, etc.).
-   * Names are case sensitive.
-   */
-  protected static Hashtable entryTypes = new Hashtable();
-
-  /** The entryTypes vector maps catalog entry types to the
-      number of arguments they're required to have. */
-  protected static Vector entryArgs = new Vector();
-
-  /**
-   * Adds a new catalog entry type.
-   *
-   * @param name The name of the catalog entry type. This must be
-   * unique among all types and is case-sensitive. (Adding a duplicate
-   * name effectively replaces the old type with the new type.)
-   * @param numArgs The number of arguments that this entry type
-   * is required to have. There is no provision for variable numbers
-   * of arguments.
-   * @return The type for the new entry.
-   */
-  public static int addEntryType(String name, int numArgs) {
-    entryTypes.put(name, new Integer(nextEntry));
-    entryArgs.add(nextEntry, new Integer(numArgs));
-    nextEntry++;
-
-    return nextEntry-1;
-  }
-
-  /**
-   * Lookup an entry type
-   *
-   * @param name The name of the catalog entry type.
-   * @return The type of the catalog entry with the specified name.
-   * @throws InvalidCatalogEntryTypeException if no entry has the
-   * specified name.
-   */
-  public static int getEntryType(String name)
-    throws CatalogException {
-    if (!entryTypes.containsKey(name)) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    Integer iType = (Integer) entryTypes.get(name);
-
-    if (iType == null) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    return iType.intValue();
-  }
-
-  /**
-   * Find out how many arguments an entry is required to have.
-   *
-   * @param name The name of the catalog entry type.
-   * @return The number of arguments that entry type is required to have.
-   * @throws InvalidCatalogEntryTypeException if no entry has the
-   * specified name.
-   */
-  public static int getEntryArgCount(String name)
-    throws CatalogException {
-    return getEntryArgCount(getEntryType(name));
-  }
-
-  /**
-   * Find out how many arguments an entry is required to have.
-   *
-   * @param type A valid catalog entry type.
-   * @return The number of arguments that entry type is required to have.
-   * @throws InvalidCatalogEntryTypeException if the type is invalid.
-   */
-  public static int getEntryArgCount(int type)
-    throws CatalogException {
-    try {
-      Integer iArgs = (Integer) entryArgs.get(type);
-      return iArgs.intValue();
-    } catch (ArrayIndexOutOfBoundsException e) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-  }
-
-  /** The entry type of this entry */
-  protected int entryType = 0;
-
-  /** The arguments associated with this entry */
-  protected Vector args = null;
-
-  /**
-   * Null constructor; something for subclasses to call.
-   */
-  public CatalogEntry() {}
-
-  /**
-   * Construct a catalog entry of the specified type.
-   *
-   * @param name The name of the entry type
-   * @param args A String Vector of arguments
-   * @throws InvalidCatalogEntryTypeException if no such entry type
-   * exists.
-   * @throws InvalidCatalogEntryException if the wrong number of arguments
-   * is passed.
-   */
-  public CatalogEntry(String name, Vector args)
-    throws CatalogException {
-    Integer iType = (Integer) entryTypes.get(name);
-
-    if (iType == null) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    int type = iType.intValue();
-
-    try {
-      Integer iArgs = (Integer) entryArgs.get(type);
-      if (iArgs.intValue() != args.size()) {
-	throw new CatalogException(CatalogException.INVALID_ENTRY);
-      }
-    } catch (ArrayIndexOutOfBoundsException e) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    entryType = type;
-    this.args = args;
-  }
-
-  /**
-   * Construct a catalog entry of the specified type.
-   *
-   * @param name The name of the entry type
-   * @param args A String Vector of arguments
-   * @throws InvalidCatalogEntryTypeException if no such entry type
-   * exists.
-   * @throws InvalidCatalogEntryException if the wrong number of arguments
-   * is passed.
-   */
-  public CatalogEntry(int type, Vector args)
-    throws CatalogException {
-    try {
-      Integer iArgs = (Integer) entryArgs.get(type);
-      if (iArgs.intValue() != args.size()) {
-	throw new CatalogException(CatalogException.INVALID_ENTRY);
-      }
-    } catch (ArrayIndexOutOfBoundsException e) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    entryType = type;
-    this.args = args;
-  }
-
-  /**
-   * Get the entry type.
-   *
-   * @return The entry type of the CatalogEntry
-   */
-  public int getEntryType() {
-    return entryType;
-  }
-
-  /**
-   * Get an entry argument.
-   *
-   * @param argNum The argument number (arguments are numbered from 0).
-   * @return The specified argument or null if an invalid argNum is
-   * provided.
-   */
-  public String getEntryArg(int argNum) {
-    try {
-      String arg = (String) args.get(argNum);
-      return arg;
-    } catch (ArrayIndexOutOfBoundsException e) {
-      return null;
-    }
-  }
-
-  /**
-   * Set an entry argument.
-   *
-   * <p>Catalogs sometimes need to adjust the catlog entry parameters,
-   * for example to make a relative URI absolute with respect to the
-   * current base URI. But in general, this function should only be
-   * called shortly after object creation to do some sort of cleanup.
-   * Catalog entries should not mutate over time.</p>
-   *
-   * @param argNum The argument number (arguments are numbered from 0).
-   * @throws ArrayIndexOutOfBoundsException if an invalid argument
-   * number is provided.
-   */
-  public void setEntryArg(int argNum, String newspec)
-    throws ArrayIndexOutOfBoundsException {
-    args.set(argNum, newspec);
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogException.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,200 +0,0 @@
-// CatalogException.java - Catalog exception
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog;
-
-/**
- * Signal Catalog exception.
- *
- * <p>This exception is thrown if an error occurs loading a
- * catalog file.</p>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class CatalogException extends Exception {
-  /** A wrapper around another exception */
-  public static final int WRAPPER = 1;
-  /** An invalid entry */
-  public static final int INVALID_ENTRY = 2;
-  /** An invalid entry type */
-  public static final int INVALID_ENTRY_TYPE = 3;
-  /** Could not instantiate an XML parser */
-  public static final int NO_XML_PARSER = 4;
-  /** Unknown XML format */
-  public static final int UNKNOWN_FORMAT = 5;
-  /** Unparseable XML catalog (not XML)*/
-  public static final int UNPARSEABLE = 6;
-  /** XML but parse failed */
-  public static final int PARSE_FAILED = 7;
-
-  /**
-   * The embedded exception if tunnelling, or null.
-   */
-  private Exception exception = null;
-  private int exceptionType = 0;
-
-  /**
-   * Create a new CatalogException.
-   *
-   * @param type The exception type
-   * @param message The error or warning message.
-   */
-  public CatalogException (int type, String message) {
-    super(message);
-    this.exceptionType = type;
-    this.exception = null;
-  }
-
-  /**
-   * Create a new CatalogException.
-   *
-   * @param type The exception type
-   */
-  public CatalogException (int type) {
-    super("Catalog Exception " + type);
-    this.exceptionType = type;
-    this.exception = null;
-  }
-
-  /**
-   * Create a new CatalogException wrapping an existing exception.
-   *
-   * <p>The existing exception will be embedded in the new
-   * one, and its message will become the default message for
-   * the CatalogException.</p>
-   *
-   * @param e The exception to be wrapped in a CatalogException.
-   */
-  public CatalogException (Exception e) {
-    super();
-    this.exceptionType = WRAPPER;
-    this.exception = e;
-  }
-
-  /**
-   * Create a new CatalogException from an existing exception.
-   *
-   * <p>The existing exception will be embedded in the new
-   * one, but the new exception will have its own message.</p>
-   *
-   * @param message The detail message.
-   * @param e The exception to be wrapped in a CatalogException.
-   */
-  public CatalogException (String message, Exception e) {
-    super(message);
-    this.exceptionType = WRAPPER;
-    this.exception = e;
-  }
-
-  /**
-   * Return a detail message for this exception.
-   *
-   * <p>If there is an embedded exception, and if the CatalogException
-   * has no detail message of its own, this method will return
-   * the detail message from the embedded exception.</p>
-   *
-   * @return The error or warning message.
-   */
-  public String getMessage ()
-  {
-    String message = super.getMessage();
-
-    if (message == null && exception != null) {
-      return exception.getMessage();
-    } else {
-      return message;
-    }
-  }
-
-  /**
-   * Return the embedded exception, if any.
-   *
-   * @return The embedded exception, or null if there is none.
-   */
-  public Exception getException ()
-  {
-    return exception;
-  }
-
-  /**
-   * Return the exception type
-   *
-   * @return The exception type
-   */
-  public int getExceptionType ()
-  {
-    return exceptionType;
-  }
-
-  /**
-   * Override toString to pick up any embedded exception.
-   *
-   * @return A string representation of this exception.
-   */
-  public String toString ()
-  {
-    if (exception != null) {
-      return exception.toString();
-    } else {
-      return super.toString();
-    }
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogException.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogException.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogManager.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogManager.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogManager.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,862 +0,0 @@
-// CatalogManager.java - Access CatalogManager.properties
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog;
-
-import java.io.InputStream;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import java.util.MissingResourceException;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.helpers.BootstrapResolver;
-import org.jboss.util.xml.catalog.helpers.Debug;
-
-/**
- * CatalogManager provides an interface to the catalog properties.
- *
- * <p>Properties can come from two places: from system properties or
- * from a <i>CatalogManager.properties</i> file. This class provides a transparent
- * interface to both, with system properties preferred over property file values.</p>
- *
- * <p>The following table summarizes the properties:</p>
- *
- * <table border="1">
- * <thead>
- * <tr>
- * <td>System Property</td>
- * <td>CatalogManager.properties<br/>Property</td>
- * <td>Description</td>
- * </tr>
- * </thead>
- * <tbody>
- * <tr>
- * <td>xml.catalog.ignoreMissing</td>
- * <td>&#160;</td>
- * <td>If true, a missing <i>CatalogManager.properties</i> file or missing properties
- * within that file will not generate warning messages. See also the
- * <i>ignoreMissingProperties</i> method.</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.files</td>
- * <td>catalogs</td>
- * <td>The <emph>semicolon-delimited</emph> list of catalog files.</td>
- * </tr>
- *
- * <tr>
- * <td>&#160;</td>
- * <td>relative-catalogs</td>
- * <td>If false, relative catalog URIs are made absolute with respect to the base URI of
- * the <i>CatalogManager.properties</i> file. This setting only applies to catalog
- * URIs obtained from the <i>catalogs</i> property <emph>in the</emph>
- * <i>CatalogManager.properties</i> file</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.verbosity</td>
- * <td>verbosity</td>
- * <td>If non-zero, the Catalog classes will print informative and debugging messages.
- * The higher the number, the more messages.</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.prefer</td>
- * <td>prefer</td>
- * <td>Which identifier is preferred, "public" or "system"?</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.staticCatalog</td>
- * <td>static-catalog</td>
- * <td>Should a single catalog be constructed for all parsing, or should a different
- * catalog be created for each parser?</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.allowPI</td>
- * <td>allow-oasis-xml-catalog-pi</td>
- * <td>If the source document contains "oasis-xml-catalog" processing instructions,
- * should they be used?</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.className</td>
- * <td>catalog-class-name</td>
- * <td>If you're using the convenience classes
- * <tt>org.apache.xml.resolver.tools.*</tt>), this setting
- * allows you to specify an alternate class name to use for the underlying
- * catalog.</td>
- * </tr>
- * </tbody>
- * </table>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-
-public class CatalogManager {
-  private static String pFiles         = "xml.catalog.files";
-  private static String pVerbosity     = "xml.catalog.verbosity";
-  private static String pPrefer        = "xml.catalog.prefer";
-  private static String pStatic        = "xml.catalog.staticCatalog";
-  private static String pAllowPI       = "xml.catalog.allowPI";
-  private static String pClassname     = "xml.catalog.className";
-  private static String pIgnoreMissing = "xml.catalog.ignoreMissing";
-
-  /** A static CatalogManager instance for sharing */
-  private static CatalogManager staticManager = new CatalogManager();
-
-  /** The bootstrap resolver to use when loading XML Catalogs. */
-  private BootstrapResolver bResolver = new BootstrapResolver();
-
-  /** Flag to ignore missing property files and/or properties */
-  private boolean ignoreMissingProperties
-    = (System.getProperty(pIgnoreMissing) != null
-       || System.getProperty(pFiles) != null);
-
-  /** Holds the resources after they are loaded from the file. */
-  private ResourceBundle resources;
-
-  /** The name of the CatalogManager properties file. */
-  private String propertyFile = "CatalogManager.properties";
-
-  /** The location of the propertyFile */
-  private URL propertyFileURI = null;
-
-  /** Default catalog files list. */
-  private String defaultCatalogFiles = "./xcatalog";
-
-  /** Current catalog files list. */
-  private String catalogFiles = null;
-
-  /** Did the catalgoFiles come from the properties file? */
-  private boolean fromPropertiesFile = false;
-
-  /** Default verbosity level if there is no property setting for it. */
-  private int defaultVerbosity = 1;
-
-  /** Current verbosity level. */
-  private Integer verbosity = null;
-
-  /** Default preference setting. */
-  private boolean defaultPreferPublic = true;
-
-  /** Current preference setting. */
-  private Boolean preferPublic = null;
-
-  /** Default setting of the static catalog flag. */
-  private boolean defaultUseStaticCatalog = true;
-
-  /** Current setting of the static catalog flag. */
-  private Boolean useStaticCatalog = null;
-
-  /** The static catalog used by this manager. */
-  private static Catalog staticCatalog = null;
-
-  /** Default setting of the oasisXMLCatalogPI flag. */
-  private boolean defaultOasisXMLCatalogPI = true;
-
-  /** Current setting of the oasisXMLCatalogPI flag. */
-  private Boolean oasisXMLCatalogPI = null;
-
-  /** Default setting of the relativeCatalogs flag. */
-  private boolean defaultRelativeCatalogs = true;
-
-  /** Current setting of the relativeCatalogs flag. */
-  private Boolean relativeCatalogs = null;
-
-  /** Current catalog class name. */
-  private String catalogClassName = null;
-
-  /** The manager's debug object. Used for printing debugging messages.
-   *
-   * <p>This field is public so that objects that have access to this
-   * CatalogManager can use this debug object.</p>
-   */
-  public Debug debug = null;
-
-  /** Constructor. */
-  public CatalogManager() {
-    debug = new Debug();
-    // Note that we don't setDebug() here; we do that lazily. Either the
-    // user will set it explicitly, or we'll do it automagically if they
-    // read from the propertyFile for some other reason. That way, there's
-    // no attempt to read from the file before the caller has had a chance
-    // to avoid it.
-  }
-
-  /** Constructor that specifies an explicit property file. */
-  public CatalogManager(String propertyFile) {
-    this.propertyFile = propertyFile;
-
-    debug = new Debug();
-    // Note that we don't setDebug() here; we do that lazily. Either the
-    // user will set it explicitly, or we'll do it automagically if they
-    // read from the propertyFile for some other reason. That way, there's
-    // no attempt to read from the file before the caller has had a chance
-    // to avoid it.
-  }
-
-  /** Set the bootstrap resolver.*/
-  public void setBootstrapResolver(BootstrapResolver resolver) {
-    bResolver = resolver;
-  }
-
-  /** Get the bootstrap resolver.*/
-  public BootstrapResolver getBootstrapResolver() {
-    return bResolver;
-  }
-
-  /**
-   * Load the properties from the propertyFile and build the
-   * resources from it.
-   */
-  private synchronized void readProperties() {
-    try {
-      propertyFileURI = CatalogManager.class.getResource("/"+propertyFile);
-      InputStream in =
-	CatalogManager.class.getResourceAsStream("/"+propertyFile);
-      if (in==null) {
-	if (!ignoreMissingProperties) {
-	  System.err.println("Cannot find "+propertyFile);
-	  // there's no reason to give this warning more than once
-	  ignoreMissingProperties = true;
-	}
-	return;
-      }
-      resources = new PropertyResourceBundle(in);
-    } catch (MissingResourceException mre) {
-      if (!ignoreMissingProperties) {
-	System.err.println("Cannot read "+propertyFile);
-      }
-    } catch (java.io.IOException e) {
-      if (!ignoreMissingProperties) {
-	System.err.println("Failure trying to read "+propertyFile);
-      }
-    }
-
-    // This is a bit of a hack. After we've successfully read the properties,
-    // use them to set the default debug level, if the user hasn't already set
-    // the default debug level.
-    if (verbosity == null) {
-      try {
-	String verbStr = resources.getString("verbosity");
-	int verb = Integer.parseInt(verbStr.trim());
-	debug.setDebug(verb);
-	verbosity = new Integer(verb);
-      } catch (Exception e) {
-	// nop
-      }
-    }
-  }
-
-  /**
-   * Allow access to the static CatalogManager
-   */
-  public static CatalogManager getStaticManager() {
-    return staticManager;
-  }
-
-  /**
-   * How are missing properties handled?
-   *
-   * <p>If true, missing or unreadable property files will
-   * not be reported. Otherwise, a message will be sent to System.err.
-   * </p>
-   */
-  public boolean getIgnoreMissingProperties() {
-    return ignoreMissingProperties;
-  }
-
-  /**
-   * How should missing properties be handled?
-   *
-   * <p>If ignore is true, missing or unreadable property files will
-   * not be reported. Otherwise, a message will be sent to System.err.
-   * </p>
-   */
-  public void setIgnoreMissingProperties(boolean ignore) {
-    ignoreMissingProperties = ignore;
-  }
-
-  /**
-   * How are missing properties handled?
-   *
-   * <p>If ignore is true, missing or unreadable property files will
-   * not be reported. Otherwise, a message will be sent to System.err.
-   * </p>
-   *
-   * @deprecated No longer static; use get/set methods.
-   */
-  public void ignoreMissingProperties(boolean ignore) {
-    setIgnoreMissingProperties(ignore);
-  }
-
-  /**
-   * Obtain the verbosity setting from the properties.
-   *
-   * @return The verbosity level from the propertyFile or the
-   * defaultVerbosity.
-   */
-  private int queryVerbosity () {
-    String verbStr = System.getProperty(pVerbosity);
-
-    if (verbStr == null) {
-      if (resources==null) readProperties();
-      if (resources==null) return defaultVerbosity;
-      try {
-	verbStr = resources.getString("verbosity");
-      } catch (MissingResourceException e) {
-	return defaultVerbosity;
-      }
-    }
-
-    try {
-      int verb = Integer.parseInt(verbStr.trim());
-      return verb;
-    } catch (Exception e) {
-      System.err.println("Cannot parse verbosity: \"" + verbStr + "\"");
-      return defaultVerbosity;
-    }
-  }
-
-  /**
-   * What is the current verbosity?
-   */
-  public int getVerbosity() {
-    if (verbosity == null) {
-      verbosity = new Integer(queryVerbosity());
-    }
-
-    return verbosity.intValue();
-  }
-
-  /**
-   * Set the current verbosity.
-   */
-  public void setVerbosity (int verbosity) {
-    this.verbosity = new Integer(verbosity);
-    debug.setDebug(verbosity);
-  }
-
-  /**
-   * What is the current verbosity?
-   *
-   * @deprecated No longer static; use get/set methods.
-   */
-  public int verbosity () {
-    return getVerbosity();
-  }
-
-  /**
-   * Obtain the relativeCatalogs setting from the properties.
-   *
-   * @return The relativeCatalogs setting from the propertyFile or the
-   * defaultRelativeCatalogs.
-   */
-  private boolean queryRelativeCatalogs () {
-    if (resources==null) readProperties();
-
-    if (resources==null) return defaultRelativeCatalogs;
-
-    try {
-      String allow = resources.getString("relative-catalogs");
-      return (allow.equalsIgnoreCase("true")
-	      || allow.equalsIgnoreCase("yes")
-	      || allow.equalsIgnoreCase("1"));
-    } catch (MissingResourceException e) {
-      return defaultRelativeCatalogs;
-    }
-  }
-
-  /**
-   * Get the relativeCatalogs setting.
-   *
-   * <p>This property is used when the catalogFiles property is
-   * interrogated. If true, then relative catalog entry file names
-   * are returned. If false, relative catalog entry file names are
-   * made absolute with respect to the properties file before returning
-   * them.</p>
-   *
-   * <p>This property <emph>only applies</emph> when the catalog files
-   * come from a properties file. If they come from a system property or
-   * the default list, they are never considered relative. (What would
-   * they be relative to?)</p>
-   *
-   * <p>In the properties, a value of 'yes', 'true', or '1' is considered
-   * true, anything else is false.</p>
-   *
-   * @return The relativeCatalogs setting from the propertyFile or the
-   * defaultRelativeCatalogs.
-   */
-  public boolean getRelativeCatalogs () {
-    if (relativeCatalogs == null) {
-      relativeCatalogs = new Boolean(queryRelativeCatalogs());
-    }
-
-    return relativeCatalogs.booleanValue();
-  }
-
-  /**
-   * Set the relativeCatalogs setting.
-   *
-   * @return The relativeCatalogs setting from the propertyFile or the
-   * defaultRelativeCatalogs.
-   *
-   * @see #getRelativeCatalogs()
-   */
-  public void setRelativeCatalogs (boolean relative) {
-    relativeCatalogs = new Boolean(relative);
-  }
-
-  /**
-   * Get the relativeCatalogs setting.
-   *
-   * @deprecated No longer static; use get/set methods.
-   */
-  public boolean relativeCatalogs () {
-    return getRelativeCatalogs();
-  }
-
-  /**
-   * Obtain the list of catalog files from the properties.
-   *
-   * @return A semicolon delimited list of catlog file URIs
-   */
-  private String queryCatalogFiles () {
-    String catalogList = System.getProperty(pFiles);
-    fromPropertiesFile = false;
-
-    if (catalogList == null) {
-      if (resources == null) readProperties();
-      if (resources != null) {
-	try {
-	  catalogList = resources.getString("catalogs");
-	  fromPropertiesFile = true;
-	} catch (MissingResourceException e) {
-	  System.err.println(propertyFile + ": catalogs not found.");
-	  catalogList = null;
-	}
-      }
-    }
-
-    if (catalogList == null) {
-      catalogList = defaultCatalogFiles;
-    }
-
-    return catalogList;
-  }
-
-  /**
-   * Return the current list of catalog files.
-   *
-   * @return A vector of the catalog file names or null if no catalogs
-   * are available in the properties.
-   */
-  public Vector getCatalogFiles() {
-    if (catalogFiles == null) {
-      catalogFiles = queryCatalogFiles();
-    }
-
-    StringTokenizer files = new StringTokenizer(catalogFiles, ";");
-    Vector catalogs = new Vector();
-    while (files.hasMoreTokens()) {
-      String catalogFile = files.nextToken();
-      URL absURI = null;
-
-      if (fromPropertiesFile && !relativeCatalogs()) {
-	try {
-	  absURI = new URL(propertyFileURI, catalogFile);
-	  catalogFile = absURI.toString();
-	} catch (MalformedURLException mue) {
-	  absURI = null;
-	}
-      }
-
-      catalogs.add(catalogFile);
-    }
-
-    return catalogs;
-  }
-
-  /**
-   * Set the list of catalog files.
-   */
-  public void setCatalogFiles(String fileList) {
-    catalogFiles = fileList;
-    fromPropertiesFile = false;
-  }
-
-  /**
-   * Return the current list of catalog files.
-   *
-   * @return A vector of the catalog file names or null if no catalogs
-   * are available in the properties.
-   *
-   * @deprecated No longer static; use get/set methods.
-   */
-  public Vector catalogFiles() {
-    return getCatalogFiles();
-  }
-
-  /**
-   * Obtain the preferPublic setting from the properties.
-   *
-   * <p>In the properties, a value of 'public' is true,
-   * anything else is false.</p>
-   *
-   * @return True if prefer is public or the
-   * defaultPreferSetting.
-   */
-  private boolean queryPreferPublic () {
-    String prefer = System.getProperty(pPrefer);
-
-    if (prefer == null) {
-      if (resources==null) readProperties();
-      if (resources==null) return defaultPreferPublic;
-      try {
-	prefer = resources.getString("prefer");
-      } catch (MissingResourceException e) {
-	return defaultPreferPublic;
-      }
-    }
-
-    if (prefer == null) {
-      return defaultPreferPublic;
-    }
-
-    return (prefer.equalsIgnoreCase("public"));
-  }
-
-  /**
-   * Return the current prefer public setting.
-   *
-   * @return True if public identifiers are preferred.
-   */
-  public boolean getPreferPublic () {
-    if (preferPublic == null) {
-      preferPublic = new Boolean(queryPreferPublic());
-    }
-    return preferPublic.booleanValue();
-  }
-
-  /**
-   * Set the prefer public setting.
-   *
-   * @return True if public identifiers are preferred.
-   */
-  public void setPreferPublic (boolean preferPublic) {
-    this.preferPublic = new Boolean(preferPublic);
-  }
-
-  /**
-   * Return the current prefer public setting.
-   *
-   * @return True if public identifiers are preferred.
-   *
-   * @deprecated No longer static; use get/set methods.
-   */
-  public boolean preferPublic () {
-    return getPreferPublic();
-  }
-
-  /**
-   * Obtain the static-catalog setting from the properties.
-   *
-   * <p>In the properties, a value of 'yes', 'true', or '1' is considered
-   * true, anything else is false.</p>
-   *
-   * @return The static-catalog setting from the propertyFile or the
-   * defaultUseStaticCatalog.
-   */
-  private boolean queryUseStaticCatalog () {
-    String staticCatalog = System.getProperty(pStatic);
-
-    if (useStaticCatalog == null) {
-      if (resources==null) readProperties();
-      if (resources==null) return defaultUseStaticCatalog;
-      try {
-	staticCatalog = resources.getString("static-catalog");
-      } catch (MissingResourceException e) {
-	return defaultUseStaticCatalog;
-      }
-    }
-
-    if (staticCatalog == null) {
-      return defaultUseStaticCatalog;
-    }
-
-    return (staticCatalog.equalsIgnoreCase("true")
-	    || staticCatalog.equalsIgnoreCase("yes")
-	    || staticCatalog.equalsIgnoreCase("1"));
-  }
-
-  /**
-   * Get the current use static catalog setting.
-   */
-  public boolean getUseStaticCatalog() {
-    if (useStaticCatalog == null) {
-      useStaticCatalog = new Boolean(queryUseStaticCatalog());
-    }
-
-    return useStaticCatalog.booleanValue();
-  }
-
-  /**
-   * Set the use static catalog setting.
-   */
-  public void setUseStaticCatalog(boolean useStatic) {
-    useStaticCatalog = new Boolean(useStatic);
-  }
-
-  /**
-   * Get the current use static catalog setting.
-   *
-   * @deprecated No longer static; use get/set methods.
-   */
-  public boolean staticCatalog() {
-    return getUseStaticCatalog();
-  }
-
-  /**
-   * Get a new catalog instance.
-   *
-   * This method always returns a new instance of the underlying catalog class.
-   */
-  public Catalog getPrivateCatalog() {
-    Catalog catalog = staticCatalog;
-
-    if (useStaticCatalog == null) {
-      useStaticCatalog = new Boolean(getUseStaticCatalog());
-    }
-
-    if (catalog == null || !useStaticCatalog.booleanValue()) {
-
-      try {
-	String catalogClassName = getCatalogClassName();
-
-	if (catalogClassName == null) {
-	  catalog = new Catalog();
-	} else {
-	  try {
-	    catalog = (Catalog) Class.forName(catalogClassName).newInstance();
-	  } catch (ClassNotFoundException cnfe) {
-	    debug.message(1,"Catalog class named '"
-			  + catalogClassName
-			  + "' could not be found. Using default.");
-	    catalog = new Catalog();
-	  } catch (ClassCastException cnfe) {
-	    debug.message(1,"Class named '"
-			  + catalogClassName
-			  + "' is not a Catalog. Using default.");
-	    catalog = new Catalog();
-	  }
-	}
-
-	catalog.setCatalogManager(this);
-	catalog.setupReaders();
-	catalog.loadSystemCatalogs();
-      } catch (Exception ex) {
-	ex.printStackTrace();
-      }
-
-      if (useStaticCatalog.booleanValue()) {
-	staticCatalog = catalog;
-      }
-    }
-
-    return catalog;
-  }
-
-  /**
-   * Get a catalog instance.
-   *
-   * If this manager uses static catalogs, the same static catalog will
-   * always be returned. Otherwise a new catalog will be returned.
-   */
-  public Catalog getCatalog() {
-    Catalog catalog = staticCatalog;
-
-    if (useStaticCatalog == null) {
-      useStaticCatalog = new Boolean(getUseStaticCatalog());
-    }
-
-    if (catalog == null || !useStaticCatalog.booleanValue()) {
-      catalog = getPrivateCatalog();
-      if (useStaticCatalog.booleanValue()) {
-	staticCatalog = catalog;
-      }
-    }
-
-    return catalog;
-  }
-
-  /**
-   * <p>Obtain the oasisXMLCatalogPI setting from the properties.</p>
-   *
-   * <p>In the properties, a value of 'yes', 'true', or '1' is considered
-   * true, anything else is false.</p>
-   *
-   * @return The oasisXMLCatalogPI setting from the propertyFile or the
-   * defaultOasisXMLCatalogPI.
-   */
-  public boolean queryAllowOasisXMLCatalogPI () {
-    String allow = System.getProperty(pAllowPI);
-
-    if (allow == null) {
-      if (resources==null) readProperties();
-      if (resources==null) return defaultOasisXMLCatalogPI;
-      try {
-	allow = resources.getString("allow-oasis-xml-catalog-pi");
-      } catch (MissingResourceException e) {
-	return defaultOasisXMLCatalogPI;
-      }
-    }
-
-    if (allow == null) {
-      return defaultOasisXMLCatalogPI;
-    }
-
-    return (allow.equalsIgnoreCase("true")
-	    || allow.equalsIgnoreCase("yes")
-	    || allow.equalsIgnoreCase("1"));
-  }
-
-  /**
-   * Get the current XML Catalog PI setting.
-   */
-  public boolean getAllowOasisXMLCatalogPI () {
-    if (oasisXMLCatalogPI == null) {
-      oasisXMLCatalogPI = new Boolean(queryAllowOasisXMLCatalogPI());
-    }
-
-    return oasisXMLCatalogPI.booleanValue();
-  }
-
-  /**
-   * Set the XML Catalog PI setting
-   */
-  public void setAllowOasisXMLCatalogPI(boolean allowPI) {
-    oasisXMLCatalogPI = new Boolean(allowPI);
-  }
-
-  /**
-   * Get the current XML Catalog PI setting.
-   *
-   * @deprecated No longer static; use get/set methods.
-   */
-  public boolean allowOasisXMLCatalogPI() {
-    return getAllowOasisXMLCatalogPI();
-  }
-
-  /**
-   * Obtain the Catalog class name setting from the properties.
-   *
-   */
-  public String queryCatalogClassName () {
-    String className = System.getProperty(pClassname);
-
-    if (className == null) {
-      if (resources==null) readProperties();
-      if (resources==null) return null;
-      try {
-	return resources.getString("catalog-class-name");
-      } catch (MissingResourceException e) {
-	return null;
-      }
-    }
-
-    return className;
-  }
-
-  /**
-   * Get the current Catalog class name.
-   */
-  public String getCatalogClassName() {
-    if (catalogClassName == null) {
-      catalogClassName = queryCatalogClassName();
-    }
-
-    return catalogClassName;
-  }
-
-  /**
-   * Set the Catalog class name.
-   */
-  public void setCatalogClassName(String className) {
-    catalogClassName = className;
-  }
-
-  /**
-   * Get the current Catalog class name.
-   *
-   * @deprecated No longer static; use get/set methods.
-   */
-  public String catalogClassName() {
-    return getCatalogClassName();
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogManager.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/CatalogManager.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Resolver.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Resolver.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Resolver.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,732 +0,0 @@
-// Resolver.java - Represents an extension of OASIS Open Catalog files.
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.FileNotFoundException;
-import java.util.Enumeration;
-import java.util.Vector;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.MalformedURLException;
-
-import org.jboss.util.xml.catalog.readers.ExtendedXMLCatalogReader;
-import org.jboss.util.xml.catalog.readers.OASISXMLCatalogReader;
-import org.jboss.util.xml.catalog.readers.SAXCatalogReader;
-import org.jboss.util.xml.catalog.readers.TR9401CatalogReader;
-import org.jboss.util.xml.catalog.readers.XCatalogReader;
-
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- * An extension to OASIS Open Catalog files, this class supports
- * suffix-based matching and an external RFC2483 resolver.
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class Resolver extends Catalog {
-  /**
-   * The URISUFFIX Catalog Entry type.
-   *
-   * <p>URI suffix entries match URIs that end in a specified suffix.</p>
-   */
-  public static final int URISUFFIX = CatalogEntry.addEntryType("URISUFFIX", 2);
-
-  /**
-   * The SYSTEMSUFFIX Catalog Entry type.
-   *
-   * <p>System suffix entries match system identifiers that end in a
-   * specified suffix.</p>
-   */
-  public static final int SYSTEMSUFFIX = CatalogEntry.addEntryType("SYSTEMSUFFIX", 2);
-
-  /**
-   * The RESOLVER Catalog Entry type.
-   *
-   * <p>A hook for providing support for web-based backup resolvers.</p>
-   */
-  public static final int RESOLVER = CatalogEntry.addEntryType("RESOLVER", 1);
-
-  /**
-   * The SYSTEMREVERSE Catalog Entry type.
-   *
-   * <p>This is a bit of a hack. There's no actual SYSTEMREVERSE entry,
-   * but this entry type is used to indicate that a reverse lookup is
-   * being performed. (This allows the Resolver to implement
-   * RFC2483 I2N and I2NS.)
-   */
-  public static final int SYSTEMREVERSE
-    = CatalogEntry.addEntryType("SYSTEMREVERSE", 1);
-
-  /**
-   * Setup readers.
-   */
-  public void setupReaders() {
-    SAXParserFactory spf = SAXParserFactory.newInstance();
-    spf.setNamespaceAware(true);
-    spf.setValidating(false);
-
-    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
-
-    saxReader.setCatalogParser(null, "XMLCatalog",
-			       XCatalogReader.class.getName());
-
-    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
-			       "catalog",
-			       ExtendedXMLCatalogReader.class.getName());
-
-    addReader("application/xml", saxReader);
-
-    TR9401CatalogReader textReader = new TR9401CatalogReader();
-    addReader("text/plain", textReader);
-  }
-
-  /**
-   * Cleanup and process a Catalog entry.
-   *
-   * <p>This method processes each Catalog entry, changing mapped
-   * relative system identifiers into absolute ones (based on the current
-   * base URI), and maintaining other information about the current
-   * catalog.</p>
-   *
-   * @param entry The CatalogEntry to process.
-   */
-  public void addEntry(CatalogEntry entry) {
-    int type = entry.getEntryType();
-
-    if (type == URISUFFIX) {
-      String suffix = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "URISUFFIX", suffix, fsi);
-    } else if (type == SYSTEMSUFFIX) {
-      String suffix = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "SYSTEMSUFFIX", suffix, fsi);
-    }
-
-    super.addEntry(entry);
-  }
-
-  /**
-   * Return the applicable URI.
-   *
-   * <p>If a URI entry exists in the Catalog
-   * for the URI specified, return the mapped value.</p>
-   *
-   * <p>In the Resolver (as opposed to the Catalog) class, if the
-   * URI isn't found by the usual algorithm, URISUFFIX entries are
-   * considered.</p>
-   *
-   * <p>URI comparison is case sensitive.</p>
-   *
-   * @param uri The URI to locate in the catalog.
-   *
-   * @return The resolved URI.
-   *
-   * @throws MalformedURLException The system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveURI(String uri)
-    throws MalformedURLException, IOException {
-
-    String resolved = super.resolveURI(uri);
-    if (resolved != null) {
-      return resolved;
-    }
-
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == RESOLVER) {
-	resolved = resolveExternalSystem(uri, e.getEntryArg(0));
-	if (resolved != null) {
-	  return resolved;
-	}
-      } else if (e.getEntryType() == URISUFFIX) {
-	String suffix = e.getEntryArg(0);
-	String result = e.getEntryArg(1);
-
-	if (suffix.length() <= uri.length()
-	    && uri.substring(uri.length()-suffix.length()).equals(suffix)) {
-	  return result;
-	}
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(Catalog.URI,
-				      null,
-				      null,
-				      uri);
-  }
-
-  /**
-   * Return the applicable SYSTEM system identifier, resorting
-   * to external RESOLVERs if necessary.
-   *
-   * <p>If a SYSTEM entry exists in the Catalog
-   * for the system ID specified, return the mapped value.</p>
-   *
-   * <p>In the Resolver (as opposed to the Catalog) class, if the
-   * URI isn't found by the usual algorithm, SYSTEMSUFFIX entries are
-   * considered.</p>
-   *
-   * <p>On Windows-based operating systems, the comparison between
-   * the system identifier provided and the SYSTEM entries in the
-   * Catalog is case-insensitive.</p>
-   *
-   * @param systemId The system ID to locate in the catalog.
-   *
-   * @return The system identifier to use for systemId.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveSystem(String systemId)
-    throws MalformedURLException, IOException {
-
-    String resolved = super.resolveSystem(systemId);
-    if (resolved != null) {
-      return resolved;
-    }
-
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == RESOLVER) {
-	resolved = resolveExternalSystem(systemId, e.getEntryArg(0));
-	if (resolved != null) {
-	  return resolved;
-	}
-      } else if (e.getEntryType() == SYSTEMSUFFIX) {
-	String suffix = e.getEntryArg(0);
-	String result = e.getEntryArg(1);
-
-	if (suffix.length() <= systemId.length()
-	    && systemId.substring(systemId.length()-suffix.length()).equals(suffix)) {
-	  return result;
-	}
-      }
-    }
-
-    return resolveSubordinateCatalogs(Catalog.SYSTEM,
-				      null,
-				      null,
-				      systemId);
-  }
-
-  /**
-   * Return the applicable PUBLIC or SYSTEM identifier, resorting
-   * to external resolvers if necessary.
-   *
-   * <p>This method searches the Catalog and returns the system
-   * identifier specified for the given system or
-   * public identifiers. If
-   * no appropriate PUBLIC or SYSTEM entry is found in the Catalog,
-   * null is returned.</p>
-   *
-   * <p>Note that a system or public identifier in the current catalog
-   * (or subordinate catalogs) will be used in preference to an
-   * external resolver. Further, if a systemId is present, the external
-   * resolver(s) will be queried for that before the publicId.</p>
-   *
-   * @param publicId The public identifier to locate in the catalog.
-   * Public identifiers are normalized before comparison.
-   * @param systemId The nominal system identifier for the entity
-   * in question (as provided in the source document).
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   *
-   * @return The system identifier to use.
-   * Note that the nominal system identifier is not returned if a
-   * match is not found in the catalog, instead null is returned
-   * to indicate that no match was found.
-   */
-  public String resolvePublic(String publicId, String systemId) 
-    throws MalformedURLException, IOException {
-
-    String resolved = super.resolvePublic(publicId, systemId);
-    if (resolved != null) {
-      return resolved;
-    }
-
-    Enumeration enumt = catalogEntries.elements();
-    while (enumt.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) enumt.nextElement();
-      if (e.getEntryType() == RESOLVER) {
-	if (systemId != null) {
-	  resolved = resolveExternalSystem(systemId,
-					   e.getEntryArg(0));
-	  if (resolved != null) {
-	    return resolved;
-	  }
-	}
-	resolved = resolveExternalPublic(publicId, e.getEntryArg(0));
-	if (resolved != null) {
-	  return resolved;
-	}
-      }
-    }
-
-    return resolveSubordinateCatalogs(Catalog.PUBLIC,
-				      null,
-				      publicId,
-				      systemId);
-  }
-
-    /**
-     * Query an external RFC2483 resolver for a system identifier.
-     *
-     * @param systemId The system ID to locate.
-     * @param resolver The name of the resolver to use.
-     *
-     * @return The system identifier to use for the systemId.
-     */
-    protected String resolveExternalSystem(String systemId, String resolver)
-	throws MalformedURLException, IOException {
-	Resolver r = queryResolver(resolver, "i2l", systemId, null);
-	if (r != null) {
-	    return r.resolveSystem(systemId);
-	} else {
-	    return null;
-	}
-    }
-
-    /**
-     * Query an external RFC2483 resolver for a public identifier.
-     *
-     * @param publicId The system ID to locate.
-     * @param resolver The name of the resolver to use.
-     *
-     * @return The system identifier to use for the systemId.
-     */
-    protected String resolveExternalPublic(String publicId, String resolver)
-	throws MalformedURLException, IOException {
-	Resolver r = queryResolver(resolver, "fpi2l", publicId, null);
-	if (r != null) {
-	    return r.resolvePublic(publicId, null);
-	} else {
-	    return null;
-	}
-    }
-
-    /**
-     * Query an external RFC2483 resolver.
-     *
-     * @param resolver The URL of the RFC2483 resolver.
-     * @param command The command to send the resolver.
-     * @param arg1 The first argument to the resolver.
-     * @param arg2 The second argument to the resolver, usually null.
-     *
-     * @return The Resolver constructed.
-     */
-    protected Resolver queryResolver(String resolver,
-				     String command,
-				     String arg1,
-				     String arg2) {
-	InputStream iStream = null;
-	String RFC2483 = resolver + "?command=" + command 
-	    + "&format=tr9401&uri=" + arg1 
-	    + "&uri2=" + arg2;
-	String line = null;
-
-	try {
-	    URL url = new URL(RFC2483);
-
-	    URLConnection urlCon = url.openConnection();
-
-	    urlCon.setUseCaches(false);
-
-	    Resolver r = (Resolver) newCatalog();
-
-	    String cType = urlCon.getContentType();
-
-	    // I don't care about the character set or subtype
-	    if (cType.indexOf(";") > 0) {
-		cType = cType.substring(0, cType.indexOf(";"));
-	    }
-
-	    r.parseCatalog(cType, urlCon.getInputStream());
-
-	    return r;
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.UNPARSEABLE) {
-	    catalogManager.debug.message(1, "Unparseable catalog: " + RFC2483);
-	  } else if (cex.getExceptionType()
-		     == CatalogException.UNKNOWN_FORMAT) {
-	    catalogManager.debug.message(1, "Unknown catalog format: " + RFC2483);
-	  }
-	  return null;
-	} catch (MalformedURLException mue) {
-	    catalogManager.debug.message(1, "Malformed resolver URL: " + RFC2483);
-	    return null;
-	} catch (IOException ie) {
-	    catalogManager.debug.message(1, "I/O Exception opening resolver: " + RFC2483);
-	    return null;
-	}
-    }
-
-    /**
-     * Append two vectors, returning the result.
-     *
-     * @param vec The first vector
-     * @param appvec The vector to be appended
-     * @return The vector vec, with appvec's elements appended to it
-     */
-    private Vector appendVector(Vector vec, Vector appvec) {
-	if (appvec != null) {
-	    for (int count = 0; count < appvec.size(); count++) {
-		vec.addElement(appvec.elementAt(count));
-	    }
-	}
-	return vec;
-    }
-
-    /**
-     * Find the URNs for a given system identifier in all catalogs.
-     *
-     * @param systemId The system ID to locate.
-     *
-     * @return A vector of URNs that map to the systemId.
-     */
-    public Vector resolveAllSystemReverse(String systemId)
-	throws MalformedURLException, IOException {
-	Vector resolved = new Vector();
-
-	// If there's a SYSTEM entry in this catalog, use it
-	if (systemId != null) {
-	    Vector localResolved = resolveLocalSystemReverse(systemId);
-	    resolved = appendVector(resolved, localResolved);
-	}
-
-	// Otherwise, look in the subordinate catalogs
-	Vector subResolved = resolveAllSubordinateCatalogs(SYSTEMREVERSE,
-							   null,
-							   null,
-							   systemId);
-
-	return appendVector(resolved, subResolved);
-    }
-
-    /**
-     * Find the URN for a given system identifier.
-     *
-     * @param systemId The system ID to locate.
-     *
-     * @return A (single) URN that maps to the systemId.
-     */
-    public String resolveSystemReverse(String systemId)
-	throws MalformedURLException, IOException {
-	Vector resolved = resolveAllSystemReverse(systemId);
-	if (resolved != null && resolved.size() > 0) {
-	    return (String) resolved.elementAt(0);
-	} else {
-	    return null;
-	}
-    }
-
-    /**
-     * Return the applicable SYSTEM system identifiers.
-     *
-     * <p>If one or more SYSTEM entries exists in the Catalog
-     * for the system ID specified, return the mapped values.</p>
-     *
-     * <p>The caller is responsible for doing any necessary
-     * normalization of the system identifier before calling
-     * this method. For example, a relative system identifier in
-     * a document might be converted to an absolute system identifier
-     * before attempting to resolve it.</p>
-     *
-     * <p>Note that this function will force all subordinate catalogs
-     * to be loaded.</p>
-     *
-     * <p>On Windows-based operating systems, the comparison between
-     * the system identifier provided and the SYSTEM entries in the
-     * Catalog is case-insensitive.</p>
-     *
-     * @param systemId The system ID to locate in the catalog.
-     *
-     * @return The system identifier to use for the notation.
-     *
-     * @throws MalformedURLException The formal system identifier of a
-     * subordinate catalog cannot be turned into a valid URL.
-     * @throws IOException Error reading subordinate catalog file.
-     */
-    public Vector resolveAllSystem(String systemId)
-	throws MalformedURLException, IOException {
-	Vector resolutions = new Vector();
-
-	// If there are SYSTEM entries in this catalog, start with them
-	if (systemId != null) {
-	    Vector localResolutions = resolveAllLocalSystem(systemId);
-	    resolutions = appendVector(resolutions, localResolutions);
-	}
-
-	// Then look in the subordinate catalogs
-	Vector subResolutions = resolveAllSubordinateCatalogs(SYSTEM,
-							      null,
-							      null,
-							      systemId);
-	resolutions = appendVector(resolutions, subResolutions);
-
-	if (resolutions.size() > 0) {
-	    return resolutions;
-	} else {
-	    return null;
-	}
-    }
-
-    /**
-     * Return all applicable SYSTEM system identifiers in this
-     * catalog.
-     *
-     * <p>If one or more SYSTEM entries exists in the catalog file
-     * for the system ID specified, return the mapped values.</p>
-     *
-     * @param systemId The system ID to locate in the catalog
-     *
-     * @return A vector of the mapped system identifiers or null
-     */
-    private Vector resolveAllLocalSystem(String systemId) {
-	Vector map = new Vector();
-	String osname = System.getProperty("os.name");
-	boolean windows = (osname.indexOf("Windows") >= 0);
-	Enumeration enumt = catalogEntries.elements();
-	while (enumt.hasMoreElements()) {
-	    CatalogEntry e = (CatalogEntry) enumt.nextElement();
-	    if (e.getEntryType() == SYSTEM
-		&& (e.getEntryArg(0).equals(systemId)
-		    || (windows
-			&& e.getEntryArg(0).equalsIgnoreCase(systemId)))) {
-		map.addElement(e.getEntryArg(1));
-	    }
-	}
-	if (map.size() == 0) {
-	    return null;
-	} else {
-	    return map;
-	}
-    }
-
-    /**
-     * Find the URNs for a given system identifier in the current catalog.
-     *
-     * @param systemId The system ID to locate.
-     *
-     * @return A vector of URNs that map to the systemId.
-     */
-    private Vector resolveLocalSystemReverse(String systemId) {
-	Vector map = new Vector();
-	String osname = System.getProperty("os.name");
-	boolean windows = (osname.indexOf("Windows") >= 0);
-	Enumeration enumt = catalogEntries.elements();
-	while (enumt.hasMoreElements()) {
-	    CatalogEntry e = (CatalogEntry) enumt.nextElement();
-	    if (e.getEntryType() == SYSTEM
-		&& (e.getEntryArg(1).equals(systemId)
-		    || (windows
-			&& e.getEntryArg(1).equalsIgnoreCase(systemId)))) {
-		map.addElement(e.getEntryArg(0));
-	    }
-	}
-	if (map.size() == 0) {
-	    return null;
-	} else {
-	    return map;
-	}
-    }
-
-    /**
-     * Search the subordinate catalogs, in order, looking for all
-     * match.
-     *
-     * <p>This method searches the Catalog and returns all of the system
-     * identifiers specified for the given entity type with the given
-     * name, public, and system identifiers. In some contexts, these
-     * may be null.</p>
-     *
-     * @param entityType The CatalogEntry type for which this query is
-     * being conducted. This is necessary in order to do the approprate
-     * query on a subordinate catalog.
-     * @param entityName The name of the entity being searched for, if
-     * appropriate.
-     * @param publicId The public identifier of the entity in question
-     * (as provided in the source document).
-     * @param systemId The nominal system identifier for the entity
-     * in question (as provided in the source document).
-     *
-     * @throws MalformedURLException The formal system identifier of a
-     * delegated catalog cannot be turned into a valid URL.
-     * @throws IOException Error reading delegated catalog file.
-     *
-     * @return The system identifier to use.
-     * Note that the nominal system identifier is not returned if a
-     * match is not found in the catalog, instead null is returned
-     * to indicate that no match was found.
-     */
-    private synchronized Vector resolveAllSubordinateCatalogs(int entityType,
-					      String entityName,
-					      String publicId,
-					      String systemId)
-	throws MalformedURLException, IOException {
-
-	Vector resolutions = new Vector();
-
-	for (int catPos = 0; catPos < catalogs.size(); catPos++) {
-	    Resolver c = null;
-
-	    try {
-		c = (Resolver) catalogs.elementAt(catPos);
-	    } catch (ClassCastException e) {
-		String catfile = (String) catalogs.elementAt(catPos);
-		c = (Resolver) newCatalog();
-
-		try {
-		    c.parseCatalog(catfile);
-		} catch (MalformedURLException mue) {
-		    catalogManager.debug.message(1, "Malformed Catalog URL", catfile);
-		} catch (FileNotFoundException fnfe) {
-		    catalogManager.debug.message(1, "Failed to load catalog, file not found",
-			  catfile);
-		} catch (IOException ioe) {
-		    catalogManager.debug.message(1, "Failed to load catalog, I/O error", catfile);
-		}
-
-		catalogs.setElementAt(c, catPos);
-	    }
-
-	    String resolved = null;
-
-	    // Ok, now what are we supposed to call here?
-	    if (entityType == DOCTYPE) {
-		resolved = c.resolveDoctype(entityName,
-					    publicId,
-					    systemId);
-		if (resolved != null) {
-		    // Only find one DOCTYPE resolution
-		    resolutions.addElement(resolved);
-		    return resolutions;
-		}
-	    } else if (entityType == DOCUMENT) {
-		resolved = c.resolveDocument();
-		if (resolved != null) {
-		    // Only find one DOCUMENT resolution
-		    resolutions.addElement(resolved);
-		    return resolutions;
-		}
-	    } else if (entityType == ENTITY) {
-		resolved = c.resolveEntity(entityName,
-					   publicId,
-					   systemId);
-		if (resolved != null) {
-		    // Only find one ENTITY resolution
-		    resolutions.addElement(resolved);
-		    return resolutions;
-		}
-	    } else if (entityType == NOTATION) {
-		resolved = c.resolveNotation(entityName,
-					     publicId,
-					     systemId);
-		if (resolved != null) {
-		    // Only find one NOTATION resolution
-		    resolutions.addElement(resolved);
-		    return resolutions;
-		}
-	    } else if (entityType == PUBLIC) {
-		resolved = c.resolvePublic(publicId, systemId);
-		if (resolved != null) {
-		    // Only find one PUBLIC resolution
-		    resolutions.addElement(resolved);
-		    return resolutions;
-		}
-	    } else if (entityType == SYSTEM) {
-		Vector localResolutions = c.resolveAllSystem(systemId);
-		resolutions = appendVector(resolutions, localResolutions);
-		break;
-	    } else if (entityType == SYSTEMREVERSE) {
-		Vector localResolutions = c.resolveAllSystemReverse(systemId);
-		resolutions = appendVector(resolutions, localResolutions);
-	    }
-	}
-
-	if (resolutions != null) {
-	    return resolutions;
-	} else {
-	    return null;
-	}
-    }
-}
-
-
-
-

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Resolver.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Resolver.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Version.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Version.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Version.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,107 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2002 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xalan" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, Lotus
- * Development Corporation., http://www.lotus.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.jboss.util.xml.catalog;
-
-/**
- * <meta name="usage" content="general"/>
- * Administrative class to keep track of the version number of
- * xml-commons external sources releases.
- * See xml-commons/java/resolver.xml for filtering on 1.0, etc.
- */
-public class Version
-{
-
-  /**
-   * Get the version string for xml-commons-resolver.  
-   * Version String formatted like: 
-   * <CODE>"XmlResolver v.r"</CODE>.
-   *
-   * @return String denoting our current version
-   */
-  public static String getVersion()
-  {
-    return getProduct()+" "+getVersionNum();
-  }
-
-  /**
-   * Get just the product name.
-   *
-   * @return String denoting our product name
-   */
-  public static String getProduct()
-  {
-    return "XmlResolver";
-  }
-
-  /**
-   * Get just the version number v.r.
-   * @return String denoting our current version number
-   */
-  public static String getVersionNum()
-  {
-    return "1.1";
-  }
-
-  /**
-   * Print the release version to the command line.
-   * @param argv command line arguments, unused.
-   */
-  public static void main(String argv[])
-  {
-    System.out.println(getVersion());
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Version.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/Version.java)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/BootstrapResolver.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/BootstrapResolver.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/BootstrapResolver.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,246 +0,0 @@
-// BootstrapResolver.java - Resolve entities and URIs internally
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.helpers;
-
-import java.util.Hashtable;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.InputStream;
-
-import javax.xml.transform.URIResolver;
-import javax.xml.transform.Source;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.TransformerException;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-/**
- * A simple bootstrapping resolver.
- *
- * <p>This class is used as the entity resolver when reading XML Catalogs.
- * It searches for the OASIS XML Catalog DTD, Relax NG Grammar and W3C XML Schema
- * as resources (e.g., in the resolver jar file).</p>
- *
- * <p>If you have your own DTDs or schemas, you can extend this class and
- * set the BootstrapResolver in your CatalogManager.</p>
- *
- * @see org.jboss.util.xml.catalog.CatalogManager
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class BootstrapResolver implements EntityResolver, URIResolver {
-  /** URI of the W3C XML Schema for OASIS XML Catalog files. */
-  public static final String xmlCatalogXSD = "http://www.oasis-open.org/committees/entity/release/1.0/catalog.xsd";
-
-  /** URI of the RELAX NG Grammar for OASIS XML Catalog files. */
-  public static final String xmlCatalogRNG = "http://www.oasis-open.org/committees/entity/release/1.0/catalog.rng";
-
-  /** Public identifier for OASIS XML Catalog files. */
-  public static final String xmlCatalogPubId = "-//OASIS//DTD XML Catalogs V1.0//EN";
-
-  /** System identifier for OASIS XML Catalog files. */
-  public static final String xmlCatalogSysId = "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd";
-
-  /** Private hash used for public identifiers. */
-  private Hashtable publicMap = new Hashtable();
-
-  /** Private hash used for system identifiers. */
-  private Hashtable systemMap = new Hashtable();
-
-  /** Private hash used for URIs. */
-  private Hashtable uriMap = new Hashtable();
-
-  /** Constructor. */
-  public BootstrapResolver() {
-    URL url = this.getClass().getResource("/org/apache/xml/resolver/etc/catalog.dtd");
-    if (url != null) {
-      publicMap.put(xmlCatalogPubId, url.toString());
-      systemMap.put(xmlCatalogSysId, url.toString());
-    }
-
-    url = this.getClass().getResource("/org/apache/xml/resolver/etc/catalog.rng");
-    if (url != null) {
-      uriMap.put(xmlCatalogRNG, url.toString());
-    }
-
-    url = this.getClass().getResource("/org/apache/xml/resolver/etc/catalog.xsd");
-    if (url != null) {
-      uriMap.put(xmlCatalogXSD, url.toString());
-    }
-  }
-
-  /** SAX resolveEntity API. */
-  public InputSource resolveEntity (String publicId, String systemId) {
-    String resolved = null;
-
-    if (systemId != null && systemMap.containsKey(systemId)) {
-      resolved = (String) systemMap.get(systemId);
-    } else if (publicId != null && publicMap.containsKey(publicId)) {
-      resolved = (String) publicMap.get(publicId);
-    }
-
-    if (resolved != null) {
-      try {
-	InputSource iSource = new InputSource(resolved);
-	iSource.setPublicId(publicId);
-
-	// Ideally this method would not attempt to open the
-	// InputStream, but there is a bug (in Xerces, at least)
-	// that causes the parser to mistakenly open the wrong
-	// system identifier if the returned InputSource does
-	// not have a byteStream.
-	//
-	// It could be argued that we still shouldn't do this here,
-	// but since the purpose of calling the entityResolver is
-	// almost certainly to open the input stream, it seems to
-	// do little harm.
-	//
-	URL url = new URL(resolved);
-	InputStream iStream = url.openStream();
-	iSource.setByteStream(iStream);
-
-	return iSource;
-      } catch (Exception e) {
-	// FIXME: silently fail?
-	return null;
-      }
-    }
-
-    return null;
-  }
-
-  /** Transformer resolve API. */
-  public Source resolve(String href, String base)
-    throws TransformerException {
-
-    String uri = href;
-    String fragment = null;
-    int hashPos = href.indexOf("#");
-    if (hashPos >= 0) {
-      uri = href.substring(0, hashPos);
-      fragment = href.substring(hashPos+1);
-    }
-
-    String result = null;
-    if (href != null && uriMap.containsKey(href)) {
-      result = (String) uriMap.get(href);
-    }
-
-    if (result == null) {
-      try {
-	URL url = null;
-
-	if (base==null) {
-	  url = new URL(uri);
-	  result = url.toString();
-	} else {
-	  URL baseURL = new URL(base);
-	  url = (href.length()==0 ? baseURL : new URL(baseURL, uri));
-	  result = url.toString();
-	}
-      } catch (java.net.MalformedURLException mue) {
-	// try to make an absolute URI from the current base
-	String absBase = makeAbsolute(base);
-	if (!absBase.equals(base)) {
-	  // don't bother if the absBase isn't different!
-	  return resolve(href, absBase);
-	} else {
-	  throw new TransformerException("Malformed URL "
-					 + href + "(base " + base + ")",
-					 mue);
-	}
-      }
-    }
-
-    SAXSource source = new SAXSource();
-    source.setInputSource(new InputSource(result));
-    return source;
-  }
-
-  /** Attempt to construct an absolute URI */
-  private String makeAbsolute(String uri) {
-    if (uri == null) {
-      uri = "";
-    }
-
-    try {
-      URL url = new URL(uri);
-      return url.toString();
-    } catch (MalformedURLException mue) {
-      String dir = System.getProperty("user.dir");
-      String file = "";
-
-      if (dir.endsWith("/")) {
-	file = "file://" + dir + uri;
-      } else {
-	file = "file://" + dir + "/" + uri;
-      }
-
-      try {
-	URL fileURL = new URL(file);
-	return fileURL.toString();
-      } catch (MalformedURLException mue2) {
-	// bail
-	return uri;
-      }
-    }
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/BootstrapResolver.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/BootstrapResolver.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Debug.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Debug.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Debug.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,145 +0,0 @@
-// Debug.java - Print debug messages
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.helpers;
-
-/**
- * Static debugging/messaging class for Catalogs.
- *
- * <p>This class defines a set of static methods that can be called
- * to produce debugging messages. Messages have an associated "debug
- * level" and messages below the current setting are not displayed.</p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class Debug {
-  /** The internal debug level. */
-  protected int debug = 0;
-
-  /** Constructor */
-  public Debug() {
-    // nop
-  }
-
-  /** Set the debug level for future messages. */
-  public void setDebug(int newDebug) {
-    debug = newDebug;
-  }
-
-  /** Get the current debug level. */
-  public int getDebug() {
-    return debug;
-  }
-
-  /**
-   * Print debug message (if the debug level is high enough).
-   *
-   * <p>Prints "the message"</p>
-   *
-   * @param level The debug level of this message. This message
-   * will only be
-   * displayed if the current debug level is at least equal to this
-   * value.
-   * @param message The text of the message.
-   */
-  public void message(int level, String message) {
-    if (debug >= level) {
-      System.out.println(message);
-    }
-  }
-
-  /**
-   * Print debug message (if the debug level is high enough).
-   *
-   * <p>Prints "the message: spec"</p>
-   *
-   * @param level The debug level of this message. This message
-   * will only be
-   * displayed if the current debug level is at least equal to this
-   * value.
-   * @param message The text of the message.
-   * @param spec An argument to the message.
-   */
-  public void message(int level, String message, String spec) {
-    if (debug >= level) {
-      System.out.println(message + ": " + spec);
-    }
-  }
-
-  /**
-   * Print debug message (if the debug level is high enough).
-   *
-   * <p>Prints "the message: spec1" and "spec2" indented on the next line.</p>
-   *
-   * @param level The debug level of this message. This message
-   * will only be
-   * displayed if the current debug level is at least equal to this
-   * value.
-   * @param message The text of the message.
-   * @param spec1 An argument to the message.
-   * @param spec2 Another argument to the message.
-   */
-  public void message(int level, String message,
-			     String spec1, String spec2) {
-    if (debug >= level) {
-      System.out.println(message + ": " + spec1);
-      System.out.println("\t" + spec2);
-    }
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Debug.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Debug.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Namespaces.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Namespaces.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Namespaces.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,148 +0,0 @@
-// Namespaces.java - Analyze namespace nodes in a DOM tree
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.helpers;
-
-import org.w3c.dom.*;
-
-/**
- * Static Namespace query methods.
- *
- * <p>This class defines a set of static methods that can be called
- * to analyze the namespace properties of DOM nodes.</p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class Namespaces {
-    /**
-     * Returns the "prefix" part of a QName or the empty string (not
-     * null) if the name has no prefix.
-     *
-     * @param element The QName of an element.
-     * @return The prefix part of the element name.
-     */
-    public static String getPrefix(Element element) {
-	String name = element.getTagName();
-	String prefix = "";
-
-	if (name.indexOf(':') > 0) {
-	    prefix = name.substring(0, name.indexOf(':'));
-	}
-
-	return prefix;
-    }
-
-    /**
-     * Returns the "localname" part of a QName, which is the whole
-     * name if it has no prefix.
-     *
-     * @param element The QName of an element.
-     * @return The local part of a QName.
-     */
-    public static String getLocalName(Element element) {
-	String name = element.getTagName();
-
-	if (name.indexOf(':') > 0) {
-	    name = name.substring(name.indexOf(':')+1);
-	}
-
-	return name;
-    }
-
-    /**
-     * Returns the namespace URI for the specified prefix at the
-     * specified context node.
-     *
-     * @param node The context node.
-     * @param prefix The prefix.
-     * @return The namespace URI associated with the prefix, or
-     * null if no namespace declaration exists for the prefix.
-     */
-    public static String getNamespaceURI(Node node, String prefix) {
-	if (node == null || node.getNodeType() != Node.ELEMENT_NODE) {
-	    return null;
-	}
-
-	if (prefix.equals("")) {
-	    if (((Element) node).hasAttribute("xmlns")) {
-		return ((Element) node).getAttribute("xmlns");
-	    }
-	} else {
-	    String nsattr = "xmlns:" + prefix;
-	    if (((Element) node).hasAttribute(nsattr)) {
-		return ((Element) node).getAttribute(nsattr);
-	    }
-	}
-
-	return getNamespaceURI(node.getParentNode(), prefix);
-    }
-
-    /**
-     * Returns the namespace URI for the namespace to which the
-     * element belongs.
-     *
-     * @param element The element.
-     * @return The namespace URI associated with the namespace of the
-     * element, or null if no namespace declaration exists for it.
-     */
-    public static String getNamespaceURI(Element element) {
-	String prefix = getPrefix(element);
-	return getNamespaceURI(element, prefix);
-    }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Namespaces.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/Namespaces.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/PublicId.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/PublicId.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/PublicId.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,195 +0,0 @@
-// PublicId.java - Information about public identifiers
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.helpers;
-
-/**
- * Static methods for dealing with public identifiers.
- *
- * <p>This class defines a set of static methods that can be called
- * to handle public identifiers.</p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public abstract class PublicId {
-  protected PublicId() { }
-
-  /**
-   * Normalize a public identifier.
-   *
-   * <p>Public identifiers must be normalized according to the following
-   * rules before comparisons between them can be made:</p>
-   *
-   * <ul>
-   * <li>Whitespace characters are normalized to spaces (e.g., line feeds,
-   * tabs, etc. become spaces).</li>
-   * <li>Leading and trailing whitespace is removed.</li>
-   * <li>Multiple internal whitespaces are normalized to a single
-   * space.</li>
-   * </ul>
-   *
-   * <p>This method is declared static so that other classes
-   * can use it directly.</p>
-   *
-   * @param publicId The unnormalized public identifier.
-   *
-   * @return The normalized identifier.
-   */
-  public static String normalize(String publicId) {
-    String normal = publicId.replace('\t', ' ');
-    normal = normal.replace('\r', ' ');
-    normal = normal.replace('\n', ' ');
-    normal = normal.trim();
-
-    int pos;
-
-    while ((pos = normal.indexOf("  ")) >= 0) {
-      normal = normal.substring(0, pos) + normal.substring(pos+1);
-    }
-
-    return normal;
-  }
-
-  /**
-   * Encode a public identifier as a "publicid" URN.
-   *
-   * <p>This method is declared static so that other classes
-   * can use it directly.</p>
-   *
-   * @param publicId The unnormalized public identifier.
-   *
-   * @return The normalized identifier.
-   */
-  public static String encodeURN(String publicId) {
-    String urn = PublicId.normalize(publicId);
-
-    urn = PublicId.stringReplace(urn, "%", "%25");
-    urn = PublicId.stringReplace(urn, ";", "%3B");
-    urn = PublicId.stringReplace(urn, "'", "%27");
-    urn = PublicId.stringReplace(urn, "?", "%3F");
-    urn = PublicId.stringReplace(urn, "#", "%23");
-    urn = PublicId.stringReplace(urn, "+", "%2B");
-    urn = PublicId.stringReplace(urn, " ", "+");
-    urn = PublicId.stringReplace(urn, "::", ";");
-    urn = PublicId.stringReplace(urn, ":", "%3A");
-    urn = PublicId.stringReplace(urn, "//", ":");
-    urn = PublicId.stringReplace(urn, "/", "%2F");
-
-    return "urn:publicid:" + urn;
-  }
-
-  /**
-   * Decode a "publicid" URN into a public identifier.
-   *
-   * <p>This method is declared static so that other classes
-   * can use it directly.</p>
-   *
-   * @param publicId The unnormalized public identifier.
-   *
-   * @return The normalized identifier.
-   */
-  public static String decodeURN(String urn) {
-    String publicId = "";
-
-    if (urn.startsWith("urn:publicid:")) {
-      publicId = urn.substring(13);
-    } else {
-      return urn;
-    }
-
-    publicId = PublicId.stringReplace(publicId, "%2F", "/");
-    publicId = PublicId.stringReplace(publicId, ":", "//");
-    publicId = PublicId.stringReplace(publicId, "%3A", ":");
-    publicId = PublicId.stringReplace(publicId, ";", "::");
-    publicId = PublicId.stringReplace(publicId, "+", " ");
-    publicId = PublicId.stringReplace(publicId, "%2B", "+");
-    publicId = PublicId.stringReplace(publicId, "%23", "#");
-    publicId = PublicId.stringReplace(publicId, "%3F", "?");
-    publicId = PublicId.stringReplace(publicId, "%27", "'");
-    publicId = PublicId.stringReplace(publicId, "%3B", ";");
-    publicId = PublicId.stringReplace(publicId, "%25", "%");
-
-    return publicId;
-    }
-
-  /**
-   * Replace one string with another.
-   *
-   */
-  private static String stringReplace(String str,
-				      String oldStr,
-				      String newStr) {
-
-    String result = "";
-    int pos = str.indexOf(oldStr);
-
-    //    System.out.println(str + ": " + oldStr + " => " + newStr);
-
-    while (pos >= 0) {
-      //      System.out.println(str + " (" + pos + ")");
-      result += str.substring(0, pos);
-      result += newStr;
-      str = str.substring(pos+1);
-
-      pos = str.indexOf(oldStr);
-    }
-
-    return result + str;
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/PublicId.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/PublicId.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>XML utilities.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/helpers/package.html)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>XML utilities.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/CatalogReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/CatalogReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/CatalogReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,116 +0,0 @@
-// CatalogReader.java - An interface for reading catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import java.io.InputStream;
-
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.CatalogException;
-
-/**
- * The CatalogReader interface.
- *
- * <p>The Catalog class requires that classes implement this interface
- * in order to be used to read catalogs. Examples of CatalogReaders
- * include the TextCatalogReader, the SAXCatalogReader, and the
- * DOMCatalogReader.</p>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public interface CatalogReader {
-    /**
-     * Read a catalog from a file.
-     *
-     * <p>This class reads a catalog from a URL.</p>
-     *
-     * @param catalog The catalog for which this reader is called.
-     * @param fileUrl The URL of a document to be read.
-     * @throws MalformedURLException if the specified URL cannot be
-     * turned into a URL object.
-     * @throws IOException if the URL cannot be read.
-     * @throws UnknownCatalogFormatException if the catalog format is
-     * not recognized.
-     * @throws UnparseableCatalogException if the catalog cannot be parsed.
-     * (For example, if it is supposed to be XML and isn't well-formed.)
-     */
-    public void readCatalog(Catalog catalog, String fileUrl)
-      throws MalformedURLException, IOException, CatalogException;
-
-    /**
-     * Read a catalog from an input stream.
-     *
-     * <p>This class reads a catalog from an input stream.</p>
-     *
-     * @param catalog The catalog for which this reader is called.
-     * @param is The input stream that is to be read.
-     * @throws IOException if the URL cannot be read.
-     * @throws UnknownCatalogFormatException if the catalog format is
-     * not recognized.
-     * @throws UnparseableCatalogException if the catalog cannot be parsed.
-     * (For example, if it is supposed to be XML and isn't well-formed.)
-     */
-    public void readCatalog(Catalog catalog, InputStream is)
-	throws IOException, CatalogException;
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/CatalogReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/CatalogReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogParser.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogParser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogParser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,87 +0,0 @@
-// DOMCatalogParser.java - An interface for reading catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import org.jboss.util.xml.catalog.Catalog;
-import org.w3c.dom.Node;
-
-/**
- * The DOMCatalogParser interface.
- *
- * <p>This interface must be implemented in order for a class to
- * participate as a parser for the DOMCatalogReader.
- *
- * @see Catalog
- * @see DOMCatalogReader
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public interface DOMCatalogParser {
-    /**
-     * Parse a DOM node as a catalog entry.
-     *
-     * <p>This method is expected to analyze the specified node and
-     * construct appropriate catalog entry(ies) from it.</p>
-     *
-     * @param catalog The catalog for which this node is being considered.
-     * @param node The DOM Node from the catalog.
-     */
-    public void parseCatalogEntry(Catalog catalog, Node node);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogParser.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogParser.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,280 +0,0 @@
-// DOMCatalogReader.java - Read XML Catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.util.Hashtable;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.MalformedURLException;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.CatalogException;
-import org.jboss.util.xml.catalog.helpers.Namespaces;
-import org.jboss.util.xml.catalog.readers.CatalogReader;
-
-import org.xml.sax.SAXException;
-import org.w3c.dom.*;
-
-/**
- * A DOM-based CatalogReader.
- *
- * <p>This class is used to read XML Catalogs using the DOM. This reader
- * has an advantage over the SAX-based reader that it can analyze the
- * DOM tree rather than simply a series of SAX events. It has the disadvantage
- * that it requires all of the code necessary to build and walk a DOM
- * tree.</p>
- *
- * <p>Since the choice of CatalogReaders (in the InputStream case) can only
- * be made on the basis of MIME type, the following problem occurs: only
- * one CatalogReader can exist for all XML mime types. In order to get
- * around this problem, the DOMCatalogReader relies on a set of external
- * CatalogParsers to actually build the catalog.</p>
- *
- * <p>The selection of CatalogParsers is made on the basis of the QName
- * of the root element of the document.</p>
- *
- * <p>This class requires the <a href="http://java.sun.com/aboutJava/communityprocess/final/jsr005/index.html">Java API for XML Parsing</a>.</p>
- *
- * @see Catalog
- * @see CatalogReader
- * @see SAXCatalogReader
- * @see TextCatalogReader
- * @see DOMCatalogParser
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class DOMCatalogReader implements CatalogReader {
-  /**
-   * Mapping table from QNames to CatalogParser classes.
-   *
-   * <p>Each key in this hash table has the form "elementname"
-   * or "{namespaceuri}elementname". The former is used if the
-   * namespace URI is null.</p>
-   */
-  protected Hashtable namespaceMap = new Hashtable();
-
-  /**
-   * Add a new parser to the reader.
-   *
-   * <p>This method associates the specified parserClass with the
-   * namespaceURI/rootElement names specified.</p>
-   *
-   * @param namespaceURI The namespace URI. <em>Not</em> the prefix.
-   * @param rootElement The name of the root element.
-   * @param parserClass The name of the parserClass to instantiate
-   * for this kind of catalog.
-   */
-  public void setCatalogParser(String namespaceURI,
-			       String rootElement,
-			       String parserClass) {
-    if (namespaceURI == null) {
-      namespaceMap.put(rootElement, parserClass);
-    } else {
-      namespaceMap.put("{"+namespaceURI+"}"+rootElement, parserClass);
-    }
-  }
-
-  /**
-   * Get the name of the parser class for a given catalog type.
-   *
-   * <p>This method returns the parserClass associated with the
-   * namespaceURI/rootElement names specified.</p>
-   *
-   * @param namespaceURI The namespace URI. <em>Not</em> the prefix.
-   * @param rootElement The name of the root element.
-   * @return The parser class.
-   */
-  public String getCatalogParser(String namespaceURI,
-				 String rootElement) {
-    if (namespaceURI == null) {
-      return (String) namespaceMap.get(rootElement);
-    } else {
-      return (String) namespaceMap.get("{"+namespaceURI+"}"+rootElement);
-    }
-  }
-
-  /**
-   * Null constructor; something for subclasses to call.
-   */
-  public DOMCatalogReader() { }
-
-  /**
-   * Read a catalog from an input stream.
-   *
-   * <p>This class reads a catalog from an input stream:</p>
-   *
-   * <ul>
-   * <li>Based on the QName of the root element, it determines which
-   * parser to instantiate for this catalog.</li>
-   * <li>It constructs a DOM Document from the catalog and</li>
-   * <li>For each child of the root node, it calls the parser's
-   * parseCatalogEntry method. This method is expected to make
-   * appropriate calls back into the catalog to add entries for the
-   * entries in the catalog. It is free to do this in whatever manner
-   * is appropriate (perhaps using just the node passed in, perhaps
-   * wandering arbitrarily throughout the tree).</li>
-   * </ul>
-   *
-   * @param catalog The catalog for which this reader is called.
-   * @param is The input stream that is to be read.
-   * @throws IOException if the URL cannot be read.
-   * @throws UnknownCatalogFormatException if the catalog format is
-   * not recognized.
-   * @throws UnparseableCatalogException if the catalog cannot be parsed.
-   * (For example, if it is supposed to be XML and isn't well-formed or
-   * if the parser class cannot be instantiated.)
-   */
-  public void readCatalog(Catalog catalog, InputStream is)
-    throws IOException, CatalogException {
-
-    DocumentBuilderFactory factory = null;
-    DocumentBuilder builder = null;
-
-    factory = DocumentBuilderFactory.newInstance();
-    factory.setNamespaceAware(false);
-    factory.setValidating(false);
-    try {
-      builder = factory.newDocumentBuilder();
-    } catch (ParserConfigurationException pce) {
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    }
-
-    Document doc = null;
-
-    try {
-      doc = builder.parse(is);
-    } catch (SAXException se) {
-      throw new CatalogException(CatalogException.UNKNOWN_FORMAT);
-    }
-
-    Element root = doc.getDocumentElement();
-
-    String namespaceURI = Namespaces.getNamespaceURI(root);
-    String localName    = Namespaces.getLocalName(root);
-
-    String domParserClass = getCatalogParser(namespaceURI,
-					     localName);
-
-    if (domParserClass == null) {
-      if (namespaceURI == null) {
-	catalog.getCatalogManager().debug.message(1, "No Catalog parser for "
-						  + localName);
-      } else {
-	catalog.getCatalogManager().debug.message(1, "No Catalog parser for "
-						  + "{" + namespaceURI + "}"
-						  + localName);
-      }
-      return;
-    }
-
-    DOMCatalogParser domParser = null;
-
-    try {
-      domParser = (DOMCatalogParser) Class.forName(domParserClass).newInstance();
-    } catch (ClassNotFoundException cnfe) {
-      catalog.getCatalogManager().debug.message(1, "Cannot load XML Catalog Parser class", domParserClass);
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (InstantiationException ie) {
-      catalog.getCatalogManager().debug.message(1, "Cannot instantiate XML Catalog Parser class", domParserClass);
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (IllegalAccessException iae) {
-      catalog.getCatalogManager().debug.message(1, "Cannot access XML Catalog Parser class", domParserClass);
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (ClassCastException cce ) {
-      catalog.getCatalogManager().debug.message(1, "Cannot cast XML Catalog Parser class", domParserClass);
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    }
-
-    Node node = root.getFirstChild();
-    while (node != null) {
-      domParser.parseCatalogEntry(catalog, node);
-      node = node.getNextSibling();
-    }
-  }
-
-  /**
-   * Read the catalog behind the specified URL.
-   *
-   * @see #readCatalog(Catalog, InputStream)
-   *
-   * @param catalog The catalog for which we are reading.
-   * @param fileUrl The URL of the document that should be read.
-   *
-   * @throws MalformedURLException if the specified URL cannot be
-   * turned into a URL object.
-   * @throws IOException if the URL cannot be read.
-   * @throws UnknownCatalogFormatException if the catalog format is
-   * not recognized.
-   * @throws UnparseableCatalogException if the catalog cannot be parsed.
-   * (For example, if it is supposed to be XML and isn't well-formed.)
-   */
-  public void readCatalog(Catalog catalog, String fileUrl)
-    throws MalformedURLException, IOException, CatalogException {
-    URL url = new URL(fileUrl);
-    URLConnection urlCon = url.openConnection();
-    readCatalog(catalog, urlCon.getInputStream());
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/DOMCatalogReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/ExtendedXMLCatalogReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/ExtendedXMLCatalogReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/ExtendedXMLCatalogReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,222 +0,0 @@
-// ExtendedXMLCatalogReader.java - Read XML Catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.util.Vector;
-
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.CatalogEntry;
-import org.jboss.util.xml.catalog.CatalogException;
-import org.jboss.util.xml.catalog.Resolver;
-
-import org.xml.sax.*;
-import org.w3c.dom.*;
-
-/**
- * Parse Extended OASIS Entity Resolution Technical Committee 
- * XML Catalog files.
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class ExtendedXMLCatalogReader extends OASISXMLCatalogReader {
-  /** The namespace name of extended catalog elements */
-  public static final String extendedNamespaceName = "http://nwalsh.com/xcatalog/1.0";
-
-  /**
-   * The SAX <code>startElement</code> method recognizes elements
-   * from the plain catalog format and instantiates CatalogEntry
-   * objects for them.
-   *
-   * @param namespaceURI The namespace name of the element.
-   * @param localName The local name of the element.
-   * @param qName The QName of the element.
-   * @param atts The list of attributes on the element.
-   *
-   * @see CatalogEntry
-   */
-  public void startElement (String namespaceURI,
-			    String localName,
-			    String qName,
-			    Attributes atts)
-    throws SAXException {
-
-    // Check before calling the super because super will report our
-    // namespace as an extension namespace, but that doesn't count
-    // for this element.
-    boolean inExtension = inExtensionNamespace();
-
-    super.startElement(namespaceURI, localName, qName, atts);
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    if (namespaceURI != null && extendedNamespaceName.equals(namespaceURI)
-	&& !inExtension) {
-      // This is an Extended XML Catalog entry
-
-      if (atts.getValue("xml:base") != null) {
-	String baseURI = atts.getValue("xml:base");
-	entryType = Catalog.BASE;
-	entryArgs.add(baseURI);
-	baseURIStack.push(baseURI);
-
-	debug.message(4, "xml:base", baseURI);
-
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry (base)", localName);
-	  }
-	}
-
-	entryType = -1;
-	entryArgs = new Vector();
-      } else {
-	baseURIStack.push(baseURIStack.peek());
-      }
-
-      if (localName.equals("uriSuffix")) {
-	if (checkAttributes(atts, "suffix", "uri")) {
-	  entryType = Resolver.URISUFFIX;
-	  entryArgs.add(atts.getValue("suffix"));
-	  entryArgs.add(atts.getValue("uri"));
-
-	  debug.message(4, "uriSuffix",
-			atts.getValue("suffix"),
-			atts.getValue("uri"));
-	}
-      } else if (localName.equals("systemSuffix")) {
-	if (checkAttributes(atts, "suffix", "uri")) {
-	  entryType = Resolver.SYSTEMSUFFIX;
-	  entryArgs.add(atts.getValue("suffix"));
-	  entryArgs.add(atts.getValue("uri"));
-
-	  debug.message(4, "systemSuffix",
-			atts.getValue("suffix"),
-			atts.getValue("uri"));
-	}
-      } else {
-	// This is equivalent to an invalid catalog entry type
-	debug.message(1, "Invalid catalog entry type", localName);
-      }
-
-      if (entryType >= 0) {
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry", localName);
-	  }
-	}
-      }
-    }
-  }
-
-  /** The SAX <code>endElement</code> method does nothing. */
-  public void endElement (String namespaceURI,
-			  String localName,
-			  String qName)
-    throws SAXException {
-
-    super.endElement(namespaceURI, localName, qName);
-
-    // Check after popping the stack so we don't erroneously think we
-    // are our own extension namespace...
-    boolean inExtension = inExtensionNamespace();
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    if (namespaceURI != null
-	&& (extendedNamespaceName.equals(namespaceURI))
-	&& !inExtension) {
-
-      String popURI = (String) baseURIStack.pop();
-      String baseURI = (String) baseURIStack.peek();
-
-      if (!baseURI.equals(popURI)) {
-	entryType = catalog.BASE;
-	entryArgs.add(baseURI);
-
-	debug.message(4, "(reset) xml:base", baseURI);
-
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry (rbase)", localName);
-	  }
-	}
-      }
-    }
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/ExtendedXMLCatalogReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/ExtendedXMLCatalogReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/OASISXMLCatalogReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/OASISXMLCatalogReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/OASISXMLCatalogReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,555 +0,0 @@
-// OASISXMLCatalogReader.java - Read XML Catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.util.Stack;
-import java.util.Vector;
-import java.util.Enumeration;
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.CatalogEntry;
-import org.jboss.util.xml.catalog.CatalogException;
-import org.jboss.util.xml.catalog.helpers.PublicId;
-
-import org.xml.sax.*;
-import org.w3c.dom.*;
-
-/**
- * Parse OASIS Entity Resolution Technical Committee 
- * XML Catalog files.
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class OASISXMLCatalogReader extends SAXCatalogReader implements SAXCatalogParser {
-  /** The catalog object needs to be stored by the object so that
-   * SAX callbacks can use it.
-   */
-  protected Catalog catalog = null;
-
-  /** The namespace name of OASIS ERTC catalogs */
-  public static final String namespaceName = "urn:oasis:names:tc:entity:xmlns:xml:catalog";
-
-  /** The namespace name of OASIS ERTC TR9401 catalog extension */
-  public static final String tr9401NamespaceName = "urn:oasis:names:tc:entity:xmlns:tr9401:catalog";
-
-  protected Stack baseURIStack = new Stack();
-  protected Stack overrideStack = new Stack();
-  protected Stack namespaceStack = new Stack();
-
-  /** Set the current catalog. */
-  public void setCatalog (Catalog catalog) {
-    this.catalog = catalog;
-    debug = catalog.getCatalogManager().debug;
-  }
-
-  /** Get the current catalog. */
-  public Catalog getCatalog () {
-    return catalog;
-  }
-
-  /**
-   * Are we in an extension namespace?
-   *
-   * @return true if the current stack of open namespaces includes
-   *               an extension namespace.
-   */
-  protected boolean inExtensionNamespace() {
-    boolean inExtension = false;
-
-    Enumeration elements = namespaceStack.elements();
-    while (!inExtension && elements.hasMoreElements()) {
-      String ns = (String) elements.nextElement();
-      if (ns == null) {
-	inExtension = true;
-      } else {
-	inExtension = (!ns.equals(tr9401NamespaceName)
-		       && !ns.equals(namespaceName));
-      }
-    }
-
-    return inExtension;
-  }
-
-  // ----------------------------------------------------------------------
-  // Implement the SAX ContentHandler interface
-
-  /** The SAX <code>setDocumentLocator</code> method does nothing. */
-  public void setDocumentLocator (Locator locator) {
-    return;
-  }
-
-  /** The SAX <code>startDocument</code> method does nothing. */
-  public void startDocument ()
-    throws SAXException {
-    baseURIStack.push(catalog.getCurrentBase());
-    overrideStack.push(catalog.getDefaultOverride());
-    return;
-  }
-
-  /** The SAX <code>endDocument</code> method does nothing. */
-  public void endDocument ()
-    throws SAXException {
-    return;
-  }
-
-  /**
-   * The SAX <code>startElement</code> method recognizes elements
-   * from the plain catalog format and instantiates CatalogEntry
-   * objects for them.
-   *
-   * @param namespaceURI The namespace name of the element.
-   * @param localName The local name of the element.
-   * @param qName The QName of the element.
-   * @param atts The list of attributes on the element.
-   *
-   * @see CatalogEntry
-   */
-  public void startElement (String namespaceURI,
-			    String localName,
-			    String qName,
-			    Attributes atts)
-    throws SAXException {
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    namespaceStack.push(namespaceURI);
-
-    boolean inExtension = inExtensionNamespace();
-
-    if (namespaceURI != null && namespaceName.equals(namespaceURI)
-	&& !inExtension) {
-      // This is an XML Catalog entry
-
-      if (atts.getValue("xml:base") != null) {
-	String baseURI = atts.getValue("xml:base");
-	entryType = Catalog.BASE;
-	entryArgs.add(baseURI);
-	baseURIStack.push(baseURI);
-
-	debug.message(4, "xml:base", baseURI);
-
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry (base)", localName);
-	  }
-	}
-
-	entryType = -1;
-	entryArgs = new Vector();
-
-      } else {
-	baseURIStack.push(baseURIStack.peek());
-      }
-
-      if ((localName.equals("catalog") || localName.equals("group"))
-	  && atts.getValue("prefer") != null) {
-	String override = atts.getValue("prefer");
-
-	if (override.equals("public")) {
-	  override = "yes";
-	} else if (override.equals("system")) {
-	  override = "no";
-	} else {
-	  debug.message(1,
-			"Invalid prefer: must be 'system' or 'public'",
-			localName);
-	  override = catalog.getDefaultOverride();
-	}
-
-	entryType = Catalog.OVERRIDE;
-	entryArgs.add(override);
-	overrideStack.push(override);
-
-	debug.message(4, "override", override);
-
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry (override)", localName);
-	  }
-	}
-
-	entryType = -1;
-	entryArgs = new Vector();
-
-      } else {
-	overrideStack.push(overrideStack.peek());
-      }
-
-      if (localName.equals("delegatePublic")) {
-	if (checkAttributes(atts, "publicIdStartString", "catalog")) {
-	  entryType = Catalog.DELEGATE_PUBLIC;
-	  entryArgs.add(atts.getValue("publicIdStartString"));
-	  entryArgs.add(atts.getValue("catalog"));
-
-	  debug.message(4, "delegatePublic",
-			PublicId.normalize(atts.getValue("publicIdStartString")),
-			atts.getValue("catalog"));
-	}
-      } else if (localName.equals("delegateSystem")) {
-	if (checkAttributes(atts, "systemIdStartString", "catalog")) {
-	  entryType = Catalog.DELEGATE_SYSTEM;
-	  entryArgs.add(atts.getValue("systemIdStartString"));
-	  entryArgs.add(atts.getValue("catalog"));
-
-	  debug.message(4, "delegateSystem",
-			atts.getValue("systemIdStartString"),
-			atts.getValue("catalog"));
-	}
-      } else if (localName.equals("delegateURI")) {
-	if (checkAttributes(atts, "uriStartString", "catalog")) {
-	  entryType = Catalog.DELEGATE_URI;
-	  entryArgs.add(atts.getValue("uriStartString"));
-	  entryArgs.add(atts.getValue("catalog"));
-
-	  debug.message(4, "delegateURI",
-			atts.getValue("uriStartString"),
-			atts.getValue("catalog"));
-	}
-      } else if (localName.equals("rewriteSystem")) {
-	if (checkAttributes(atts, "systemIdStartString", "rewritePrefix")) {
-	  entryType = Catalog.REWRITE_SYSTEM;
-	  entryArgs.add(atts.getValue("systemIdStartString"));
-	  entryArgs.add(atts.getValue("rewritePrefix"));
-
-	  debug.message(4, "rewriteSystem",
-			atts.getValue("systemIdStartString"),
-			atts.getValue("rewritePrefix"));
-	}
-      } else if (localName.equals("rewriteURI")) {
-	if (checkAttributes(atts, "uriStartString", "rewritePrefix")) {
-	  entryType = Catalog.REWRITE_URI;
-	  entryArgs.add(atts.getValue("uriStartString"));
-	  entryArgs.add(atts.getValue("rewritePrefix"));
-
-	  debug.message(4, "rewriteURI",
-			atts.getValue("uriStartString"),
-			atts.getValue("rewritePrefix"));
-	}
-      } else if (localName.equals("nextCatalog")) {
-	if (checkAttributes(atts, "catalog")) {
-	  entryType = Catalog.CATALOG;
-	  entryArgs.add(atts.getValue("catalog"));
-
-	  debug.message(4, "nextCatalog", atts.getValue("catalog"));
-	}
-      } else if (localName.equals("public")) {
-	if (checkAttributes(atts, "publicId", "uri")) {
-	  entryType = Catalog.PUBLIC;
-	  entryArgs.add(atts.getValue("publicId"));
-	  entryArgs.add(atts.getValue("uri"));
-
-	  debug.message(4, "public",
-			PublicId.normalize(atts.getValue("publicId")),
-			atts.getValue("uri"));
-	}
-      } else if (localName.equals("system")) {
-	if (checkAttributes(atts, "systemId", "uri")) {
-	  entryType = Catalog.SYSTEM;
-	  entryArgs.add(atts.getValue("systemId"));
-	  entryArgs.add(atts.getValue("uri"));
-
-	  debug.message(4, "system",
-			atts.getValue("systemId"),
-			atts.getValue("uri"));
-	}
-      } else if (localName.equals("uri")) {
-	if (checkAttributes(atts, "name", "uri")) {
-	  entryType = Catalog.URI;
-	  entryArgs.add(atts.getValue("name"));
-	  entryArgs.add(atts.getValue("uri"));
-
-	  debug.message(4, "uri",
-			atts.getValue("name"),
-			atts.getValue("uri"));
-	}
-      } else if (localName.equals("catalog")) {
-	// nop, start of catalog
-      } else if (localName.equals("group")) {
-	// nop, a group
-      } else {
-	// This is equivalent to an invalid catalog entry type
-	debug.message(1, "Invalid catalog entry type", localName);
-      }
-
-      if (entryType >= 0) {
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry", localName);
-	  }
-	}
-      }
-    }
-
-    if (namespaceURI != null && tr9401NamespaceName.equals(namespaceURI)
-	&& !inExtension) {
-      // This is a TR9401 Catalog entry
-
-      if (atts.getValue("xml:base") != null) {
-	String baseURI = atts.getValue("xml:base");
-	entryType = Catalog.BASE;
-	entryArgs.add(baseURI);
-	baseURIStack.push(baseURI);
-
-	debug.message(4, "xml:base", baseURI);
-
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry (base)", localName);
-	  }
-	}
-
-	entryType = -1;
-	entryArgs = new Vector();
-
-      } else {
-	baseURIStack.push(baseURIStack.peek());
-      }
-
-      if (localName.equals("doctype")) {
-	entryType = catalog.DOCTYPE;
-	entryArgs.add(atts.getValue("name"));
-	entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("document")) {
-	entryType = catalog.DOCUMENT;
-	entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("dtddecl")) {
-	entryType = catalog.DTDDECL;
-	entryArgs.add(atts.getValue("publicId"));
-	entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("entity")) {
-	entryType = Catalog.ENTITY;
-	entryArgs.add(atts.getValue("name"));
-	entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("linktype")) {
-	entryType = Catalog.LINKTYPE;
-	entryArgs.add(atts.getValue("name"));
-	entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("notation")) {
-	entryType = Catalog.NOTATION;
-	entryArgs.add(atts.getValue("name"));
-	entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("sgmldecl")) {
-	entryType = Catalog.SGMLDECL;
-	entryArgs.add(atts.getValue("uri"));
-      } else {
-	// This is equivalent to an invalid catalog entry type
-	debug.message(1, "Invalid catalog entry type", localName);
-      }
-
-      if (entryType >= 0) {
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry", localName);
-	  }
-	}
-      }
-    }
-  }
-
-  public boolean checkAttributes (Attributes atts, String attName) {
-    if (atts.getValue(attName) == null) {
-      debug.message(1, "Error: required attribute " + attName + " missing.");
-      return false;
-    } else {
-      return true;
-    }
-  }
-
-  public boolean checkAttributes (Attributes atts,
-				  String attName1,
-				  String attName2) {
-    return checkAttributes(atts, attName1)
-      && checkAttributes(atts, attName2);
-  }
-
-  /** The SAX <code>endElement</code> method does nothing. */
-  public void endElement (String namespaceURI,
-			  String localName,
-			  String qName)
-    throws SAXException {
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    boolean inExtension = inExtensionNamespace();
-
-    if (namespaceURI != null
-	&& !inExtension
-	&& (namespaceName.equals(namespaceURI)
-	    || tr9401NamespaceName.equals(namespaceURI))) {
-
-      String popURI = (String) baseURIStack.pop();
-      String baseURI = (String) baseURIStack.peek();
-
-      if (!baseURI.equals(popURI)) {
-	entryType = catalog.BASE;
-	entryArgs.add(baseURI);
-
-	debug.message(4, "(reset) xml:base", baseURI);
-
-	try {
-	  CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	  catalog.addEntry(ce);
-	} catch (CatalogException cex) {
-	  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	    debug.message(1, "Invalid catalog entry type", localName);
-	  } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	    debug.message(1, "Invalid catalog entry (rbase)", localName);
-	  }
-	}
-      }
-    }
-
-    if (namespaceURI != null && namespaceName.equals(namespaceURI)
-	&& !inExtension) {
-      if (localName.equals("catalog") || localName.equals("group")) {
-	String popOverride = (String) overrideStack.pop();
-	String override = (String) overrideStack.peek();
-
-	if (!override.equals(popOverride)) {
-	  entryType = catalog.OVERRIDE;
-	  entryArgs.add(override);
-	  overrideStack.push(override);
-
-	  debug.message(4, "(reset) override", override);
-
-	  try {
-	    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	    catalog.addEntry(ce);
-	  } catch (CatalogException cex) {
-	    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	      debug.message(1, "Invalid catalog entry type", localName);
-	    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	      debug.message(1, "Invalid catalog entry (roverride)", localName);
-	    }
-	  }
-	}
-      }
-    }
-
-    namespaceStack.pop();
-
-    return;
-  }
-
-  /** The SAX <code>characters</code> method does nothing. */
-  public void characters (char ch[], int start, int length)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>ignorableWhitespace</code> method does nothing. */
-  public void ignorableWhitespace (char ch[], int start, int length)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>processingInstruction</code> method does nothing. */
-  public void processingInstruction (String target, String data)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>skippedEntity</code> method does nothing. */
-  public void skippedEntity (String name)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>startPrefixMapping</code> method does nothing. */
-  public void startPrefixMapping(String prefix, String uri)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>endPrefixMapping</code> method does nothing. */
-  public void endPrefixMapping(String prefix)
-    throws SAXException {
-    return;
-  }
-
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/OASISXMLCatalogReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/OASISXMLCatalogReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogParser.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogParser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogParser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,79 +0,0 @@
-// SAXCatalogParser.java - An interface for reading catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import org.jboss.util.xml.catalog.Catalog;
-import org.xml.sax.*;
-
-/**
- * The SAXCatalogParser interface.
- *
- * <p>This interface must be implemented in order for a class to
- * participate as a parser for the SAXCatalogReader.
- *
- * @see Catalog
- * @see SAXCatalogReader
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public interface SAXCatalogParser extends ContentHandler, DocumentHandler {
-    /** Set the Catalog for which parsing is being performed. */
-    public void setCatalog(Catalog catalog);
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogParser.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogParser.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,540 +0,0 @@
-// SAXCatalogReader.java - Read XML Catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.util.Hashtable;
-import java.io.IOException;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.MalformedURLException;
-import java.net.UnknownHostException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.parsers.SAXParser;
-
-import org.xml.sax.AttributeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.CatalogException;
-import org.jboss.util.xml.catalog.CatalogManager;
-import org.jboss.util.xml.catalog.helpers.Debug;
-import org.jboss.util.xml.catalog.readers.CatalogReader;
-
-/**
- * A SAX-based CatalogReader.
- *
- * <p>This class is used to read XML Catalogs using the SAX. This reader
- * has an advantage over the DOM-based reader in that it functions on
- * the stream of SAX events. It has the disadvantage
- * that it cannot look around in the tree.</p>
- *
- * <p>Since the choice of CatalogReaders (in the InputStream case) can only
- * be made on the basis of MIME type, the following problem occurs: only
- * one CatalogReader can exist for all XML mime types. In order to get
- * around this problem, the SAXCatalogReader relies on a set of external
- * CatalogParsers to actually build the catalog.</p>
- *
- * <p>The selection of CatalogParsers is made on the basis of the QName
- * of the root element of the document.</p>
- *
- * @see Catalog
- * @see CatalogReader
- * @see SAXCatalogReader
- * @see TextCatalogReader
- * @see DOMCatalogParser
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class SAXCatalogReader implements CatalogReader, ContentHandler, DocumentHandler {
-  /** The SAX Parser Factory */
-  protected SAXParserFactory parserFactory = null;
-
-  /** The SAX Parser Class */
-  protected String parserClass = null;
-
-  /**
-     * Mapping table from QNames to CatalogParser classes.
-     *
-     * <p>Each key in this hash table has the form "elementname"
-     * or "{namespaceuri}elementname". The former is used if the
-     * namespace URI is null.</p>
-     */
-  protected Hashtable namespaceMap = new Hashtable();
-
-  /** The parser in use for the current catalog. */
-  private SAXCatalogParser saxParser = null;
-
-  /** Set if something goes horribly wrong. It allows the class to
-     * ignore the rest of the events that are received.
-     */
-  private boolean abandonHope = false;
-
-  /** The Catalog that we're working for. */
-  private Catalog catalog;
-
-  /** Set the XML SAX Parser Factory.
-   */
-  public void setParserFactory(SAXParserFactory parserFactory) {
-    this.parserFactory = parserFactory;
-  }
-
-  /** Set the XML SAX Parser Class
-   */
-  public void setParserClass(String parserClass) {
-    this.parserClass = parserClass;
-  }
-
-  /** Get the parser factory currently in use. */
-  public SAXParserFactory getParserFactory() {
-    return parserFactory;
-  }
-
-  /** Get the parser class currently in use. */
-  public String getParserClass() {
-    return parserClass;
-  }
-
-  /** The debug class to use for this reader.
-   *
-   * This is a bit of a hack. Anyway, whenever we read for a catalog,
-   * we extract the debug object
-   * from the catalog's manager so that we can use it to print messages.
-   *
-   * In production, we don't really expect any messages so it doesn't
-   * really matter. But it's still a bit of a hack.
-   */
-  protected Debug debug = CatalogManager.getStaticManager().debug;
-
-  /** The constructor */
-  public SAXCatalogReader() {
-    parserFactory = null;
-    parserClass = null;
-  }
-
-  /** The constructor */
-  public SAXCatalogReader(SAXParserFactory parserFactory) {
-    this.parserFactory = parserFactory;
-  }
-
-  /** The constructor */
-  public SAXCatalogReader(String parserClass) {
-    this.parserClass = parserClass;
-  }
-
-  /** Set the SAXCatalogParser class for the given namespace/root
-     * element type.
-     */
-  public void setCatalogParser(String namespaceURI,
-			       String rootElement,
-			       String parserClass) {
-    if (namespaceURI == null) {
-      namespaceMap.put(rootElement, parserClass);
-    } else {
-      namespaceMap.put("{"+namespaceURI+"}"+rootElement, parserClass);
-    }
-  }
-
-  /** Get the SAXCatalogParser class for the given namespace/root
-     * element type.
-     */
-  public String getCatalogParser(String namespaceURI,
-				 String rootElement) {
-    if (namespaceURI == null) {
-      return (String) namespaceMap.get(rootElement);
-    } else {
-      return (String) namespaceMap.get("{"+namespaceURI+"}"+rootElement);
-    }
-  }
-
-  /**
-   * Parse an XML Catalog file.
-   *
-   * @param catalog The catalog to which this catalog file belongs
-   * @param fileUrl The URL or filename of the catalog file to process
-   *
-   * @throws MalformedURLException Improper fileUrl
-   * @throws IOException Error reading catalog file
-   */
-  public void readCatalog(Catalog catalog, String fileUrl)
-    throws MalformedURLException, IOException,
-	   CatalogException {
-
-    URL url = null;
-
-    try {
-      url = new URL(fileUrl);
-    } catch (MalformedURLException e) {
-      url = new URL("file:///" + fileUrl);
-    }
-
-    debug = catalog.getCatalogManager().debug;
-
-    try {
-      URLConnection urlCon = url.openConnection();
-      readCatalog(catalog, urlCon.getInputStream());
-    } catch (FileNotFoundException e) {
-      catalog.getCatalogManager().debug.message(1, "Failed to load catalog, file not found",
-		    url.toString());
-    }
-  }
-
-  /**
-   * Parse an XML Catalog stream.
-   *
-   * @param catalog The catalog to which this catalog file belongs
-   * @param is The input stream from which the catalog will be read
-   *
-   * @throws MalformedURLException Improper fileUrl
-   * @throws IOException Error reading catalog file
-   * @throws CatalogException A Catalog exception
-   */
-  public void readCatalog(Catalog catalog, InputStream is) 
-    throws IOException, CatalogException {
-
-    // Create an instance of the parser
-    if (parserFactory == null && parserClass == null) {
-      debug.message(1, "Cannot read SAX catalog without a parser");
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    }
-
-    debug = catalog.getCatalogManager().debug;
-    EntityResolver bResolver = catalog.getCatalogManager().getBootstrapResolver();
-
-    this.catalog = catalog;
-
-    try {
-      if (parserFactory != null) {
-	SAXParser parser = parserFactory.newSAXParser();
-	SAXParserHandler spHandler = new SAXParserHandler();
-	spHandler.setContentHandler(this);
-	if (bResolver != null) {
-	  spHandler.setEntityResolver(bResolver);
-	}
-	parser.parse(new InputSource(is), spHandler);
-      } else {
-	Parser parser = (Parser) Class.forName(parserClass).newInstance();
-	parser.setDocumentHandler(this);
-	if (bResolver != null) {
-	  parser.setEntityResolver(bResolver);
-	}
-	parser.parse(new InputSource(is));
-      }
-    } catch (ClassNotFoundException cnfe) {
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (IllegalAccessException iae) {
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (InstantiationException ie) {
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (ParserConfigurationException pce) {
-      throw new CatalogException(CatalogException.UNKNOWN_FORMAT);
-    } catch (SAXException se) {
-      Exception e = se.getException();
-      // FIXME: there must be a better way
-      UnknownHostException uhe = new UnknownHostException();
-      FileNotFoundException fnfe = new FileNotFoundException();
-      if (e != null) {
-	if (e.getClass() == uhe.getClass()) {
-	  throw new CatalogException(CatalogException.PARSE_FAILED,
-				     e.toString());
-	} else if (e.getClass() == fnfe.getClass()) {
-	  throw new CatalogException(CatalogException.PARSE_FAILED,
-				     e.toString());
-	}
-      }
-      throw new CatalogException(se);
-    }
-  }
-
-  // ----------------------------------------------------------------------
-  // Implement the SAX ContentHandler interface
-
-  /** The SAX <code>setDocumentLocator</code> method. Does nothing. */
-  public void setDocumentLocator (Locator locator) {
-    if (saxParser != null) {
-      saxParser.setDocumentLocator(locator);
-    }
-  }
-
-  /** The SAX <code>startDocument</code> method. Does nothing. */
-  public void startDocument () throws SAXException {
-    saxParser = null;
-    abandonHope = false;
-    return;
-  }
-
-  /** The SAX <code>endDocument</code> method. Does nothing. */
-  public void endDocument ()throws SAXException {
-    if (saxParser != null) {
-      saxParser.endDocument();
-    }
-  }
-
-  /**
-   * The SAX <code>startElement</code> method.
-   *
-   * <p>The catalog parser is selected based on the namespace of the
-   * first element encountered in the catalog.</p>
-   */
-  public void startElement (String name,
-			    AttributeList atts)
-    throws SAXException {
-
-    if (abandonHope) {
-      return;
-    }
-
-    if (saxParser == null) {
-      String prefix = "";
-      if (name.indexOf(':') > 0) {
-	prefix = name.substring(0, name.indexOf(':'));
-      }
-
-      String localName = name;
-      if (localName.indexOf(':') > 0) {
-	localName = localName.substring(localName.indexOf(':')+1);
-      }
-
-      String namespaceURI = null;
-      if (prefix.equals("")) {
-	namespaceURI = atts.getValue("xmlns");
-      } else {
-	namespaceURI = atts.getValue("xmlns:" + prefix);
-      }
-
-      String saxParserClass = getCatalogParser(namespaceURI,
-					       localName);
-
-      if (saxParserClass == null) {
-	abandonHope = true;
-	if (namespaceURI == null) {
-	  debug.message(2, "No Catalog parser for " + name);
-	} else {
-	  debug.message(2, "No Catalog parser for "
-			+ "{" + namespaceURI + "}"
-			+ name);
-	}
-	return;
-      }
-
-      try {
-	saxParser = (SAXCatalogParser)
-	  Class.forName(saxParserClass).newInstance();
-
-	saxParser.setCatalog(catalog);
-	saxParser.startDocument();
-	saxParser.startElement(name, atts);
-      } catch (ClassNotFoundException cnfe) {
-	saxParser = null;
-	abandonHope = true;
-	debug.message(2, cnfe.toString());
-      } catch (InstantiationException ie) {
-	saxParser = null;
-	abandonHope = true;
-	debug.message(2, ie.toString());
-      } catch (IllegalAccessException iae) {
-	saxParser = null;
-	abandonHope = true;
-	debug.message(2, iae.toString());
-      } catch (ClassCastException cce ) {
-	saxParser = null;
-	abandonHope = true;
-	debug.message(2, cce.toString());
-      }
-    } else {
-      saxParser.startElement(name, atts);
-    }
-  }
-
-  /**
-   * The SAX2 <code>startElement</code> method.
-   *
-   * <p>The catalog parser is selected based on the namespace of the
-   * first element encountered in the catalog.</p>
-   */
-  public void startElement (String namespaceURI,
-			    String localName,
-			    String qName,
-			    Attributes atts)
-    throws SAXException {
-
-    if (abandonHope) {
-      return;
-    }
-
-    if (saxParser == null) {
-      String saxParserClass = getCatalogParser(namespaceURI,
-					       localName);
-
-      if (saxParserClass == null) {
-	abandonHope = true;
-	if (namespaceURI == null) {
-	  debug.message(2, "No Catalog parser for " + localName);
-	} else {
-	  debug.message(2, "No Catalog parser for "
-			+ "{" + namespaceURI + "}"
-			+ localName);
-	}
-	return;
-      }
-
-      try {
-	saxParser = (SAXCatalogParser)
-	  Class.forName(saxParserClass).newInstance();
-
-	saxParser.setCatalog(catalog);
-	saxParser.startDocument();
-	saxParser.startElement(namespaceURI, localName, qName, atts);
-      } catch (ClassNotFoundException cnfe) {
-	saxParser = null;
-	abandonHope = true;
-	debug.message(2, cnfe.toString());
-      } catch (InstantiationException ie) {
-	saxParser = null;
-	abandonHope = true;
-	debug.message(2, ie.toString());
-      } catch (IllegalAccessException iae) {
-	saxParser = null;
-	abandonHope = true;
-	debug.message(2, iae.toString());
-      } catch (ClassCastException cce ) {
-	saxParser = null;
-	abandonHope = true;
-	debug.message(2, cce.toString());
-      }
-    } else {
-      saxParser.startElement(namespaceURI, localName, qName, atts);
-    }
-  }
-
-  /** The SAX <code>endElement</code> method. Does nothing. */
-  public void endElement (String name) throws SAXException {
-    if (saxParser != null) {
-      saxParser.endElement(name);
-    }
-  }
-
-  /** The SAX2 <code>endElement</code> method. Does nothing. */
-  public void endElement (String namespaceURI,
-			  String localName,
-			  String qName) throws SAXException {
-    if (saxParser != null) {
-      saxParser.endElement(namespaceURI, localName, qName);
-    }
-  }
-
-  /** The SAX <code>characters</code> method. Does nothing. */
-  public void characters (char ch[], int start, int length)
-    throws SAXException {
-    if (saxParser != null) {
-      saxParser.characters(ch, start, length);
-    }
-  }
-
-  /** The SAX <code>ignorableWhitespace</code> method. Does nothing. */
-  public void ignorableWhitespace (char ch[], int start, int length)
-    throws SAXException {
-    if (saxParser != null) {
-      saxParser.ignorableWhitespace(ch, start, length);
-    }
-  }
-
-  /** The SAX <code>processingInstruction</code> method. Does nothing. */
-  public void processingInstruction (String target, String data)
-    throws SAXException {
-    if (saxParser != null) {
-      saxParser.processingInstruction(target, data);
-    }
-  }
-
-  /** The SAX <code>startPrefixMapping</code> method. Does nothing. */
-  public void startPrefixMapping (String prefix, String uri)
-    throws SAXException {
-    if (saxParser != null) {
-      saxParser.startPrefixMapping (prefix, uri);
-    }
-  }
-
-  /** The SAX <code>endPrefixMapping</code> method. Does nothing. */
-  public void endPrefixMapping (String prefix)
-    throws SAXException {
-    if (saxParser != null) {
-      saxParser.endPrefixMapping (prefix);
-    }
-  }
-
-  /** The SAX <code>skippedentity</code> method. Does nothing. */
-  public void skippedEntity (String name)
-    throws SAXException {
-    if (saxParser != null) {
-      saxParser.skippedEntity(name);
-    }
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXCatalogReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXParserHandler.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXParserHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXParserHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,184 +0,0 @@
-// SAXParserHandler.java - An entity-resolving DefaultHandler
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.io.IOException;
-
-import org.xml.sax.*;
-import org.xml.sax.helpers.*;
-
-/**
- * An entity-resolving DefaultHandler.
- *
- * <p>This class provides a SAXParser DefaultHandler that performs
- * entity resolution.
- * </p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- * @version 1.0
- */
-public class SAXParserHandler extends DefaultHandler {
-  private EntityResolver er = null;
-  private ContentHandler ch = null;
-
-  public SAXParserHandler() {
-    super();
-  }
-
-  public void setEntityResolver(EntityResolver er) {
-    this.er = er;
-  }
-
-  public void setContentHandler(ContentHandler ch) {
-    this.ch = ch;
-  }
-
-  // Entity Resolver
-  public InputSource resolveEntity(String publicId, String systemId) 
-    throws SAXException {
-
-    if (er != null) {
-      try {
-	return er.resolveEntity(publicId, systemId);
-      }	catch (IOException e) {
-	  System.out.println("resolveEntity threw IOException!");
-	  return null;
-      }
-    } else {
-      return null;
-    }
-  }
-
-  // Content Handler
-  public void characters(char[] ch, int start, int length)
-    throws SAXException {
-    if (this.ch != null) {
-      this.ch.characters(ch, start, length);
-    }
-  }
-
-  public void endDocument()
-    throws SAXException {
-    if (ch != null) {
-      ch.endDocument();
-    }
-  }
-
-  public void endElement(String namespaceURI, String localName, String qName)
-    throws SAXException {
-    if (ch != null) {
-      ch.endElement(namespaceURI, localName, qName);
-    }
-  }
-
-  public void endPrefixMapping(String prefix)
-    throws SAXException {
-    if (ch != null) {
-      ch.endPrefixMapping(prefix);
-    }
-  }
-
-  public void ignorableWhitespace(char[] ch, int start, int length) 
-    throws SAXException {
-    if (this.ch != null) {
-      this.ch.ignorableWhitespace(ch, start, length);
-    }
-  }
-
-  public void processingInstruction(String target, String data) 
-    throws SAXException {
-    if (ch != null) {
-      ch.processingInstruction(target, data);
-    }
-  }
-
-  public void setDocumentLocator(Locator locator) {
-    if (ch != null) {
-      ch.setDocumentLocator(locator);
-    }
-  }
-
-  public void skippedEntity(String name)
-    throws SAXException {
-    if (ch != null) {
-      ch.skippedEntity(name);
-    }
-  }
-
-  public void startDocument()
-    throws SAXException {
-    if (ch != null) {
-      ch.startDocument();
-    }
-  }
-
-  public void startElement(String namespaceURI, String localName,
-			   String qName, Attributes atts)
-    throws SAXException {
-    if (ch != null) {
-      ch.startElement(namespaceURI, localName, qName, atts);
-    }
-  }
-
-  public void startPrefixMapping(String prefix, String uri)
-    throws SAXException {
-    if (ch != null) {
-      ch.startPrefixMapping(prefix, uri);
-    }
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXParserHandler.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/SAXParserHandler.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TR9401CatalogReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TR9401CatalogReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TR9401CatalogReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,168 +0,0 @@
-// TR9401CatalogReader.java - Read OASIS Catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Vector;
-
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.CatalogEntry;
-import org.jboss.util.xml.catalog.CatalogException;
-
-/**
- * Parses OASIS Open Catalog files.
- *
- * <p>This class reads OASIS Open Catalog files, returning a stream
- * of tokens.</p>
- *
- * <p>This code interrogates the following non-standard system properties:</p>
- *
- * <dl>
- * <dt><b>xml.catalog.debug</b></dt>
- * <dd><p>Sets the debug level. A value of 0 is assumed if the
- * property is not set or is not a number.</p></dd>
- * </dl>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class TR9401CatalogReader extends TextCatalogReader {
-
-  /**
-   * Start parsing an OASIS TR9401 Open Catalog file. The file is
-   * actually read and parsed
-   * as needed by <code>nextEntry</code>.
-   *
-   * <p>In a TR9401 Catalog the 'DELEGATE' entry delegates public
-   * identifiers. There is no delegate entry for system identifiers
-   * or URIs.</p>
-   *
-   * @param fileUrl  The URL or filename of the catalog file to process
-   *
-   * @throws MalformedURLException Improper fileUrl
-   * @throws IOException Error reading catalog file
-   */
-  public void readCatalog(Catalog catalog, InputStream is)
-    throws MalformedURLException, IOException {
-
-    catfile = is;
-
-    if (catfile == null) {
-      return;
-    }
-
-    Vector unknownEntry = null;
-
-    while (true) {
-      String token = nextToken();
-
-      if (token == null) {
-	if (unknownEntry != null) {
-	  catalog.unknownEntry(unknownEntry);
-	  unknownEntry = null;
-	}
-	catfile.close();
-	catfile = null;
-	return;
-      }
-
-      String entryToken = null;
-      if (caseSensitive) {
-	entryToken = token;
-      } else {
-	entryToken = token.toUpperCase();
-      }
-
-      if (entryToken.equals("DELEGATE")) {
-	entryToken = "DELEGATE_PUBLIC";
-      }
-
-      try {
-	int type = CatalogEntry.getEntryType(entryToken);
-	int numArgs = CatalogEntry.getEntryArgCount(type);
-	Vector args = new Vector();
-
-	if (unknownEntry != null) {
-	  catalog.unknownEntry(unknownEntry);
-	  unknownEntry = null;
-	}
-
-	for (int count = 0; count < numArgs; count++) {
-	  args.addElement(nextToken());
-	}
-
-	catalog.addEntry(new CatalogEntry(entryToken, args));
-      } catch (CatalogException cex) {
-	if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	  if (unknownEntry == null) {
-	    unknownEntry = new Vector();
-	  }
-	  unknownEntry.addElement(token);
-	} else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	  catalog.getCatalogManager().debug.message(1, "Invalid catalog entry", token);
-	  unknownEntry = null;
-	}
-      }
-    }
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TR9401CatalogReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TR9401CatalogReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TextCatalogReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TextCatalogReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TextCatalogReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,321 +0,0 @@
-// TextCatalogReader.java - Read text/plain Catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.FileNotFoundException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.MalformedURLException;
-import java.util.Vector;
-import java.util.Stack;
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.CatalogEntry;
-import org.jboss.util.xml.catalog.CatalogException;
-import org.jboss.util.xml.catalog.readers.CatalogReader;
-
-/**
- * Parses plain text Catalog files.
- *
- * <p>This class reads plain text Open Catalog files.</p>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class TextCatalogReader implements CatalogReader {
-  /** The input stream used to read the catalog */
-  protected InputStream catfile = null;
-
-  /**
-   * Character lookahead stack. Reading a catalog sometimes requires
-   * up to two characters of lookahead.
-   */
-  protected int[] stack = new int[3];
-
-  /**
-   * Token stack. Recognizing an unexpected catalog entry requires
-   * the ability to "push back" a token.
-   */
-  protected Stack tokenStack = new Stack();
-
-  /** The current position on the lookahead stack */
-  protected int top = -1;
-
-  /** Are keywords in the catalog case sensitive? */
-  protected boolean caseSensitive = false;
-
-  /**
-   * Construct a CatalogReader object.
-   */
-  public TextCatalogReader() { }
-
-  public void setCaseSensitive(boolean isCaseSensitive) {
-    caseSensitive = isCaseSensitive;
-  }
-
-  public boolean getCaseSensitive() {
-    return caseSensitive;
-  }
-
-  /**
-   * Start parsing a text catalog file. The file is
-   * actually read and parsed
-   * as needed by <code>nextEntry</code>.</p>
-   *
-   * @param fileUrl  The URL or filename of the catalog file to process
-   *
-   * @throws MalformedURLException Improper fileUrl
-   * @throws IOException Error reading catalog file
-   */
-  public void readCatalog(Catalog catalog, String fileUrl)
-    throws MalformedURLException, IOException {
-    URL catURL = null;
-
-    try {
-      catURL = new URL(fileUrl);
-    } catch (MalformedURLException e) {
-      catURL = new URL("file:///" + fileUrl);
-    }
-
-    URLConnection urlCon = catURL.openConnection();
-    try {
-      readCatalog(catalog, urlCon.getInputStream());
-    } catch (FileNotFoundException e) {
-      catalog.getCatalogManager().debug.message(1, "Failed to load catalog, file not found",
-						catURL.toString());
-    }
-  }
-
-  public void readCatalog(Catalog catalog, InputStream is)
-    throws MalformedURLException, IOException {
-
-    catfile = is;
-
-    if (catfile == null) {
-      return;
-    }
-
-    Vector unknownEntry = null;
-
-    while (true) {
-      String token = nextToken();
-
-      if (token == null) {
-	if (unknownEntry != null) {
-	  catalog.unknownEntry(unknownEntry);
-	  unknownEntry = null;
-	}
-	catfile.close();
-	catfile = null;
-	return;
-      }
-
-      String entryToken = null;
-      if (caseSensitive) {
-	entryToken = token;
-      } else {
-	entryToken = token.toUpperCase();
-      }
-
-      try {
-	int type = CatalogEntry.getEntryType(entryToken);
-	int numArgs = CatalogEntry.getEntryArgCount(type);
-	Vector args = new Vector();
-
-	if (unknownEntry != null) {
-	  catalog.unknownEntry(unknownEntry);
-	  unknownEntry = null;
-	}
-
-	for (int count = 0; count < numArgs; count++) {
-	  args.addElement(nextToken());
-	}
-
-	catalog.addEntry(new CatalogEntry(entryToken, args));
-      } catch (CatalogException cex) {
-	if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	  if (unknownEntry == null) {
-	    unknownEntry = new Vector();
-	  }
-	  unknownEntry.addElement(token);
-	} else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	  catalog.getCatalogManager().debug.message(1, "Invalid catalog entry", token);
-	  unknownEntry = null;
-	}
-      }
-    }
-  }
-
-  /**
-     * The destructor.
-     *
-     * <p>Makes sure the catalog file is closed.</p>
-     */
-  protected void finalize() {
-    if (catfile != null) {
-      try {
-	catfile.close();
-      } catch (IOException e) {
-	// whatever...
-      }
-    }
-    catfile = null;
-  }
-
-  // -----------------------------------------------------------------
-
-    /**
-     * Return the next token in the catalog file.
-     *
-     * @return The Catalog file token from the input stream.
-     * @throws IOException If an error occurs reading from the stream.
-     */
-  protected String nextToken() throws IOException {
-    String token = "";
-    int ch, nextch;
-
-    if (!tokenStack.empty()) {
-      return (String) tokenStack.pop();
-    }
-
-    // Skip over leading whitespace and comments
-    while (true) {
-      // skip leading whitespace
-      ch = catfile.read();
-      while (ch <= ' ') {      // all ctrls are whitespace
-	ch = catfile.read();
-	if (ch < 0) {
-	  return null;
-	}
-      }
-
-      // now 'ch' is the current char from the file
-      nextch = catfile.read();
-      if (nextch < 0) {
-	return null;
-      }
-
-      if (ch == '-' && nextch == '-') {
-	// we've found a comment, skip it...
-	ch = ' ';
-	nextch = nextChar();
-	while (ch != '-' || nextch != '-') {
-	  ch = nextch;
-	  nextch = nextChar();
-	}
-
-	// Ok, we've found the end of the comment,
-	// loop back to the top and start again...
-      } else {
-	stack[++top] = nextch;
-	stack[++top] = ch;
-	break;
-      }
-    }
-
-    ch = nextChar();
-    if (ch == '"' || ch == '\'') {
-      int quote = ch;
-      while ((ch = nextChar()) != quote) {
-	char[] chararr = new char[1];
-	chararr[0] = (char) ch;
-	String s = new String(chararr);
-	token = token.concat(s);
-      }
-      return token;
-    } else {
-      // return the next whitespace or comment delimited
-      // string
-      while (ch > ' ') {
-	nextch = nextChar();
-	if (ch == '-' && nextch == '-') {
-	  stack[++top] = ch;
-	  stack[++top] = nextch;
-	  return token;
-	} else {
-	  char[] chararr = new char[1];
-	  chararr[0] = (char) ch;
-	  String s = new String(chararr);
-	  token = token.concat(s);
-	  ch = nextch;
-	}
-      }
-      return token;
-    }
-  }
-
-  /**
-     * Return the next logical character from the input stream.
-     *
-     * @return The next (logical) character from the input stream. The
-     * character may be buffered from a previous lookahead.
-     *
-     * @throws IOException If an error occurs reading from the stream.
-     */
-  protected int nextChar() throws IOException {
-    if (top < 0) {
-      return catfile.read();
-    } else {
-      return stack[top--];
-    }
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TextCatalogReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/TextCatalogReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/XCatalogReader.java
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/XCatalogReader.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/XCatalogReader.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,222 +0,0 @@
-// XCatalogReader.java - Read XML Catalog files
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  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. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.jboss.util.xml.catalog.readers;
-
-import java.util.Vector;
-import org.jboss.util.xml.catalog.Catalog;
-import org.jboss.util.xml.catalog.CatalogEntry;
-import org.jboss.util.xml.catalog.CatalogException;
-import org.jboss.util.xml.catalog.helpers.PublicId;
-
-import org.xml.sax.*;
-
-import javax.xml.parsers.*;
-
-/**
- * Parse "xcatalog" XML Catalog files, this is the XML Catalog format
- * developed by John Cowan and supported by Apache.
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh at Sun.COM">Norman.Walsh at Sun.COM</a>
- *
- * @version 1.0
- */
-public class XCatalogReader extends SAXCatalogReader implements SAXCatalogParser {
-  /** The catalog object needs to be stored by the object so that
-   * SAX callbacks can use it.
-   */
-  protected Catalog catalog = null;
-
-  /** Set the current catalog. */
-  public void setCatalog (Catalog catalog) {
-    this.catalog = catalog;
-  }
-
-  /** Get the current catalog. */
-  public Catalog getCatalog () {
-    return catalog;
-  }
-
-  /** The constructor */
-  public XCatalogReader(SAXParserFactory parserFactory) {
-    super(parserFactory);
-  }
-
-  // ----------------------------------------------------------------------
-  // Implement the SAX DocumentHandler interface
-
-  /** The SAX <code>setDocumentLocator</code> method does nothing. */
-  public void setDocumentLocator (Locator locator) {
-    return;
-  }
-
-  /** The SAX <code>startDocument</code> method does nothing. */
-  public void startDocument ()
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>endDocument</code> method does nothing. */
-  public void endDocument ()
-    throws SAXException {
-    return;
-  }
-
-  /**
-   * The SAX <code>startElement</code> method recognizes elements
-   * from the plain catalog format and instantiates CatalogEntry
-   * objects for them.
-   *
-   * @param namespaceURI The namespace name of the element.
-   * @param localName The local name of the element.
-   * @param qName The QName of the element.
-   * @param atts The list of attributes on the element.
-   *
-   * @see CatalogEntry
-   */
-  public void startElement (String namespaceURI,
-			    String localName,
-			    String qName,
-			    Attributes atts)
-    throws SAXException {
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    if (localName.equals("Base")) {
-      entryType = catalog.BASE;
-      entryArgs.add(atts.getValue("HRef"));
-
-      catalog.getCatalogManager().debug.message(4, "Base", atts.getValue("HRef"));
-    } else if (localName.equals("Delegate")) {
-      entryType = catalog.DELEGATE_PUBLIC;
-      entryArgs.add(atts.getValue("PublicId"));
-      entryArgs.add(atts.getValue("HRef"));
-
-      catalog.getCatalogManager().debug.message(4, "Delegate",
-		    PublicId.normalize(atts.getValue("PublicId")),
-		    atts.getValue("HRef"));
-    } else if (localName.equals("Extend")) {
-      entryType = catalog.CATALOG;
-      entryArgs.add(atts.getValue("HRef"));
-
-      catalog.getCatalogManager().debug.message(4, "Extend", atts.getValue("HRef"));
-    } else if (localName.equals("Map")) {
-      entryType = catalog.PUBLIC;
-      entryArgs.add(atts.getValue("PublicId"));
-      entryArgs.add(atts.getValue("HRef"));
-
-      catalog.getCatalogManager().debug.message(4, "Map",
-		    PublicId.normalize(atts.getValue("PublicId")),
-		    atts.getValue("HRef"));
-    } else if (localName.equals("Remap")) {
-      entryType = catalog.SYSTEM;
-      entryArgs.add(atts.getValue("SystemId"));
-      entryArgs.add(atts.getValue("HRef"));
-
-      catalog.getCatalogManager().debug.message(4, "Remap",
-		    atts.getValue("SystemId"),
-		    atts.getValue("HRef"));
-    } else if (localName.equals("XMLCatalog")) {
-      // nop, start of catalog
-    } else {
-      // This is equivalent to an invalid catalog entry type
-      catalog.getCatalogManager().debug.message(1, "Invalid catalog entry type", localName);
-    }
-
-    if (entryType >= 0) {
-      try {
-	CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-	catalog.addEntry(ce);
-      } catch (CatalogException cex) {
-	if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-	  catalog.getCatalogManager().debug.message(1, "Invalid catalog entry type", localName);
-	} else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-	  catalog.getCatalogManager().debug.message(1, "Invalid catalog entry", localName);
-	}
-      }
-    }
-    }
-
-    /** The SAX <code>endElement</code> method does nothing. */
-    public void endElement (String namespaceURI,
-			    String localName,
-			    String qName)
-      throws SAXException {
-      return;
-    }
-
-  /** The SAX <code>characters</code> method does nothing. */
-  public void characters (char ch[], int start, int length)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>ignorableWhitespace</code> method does nothing. */
-  public void ignorableWhitespace (char ch[], int start, int length)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>processingInstruction</code> method does nothing. */
-  public void processingInstruction (String target, String data)
-    throws SAXException {
-    return;
-  }
-}

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/XCatalogReader.java (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/XCatalogReader.java)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>XML utilities.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/catalog/readers/package.html)

Deleted: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/package.html
===================================================================
--- branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>XML utilities.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-core/trunk/src/main/java/org/jboss/util/xml/package.html (from rev 1956, branches/logging_refactoring/common-core/trunk/src/main/java/org/jboss/util/xml/package.html)

Copied: branches/refactor-test-branch/common-core/trunk/tools (from rev 1956, branches/logging_refactoring/common-core/trunk/tools)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/.project
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/.project	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/.project	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>tools</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>

Copied: branches/refactor-test-branch/common-core/trunk/tools/.project (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/.project)

Copied: branches/refactor-test-branch/common-core/trunk/tools/bin (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/bin)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/bin/ant
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/bin/ant	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/bin/ant	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,299 +0,0 @@
-#! /bin/sh
-
-#   Copyright 2001-2005 The Apache Software Foundation
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-# Extract launch and ant arguments, (see details below).
-ant_exec_args=
-no_config=false
-use_jikes_default=false
-ant_exec_debug=false
-show_help=false
-for arg in "$@" ; do
-  if [ "$arg" = "--noconfig" ] ; then
-    no_config=true
-  elif [ "$arg" = "--usejikes" ] ; then
-    use_jikes_default=true
-  elif [ "$arg" = "--execdebug" ] ; then
-    ant_exec_debug=true
-  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
-    show_help=true
-    ant_exec_args="$ant_exec_args -h"
-  else
-    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
-      show_help=true
-    fi
-    ant_exec_args="$ant_exec_args \"$arg\""
-  fi
-done
-
-# Source/default ant configuration
-if $no_config ; then
-  rpm_mode=false
-  usejikes=$use_jikes_default
-else
-  # load system-wide ant configuration
-  if [ -f "/etc/ant.conf" ] ; then
-    . /etc/ant.conf
-  fi
-
-  # load user ant configuration
-  if [ -f "$HOME/.ant/ant.conf" ] ; then
-    . $HOME/.ant/ant.conf
-  fi
-  if [ -f "$HOME/.antrc" ] ; then
-    . "$HOME/.antrc"
-  fi
-
-  # provide default configuration values
-  if [ -z "$rpm_mode" ] ; then
-    rpm_mode=false
-  fi
-  if [ -z "$usejikes" ] ; then
-    usejikes=$use_jikes_default
-  fi
-fi
-
-# Setup Java environment in rpm mode
-if $rpm_mode ; then
-  if [ -f /usr/share/java-utils/java-functions ] ; then
-    . /usr/share/java-utils/java-functions
-    set_jvm
-    set_javacmd
-  fi
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
-  ## resolve links - $0 may be a link to ant's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ANT_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ANT_HOME" ] &&
-    ANT_HOME=`cygpath --unix "$ANT_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# Build local classpath using just the launcher in non-rpm mode or
-# use the Jpackage helper in rpm mode with basic and default jars
-# specified in the ant.conf configuration. Because the launcher is
-# used, libraries linked in ANT_HOME will also be include, but this
-# is discouraged as it is not java-version safe. A user should
-# request optional jars and their dependencies via the OPT_JAR_LIST
-# variable
-if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
-  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
-  # If the user requested to try to add some other jars to the classpath
-  if [ -n "$OPT_JAR_LIST" ] ; then
-    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
-    if [ -n "$_OPTCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
-    fi
-  fi
-
-  # Explicitly add javac path to classpath, assume JAVA_HOME set
-  # properly in rpm mode
-  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
-  fi
-  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
-  fi
-
-  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-  # user CLASSPATH first and ant-found jars after.
-  # In that case, the user CLASSPATH will override ant-found jars
-  #
-  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-  # with ant-found jars first and user CLASSPATH after
-  if [ -n "$CLASSPATH" ] ; then
-    # merge local and specified classpath 
-    if [ -z "$LOCALCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$CLASSPATH"
-    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-    else
-      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-    fi
-
-    # remove class path from launcher -cp option
-    CLASSPATH=""
-  fi
-else
-  # not using rpm_mode; use launcher to determine classpaths
-  if [ -z "$LOCALCLASSPATH" ] ; then
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
-  else
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
-  fi
-fi
-
-if [ -n "$JAVA_HOME" ] ; then
-  # OSX hack to make Ant work with jikes
-  if $darwin ; then
-    OSXHACK="${JAVA_HOME}/../Classes"
-    if [ -d "${OSXHACK}" ] ; then
-      for i in "${OSXHACK}"/*.jar
-      do
-        JIKESPATH="$JIKESPATH:$i"
-      done
-    fi
-  fi
-fi
-
-# Allow Jikes support (off by default)
-if $usejikes; then
-  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  ANT_HOME=`cygpath --$format "$ANT_HOME"`
-  ANT_LIB=`cygpath --$format "$ANT_LIB"`
-  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# Show script help if requested
-if $show_help ; then
-  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
-  echo 'Script Options:'
-  echo '  --help, --h            print this message and ant help'
-  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
-  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
-  echo '                         configuration files'
-  echo '  --usejikes             enable use of jikes by default, unless'
-  echo '                         set explicitly in configuration files'
-  echo '  --execdebug            print ant exec line generated by this'
-  echo '                         launch script'
-  echo '  '
-fi
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$ANT_HOME" in
-    *\\ )
-    ANT_HOME="$ANT_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$JIKESPATH" in
-    *\\ )
-    JIKESPATH="$JIKESPATH\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-# Execute ant using eval/exec to preserve spaces in paths,
-# java options, and ant args
-ant_sys_opts=
-if [ -n "$CYGHOME" ]; then
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
-  else
-    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
-  fi
-else
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
-  fi
-fi
-ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
-if $ant_exec_debug ; then
-    echo $ant_exec_command
-fi
-eval $ant_exec_command

Copied: branches/refactor-test-branch/common-core/trunk/tools/bin/ant (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/bin/ant)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/bin/ant.bat
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/bin/ant.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/bin/ant.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,126 +0,0 @@
- at echo off
-
-REM  Copyright 2001,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-
-if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ANT_HOME=%~dp0..
-
-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
-
-set _USE_CLASSPATH=yes
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of arguments (up to the command line limit, anyway).
-set ANT_CMD_LINE_ARGS=%1
-if ""%1""=="""" goto doneStart
-shift
-:setupArgs
-if ""%1""=="""" goto doneStart
-if ""%1""==""-noclasspath"" goto clearclasspath
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
-shift
-goto setupArgs
-
-rem here is there is a -noclasspath in the options
-:clearclasspath
-set _USE_CLASSPATH=no
-shift
-goto setupArgs
-
-rem This label provides a place for the argument list loop to break out
-rem and for NT handling to skip to.
-
-:doneStart
-rem find ANT_HOME if it does not exist due to either an invalid value passed
-rem by the user or the %0 problem on Windows 9x
-if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
-
-rem check for ant in Program Files
-if not exist "%ProgramFiles%\ant" goto checkSystemDrive
-set ANT_HOME=%ProgramFiles%\ant
-goto checkJava
-
-:checkSystemDrive
-rem check for ant in root directory of system drive
-if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
-set ANT_HOME=%SystemDrive%\ant
-goto checkJava
-
-:checkCDrive
-rem check for ant in C:\ant for Win9X users
-if not exist C:\ant\lib\ant.jar goto noAntHome
-set ANT_HOME=C:\ant
-goto checkJava
-
-:noAntHome
-echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
-goto end
-
-:checkJava
-set _JAVACMD=%JAVACMD%
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
-goto checkJikes
-
-:noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=java.exe
-
-:checkJikes
-if not "%JIKESPATH%"=="" goto runAntWithJikes
-
-:runAnt
-if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikes
-if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
-
-:runAntWithJikesNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikesAndClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:end
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-
-:mainEnd
-if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/bin/ant.bat (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/bin/ant.bat)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/bin/antRun
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/bin/antRun	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/bin/antRun	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#
-#  Copyright  2001-2002,2004 The Apache Software Foundation
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#       http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# 
-#
-
-# Args: DIR command
-cd "$1"
-CMD="$2"
-shift
-shift
-
-exec "$CMD" "$@"

Copied: branches/refactor-test-branch/common-core/trunk/tools/bin/antRun (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/bin/antRun)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/bin/antRun.bat
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/bin/antRun.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/bin/antRun.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
- at echo off
-
-REM
-REM Copyright  2001-2002,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-if ""%1""=="""" goto runCommand
-
-rem Change drive and directory to %1
-if "%OS%"=="Windows_NT" cd /d ""%1""
-if not "%OS%"=="Windows_NT" cd ""%1""
-shift
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of agruments (up to the command line limit, anyway).
-set ANT_RUN_CMD=%1
-if ""%1""=="""" goto runCommand
-shift
-:loop
-if ""%1""=="""" goto runCommand
-set ANT_RUN_CMD=%ANT_RUN_CMD% %1
-shift
-goto loop
-
-:runCommand
-rem echo %ANT_RUN_CMD%
-%ANT_RUN_CMD%
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/bin/antRun.bat (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/bin/antRun.bat)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/bin/antx.bat
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/bin/antx.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/bin/antx.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,6 +0,0 @@
- at echo off
- at setlocal
-set CLASSPATH=%~dp0..\lib\ant.jar;%CLASSPATH%
-java org.apache.tools.ant.Launcher %*
-rem java -jar %ANT_HOME%\lib\ant.jar org.apache.tools.ant.Launcher
- at endlocal

Copied: branches/refactor-test-branch/common-core/trunk/tools/bin/antx.bat (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/bin/antx.bat)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/bin/lcp.bat
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/bin/lcp.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/bin/lcp.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,30 +0,0 @@
-REM
-REM Copyright  2001-2004 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-set _CLASSPATHCOMPONENT=%1
-if ""%1""=="""" goto gotAllArgs
-shift
-
-:argCheck
-if ""%1""=="""" goto gotAllArgs
-set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
-shift
-goto argCheck
-
-:gotAllArgs
-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/bin/lcp.bat (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/bin/lcp.bat)

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc)

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildfragments (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildfragments)

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/aliases.ent
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,99 +0,0 @@
-<!-- list of aliases used to bridge gap between buildmagic defs and jbossbuild -->
-
-
-<path id="apache.commons.classpath">
-  <pathelement path="${apache.collections.lib}/commons-collections.jar"/>
-  <pathelement path="${apache.logging.lib}/commons-logging.jar"/>
-  <pathelement path="${apache.httpclient.lib}/commons-httpclient.jar"/>
-  <pathelement path="${apache.pool.lib}/commons-pool.jar"/>
-  <pathelement path="${apache.discovery.lib}/commons-discovery.jar"/>
-  <pathelement path="${apache.fileupload.lib}/commons-fileupload.jar"/>
-  <pathelement path="${apache.lang.lib}/commons-lang-2.0.jar"/>  
-</path>
-
-<path id="sax.classpath">
-  <pathelement path="${xml-sax.classpath}"/>
-</path>
- 
-<property name="xdoclet-xdoclet.lib" value="${xdoclet.xdoclet.lib}"/>
-<path id="xdoclet.task.classpath">
-  <path refid="xdoclet.xdoclet.classpath"/>
-</path>
-   
-<property name="gjt.jpl-util.lib" value="${gjt.jpl.util.lib}"/>   
-<path id="gjt.jpl-util.classpath">
-   <path refid="gjt.jpl.util.classpath"/>
-</path>   
-
-<property name="opennms.joesnmp.lib" value="${joesnmp.joesnmp.lib}"/>   
-<path id="opennms.joesnmp.classpath">
-   <path refid="joesnmp.joesnmp.classpath"/>
-</path>   
-
-<path id="jacorb.idl.classpath">
-   <path refid="apache.avalon.logkit.classpath"/>
-   <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-</path>
-
-<property name="jacorb.idl.include" value="${jacorb.jacorb.resources}"/>
-<property name="jacorb.jacorb.properties" value="${jacorb.jacorb.resources}"/>
-  
-<property name="sleepycat.lib" value="${sleepycat.sleepycat.lib}"/>
-<path id="sleepycat.classpath">
-   <path refid="sleepycat.sleepycat.classpath"/>
-</path>
-  
-<property name="apache.tomcat55.root" value="${apache.tomcat.root}"/>
-<property name="apache.tomcat55.lib" value="${apache.tomcat.lib}"/>
-<path id="apache.tomcat55.classpath">
-   <path refid="apache.tomcat.classpath"/>
-</path>
-  
-<property name="trove.lib" value="${trove.trove.lib}"/>  
-<path id="trove.classpath">
-   <path refid="trove.trove.classpath"/>
-</path>
-  
-<path id="qdox.classpath">
-   <path refid="qdox.qdox.classpath"/>
-</path>
-  
-<property name="javassist.lib" value="${javassist.javassist.lib}"/>
-<path id="javassist.classpath">
-  <path refid="javassist.javassist.classpath"/>
-</path>
-  
-<property name="hibernate.lib" value="${hibernate.hibernate.lib}"/>  
-<path id="hibernate3.classpath">
-  <path refid="hibernate.hibernate.classpath"/>
-</path>
-
-<property name="odmg.lib" value="${odmg.odmg.lib}"/>
-<path id="odmg.classpath">
-  <path refid="odmg.odmg.classpath"/>
-</path>
-
-<property name="cglib.lib" value="${cglib.cglib.lib}"/>
-<path id="cglib.classpath">
-  <path refid="cglib.cglib.classpath"/>  
-</path>
-
-
-<path id="ejb3-persistence.classpath">
-   <path refid="hibernate.annotations.classpath"/>
-   <path refid="hibernate.entitymanager.classpath"/>
-</path>
-
-<property name="spring.lib" value="${spring.spring.lib}"/>
-<path id="spring.classpath">
-  <path refid="spring.spring.classpath"/>  
-</path>
-
-<!-- Ant -->
-<property name="apache.ant.root" value="${project.tools}"/>
-<property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-<path id="apache.ant.classpath">
-  <pathelement path="${apache.ant.lib}/ant.jar"/>
-</path>
-
-  
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/aliases.ent (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/aliases.ent)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/autoload.properties
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  BuildMagic tasks which will be autoloaded.                              ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: autoload.properties,v 1.8 2004/11/24 02:07:35 starksm Exp $ ###
-
-### Stuff that glues things together  ###
-
-resolveproperties=org.jboss.tools.buildmagic.task.ResolveProperties
-resolver=org.jboss.tools.buildmagic.task.ResolveProperties
-propertyfilter=org.jboss.tools.buildmagic.task.PropertyFilter
-require=org.jboss.tools.buildmagic.task.Require
-call=org.jboss.tools.buildmagic.task.CallTarget
-Ant=org.jboss.tools.buildmagic.task.Ant
-
-### Project/Module tasks ###
-
-execmodules=org.jboss.tools.buildmagic.task.module.ExecuteModules
-projectinfo=org.jboss.tools.buildmagic.task.module.ProjectInfo
-moduleinfo=org.jboss.tools.buildmagic.task.module.ModuleInfo
-moduleconfig=org.jboss.tools.buildmagic.task.module.ModuleConfig
-moduleinit=org.jboss.tools.buildmagic.task.module.ModuleInit
-
-### Configuration Helpers ###
-library=org.jboss.tools.buildmagic.task.config.Library
-modulelibrary=org.jboss.tools.buildmagic.task.config.ModuleLibrary
-libraryset=org.jboss.tools.buildmagic.task.config.LibrarySet
-
-### Misc ###
-
-projecthelp=org.jboss.tools.buildmagic.task.ProjectHelp
-_puke=org.jboss.tools.buildmagic.task.util.Puke
-_dump=org.jboss.tools.buildmagic.task.util.Dump
-
-### Unused ??? ###
-
-#set=org.jboss.tools.buildmagic.task.Set
-#unset=org.jboss.tools.buildmagic.task.Unset
-#appendpath=org.jboss.tools.buildmagic.task.AppendPath
-#findroot=org.jboss.tools.buildmagic.task.FindRoot

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/autoload.properties (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/autoload.properties)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/build-common.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,905 +0,0 @@
-<project name="common tasks">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}" 
-	        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-  Unsupported Ant version:
-    ${ant.version}
-  Please install a version which is compatible with Ant ${buildmagic.ant16.baseversion}.
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Define the environment varaible. This needs to be first. -->
-  <property environment="env"/>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-  <property name="project.build" value="${project.root}/build"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-
-  <!-- Include user and project property overrides. -->
-  <import file="version-info.xml" />
-  <property file="${project.build}/local.properties"/>
-
-    <available file="${module.root}/etc/local.properties-example"
-	       property="init.have-local-properties"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" unless="build-bypass.disabled">
-
-   <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="**/*"/>
-      <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-      <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-      <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-      <srcfiles dir="${project.tools}" includes="**/*"/>
-   </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-   <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-   </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean">
-   <available file="${module.output}" property="module.output.present"/>  
-   <antcall target="_buildmagic:clean-internal"/>
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal" if="module.output.present">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes/**"/>
-      </fileset>
-    </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-	zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-    <!-- Where source files live -->
-    <property name="source.java" value="${module.source}/main"/>
-    <property name="source.etc" value="${module.source}/etc"/>
-    <property name="source.bin" value="${module.source}/bin"/>
-    <property name="source.docs" value="${module.source}/docs"/>
-    <property name="source.resources" value="${module.source}/resources"/>
-    <property name="source.examples" value="${module.source}/examples"/>
-
-    <!-- Where build generated files will go -->
-    <property name="build.classes" value="${module.output}/classes"/>
-    <property name="build.lib" value="${module.output}/lib"/>
-    <property name="build.api" value="${module.output}/api"/>
-    <property name="build.etc" value="${module.output}/etc"/>
-    <property name="build.bin" value="${module.output}/bin"/>
-    <property name="build.docs" value="${module.output}/docs"/>
-    <property name="build.parsers" value="${module.output}/gen-parsers"/>
-    <property name="build.resources" value="${module.output}/resources"/>
-    <property name="build.examples" value="${module.output}/examples"/>
-    <property name="build.reports" value="${module.output}/reports"/>
-    <property name="build.gen" value="${module.output}/gen"/>
-    <property name="build.gen-src" value="${module.output}/gen-src"/>
-    <property name="build.todo" value="${module.output}/todo"/>
-
-    <!-- Install/Release structure -->
-    <property name="install.id" value="${module.name}-${module.version}"/>
-    <property name="release.id" value="${install.id}"/>
-    <property name="install.root" value="${module.output}/${install.id}"/>
-
-    <!-- The combined thirdparty classpath -->
-    <path id="thirdparty.classpath">
-      <path refid="library.classpath"/>
-      <path refid="dependentmodule.classpath"/>
-    </path>
-
-    <!-- This module is based on Java 1.4 -->
-    <property name="javac.target" value="1.4"/>
-    <property name="javac.source" value="1.4"/>
-
-    <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-    <property name="rmic.stubVersion" value="1.2"/>
-
-    <!-- classpath and local.classpath must have a value using with a path -->
-    <property name="classpath" value=""/>
-    <property name="local.classpath" value=""/>
-
-    <!-- The classpath required to build classes. -->
-    <path id="javac.classpath">
-      <pathelement path="${classpath}"/>
-      <pathelement path="${local.classpath}"/>
-      <path refid="thirdparty.classpath"/>
-    </path>
-
-    <!-- The classpath required to build javadocs. -->
-    <path id="javadoc.classpath">
-      <path refid="javac.classpath"/>
-    </path>
-
-    <!-- The default prefix -->
-    <property name="jar.prefix" value="jboss-${module.name}"/>
-
-    <!-- The default server and client jar name -->
-    <property name="jar.server.name" value="${jar.prefix}.jar"/>
-    <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-    <!-- Packages to include when generating api documentation -->
-    <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <javac destdir="${build.classes}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-         depend="${javac.depend}"
-         verbose="${javac.verbose}"
-         deprecation="${javac.deprecation}"
-         includeAntRuntime="${javac.include.ant.runtime}"
-         includeJavaRuntime="${javac.include.java.runtime}"
-         failonerror="${javac.fail.onerror}">
-     <src path="${source.java}:${build.gen-src}"/>
-     <classpath refid="javac.classpath"/>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" unless="mbean-bypass.disabled">
-
-   <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="${mbean.includes}"/>
-   </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-        depends="_buildmagic:mbean-bypass-checker" 
-        unless="mbean-bypass.on">
-
-    <taskdef name="jmxdoclet"
-             classname="xdoclet.modules.jmx.JMXDocletTask"
-             classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.gen-src}"/>
-    
-    <jmxdoclet destdir="${build.gen-src}"
-               excludedtags="@version, at author">
-      <fileset dir="${source.java}" 
-               includes="${mbean.includes}"/>
-      <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    </jmxdoclet>
-    
-    <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <javac destdir="${build.test}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    failonerror="${javac.fail.onerror}">
-     <src path="${source.test}:${build.gen.test}"/>
-     <classpath>
-       <path refid="javac.classpath"/>
-       <pathelement location="${build.classes}"/>
-     </classpath>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-       <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-
-</target>
-
-<target name="_default:fix-bin">
-  <fixcrlf srcdir="${build.bin}"
-        eol="lf" eof="remove"
-        includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}" 
-        eol="crlf" eof="remove"
-        includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-       <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" unless="compile.disable">
-  <rmic base="${build.classes}"
-        verify="${rmic.verify}"
-   iiop="${rmic.iiop}"
-   iiopopts="${rmic.iiopops}"
-   idl="${rmic.idl}"
-   idlopts="${rmic.idlops}"
-   debug="${rmic.debug}"
-        stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-    <!-- Build the server jar -->
-    <jar jarfile="${build.lib}/${jar.server.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.server.includes}"/>
-    </jar>
-
-    <!-- Build jbossmq-client.jar -->
-    <jar jarfile="${build.lib}/${jar.client.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.client.includes}"/>
-    </jar>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-   depends="docs-api, docs-todo"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-
-<target name="docs-javadocs-check">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-         targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-  <!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs" 
-     depends="docs-javadocs-check" 
-     unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="${javadoc.packages}"
-             sourcepath="${source.java}:${module.output}/gen-src"
-             destdir="${build.api}"
-             classpathref="javadoc.classpath"
-             windowtitle="${javadoc.windowtitle}"
-        splitindex="${javadoc.splitindex}"
-             author="${javadoc.author}"
-             version="${javadoc.version}"
-             public="${javadoc.public}"
-             package="${javadoc.package}"
-             protected="${javadoc.protected}"
-             private="${javadoc.private}"
-             use="${javadoc.use}"
-        verbose="${javadoc.verbose}"> 
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2002 JBoss Group, LLC. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-    
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-      
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false" />
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false" />
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false" />
-    <tag name="ejb.pk" description="ejb" enabled="false" />
-    <tag name="ejb.bean" description="ejb" enabled="false" />
-    <tag name="ejb.transaction" description="ejb" enabled="false" />
-    <tag name="ejb.finder" description="ejb" enabled="false" />
-    <tag name="ejb.relation" description="ejb" enabled="false" />
-    <tag name="ejb.create-method" description="ejb" enabled="false" />
-    
-    <tag name="jboss.query" description="jboss" enabled="false" />
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false" />
-    <tag name="jboss.load-group" description="jboss" enabled="false" />
-    <tag name="jboss.persistence" description="jboss" enabled="false" />
-    <tag name="jboss.entity-command" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false" />
-    <tag name="jboss.relation-table" description="jboss" enabled="false" />
-    <tag name="jboss.table-attribute" description="jboss" enabled="false" />
-    
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false" />
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false" />
-    <tag name="jboss.method-attributes" description="jboss" enabled="false" />
-    
-  </javadoc>
-</target>
-
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-<target name="xdoclet-task-classpath-check" unless="xdoclet.task.classpath">
-    <path id="xdoclet.task.classpath">
-      <path refid="xdoclet.base.classpath"/>
-      <path refid="apache.commons.classpath"/>
-      <path refid="javac.classpath" />
-    </path>
-    <property name="xdoclet.task.classpath" 
-	      refid="xdoclet.task.classpath"/>
-</target>
-
-<target name="docs-todo-check">
-      <!-- if index.html is newer than the sources we are up to date -->
-      <uptodate property="docs-todo.disable"
-         targetfile="${build.todo}/index.html">
-         <srcfiles dir="${source.java}" includes="**/*.java"/>
-      </uptodate>
-  </target>
-
-  <!-- Generate TODO list from @todo tags -->
-  <target name="docs-todo" 
-     depends="docs-todo-check" 
-     unless="docs-todo.disable">
-
-  <taskdef name="todo"
-               classname="xdoclet.modules.doc.DocumentDocletTask"
-               classpath="${xdoclet.task.classpath}"/>
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-
-    <info/>
-  </todo>
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-  <target name="jmx-docs">
-    <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.jmx-doc}"/>
-    <jmxdoclet
-        destdir="${build.jmx-doc}"
-             force="false"
-        excludedtags="@version, at author">
-      <fileset dir="${source.java}">
-        <include name="**/*.java"/>
-      </fileset>
-      <jbossXmlDoc/>
-    </jmxdoclet>
-
-  </target>
-
-  <!-- Generate the plain HTML jmx docs -->
-  <target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-    <!-- Force the use of SAXON XSLT -->
-    <property system="true" 
-         name="javax.xml.transform.TransformerFactory"
-         value="com.icl.saxon.TransformerFactoryImpl"/>
-
-    <mkdir dir="${build.jmx-api}"/>
-    <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-      processor="trax"
-      extension=".html"
-      basedir="${build.jmx-doc}"
-      destdir="${build.jmx-api}">
-       <include name="**/*.xml"/>
-       <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-       <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-    </style>
-
-  </target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean" 
-     depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber" 
-     depends="_buildmagic:clobber, clean">
-</target>
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-  <!-- ================================================================== -->
-  <!-- Project (build module) Targets                                     -->
-  <!-- ================================================================== -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-    <!-- Skip any missing modules and issue a warning -->
-    <property name="executemodules.skipmissing" value="true"/>
-
-    <!-- The header and footer displayed during each module execution -->
-    <property name="executemodules.header"><![CDATA[
- ============================================================== 
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-    <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-    ]]></property>
-
-    <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag, 
-       version.name, 
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-    </property>
-
-    <!-- Show the module configuration -->
-    <echo>groups:  ${groups}</echo>
-    <echo>modules: ${modules}</echo>
-
-    <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean">
-  <execmodules target="clean" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-</project>
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/build-common.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/build-common.xml)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1135 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-  <property name="javac.debug" value="true"/>
-  
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/buildmagic.ent)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent~
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1134 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/buildmagic.ent~ (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/buildmagic.ent~)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.properties
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Copyright (c) 1998-2000 by Jason Dillon <jason at planet57.com>            ##
-##                                                                          ##
-##  This file is part of BuildMagic; an extension to Ant.                   ##
-##                                                                          ##
-##  This library is free software; you can redistribute it and/or modify    ##
-##  it under the terms of the GNU Lesser General Public License as          ##
-##  published by the Free Software Foundation; either version 2 of the      ##
-##  License, or (at your option) any later version.                         ##
-##                                                                          ##
-##  This library is distributed in the hope that it will be useful, but     ##
-##  WITHOUT ANY WARRANTY; without even the implied warranty of              ##
-##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       ##
-##  Lesser General Public License for more details.                         ##
-##                                                                          ##
-### ====================================================================== ###
-##                                                                          ##
-##  Common Properties                                                       ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: common.properties,v 1.4 2004/11/24 02:07:36 starksm Exp $ ###
-
-buildmagic.resolveproperties.force=false
-buildmagic.propertyfilter.all=true
-
-### Jython Support ###
-
-true=1
-false=0
-
-### Misc ###
-
-/=${file.separator}
-sun.boot.classpath=${sun.boot.class.path}

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.properties (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/common.properties)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,324 +0,0 @@
-<!-- $Id: common.xml,v 1.7 2004/11/24 02:07:36 starksm Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Load Buildmagic extention tasks. -->
-<taskdef resource="org/jboss/tools/buildmagic/task/autoload.properties"/>
-<taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"/>
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init">
-  <!-- fail unless we have been started from the build script -->
-  <require property="build.script">
-
-    The build system MUST be executed with one of the provided build scripts.
-
-  </require>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.Void" property="HAVE_JDK_1.1"/>
-  <available classname="java.lang.ThreadLocal" property="HAVE_JDK_1.2"/>
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <!-- Setup the basic project roots. -->
-  <property name="_project.root" value=".."/>
-  <path id="project.root"><pathelement location="${_project.root}"/></path>
-  <property name="project.root" refid="project.root"/> 
-  <property name="project.build" value="${project.root}/build"/>
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the project environment. -->
-  <property file="${project.build}/local.properties"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-
-  <available file="${module.root}/etc/local.properties-example"
-        property="init.have-local-properties"/>
-  <call target="_buildmagic:init:local-properties" if="init.have-local-properties"/>
-
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property resource="org/jboss/tools/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property resource="org/jboss/tools/buildmagic/task.properties"/>
-
-  <!-- Late bind properties & install filters -->
-  <resolver force="${buildmagic.resolveproperties.force}"/>
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-        tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <record name="${basedir}/build.log" append="no"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-  <delete dir="${module.output}"/>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-
-  <!-- 
-     | Try to stop the build log before we delete the file.
-   -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-   zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/common.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/common.xml)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/libraries.ent
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,633 +0,0 @@
-<!-- $Id: libraries.ent,v 1.79 2005/11/04 15:36:44 alesj Exp $ -->
-
-  <!-- Spring -->
-  <property name="spring.root" value="${project.thirdparty}/spring"/>
-  <property name="spring.lib" value="${spring.root}/lib"/>
-  <path id="spring.classpath">
-     <pathelement path="${spring.lib}/spring-beans.jar"/>
-     <pathelement path="${spring.lib}/spring-core.jar"/>
-     <pathelement path="${spring.lib}/spring-context.jar"/>
-  </path>
-  <path id="spring-example.classpath">
-     <pathelement path="${spring.lib}/spring-aop.jar"/>
-     <pathelement path="${spring.lib}/spring-web.jar"/>
-     <pathelement path="${spring.lib}/spring-webmvc.jar"/>
-   </path>
-
-  <!-- Dom4j -->
-  <property name="dom4j.dom4j.root" value="${project.thirdparty}/dom4j-dom4j"/>
-  <property name="dom4j.dom4j.lib" value="${dom4j.dom4j.root}/lib"/>
-  <path id="dom4j.dom4j.classpath">
-    <pathelement path="${dom4j.dom4j.lib}/dom4j.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="jaxen.jaxen.lib" value="${dom4j.dom4j.root}/lib"/>  
-
-  <!-- Javassist -->
-  <property name="javassist.root" value="${project.thirdparty}/javassist"/>
-  <property name="javassist.lib" value="${javassist.root}/lib"/>
-  <path id="javassist.classpath">
-    <pathelement path="${javassist.lib}/javassist.jar"/>
-  </path>
-
-  <!-- qdox -->
-  <property name="qdox.root" value="${project.thirdparty}/qdox"/>
-  <property name="qdox.lib" value="${qdox.root}/lib"/>
-  <path id="qdox.classpath">
-    <pathelement path="${qdox.lib}/qdox.jar"/>
-  </path>
-
-  <!-- hibernate3 -->
-  <property name="hibernate.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.lib" value="${hibernate.root}/lib"/>
-  <path id="hibernate3.classpath">
-    <pathelement path="${hibernate.lib}/hibernate3.jar"/>
-    <pathelement path="${hibernate.lib}/asm.jar"/>
-    <pathelement path="${hibernate.lib}/asm-attrs.jar"/>
-    <pathelement path="${hibernate.lib}/antlr*.jar"/>
-  </path>
-  
-  <!-- hibernate entity manager -->
-  <property name="hibernate.entitymanager.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.entitymanager.lib" value="${hibernate.entitymanager.root}/lib"/>
-  <path id="hibernate.entitymanager.classpath">
-    <pathelement path="${hibernate.entitymanager.lib}/ejb3-persistence.jar"/>
-    <pathelement path="${hibernate.entitymanager.lib}/hibernate-entitymanager.jar"/>
-  </path>
-  
-  <!-- hibernate annotations manager -->
-  <property name="hibernate.annotations.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.annotations.lib" value="${hibernate.annotations.root}/lib"/>
-  <path id="hibernate.annotations.classpath">
-    <pathelement path="${hibernate.annotations.lib}/hibernate-annotations.jar"/>
-  </path>  
-  
-  <!-- asm alias used for bridging to thirdparty build-->
-  <property name="asm.asm.root" value="${project.thirdparty}/hibernate"/>
-  <property name="asm.asm.lib" value="${asm.asm.root}/lib/"/>
-  <property name="asm.asm.resources" value="${asm.asm.root}/resources/"/>
-  <path id="asm.asm.classpath">
-     <pathelement path="${asm.asm.lib}/asm.jar"/>
-     <pathelement path="${asm.asm.lib}/asm-attrs.jar"/>
-  </path>
-  
-
-  <!-- ejb3-persistence -->
-  <path id="ejb3-persistence.classpath">
-    <pathelement path="${hibernate.lib}/hibernate-annotations.jar"/>
-    <pathelement path="${hibernate.lib}/hibernate-entitymanager.jar"/>
-    <pathelement path="${hibernate.lib}/ejb3-persistence.jar"/>
-  </path>
-
-  <!-- ODMG (needed for Hibernate) -->
-  <property name="odmg.root" value="${project.thirdparty}/odmg"/>
-  <property name="odmg.lib" value="${odmg.root}/lib"/>
-  <path id="odmg.classpath">
-    <pathelement path="${odmg.lib}/odmg-3.0.jar"/>
-  </path>
-
-  <!-- CGLIB (needed for Hibernate) -->
-  <property name="cglib.root" value="${project.thirdparty}/cglib"/>
-  <property name="cglib.lib" value="${cglib.root}/lib"/>
-  <path id="cglib.classpath">
-    <pathelement path="${cglib.lib}/cglib-2.1.1.jar"/>
-  </path>
-
-
-  <!-- Trove -->
-  <property name="trove.root" value="${project.thirdparty}/trove"/>
-  <property name="trove.lib" value="${trove.root}/lib"/>
-  <path id="trove.classpath">
-    <pathelement path="${trove.lib}/trove.jar"/>
-  </path>
-
-  <!-- Ant -->
-  <property name="apache.ant.root" value="${project.tools}"/>
-  <property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-  <path id="apache.ant.classpath">
-    <pathelement path="${apache.ant.lib}/ant.jar"/>
-  </path>
-
-  <!-- Apache Avalon -->
-  <property name="apache.avalon.root" value="${project.thirdparty}/apache-avalon"/>
-  <property name="apache.avalon.lib" value="${apache.avalon.root}/lib"/>
-  <path id="apache.avalon.classpath">
-    <pathelement path="${apache.avalon.lib}/avalon-framework.jar"/>
-  </path>
-  <property name="apache.avalon.logkit.lib" value="${apache.avalon.lib}"/>  
-  <path id="apache.avalon.logkit.classpath">
-    <pathelement path="${apache.avalon.logkit.lib}/logkit.jar"/>
-  </path>
-
-  <!-- Apache BCEL -->
-  <property name="apache.bcel.root" value="${project.thirdparty}/apache-bcel"/>
-  <property name="apache.bcel.lib" value="${apache.bcel.root}/lib"/>
-  <path id="apache.bcel.classpath">
-    <pathelement path="${apache.bcel.lib}/bcel.jar"/>
-  </path>
-
-  <!-- Apache Commons -->
-  <property name="apache.commons.root" value="${project.thirdparty}/apache-commons"/>
-  <property name="apache.commons.lib" value="${apache.commons.root}/lib"/>
-  <path id="apache.commons.classpath">
-    <pathelement path="${apache.commons.lib}/commons-collections.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-pool.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-discovery.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-fileupload.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-lang-2.0.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-vfs.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="apache.collections.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.codec.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.beanutils.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.digester.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.httpclient.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.logging.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.pool.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.fileupload.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.lang.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.vfs.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.discovery.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.validator.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.logging.api.lib" value="${apache.commons.root}/lib"/>
-  
-  <path id="apache.httpclient.classpath">
-     <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <path id="apache.logging.classpath">
-     <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-  </path>
-  
-  <path id="apache.beanutils.classpath">
-     <pathelement path="${apache.commons.lib}/commons-beanutils.jar"/>
-  </path>
-  
-  <path id="apache.validator.classpath">
-       <pathelement path="${apache.commons.lib}/commons-validator-1.1.3.jar"/>
-  </path>
-
-  <!-- Apache Log4j -->
-  <property name="apache.log4j.root" value="${project.thirdparty}/apache-log4j"/>
-  <property name="apache.log4j.lib" value="${apache.log4j.root}/lib"/>
-  <path id="apache.log4j.classpath">
-    <pathelement path="${apache.log4j.lib}/log4j.jar"/>
-  </path>
-
-  <!-- Apache Lucene -->
-  <property name="apache.lucene.root"
-    value="${project.thirdparty}/apache-lucene"/>
-  <property name="apache.lucene.lib" value="${apache.lucene.root}/lib"/>
-  <path id="apache.lucene.classpath">
-    <pathelement path="${apache.lucene.lib}/lucene.jar"/>
-  </path>
-
-   <!-- Apache Myfaces -->
-   <property name="apache.myfaces.root"
-     value="${project.thirdparty}/apache-myfaces"/>
-   <property name="apache.myfaces.lib" value="${apache.myfaces.root}/lib"/>
-
-  <!-- Apache Tomcat 5.5.x -->
-  <property name="apache.tomcat55.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.tomcat55.lib" value="${apache.tomcat55.root}"/>  
-  <path id="apache.tomcat55.classpath">
-    <fileset dir="${apache.tomcat55.root}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-  
-  <!-- Apache commons-el -->
-  <property name="commons.el.root" value="${apache.tomcat55.root}"/>
-  <property name="commons.el.lib" value="${apache.tomcat55.root}"/>
-  <path id="commons.el.classpath">
-     <pathelement path="${commons.el.lib}/commons-el.jar"/>
-  </path> 
-  
-  <!-- Apache Modeler -->
-  <property name="apache.modeler.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.modeler.lib" value="${apache.modeler.root}"/>
-  <path id="apache.modeler.classpath">
-    <fileset dir="${apache.modeler.root}">
-      <include name="commons-modeler.jar" />
-    </fileset>
-  </path>
-
-  <!-- Apache Velocity -->
-  <property name="apache.velocity.root" value="${project.thirdparty}/apache-velocity"/>
-  <property name="apache.velocity.lib" value="${apache.velocity.root}/lib"/>
-  <path id="apache.velocity.classpath">
-    <pathelement path="${apache.velocity.lib}/velocity.jar"/>
-  </path>
-
-  <!-- Apache Xerces -->
-  <property name="apache.xerces.root" value="${project.thirdparty}/apache-xerces"/>
-  <property name="apache.xerces.lib" value="${apache.xerces.root}/lib"/>
-  <path id="apache.xerces.classpath">
-    <pathelement path="${apache.xerces.lib}/xml-apis.jar"/>
-    <pathelement path="${apache.xerces.lib}/xercesImpl.jar"/>
-    <pathelement path="${apache.xerces.lib}/resolver.jar"/>
-  </path>
-
-  <!-- Apache Xalan -->
-  <property name="apache.xalan.root" value="${project.thirdparty}/apache-xalan"/>
-  <property name="apache.xalan.lib" value="${apache.xalan.root}/lib"/>
-  <path id="apache.xalan.classpath">
-    <pathelement path="${apache.xalan.lib}/xalan.jar"/>
-    <path refid="apache.xerces.classpath"/>
-  </path>
-
-   <!-- Apache Scout -->
-    <property name="apache.scout.root" value="${project.thirdparty}/apache-scout"/>
-    <property name="apache.scout.lib" value="${apache.scout.root}/lib"/>
-    <path id="apache.scout.classpath">
-      <pathelement path="${apache.scout.lib}/scout.jar"/>
-    </path>
-
-  <!-- Apache Slide -->
-  <property name="apache.slide.root" value="${project.thirdparty}/apache-slide"/>
-  <property name="apache.slide.lib" value="${apache.slide.root}/client/lib"/>
-  <path id="apache.slide.classpath">
-    <pathelement path="${apache.slide.lib}/webdavlib.jar"/>
-    <pathelement path="${apache.slide.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <!-- Apache JaxMe2 -->
-  <property name="apache.jaxme.root" value="${project.thirdparty}/apache-jaxme"/>
-  <property name="apache.jaxme.lib" value="${apache.jaxme.root}/lib"/>
-  <path id="apache.jaxme.classpath">
-    <pathelement path="${apache.jaxme.lib}/jaxmexs.jar"/>
-  </path>
-
-  <!-- Apache WSS4J -->
-  <property name="apache.wss4j.root" value="${project.thirdparty}/apache-wss4j"/>
-  <property name="apache.wss4j.lib" value="${apache.wss4j.root}/lib"/>
-  <path id="apache.wss4j.classpath">
-    <pathelement path="${apache.wss4j.lib}/wss4j.jar"/>
-  </path>
-
-  <!-- Apache XMLSec -->
-  <property name="apache.xmlsec.root" value="${project.thirdparty}/apache-xmlsec"/>
-  <property name="apache.xmlsec.lib" value="${apache.xmlsec.root}/lib"/>
-  <path id="apache.xmlsec.classpath">
-    <pathelement path="${apache.xmlsec.lib}/xmlsec.jar"/>
-  </path>
-
-  <!-- Bouncy Castle JCE Provider -->
-  <property name="bouncycastle.root" value="${project.thirdparty}/bouncycastle"/>
-  <property name="bouncycastle.lib" value="${bouncycastle.root}/lib"/>
-  <path id="bouncycastle.classpath">
-    <pathelement path="${bouncycastle.lib}/bcprov-jdk14-122.jar"/>
-  </path>
-
-  <!-- OpenSAML -->
-  <property name="opensaml.root" value="${project.thirdparty}/opensaml"/>
-  <property name="opensaml.lib" value="${opensaml.root}/lib"/>
-  <path id="opensaml.classpath">
-    <pathelement path="${opensaml.lib}/opensaml.jar"/>
-  </path>
-
-  <!-- GNU Regex -->
-  <property name="gnu.regexp.root" value="${project.thirdparty}/gnu-regexp"/>
-  <property name="gnu.regexp.lib" value="${gnu.regexp.root}/lib"/>
-  <path id="gnu.regexp.classpath">
-    <pathelement path="${gnu.regexp.lib}/gnu-regexp.jar"/>
-  </path>
-
-  <!-- GNU Getopt -->
-  <property name="gnu.getopt.root" value="${project.thirdparty}/gnu-getopt"/>
-  <property name="gnu.getopt.lib" value="${gnu.getopt.root}/lib"/>
-  <path id="gnu.getopt.classpath">
-    <pathelement path="${gnu.getopt.lib}/getopt.jar"/>
-  </path>
-
-  <!-- org.jdom -->
-  <property name="jdom.root" value="${project.thirdparty}/jdom-beta-7"/>
-  <property name="jdom.lib" value="${jdom.root}/lib"/>
-  <path id="jdom.classpath">
-    <pathelement path="${jdom.lib}/jdom.jar"/>
-  </path>
-
-  <!-- JBoss -->
-  <property name="jboss.external.root" value="${project.thirdparty}/jboss"/>
-  <property name="jboss.remoting.root" value="${jboss.external.root}/remoting"/>
-  <property name="jboss.remoting.lib" value="${jboss.remoting.root}/lib"/>
-  <path id="jboss.remoting.classpath">
-    <pathelement path="${jboss.remoting.lib}/jboss-remoting.jar"/>
-  </path>
-  <property name="jboss.serialization.root" value="${jboss.external.root}/serialization"/>
-  <property name="jboss.serialization.lib" value="${jboss.serialization.root}/lib"/>
-  <path id="jboss.serialization.classpath">
-    <pathelement path="${jboss.serialization.lib}/jboss-serialization.jar"/>
-  </path>
-  <property name="jboss.axis.root" value="${jboss.external.root}/axis"/>
-  <property name="jboss.axis.lib" value="${jboss.axis.root}/lib"/>
-  <path id="jboss.axis.classpath">
-    <pathelement path="${jboss.axis.lib}/axis-ws4ee.jar"/>
-  </path>
-
-  <!-- JUnit -->
-  <property name="junit.junit.root" value="${project.thirdparty}/junit-junit"/>
-  <property name="junit.junit.lib" value="${junit.junit.root}/lib"/>
-  <path id="junit.junit.classpath">
-    <pathelement path="${junit.junit.lib}/junit.jar"/>
-  </path>
-
-  <!-- EDU.oswego.cs.dl.util.concurrent -->
-  <property name="oswego.concurrent.root" value="${project.thirdparty}/oswego-concurrent"/>
-  <property name="oswego.concurrent.lib" value="${oswego.concurrent.root}/lib"/>
-  <path id="oswego.concurrent.classpath">
-    <pathelement path="${oswego.concurrent.lib}/concurrent.jar"/>
-  </path>
-
-  <!-- org.xml.sax (SAX2 & SAX2 Extensions) -->
-  <property name="sax.root" value="${project.thirdparty}/xml-sax"/>
-  <property name="sax.lib" value="${sax.root}/lib"/>
-  <path id="sax.classpath">
-    <pathelement path="${sax.lib}/sax2.jar"/>
-    <pathelement path="${sax.lib}/sax2-ext.jar"/>
-  </path>
-
-  <!-- IBM WSDL4j -->
-  <property name="ibm.wsdl4j.root" value="${project.thirdparty}/ibm-wsdl4j"/>
-  <property name="ibm.wsdl4j.lib" value="${ibm.wsdl4j.root}/lib"/>
-  <path id="ibm.wsdl4j.classpath">
-    <pathelement path="${ibm.wsdl4j.lib}/wsdl4j.jar"/>
-  </path>
-
-  <!-- GJT JPL-Util -->
-  <property name="gjt.jpl-util.root" value="${project.thirdparty}/gjt-jpl-util"/>
-  <property name="gjt.jpl-util.lib" value="${gjt.jpl-util.root}/lib"/>
-  <path id="gjt.jpl-util.classpath">
-    <pathelement path="${gjt.jpl-util.lib}/jpl-util.jar"/>
-    <pathelement path="${gjt.jpl-util.lib}/jpl-pattern.jar"/>
-  </path>
-
-  <!-- Hypersonic SQL -->
-  <property name="hsqldb.hsqldb.root" value="${project.thirdparty}/hsqldb-hsqldb"/>
-  <property name="hsqldb.hsqldb.lib" value="${hsqldb.hsqldb.root}/lib"/>
-  <path id="hsqldb.hsqldb.classpath">
-    <pathelement path="${hsqldb.hsqldb.lib}/hsqldb.jar"/>
-  </path>
-
-  <!-- JacORB -->
-  <property name="jacorb.jacorb.root" value="${project.thirdparty}/jacorb-jacorb"/>
-  <property name="jacorb.jacorb.lib" value="${jacorb.jacorb.root}/lib"/>
-  <path id="jacorb.jacorb.classpath">
-    <pathelement path="${jacorb.jacorb.lib}/jacorb.jar"/>
-  </path>
-  <path id="jacorb.idl.classpath">
-    <path refid="apache.avalon.logkit.classpath"/>
-    <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-  </path>
-  <property name="jacorb.idl.include" value="${jacorb.jacorb.root}/idl"/>
-  <property name="jacorb.jacorb.resources" value="${jacorb.jacorb.root}/conf/default"/>
-
-  <!-- JGroups -->
-  <property name="jgroups.jgroups.root" value="${project.thirdparty}/javagroups-javagroups"/>
-  <property name="jgroups.jgroups.lib" value="${jgroups.jgroups.root}/lib"/>
-  <path id="jgroups.jgroups.classpath">
-    <pathelement path="${jgroups.jgroups.lib}/jgroups.jar"/>
-  </path>
-
-  <!-- Sleepycat -->
-  <property name="sleepycat.root" value="${project.thirdparty}/sleepycat"/>
-  <property name="sleepycat.lib" value="${sleepycat.root}/lib"/>
-  <path id="sleepycat.classpath">
-     <pathelement path="${sleepycat.lib}/je.jar"/>
-  </path>
-
-
-  <!-- jUDDI -->
-  <property name="juddi.juddi.root" value="${project.thirdparty}/juddi-juddi"/>
-  <property name="juddi.juddi.lib" value="${juddi.juddi.root}/lib"/>
-  <path id="juddi.juddi.classpath">
-    <pathelement path="${juddi.juddi.lib}/juddi.jar"/>
-  </path>
-
-  <!-- JUnitEJB -->
-  <property name="junitejb.junitejb.root" value="${project.thirdparty}/junitejb/junitejb"/>
-  <property name="junitejb.junitejb.lib" value="${junitejb.junitejb.root}/lib"/>
-  <path id="junitejb.junitejb.classpath">
-    <pathelement path="${junitejb.junitejb.lib}/junitejb.jar"/>
-  </path>
-
-  <!-- Sun JavaBeans Activation Framework (JAF) -->
-  <property name="sun.jaf.root" value="${project.thirdparty}/sun-jaf"/>
-  <property name="sun.jaf.lib" value="${sun.jaf.root}/lib"/>
-  <path id="sun.jaf.classpath">
-    <pathelement path="${sun.jaf.lib}/activation.jar"/>
-  </path>
-
-   <!-- Sun JavaMail -->
-   <property name="sun.javamail.root" value="${project.thirdparty}/sun-javamail"/>
-   <property name="sun.javamail.lib" value="${sun.javamail.root}/lib"/>
-   <path id="sun.javamail.classpath">
-     <pathelement path="${sun.javamail.lib}/mail.jar"/>
-   </path>
-
-  <!-- Sun Java XML Parser (JAXP) -->
-  <property name="sun.jaxp.root" value="${project.thirdparty}/sun-jaxp"/>
-  <property name="sun.jaxp.lib" value="${sun.jaxp.root}/lib"/>
-  <path id="sun.jaxp.classpath">
-    <pathelement path="${sun.jaxp.lib}/jaxp.jar"/>
-    <pathelement path="${sun.jaxp.lib}/crimson.jar"/>
-    <pathelement path="${sun.jaxp.lib}/xalan.jar"/>
-  </path>
-
-  <!-- Sun Java Media Framework (JMF) -->
-  <property name="sun.jmf.root" value="${project.thirdparty}/sun-jmf"/>
-  <property name="sun.jmf.lib" value="${sun.jmf.root}/lib"/>
-  <path id="sun.jmf.classpath">
-    <pathelement path="${sun.jmf.lib}/jmf.jar"/>
-  </path>
-
-  <!-- Sun Java Management Extensions (JMX) -->
-  <property name="sun.jmx.root" value="${project.thirdparty}/sun-jmx"/>
-  <property name="sun.jmx.lib" value="${sun.jmx.root}/lib"/>
-  <path id="sun.jmx.classpath">
-    <pathelement path="${sun.jmx.lib}/jmxri.jar"/>
-    <pathelement path="${sun.jmx.lib}/jmxtools.jar"/>
-  </path>
-
-  <!-- Sun Java Servlet Technology  -->
-  <property name="sun.servlet.root" value="${project.thirdparty}/sun-servlet"/>
-  <property name="sun.servlet.lib" value="${sun.servlet.root}/lib"/>
-  <path id="sun.servlet.classpath">
-    <pathelement path="${sun.servlet.lib}/servlet-api.jar"/>
-    <pathelement path="${sun.servlet.lib}/jsp-api.jar"/>
-  </path>
-
-  <!-- JavaCC -->
-  <property name="sun.javacc.root" value="${project.thirdparty}/sun-javacc"/>
-  <property name="sun.javacc.lib" value="${sun.javacc.root}/lib"/>
-
-  <!-- BeanShell -->
-  <property name="beanshell.beanshell.root" value="${project.thirdparty}/beanshell-beanshell"/>
-  <property name="beanshell.beanshell.lib" value="${beanshell.beanshell.root}/lib"/>
-  <path id="beanshell.beanshell.classpath">
-    <fileset dir="${beanshell.beanshell.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
-  <!-- Joe SNMP lib -->
-  <property name="opennms.joesnmp.root" value="${project.thirdparty}/opennms/joesnmp"/>
-  <property name="opennms.joesnmp.lib" value="${opennms.joesnmp.root}/lib"/>
-  <path id="opennms.joesnmp.classpath">
-    <pathelement path="${opennms.joesnmp.lib}/joesnmp.jar"/>
-  </path>
-
-  <!-- XDoclet -->
-
-  <!--
-     | xdoclet has appended a version string to all their jars.
-     | I'm using jb4 so we don't have to track them so carefully
-   -->
-  <property name="xdoclet.version" value="jb4"/>
-
-  <!--
-
-  jason: it seems like this hack is better defaulting to the default in thirdparty, if you
-         want to build from CVS then change this to the value below in build/local.properties.
-
-  <!- - this may be overridden by the build/local.properties file to use version from cvs- ->
-  <property name="xdoclet.xdoclet.root" value="${project.root}/xdoclet/output"/>
-
-  -->
-  <property name="xdoclet.xdoclet.root" value="${project.thirdparty}/xdoclet-xdoclet"/>
-
-  <property name="xdoclet.xdoclet.lib" value="${xdoclet.xdoclet.root}/lib"/>
-  <path id="xdoclet.xdoclet.classpath">
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xjavadoc-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-bea-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-ejb-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-java-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jboss-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jdo-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jmx-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-web-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xdoclet-module-${xdoclet.version}.jar"/>
-    <path refid="apache.commons.classpath"/>
-    <path refid="sun.servlet.classpath"/>
-  </path>
-  <path id="xdoclet.task.classpath">
-    <path refid="xdoclet.xdoclet.classpath"/>
-  </path>
-
-  <!-- Informa RSS -->
-  <property name="informa.rss.root" value="${project.thirdparty}/informa-rss"/>
-  <property name="informa.rss.lib" value="${informa.rss.root}/lib"/>
-  <path id="informa.rss.classpath">
-    <pathelement path="${informa.rss.lib}/informa.jar"/>
-  </path>
-
-  <!-- JRegex -->
-  <property name="jregex.jregex.root" value="${project.thirdparty}/jregex-jregex"/>
-  <property name="jregex.jregex.lib" value="${jregex.jregex.root}/lib"/>
-  <path id="jregex.jregex.classpath">
-    <pathelement path="${jregex.jregex.lib}/jregex.jar"/>
-  </path>
-
-  <!-- DNSJava -->
-  <property name="sourceforge.dnsjava.root" value="${project.thirdparty}/sourceforge-dnsjava"/>
-  <property name="sourceforge.dnsjava.lib" value="${sourceforge.dnsjava.root}/lib"/>
-  <path id="sourceforge.dnsjava.classpath">
-    <pathelement path="${sourceforge.dnsjava.lib}/dnsjava-1.4.3.jar"/>
-  </path>
-
-  <!-- M.Wutka's DTD parser -->
-  <property name="wutka.dtdparser.root" value="${project.thirdparty}/wutka-dtdparser"/>
-  <property name="wutka.dtdparser.lib" value="${wutka.dtdparser.root}/lib"/>
-  <path id="wutka.dtdparser.classpath">
-    <pathelement path="${wutka.dtdparser.lib}/dtdparser121.jar"/>
-  </path>
-
-  <!-- JFreeChart -->
-  <property name="jfreechart.jfreechart.root" value="${project.thirdparty}/jfreechart"/>
-  <property name="jfreechart.jfreechart.lib" value="${jfreechart.jfreechart.root}/lib"/>
-  <path id="jfreechart.jfreechart.classpath">
-    <fileset dir="${jfreechart.jfreechart.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
- <!-- ebxmlrr -->
-  <property name="ebxmlrr.ebxmlrr.root" value="${project.thirdparty}/sun-ebxmlrr"/>
-  <property name="ebxmlrr.ebxmlrr.lib" value="${ebxmlrr.ebxmlrr.root}/lib"/>
-  <path id="ebxmlrr.ebxmlrr.classpath">
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/ebxmlrr.jar"/>
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/jaxr-client.jar"/>
-  </path>
-
-  <!-- ANTLR -->
-  <property name="antlr.antlr.root" value="${project.thirdparty}/antlr"/>
-  <property name="antlr.antlr.lib" value="${antlr.antlr.root}/lib"/>
-  <path id="antlr.antlr.classpath">
-    <pathelement path="${antlr.antlr.lib}/antlr-2.7.5H3.jar"/>
-  </path>
-
-  <!-- Apache Taglibs -->
-  <property name="apache.taglibs.root" value="${project.thirdparty}/apache-taglibs"/>
-  <property name="apache.taglibs.lib" value="${apache.taglibs.root}/lib"/>
-  <path id="apache.taglibs.classpath">
-    <pathelement path="${apache.taglibs.lib}/jstl-1.1.2.jar"/>
-    <pathelement path="${apache.taglibs.lib}/standard-1.1.2.jar"/>
-  </path>
-
-  <!-- Apache ORO -->
-  <property name="apache.oro.root" value="${project.thirdparty}/apache-oro"/>
-  <property name="apache.oro.lib" value="${apache.oro.root}/lib"/>
-  <path id="apache.oro.classpath">
-    <pathelement path="${apache.oro.lib}/jakarta-oro-2.0.8.jar"/>
-  </path>
-
-  <!-- Apache Struts -->
-  <property name="apache.struts.root" value="${project.thirdparty}/apache-struts"/>
-  <property name="apache.struts.lib" value="${apache.struts.root}/lib"/>
-  <path id="apache.struts.classpath">
-    <pathelement path="${apache.struts.lib}/struts-1.2.6.jar"/>
-  </path>
-
-  <!-- StAX -->
-  <property name="codehaus.stax.root" value="${project.thirdparty}/codehaus-stax"/>
-  <property name="codehaus.stax.lib" value="${codehaus.stax.root}/lib"/>
-  <path id="codehaus.stax.classpath">
-    <pathelement path="${codehaus.stax.lib}/stax-1.1.1.jar"/>
-  </path>
-
-  <!-- XMLUnit -->
-  <property name="xmlunit.xmlunit.root" value="${project.thirdparty}/xmlunit-xmlunit"/>
-  <property name="xmlunit.xmlunit.lib" value="${xmlunit.xmlunit.root}/lib"/>
-  <path id="xmlunit.xmlunit.classpath">
-    <pathelement path="${xmlunit.xmlunit.lib}/xmlunit1.0.jar"/>
-  </path>
-  
-  <!-- easymock -->
-  <property name="easymock.easymock.root" value="${project.thirdparty}/easymock"/>
-  <property name="easymock.easymock.lib" value="${easymock.easymock.root}/lib/"/>
-  <property name="easymock.easymock.resources" value="${easymock.easymock.root}/resources/"/>
-  <path id="easymock.easymock.classpath">
-     <pathelement path="${easymock.easymock.lib}/easymockclassextension.jar"/>
-     <pathelement path="${easymock.easymock.lib}/easymock-1.1.jar"/>
-  </path>
-  
-  <!-- struts-test-case -->
-  <property name="struts.test.case.root" value="${project.thirdparty}/struts-test-case"/>
-  <property name="struts.test.case.lib" value="${struts.test.case.root}/lib/"/>
-  <property name="struts.test.case.resources" value="${struts.test.case.root}/resources/"/>
-  <path id="struts.test.case.classpath">
-     <pathelement path="${struts.test.case.lib}/strutstest-2.1.3.jar"/>
-  </path>  
-  
-  <!-- cache -->
-  <property name="jboss.cache.root" value="${project.thirdparty}/jboss/cache"/>
-  <property name="jboss.cache.lib" value="${jboss.cache.root}/lib"/>
-  <path id="jboss.cache.classpath">
-    <pathelement path="${jboss.cache.lib}/jboss-cache.jar"/>
-  </path>  

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/libraries.ent (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/libraries.ent)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/modules.ent
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,305 +0,0 @@
-<!-- $Id: modules.ent,v 1.56 2006/05/23 20:20:41 asaldhana Exp $ -->
-
-<!-- AOP -->
-<property name="jboss.aop.root" value="${project.root}/aop/output"/>
-<property name="jboss.aop.lib" value="${jboss.aop.root}/lib"/>
-<path id="jboss.aop.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop.jar"/>
-</path>
-<path id="jboss.aop50.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop-jdk50.jar"/>
-</path>
-
-<property name="jboss.aspects.root" value="${project.root}/aspects/output"/>
-<property name="jboss.aspects.lib" value="${jboss.aspects.root}/lib"/>
-<path id="jboss.aspects.classpath">
-  <pathelement path="${jboss.aspects.lib}/jboss-aspect-library.jar"/>
-</path>
-
-<!-- tomcat -->
-<property name="jboss.tomcat.root" value="${project.root}/tomcat/output"/>
-  <property name="jboss.tomcat.lib" value="${jboss.tomcat.root}/lib"/>
-<path id="jboss.tomcat.classpath">
-  <pathelement path="${jboss.tomcat.lib}/tc5-cluster.aop"/>
-  <pathelement path="${jboss.tomcat.root}/resource"/>
-</path>
-
-<!-- Cluster -->
-<property name="jboss.cluster.root" value="${project.root}/cluster/output"/>
-<property name="jboss.cluster.lib" value="${jboss.cluster.root}/lib"/>
-<path id="jboss.cluster.classpath">
-  <pathelement path="${jboss.cluster.lib}/jbossha.jar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-httpsession.sar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-singleton.jar"/>
-</path>
-
-<!-- Common -->
-<property name="jboss.common.root" value="${project.root}/common/output"/>
-<property name="jboss.common.lib" value="${jboss.common.root}/lib"/>
-<path id="jboss.common.classpath">
-  <pathelement path="${jboss.common.lib}/jboss-common.jar"/>
-  <pathelement path="${jboss.common.lib}/jboss-xml-binding.jar"/>
-  <pathelement path="${jboss.common.lib}/namespace.jar"/>
-</path>
-
-<!-- Compatibility -->
-<property name="jboss.compatibility.root" value="${project.root}/compatibility/output"/>
-<property name="jboss.compatibility.lib" value="${jboss.compatibility.root}/lib"/>
-<path id="jboss.compatibility.classpath">
-</path>
-
-<!-- Iiop -->
-<property name="jboss.iiop.root" value="${project.root}/iiop/output"/>
-<property name="jboss.iiop.lib" value="${jboss.iiop.root}/lib"/>
-<path id="jboss.iiop.classpath">
-  <pathelement path="${jboss.iiop.lib}/jboss-iiop.jar"/>
-</path>
-
-<!-- J2EE -->
-<property name="jboss.j2ee.root" value="${project.root}/j2ee/output"/>
-<property name="jboss.j2ee.lib" value="${jboss.j2ee.root}/lib"/>
-<path id="jboss.j2ee.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-jaxrpc.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-saaj.jar"/>
-</path>
-
-<!-- J2EE Extensions-->
-<path id="jboss.j2ee.ext.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-auth.jar"/>
-</path>
-
-<!-- J2SE -->
-<property name="jboss.j2se.root" value="${project.root}/j2se/output"/>
-<property name="jboss.j2se.lib" value="${jboss.j2se.root}/lib"/>
-<path id="jboss.j2se.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-j2se.jar"/>
-</path>
-<path id="jboss.jmxcompliance.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-jmx-compliance.jar"/>
-</path>
-
-<!-- Deployment -->
-<property name="jboss.deployment.root" value="${project.root}/deployment/output"/>
-<property name="jboss.deployment.lib" value="${jboss.deployment.root}/lib"/>
-<path id="jboss.deployment.classpath">
-  <pathelement path="${jboss.deployment.lib}/jboss-deployment.jar"/>
-</path>
-
-<!-- EJB3 -->
-<property name="jboss.ejb3.root" value="${project.root}/ejb3/output"/>
-<property name="jboss.ejb3.lib" value="${jboss.ejb3.root}/lib"/>
-<path id="jboss.ejb3.classpath">
-  <pathelement path="${jboss.ejb3.lib}/jboss-ejb3.jar"/>
-  <pathelement path="${jboss.ejb3.lib}/jboss-annotations-ejb3.jar"/>
-</path>
-
-<!-- EJB3X -->
-<property name="jboss.ejb3x.root" value="${project.root}/ejb3x/output"/>
-<property name="jboss.ejb3x.lib" value="${jboss.ejb3x.root}/lib"/>
-<path id="jboss.ejb3x.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x.jar"/>
-</path>
-<path id="jboss.ejb3x.jdk14.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x-jdk14.jar"/>
-</path>
-
-<!-- JCA -->
-<property name="jboss.jca.root" value="${project.root}/connector/output"/>
-<property name="jboss.jca.lib" value="${jboss.jca.root}/lib"/>
-<path id="jboss.jca.classpath">
-  <pathelement path="${jboss.jca.lib}/jboss-jca.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-local-jdbc.jar"/>
-    <pathelement path="${jboss.jca.lib}/jboss-ha-local-jdbc.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-common-jdbc-wrapper.jar"/>
-</path>
-
-<!-- JMX -->
-<property name="jboss.jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.jmx.lib" value="${jboss.jmx.root}/lib"/>
-<path id="jboss.jmx.classpath">
-  <pathelement path="${jboss.jmx.lib}/jboss-jmx.jar"/>
-</path>
-
-<!-- JMX Remoting -->
-<property name="jboss.jmx-remoting.root" value="${project.root}/jmx-remoting/output"/>
-<property name="jboss.jmx-remoting.lib" value="${jboss.jmx-remoting.root}/lib"/>
-<path id="jboss.jmx-remoting.classpath">
-  <pathelement path="${jboss.jmx-remoting.lib}/jboss-jmx-remoting.jar"/>
-</path>
-
-<!-- Management -->
-<property name="jboss.management.root" value="${project.root}/management/output"/>
-<property name="jboss.management.lib" value="${jboss.management.root}/lib"/>
-<path id="jboss.management.classpath">
-  <pathelement path="${jboss.management.lib}/jboss-jsr77-client.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-jsr77.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-management.jar"/>
-</path>
-
-<!-- MBeans -->
-<property name="jboss.mbeans.root" value="${project.root}/mbeans/output"/>
-<property name="jboss.mbeans.lib" value="${jboss.mbeans.root}/lib"/>
-<path id="jboss.mbeans.classpath">
-  <pathelement path="${jboss.mbeans.lib}/jboss-mbeans.jar"/>
-</path>
-
-<!-- Messaging -->
-<property name="jboss.messaging.root" value="${project.root}/messaging/output"/>
-<property name="jboss.messaging.lib" value="${jboss.messaging.root}/lib"/>
-<path id="jboss.messaging.classpath">
-  <pathelement path="${jboss.messaging.lib}/jbossmq.jar"/>
-</path>
-
-<!-- Messaging 5 -->
-<property name="jboss.jms.root" value="${project.root}/jms/output"/>
-<property name="jboss.jms.lib" value="${jboss.jms.root}/lib"/>
-<path id="jboss.jms.classpath">
-  <pathelement path="${jboss.jms.lib}/jboss-messaging.jar"/>
-</path>
-
-<!-- Naming -->
-<property name="jboss.naming.root" value="${project.root}/naming/output"/>
-<property name="jboss.naming.lib" value="${jboss.naming.root}/lib"/>
-<path id="jboss.naming.classpath">
-  <pathelement path="${jboss.naming.lib}/jnpserver.jar"/>
-</path>
-
-<!-- Security -->
-<property name="jboss.security.root" value="${project.root}/security/output"/>
-<property name="jboss.security.lib" value="${jboss.security.root}/lib"/>
-<path id="jboss.security.classpath">
-  <pathelement path="${jboss.security.lib}/jbosssx.jar"/>
-</path>
-
-<!-- Server -->
-<property name="jboss.server.root" value="${project.root}/server/output"/>
-<property name="jboss.server.lib" value="${jboss.server.root}/lib"/>
-<path id="jboss.server.classpath">
-  <pathelement path="${jboss.server.lib}/jboss.jar"/>
-  <pathelement path="${jboss.server.lib}/jmx-adaptor-plugin.jar"/>
-</path>
-
-<!-- Spring -->
-<property name="jboss.spring.root" value="${project.root}/spring-int/output"/>
-<property name="jboss.spring.lib" value="${jboss.spring.root}/lib"/>
-
-<!-- System -->
-<property name="jboss.system.root" value="${project.root}/system/output"/>
-<property name="jboss.system.lib" value="${jboss.system.root}/lib"/>
-<path id="jboss.system.classpath">
-  <pathelement path="${jboss.system.lib}/jboss-system.jar"/>
-</path>
-<property name="jboss.system.xdocletpath"
-  value="${project.root}/system/src/main"/>
-
-<!-- Test -->
-<property name="jboss.test.root" value="${project.root}/test/output"/>
-<property name="jboss.test.lib" value="${jboss.test.root}/lib"/>
-<path id="jboss.test.classpath">
-  <pathelement path="${jboss.test.lib}/jboss-test.jar"/>
-</path>
-
-<!-- Transaction -->
-<property name="jboss.transaction.root" value="${project.root}/transaction/output"/>
-<property name="jboss.transaction.lib" value="${jboss.transaction.root}/lib"/>
-<path id="jboss.transaction.classpath">
-  <pathelement path="${jboss.transaction.lib}/jboss-transaction.jar"/>
-</path>
-
-<!-- Varia -->
-<property name="jboss.varia.root" value="${project.root}/varia/output"/>
-<property name="jboss.varia.lib" value="${jboss.varia.root}/lib"/>
-<path id="jboss.varia.classpath">
-  <pathelement path="${jboss.varia.root}/classes"/>
-</path>
-
-<!-- Hibernate2 integration module -->
-<property name="jboss.hibernate.root" value="${project.root}/hibernate-int/output"/>
-<property name="jboss.hibernate.lib" value="${jboss.hibernate.root}/lib"/>
-<path id="jboss.hibernate.classpath">
-  <pathelement path="${jboss.hibernate.lib}/jboss-hibernate.jar"/>
-</path>
-
-
-<!-- below this line starts the kingdom of nukes ***************************************************************** -->
-
-<!-- Nukes on JBoss -->
-<property name="jboss.nukes.root" value="${project.root}/nukes/output"/>
-<property name="jboss.nukes.lib" value="${jboss.nukes.root}/lib"/>
-<path id="jboss.nukes.classpath">
-  <pathelement path="${jboss.nukes.lib}/nukes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss adminmessages -->
-<property name="jboss.nukes-adminmessages.root" value="${project.root}/adminmessages/output"/>
-<property name="jboss.nukes-adminmessages.lib" value="${jboss.nukes-adminmessages.root}/lib"/>
-<path id="jboss.nukes-adminmessages.classpath">
-  <pathelement path="${jboss.nukes-adminmessages.lib}/nukes-adminmessages-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss faq -->
-<property name="jboss.nukes-faq.root" value="${project.root}/faq/output"/>
-<property name="jboss.nukes-faq.lib" value="${jboss.nukes-faq.root}/lib"/>
-<path id="jboss.nukes-faq.classpath">
-  <pathelement path="${jboss.nukes-faq.lib}/nukes-faq-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss jmx -->
-<property name="jboss.nukes-jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.nukes-jmx.lib" value="${jboss.nukes-jmx.root}/lib"/>
-<path id="jboss.nukes-jmx.classpath">
-  <pathelement path="${jboss.nukes-jmx.lib}/nukes-jmx-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss journal -->
-<property name="jboss.nukes-journal.root" value="${project.root}/journal/output"/>
-<property name="jboss.nukes-journal.lib" value="${jboss.nukes-journal.root}/lib"/>
-<path id="jboss.nukes-journal.classpath">
-  <pathelement path="${jboss.nukes-journal.lib}/nukes-journal-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss mp3player -->
-<property name="jboss.nukes-mp3player.root" value="${project.root}/mp3player/output"/>
-<property name="jboss.nukes-mp3player.lib" value="${jboss.nukes-mp3player.root}/lib"/>
-<path id="jboss.nukes-mp3player.classpath">
-  <pathelement path="${jboss.nukes-mp3player.lib}/nukes-mp3player-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss news -->
-<property name="jboss.nukes-news.root" value="${project.root}/news/output"/>
-<property name="jboss.nukes-news.lib" value="${jboss.nukes-news.root}/lib"/>
-<path id="jboss.nukes-news.classpath">
-  <pathelement path="${jboss.nukes-news.lib}/nukes-news-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss quotes -->
-<property name="jboss.nukes-quotes.root" value="${project.root}/quotes/output"/>
-<property name="jboss.nukes-quotes.lib" value="${jboss.nukes-quotes.root}/lib"/>
-<path id="jboss.nukes-quotes.classpath">
-  <pathelement path="${jboss.nukes-quotes.lib}/nukes-quotes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss list -->
-<property name="jboss.nukes-list.root" value="${project.root}/list/output"/>
-<property name="jboss.nukes-list.lib" value="${jboss.nukes-list.root}/lib"/>
-<path id="jboss.nukes-list.classpath">
-  <pathelement path="${jboss.nukes-list.lib}/nukes-list-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss script -->
-<property name="jboss.nukes-script.root" value="${project.root}/script/output"/>
-<property name="jboss.nukes-script.lib" value="${jboss.nukes-script.root}/lib"/>
-<path id="jboss.nukes-script.classpath">
-  <pathelement path="${jboss.nukes-script.lib}/nukes-script-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss sections -->
-<property name="jboss.nukes-sections.root" value="${project.root}/sections/output"/>
-<property name="jboss.nukes-sections.lib" value="${jboss.nukes-sections.root}/lib"/>
-<path id="jboss.nukes-sections.classpath">
-  <pathelement path="${jboss.nukes-sections.lib}/nukes-sections-lib.jar"/>
-</path>
-
-
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/modules.ent (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/modules.ent)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/targets.ent
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,116 +0,0 @@
-<!-- $Id: targets.ent,v 1.5 2004/11/24 02:07:36 starksm Exp $ -->
-<!--
-   $Log: targets.ent,v $
-   Revision 1.5  2004/11/24 02:07:36  starksm
-   Restore the tools module content after the errant removal
-
-   Revision 1.3  2004/03/29 19:49:17  ejort
-   Bring build into line with jboss-3.2
-
-   Revision 1.1.2.2  2003/12/07 22:12:53  ejort
-   Make a start on simplifying the build,
-   including incremental xdoclet MBean generation
-
-   Revision 1.1.2.1  2003/05/18 06:24:13  starksm
-   
-   Standard targets
--->
-
-  <!-- ================================================================== -->
-  <!-- Initialization                                                     -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Initialize the build system.  Must depend on '_buildmagic:init'.  
-     | Other targets should depend on 'init' or things will mysteriously fail.
-   -->
-
-  <target name="init" unless="init.disable" depends="_buildmagic:init">
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="jars" 
-	  description="Builds all jar files."
-     depends="_buildmagic:build-bypass-check"
-	  unless="build-bypass.on">
-
-    <call target="compile"/>
-
-    <mkdir dir="${build.lib}"/>
-
-    <call target="module-jars"/>
-
-    <!-- Update the build marker to allow bypassing -->
-    <touch file="${build-bypass.marker}"/>
-
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Install & Release                                                  -->
-  <!-- ================================================================== -->
-
-  <target name="install" 
-	  description="Install the structure for a release."
-	  depends="all, _buildmagic:install:default"/>
-
-  <target name="release" depends="install"/>
-
-  <target name="release-zip" 
-	  description="Builds a ZIP distribution."
-	  depends="release, _buildmagic:release:zip"/>
-
-  <target name="release-tar" 
-	  description="Builds a TAR distribution."
-	  depends="release, _buildmagic:release:tar"/>
-
-  <target name="release-tgz" 
-	  description="Builds a TAR-GZ distribution."
-	  depends="release, _buildmagic:release:tgz"/>
-
-  <target name="release-all"
-	  description="Builds a distribution for each archive type."
-	  depends="release-zip, release-tgz"/>
-
-
-  <!-- ================================================================== -->
-  <!-- Cleaning                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- Clean up all build output -->
-  <target name="clean" 
-	  description="Cleans up most generated files."
-	  depends="_buildmagic:clean">
-  </target>
-
-  <!-- Clean up all generated files -->
-  <target name="clobber" 
-	  description="Cleans up all generated files."
-	  depends="_buildmagic:clobber, clean">
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Misc.                                                              -->
-  <!-- ================================================================== -->
-
-  <target name="main"
-	  description="Executes the default target (most)."
-	  depends="most"/>
-    
-  <target name="all"
-	  description="Builds everything."
-	  depends="jars, docs"/>
-
-  <target name="most" 
-	  description="Builds almost everything."
-	  depends="jars"/>
-
-  <target name="help" 
-          description="Show this help message."
-	  depends="_buildmagic:help:standard"/>

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/targets.ent (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/targets.ent)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/task.properties
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,91 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Default Task Properties                                                 ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: task.properties,v 1.8 2005/10/05 18:45:32 rloehr Exp $ ###
-
-### Javac Defaults ###
-
-javac.includes=**/*.java
-javac.excludes=
-javac.defaultexcludes=yes
-
-javac.boot.classpath=${sun.boot.classpath}
-javac.classpath=${classpath}
-
-javac.debug=off
-javac.optimize=on
-javac.deprecation=on
-javac.target=1.4
-javac.verbose=off
-javac.depend=off
-javac.source=1.4
-
-javac.include.ant.runtime=no
-javac.include.java.runtime=no
-javac.fail.onerror=true
-
-classpath=
-classpath.local=
-classpath.thirdparty=
-
-### Javadoc Defaults ###
-
-javadoc.classpath=${javac.classpath}
-javadoc.sourcepath=
-javadoc.source.path=
-javadoc.source.files=
-
-javadoc.public=false
-javadoc.package=false
-javadoc.protected=true
-javadoc.private=false
-javadoc.version=true
-javadoc.author=true
-javadoc.use=true
-javadoc.verbose=false
-
-javadoc.windowtitle=${module.Name} API
-javadoc.doctitle=${module.Name}
-javadoc.splitindex=no
-
-### MBean Defaults ###
-mbean.includes=
-mbean.excludes=
-
-### Jar Defaults ###
-jar.server.includes=
-jar.client.includes=
-
-### RMIC Defaults ###
-
-rmic.base=${build.classes}
-rmic.stubVersion=${javac.target}
-rmic.verify=true
-rmic.sourcebase=
-rmic.debug=false
-rmic.iiop=false
-rmic.iiopopts=
-rmic.idl=false
-rmic.idlopts=
-rmic.includes=
-rmic.excludes=
-
-### JUnit Defaults ###
-
-junit.printsummary=true
-junit.haltonerror=false
-junit.haltonfailure=false
-junit.fork=true
-junit.timeout=300000
-junit.jvm=java
-junit.jvm.options=-Dnone
-
-junit.formatter.type=xml
-junit.formatter.usefile=true
-
-junit.batchtest.fork=${junit.fork}
-junit.batchtest.haltonerror=${junit.haltonerror}
-junit.batchtest.haltonfailure=${junit.haltonfailure}

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/task.properties (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/task.properties)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/version-info.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,56 +0,0 @@
-<!-- $Id: version-info.xml,v 1.8 2006/02/23 15:07:21 dimitris Exp $ -->
-
-<project name="Common Build Defs">
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-    <!-- Version identifiers for the server. -->
-    <property name="version.major" value="5"/>
-    <property name="version.minor" value="0"/>
-    <property name="version.revision" value="0"/>
-    <property name="version.tag" value="Alpha"/>
-    <property name="version.name" value="Morpheus"/>
-    <!-- This must be set to the CVS tag for any release -->
-    <property name="version.cvstag" value="HEAD"/>
-
-    <!-- Manifest version info -->
-    <property name="specification.title" value="JBoss"/>
-    <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-    <property name="implementation.title" value="JBoss [${version.name}]"/>
-    <property name="implementation.url" value="http://www.jboss.org/"/>
-    <property name="implementation.version" 
-         value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-    <property name="implementation.vendor" value="JBoss Inc."/>
-    <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-    <target name="print-version-info">
-      <echo>
-    version.major=${version.major}
-    version.minor=${version.minor}
-    version.revision=${version.revision}
-    version.tag=${version.tag}
-    version.name=${version.name}
-    version.cvstag=${version.cvstag}
-    specification.title=${specification.title}
-    specification.version=${specification.version}
-    specification.vendor=${specification.vendor}
-    implementation.title=${implementation.title}
-    implementation.url=${implementation.url}
-    implementation.version=${implementation.version} 
-    implementation.vendor=${implementation.vendor}
-    implementation.vendor.id=${implementation.vendor.id}
-      </echo>
-    </target>
-</project>
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/buildmagic/version-info.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/buildmagic/version-info.xml)

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/jbossbuild)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/jbossbuild.properties
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-
-# The location of the thirdparty (prebuilt artifacts) directory relative to the project root
-jbossbuild.thirdparty.dir=thirdparty
-
-# The name of the component info file
-jbossbuild.component.info=component-info.xml
-
-# The targetdefs to use
-jbossbuild.targetdefs.refid=targets
-
-external.project=true;
\ No newline at end of file

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/jbossbuild.properties (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/jbossbuild/jbossbuild.properties)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/release.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,152 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-
-<!-- ================================================================== -->
-<!-- JBoss AOP release build definition                                 -->
-<!-- ================================================================== -->
-
-<project name="main.build"
-         default="build" 
-         basedir="."
->
-   <!-- Import the types -->
-   <import file="../tools/etc/jbossbuild/tasks.xml"/>
-
-   <!-- =============================================================== -->
-   <!-- The Main project definition                                     -->
-   <!-- =============================================================== -->
-
-   <build id="jboss-aop"
-          impltitle="JBoss AOP"
-          implversion="1.0.0-FINAL"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.com/products/aop"
-          description="JBoss Aspect Oriented Programming Framewoork"
-          cvsroot="cvs.sourceforge.net:/cvsroot/jboss"
-          thirdpartypath="../thirdparty/"
-          location="http://cruisecontrol.jboss.com/repository/"
-          targetdefs="targets">
-
-      <!-- ============================================================ -->
-      <!-- Common utilities                                             -->
-      <!-- ============================================================ -->
-
-      <component id="common"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-common.jar" release="lib"/>
-         <artifact id="jboss-common-client.jar"/>
-         <artifact id="namespace.jar"/>
-      </component>
-
-      <includes id="common-project">
-         <include input="jboss-common.jar"/>
-         <include input="namespace.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Container                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="container"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-container.jar"/>
-      </component>
-
-      <includes id="container-project">
-         <include input="jboss-container.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- AOP                                                          -->
-      <!-- ============================================================ -->
-
-      <component id="aop"
-                 module="jboss-aop"
-                 version="1.0.0-FINAL"
-      >
-         <artifact id="jboss-aop.jar" release="lib"/>
-      </component>
-
-      <includes id="aop-project">
-         <include input="jboss-aop.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- QDox                                                         -->
-      <!-- ============================================================ -->
-
-      <component id="qdox"
-                 version="1.4">
-         <artifact id="qdox.jar" release="lib"/>
-      </component>
-
-      <includes id="qdox-lib">
-         <include input="qdox.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Javassist                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="javassist"
-                 version="3.0beta">
-         <artifact id="javassist.jar" release="lib"/>
-      </component>
-
-      <includes id="javassist-lib">
-         <include input="javassist.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Trove                                                        -->
-      <!-- ============================================================ -->
-      
-      <component id="trove"
-                 version="2.1.1">
-         <artifact id="trove.jar" release="lib"/>
-      </component>
-
-      <includes id="trove-lib">
-         <include input="trove.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Oswego Concurrent Library                                    -->
-      <!-- ============================================================ -->
-
-      <component id="oswego-concurrent"
-                 version="1.0">
-         <artifact id="concurrent.jar" release="lib"/>
-      </component>
-
-      <includes id="concurrent">
-         <include input="concurrent.jar"/>
-      </includes>
-
-
-      <!-- ============================================================ -->
-      <!-- JUnit                                                        -->
-      <!-- ============================================================ -->
-
-      <component id="junit-junit"
-                 version="3.8.1">
-         <artifact id="junit.jar" release="lib"/>
-      </component>
-
-      <includes id="junit">
-         <include input="junit.jar"/>
-      </includes>
-   </build>
-
-   <!-- Generate the targets -->
-   <generate generate="jboss-aop"/>
-   
-</project>

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/release.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/jbossbuild/release.xml)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/tasks.xml
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1023 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-<project name="jboss.ant.tasks"
-         default="help-fragment"
->
-<!-- ================================================================== -->
-<!-- Properties                                                         -->
-<!-- ================================================================== -->
-
-   <!-- because this file may be imported from various locations
-     locations must be referenced in an absolute fashion   -->
-   <dirname property="imported.basedir" file="${ant.file.jboss.ant.tasks}"/>
-
-
-   <property file="${imported.basedir}/jbossbuild.properties"/>
-
-   <property name="jboss.tasks.path" 
-      value="${imported.basedir}/../../../tools/lib/jbossbuild.jar"   />
-
-   <!-- items required for javcc task --> 
-   <property name="sun.javacc.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/sun-javacc/lib/"/>
-             
-   <property name="jacorb.root"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/jacorb"/> 
-
-   <property name="apache.logkit.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/apache-avalon-logkit/lib"/>              
-
-      
-    <path id="jacorb.idl.classpath">
-       <pathelement path="${jacorb.root}/lib/idl.jar"/>
-       <pathelement path="${apache.logkit.lib}/logkit.jar"/>
-    </path>
-
-
-<!-- ================================================================== -->
-<!-- Type Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- The generate type -->
-   <typedef name="generate"
-            classname="org.jboss.ant.types.Generate" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build type -->
-   <typedef name="build"
-            classname="org.jboss.ant.types.build.Build" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The artifact type definition type -->
-   <typedef name="artifacttype"
-            classname="org.jboss.ant.types.build.ArtifactType" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component definition type -->
-   <typedef name="componentdef"
-            classname="org.jboss.ant.types.component.ComponentDefinition" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component type -->
-   <typedef name="component"
-            classname="org.jboss.ant.types.build.Component" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The includes type -->
-   <typedef name="includes"
-            classname="org.jboss.ant.types.Includes" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build targets type -->
-   <typedef name="targets"
-            classname="org.jboss.ant.types.target.TargetDefinitions" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-<!-- ================================================================== -->
-<!-- Task Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- Update ide info for the main build -->
-   <taskdef name="idemain"
-            classname="org.jboss.ant.tasks.build.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- Update ide info for the component -->
-   <taskdef name="idecomponent"
-            classname="org.jboss.ant.tasks.component.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- Generate a componentref graph and resolve the dependencies -->
-   <taskdef name="synchronizeinfo"
-            classname="org.jboss.ant.tasks.build.SynchronizeComponentsTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- A task which allows a visitor to visit the graph -->
-   <taskdef name="visit-componentref-graph"
-            classname="org.jboss.ant.tasks.build.VisitComponentRefGraphTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />   
-   
-   <!-- Generate libraries.ent with version number in paths -->
-   <taskdef name="gen-lib-file"
-            classname="org.jboss.ant.tasks.build.GenerateLibrariesFile"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-     
-   <!-- RMIC compilation logic -->
-   <taskdef name="rmic-helper"
-            classname="org.jboss.ant.tasks.build.RMICHelper"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />     
-
-   <!-- Executes a given target without reparsing the project file -->
-   <taskdef name="execute-target"
-            classname="org.jboss.ant.tasks.build.TargetExecutor"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-  
-   <!-- Copy with support for zipfile sets -->
-   <taskdef name="copy-zfs"
-            classname="org.jboss.ant.tasks.build.CopyWithZipFileSetSupport"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-   
-   <!-- File release task -->
-   <taskdef name="copy-release"
-            classname="org.jboss.ant.tasks.build.CopyRelease"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-   
-  
-   
-
-   
-
-<!-- ================================================================== -->
-<!-- Artifact Definitions                                               -->
-<!-- ================================================================== -->
-
-   <artifacttype type="jar" outputtype="lib"/>
-   <artifacttype type="zip" outputtype="lib"/>
-   <artifacttype type="sar" outputtype="lib"/>
-   <artifacttype type="rar" outputtype="lib"/>
-   <artifacttype type="war" outputtype="lib"/>
-   <artifacttype type="deployer" outputtype="lib"/>   
-   <artifacttype type="api" outputtype="api"/>
-   <artifacttype type="xml" outputtype="resource"/>
-   <artifacttype type="policy" outputtype="resource"/>
-   <artifacttype type="properties" outputtype="resource"/>
-   <artifacttype type="sh" outputtype="bin"/>
-   <artifacttype type="bat" outputtype="bin"/>
-   <artifacttype type="conf" outputtype="bin"/>
-   <artifacttype type="dtd" outputtype="dtd"/>
-   <artifacttype type="xsd" outputtype="schema"/>
-   <artifacttype type="aop" outputtype="resource"/>
-   <artifacttype type="idl" outputtype="resource"/>   
-   <artifacttype type="md5" outputtype="bin"/>      
-   <artifacttype type="dir" outputtype="lib"/>
-   <artifacttype type="ddl" outputtype="resource"/>
-   
-<!-- ================================================================== -->
-<!-- Target Definitions                                                 -->
-<!-- ================================================================== -->
-
-   <targets id="targets">
-
-      <!-- ============================================================ -->
-      <!-- Build All                                                    -->
-      <!-- Builds everything (build, docs, tests and release archives)  -->
-      <!-- ============================================================ -->
-
-      <targetdef target="all" description="Build All">
-         <main depends="build, doc, test, archives" components="none"/>
-         <component depends="build, doc, test"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!--  Init                                                        -->
-      <!--  Basic initilization tasks and property setup                -->
-      <!-- ============================================================ -->      
-      <targetdef target="build.init" description="initilization tasks and property setup">
-
-         <!-- for each componentdef in jbossbuild file, setup properties 
-              in case a use wishes to access them    
-         -->
-         <component>
-            <property name="build.module" value="@{parentDir}"/>
-            <property name="build.module.src" value="${build.module}/src"/>
-            <property name="build.module.resources" value="${build.module}/src/resources"/>
-            <property name="build.module.etc" value="${build.module}/src/etc"/>
-            <property name="build.module.output" value="@{output}"/>
-            <property name="build.module.output.gen-src" value="${build.module.output}/gen-src"/>            
-            <property name="build.module.dir" value="@{output}"/>
-            <property name="build.module.output.resources" value="${build.module.output}/resources"/>                        
-            <property name="build.module.output.lib" value="${build.module.output}/lib"/>                                    
-            <property name="build.module.output.classes" value="${build.module.output}/classes"/> 
-         </component>
-      </targetdef>      
-
-      <!-- ============================================================ -->
-      <!-- Build                                                        -->
-      <!-- Builds the artifacts and compiles all source                 -->
-      <!-- ============================================================ -->
-
-      <targetdef target="build" description="Build" >
-
-         <!-- Build the main release
-              Creates the main release directory and copies artifacts
-              to the specified location
-         -->
-         <main>
-            <mkdir dir="@{releaseDir}"/>
-            <antCall target="release"/>
-         </main>
-
-
-         <!-- 
-         Build the component
-              Just makes the output folder
-         -->         
-         <component depends="build.init, build.etc">
-            <mkdir dir="@{output}/etc"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-            </copy>
-         </component>
-
-         <!-- Build resources if the component has a 
-              resource node -->
-         <resource depends="build.resources"/>
-         
-         <!-- JTREE-JAVACC source generation  -->
-         <generatedsource when="@{jtree-javacc}">
-
-            <dirname file="/@{jtree-javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-            <jjtree
-               target="src/@{srcdir}/@{jtree-javacc}"
-               outputdirectory="${@{id}.output.path}"
-               javacchome="${sun.javacc.lib}"/>
-
-            <basename file="@{jtree-javacc}" 
-               property="@{id}.basename"
-               suffix="jjt"/>
-
-            <javacc
-               target="${@{id}.output.path}/${@{id}.basename}.jj"
-               javacchome="${sun.javacc.lib}"/>
-
-         </generatedsource>
-
-         <!-- JAVACC source generation -->
-         <generatedsource when="@{javacc}">
-
-            <dirname file="/@{javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <javacc
-               target="src/@{srcdir}/@{javacc}"
-               javacchome="${sun.javacc.lib}"
-               static="@{static}"
-               outputdirectory="${@{id}.output.path}"/>
-
-         </generatedsource>
-
-         <!-- IDL compilation -->         
-         <generatedsource when="@{idl}">
-
-            <!-- Task to compile idl files required by jacorb -->
-            <taskdef name="jacidl"
-               classname="org.jacorb.idl.JacIDL"
-               classpathref="jacorb.idl.classpath"
-            />             
-            
-            <property name="@{id}.output.path" value="@{output}/@{id}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <jacidl
-               srcdir ="src/@{idl}"
-               destdir="${@{id}.output.path}"
-               includes="*.idl"
-               includepath="${jacorb.root}/resources/"
-             />
-         
-         </generatedsource> 
-         
- 
-         <!-- Compile the source
-              Runs depend on the source output then compiles the source
-         -->
-         <source if="@{compileable}">
-             
-            <mkdir dir="@{output}"/>
-            <depend srcdir="@{sourcePath}"
-                    destdir="@{output}"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-            </depend>
-            <javac srcdir="@{sourcePath}" 
-                   destdir="@{output}"
-                   debug="true"
-                   deprecation="true"
-                   excludes="@{excludes}"
-                   target="@{jvmTarget}"
-                   source="@{jvmSource}"
-                   fork="true"
-                   memoryMaximumSize="512M"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               <src path="@{sourcePath}"/>
-               <!-- allow multiple sources to be compiled at once to handle circular references -->
-               <srcelements/>
-            </javac>
-
-           <copy toDir="@{output}">
-               <fileset dir="@{sourcePath}">
-                <include name="**/*.properties"/>
-              </fileset>
-           </copy>
-         </source>
-         
-        <source when="@{stubversion}">
-	    <property name="jb.stubversion" value="@{stubversion}"/>
-        </source>         
-         
-
-         <!-- Remote method call compilation.   -->
-         <source when="@{rmic}">
-            <rmic-helper
-                  base="@{output}"
-                  includes="@{rmic}"
-                  verify="true"
-                  debug="false"
-                  iiop="@{iiop}"
-                  idl="false"
-                  external="@{external}"
-                  stubversion="${jb.stubversion}"
-                  
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               </rmic-helper>
-         </source>
-
-         <!-- Create a jar archive
-              Jars the inputs of the jar artifact
-         -->
-         <jar null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </jar>
-
-         <!-- Create an aop archive
-              Jars the inputs of the aop artifact
-         -->
-         <aop  if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-                <filesets/>
-            </jar>
-         </aop>         
-
-         <jar when="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}"
-                 manifest="@{component.output}/etc/manifest/@{manifest}">
-               <filesets/>
-            </jar>
-         </jar>
-         
-         
-
-         <!-- Create a sar archive
-              Jars the inputs of the sar artifact
-         -->
-         <sar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </sar>
-
-
-         <!-- Create a rar archive
-              Jars the inputs of the rar artifact
-         -->
-         <rar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </rar>
-
-         <!-- Create a war archive
-              Jars the inputs of the war artifact
-         -->
-         <war null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </war>
-         
-         <!-- Create a deployer archive
-              Jars the inputs of the war artifact
-         -->
-         <deployer null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by" value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title" value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version" value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor" value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title" value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL" value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version" value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor" value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path" value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </deployer>       
-         
-         <!-- Create a md5 checksumarchive  -->
-         <md5 null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <checksum>
-              <filesets/>
-            </checksum>
-         </md5>         
-         
-         <!-- create a directory and copy into it all of the filesets or zipfilesets -->
-         <dir if="@{buildable}">
-            <mkdir dir="@{output}"/>
-            <copy-zfs todir="@{output}">
-               <filesets/>
-            </copy-zfs>
-         </dir>
-         
-         
-         <!-- this is a hack.  jbbuild will not allow artifacts with same id
-            varia requires a dir to be created called kernel, but cannot be created
-            because kernel already exists as a component.  Only option is to create the dir
-            and rename it to kernel -->
-         <dir if="@{buildable}" when="@{rename}">
-            <mkdir dir="@{parentDir}/@{rename}"/>
-            <copy-zfs todir="@{parentDir}/@{rename}">
-               <filesets/>
-            </copy-zfs>
-         </dir>     
-      
-         <!-- copying of artifacts to new name -->         
-         <artifactdef when="@{toname}">
-            <mkdir dir="@{parentDir}"/>
-            <copy toFile="@{parentDir}/@{toname}">
-               <filesets/>
-            </copy>
-         </artifactdef>
-         
-         <sh depends="build.bin"/>
-         <bat depends="build.bin"/>
-      </targetdef>
-
-      <!-- Copy the etc -->
-      <targetdef target="build.etc">
-
-         <component>
-              
-            <mkdir dir="@{output}/etc"/>
-            <mkdir dir="@{component.dir}/src/etc/"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-               <filterset>
-                  <filter token="java.vm.version"           value="@{component.VMVersion}"/>
-                  <filter token="java.vm.vendor"            value="@{component.VMVendor}"/>
-                  <filter token="specification.title"       value="@{component.specTitle}"/>
-                  <filter token="specification.version"     value="@{component.specVersion}"/>
-                  <filter token="specification.vendor"      value="@{component.specVendor}"/>
-                  <filter token="implementation.title"      value="@{component.implTitle}"/>
-                  <filter token="implementation.url"        value="@{component.implURL}"/>
-                  <filter token="implementation.version"    value="@{component.implVersion}"/>
-                  <filter token="implementation.vendor"     value="@{component.implVendor}"/>
-                  <filter token="implementation.vendor.id"  value="@{component.implURL}"/>
-               </filterset>
-            </copy>
-         </component>
-
-      </targetdef>
-
-      <targetdef target="build.resources">
-     
-         <component>
-            <mkdir dir="@{output}/resources"/>
-            <copy todir="@{output}" filtering="yes">
-               <fileset dir="@{component.dir}/src" includes="resources/**"/>
-            </copy>
-         </component>
-      </targetdef>
-      
-
-
-      <targetdef target="build.bin">
-         <component>
-            <mkdir dir="@{output}/bin"/>
-            <copy todir="@{output}/bin" filtering="yes">
-              <fileset dir="@{component.dir}/src/bin">
-                <include name="**/*"/>
-              </fileset>
-            </copy>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="lf" eof="remove"
-              includes="**/*.sh"/>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="crlf" eof="remove"
-              includes="**/*.bat, **/*.cmd"/>
-
-            <chmod perm="+x">
-              <fileset dir="@{output}/bin">
-                <include name="**/*.sh"/>
-              </fileset>
-            </chmod>
-
-         </component>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Release                                                      -->
-      <!-- Create the release by copying all artifacts that have a      -->
-      <!-- release tag to that specified location.                      -->
-      <!-- ============================================================ -->
-
-      <targetdef target="release">
-      
-
-          <!-- Copy the artifact into the release -->
-         <artifact when="@{tofile}">
-             <copy-release release="@{release}" tofile="@{tofile}" requiredJDK="@{requiredJDK}"
-             exploded="@{exploded}" overwrite="@{overwrite}">
-                <output/>
-             </copy-release>
-         </artifact>
-         
-       <artifact null="@{tofile}" when="@{release}" >
-            <copy-release release="@{release}"
-              exploded="@{exploded}"
-              requiredJDK="@{requiredJDK}"
-              overwrite="@{overwrite}"
-              >
-               <output/>
-            </copy-release>
-         </artifact>         
-
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Publish                                                      -->
-      <!-- Copy an artifact to the location specified by                -->
-      <!-- ${jbossbuild.repository.root}                                -->
-      <!-- Used by the continous build to publish to the repository.    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="publish" if="@{local}">
-
-         <!-- copy the component-info.xml into the repository -->
-         <componentmain if="@{local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy failonerror="false" file="@{dir}/${jbossbuild.component.info}"
-                  todir="${repository.root}/@{relativePath}"
-            />
-
-         </componentmain>
-
-         <!-- Copy the artifact into the release -->
-         <artifact if="@{component.local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy todir="${repository.root}/@{relativePath}">
-               <output/>
-            </copy>
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Archives                                                     -->
-      <!-- Builds the release archive(s)                                -->
-      <!-- ============================================================ -->
-
-      <!-- Build the release archives -->
-      <targetdef target="archives" description="Build the release archives">
-
-         <!-- Make the archives -->
-         <main>
-         
-            <!-- Create the zip file -->
-            <zip destfile="@{output}/@{releaseName}.zip"
-                 basedir="@{releaseDir}"
-            />
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Doc                                                          -->
-      <!-- Creates the documentation.                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="doc" description="Documentation">
-
-         <!-- Generate the documentation -->
-         <component depends="api"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- API                                                          -->
-      <!-- Creates the javadoc                                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="api" description="Javadoc">
-
-         <!-- Generate the javadoc -->
-         <component/>
-         <api>
-            <mkdir dir="@{output}"/>
-            <javadoc packagenames="*"
-                     destdir="@{output}"
-            >
-               <doctitle>
-                  <![CDATA[<h1>@{description} API Documentation</h1>]]>
-               </doctitle>
-               <bottom>
-                  <![CDATA[
-                     <i>
-                        <div align="center">
-                           <font size="-1">
-                              Copyright &#169; 2005 JBoss Inc. All Rights Reservered.
-                           </font>
-                        </div>
-                     </i>
-                  ]]>
-               </bottom>
-               <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
-               <sourcepath>
-                  <sourcepaths/>
-               </sourcepath>
-               <classpath>
-                  <sourcepathelements/>
-               </classpath>
-            </javadoc>
-         </api>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clean                                                        -->
-      <!-- Deletes the output folder                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clean" description="Clean">
-         <common>
-            <delete dir="@{output}" failonerror="false"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clobber                                                      -->
-      <!-- Deletes the output folder and removes thirdparty             -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clobber" description="Clobber">
-         <main depends="clean">
-            <delete dir="@{thirdparty}"/>
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize                                                  -->
-      <!-- Resynchronizes the project with cvs                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="synchronize" description="Synchronize">
-
-         <!-- Update the main build folder and tools from cvs
-              then do the same for the components before running
-              the after synchronization processing
-              NOTE: Does not automatically invoke component builds
-              as the list of components maybe out-of-date at this point
-              and we need to conditionally do cvs co/update
-         -->
-         <main components="none">
-            <!-- cvs command="update -dP" failonerror="true"/-->
-            <!--invoke target="synchronize" dir="../tools"/-->
-            <execute-target target="synchronize.components" />
-            <!-- execant target="synchronize.after.main"/-->
-         </main>
-
-         <componentmain unless="@{local}">
-            <mkdir dir="thirdparty"/>
-            <get src="@{location}/${jbossbuild.component.info}"
-                 dest="@{thirdpartyDir}/${jbossbuild.component.info}"
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </componentmain>
-
-         <!-- If the component exists we just do a cvs update -->
-         <componentmain if="@{exists}">
-           <cvs dest="@{dir}" command="update"/>
-            <!-- NOTE: unable to delegate to component until JBBUILD-62 is resolved -->
-            <!--invoke target="synchronize" dir="@{dir}"/--> 
-            <!--execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- If the component doesn't exist and we want to
-              get the source build check it out from cvs
-         -->
-         <componentmain unless="@{exists}" if="@{local}">
-            <cvs dest="@{dir.parent}">
-               <commandline>
-                  <argument value="-d"/>
-                  <argument value="@{build.cvsroot}"/>
-                  <argument value="co"/>
-                  <argument value="-d"/>
-                  <argument value="@{id}"/>
-                  <argument value="@{module}"/>
-               </commandline>
-            </cvs>
-            <!-- execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- The component already exists do a cvs update
-              and run the after synchronization
-         -->
-         <component nomain="true">
-            <cvs command="update -dP" failonerror="true"/>
-            <!--execant target="synchronize.after"/-->
-         </component>
-
-         <!-- If we are not doing a source checkout of this
-              component, download the artifacts to thirdparty
-         -->
-         <artifact unless="@{component.local}">
-            <mkdir dir="@{parentDir}"/>
-            <get src="@{location}" 
-                 dest="@{output}" 
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Commit                                                       -->
-      <!-- Commits the changes to cvs                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="commit" description="Commit">
-         <!-- Commit the main build and tools -->
-         <main>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-            <invoke target="commit" dir="../tools"/>
-         </main>
-         <!-- Commit the component -->
-         <component>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-         </component>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Test                                                         -->
-      <!-- Builds and runs the tests                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="test" description="Build and run the tests">
-         <component depends="build, runtest"/>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RunTest                                                      -->
-      <!-- Runs the tests for sources marked with a test attribute      -->
-      <!-- ============================================================ -->
-      
-      <!-- Run the Test -->
-      <targetdef target="runtest" description="Run tests">
-         <component/>
-         <source when="@{test}">
-            <mkdir dir="@{testDir}"/>
-            <delete file="@{testDir}/test.log"/>
-            <junit fork="true"
-                   printSummary="true">
-               <sysproperty key="org.jboss.test.logfile" value="@{testDir}/test.log"/>
-               <formatter type="plain"/>
-               <classpath>
-                  <pathElements/>
-               </classpath>
-               <batchtest todir="@{testDir}">
-                  <fileset dir="@{sourceDir}" includes="@{test}"/>
-               </batchtest>
-            </junit>
-         </source>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Rebuild                                                      -->
-      <!-- Synchronizes then builds                                     -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild -->
-      <targetdef target="rebuild" description="Synchronize then build">
-         <common depends="synchronize">
-            <execant target="build"/>
-         </common>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RebuildAll                                                   -->
-      <!-- Synchronizes then builds all                                 -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild all -->
-      <targetdef target="rebuildall" description="Synchronize then build all">
-         <common depends="synchronize">
-            <execant target="all"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize.After                                            -->
-      <!-- After synchronization processing                             -->
-      <!-- ============================================================ -->
-
-      <!-- After synchronization processing -->
-      <targetdef target="synchronize.after" description="After synchronization processing">
-              <main>
-                 <idemain/>
-              </main>
-              <component>
-                 <idecomponent/>
-              </component>
-      </targetdef>
-      
-
-      
- </targets>   
-
-<!-- ================================================================== -->
-<!-- Macro Definitions                                                  -->
-<!-- ================================================================== -->
-
-   <condition property="execant-executable" value="cmd.exe">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-executable" value="ant"/>
-   <condition property="execant-prefix" value="/c ant">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-prefix" value=""/>
-   <!-- Set the execant.args to empty unless it already exists -->
-   <condition property="execant.args" value="">
-      <not><isset property="execant.args"/></not>
-   </condition>
-
-   <!-- The execant macro -->
-   <macrodef name="execant">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <attribute name="filename"
-                 default="jbossbuild.xml"
-                 description="The ant file to execute"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <exec dir="@{dir}" 
-               executable="${execant-executable}"
-         >
-            <arg line="${execant-prefix} ${execant.args} -f @{filename} @{target}"/>
-         </exec>
-      </sequential>
-   </macrodef>
-
-   <!-- The invoke macro -->
-   <macrodef name="invoke">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <ant antfile="jbossbuild.xml" dir="@{dir}" target="@{target}"/>
-      </sequential>
-   </macrodef>
-
-<!-- ================================================================== -->
-<!-- Targets                                                            -->
-<!-- ================================================================== -->
-
-   <target name="help-fragment">
-      <fail message="Do not execute this build fragment directly!"/>
-   </target>
-   
-</project>
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/etc/jbossbuild/tasks.xml (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/etc/jbossbuild/tasks.xml)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/README
===================================================================
--- branches/logging_refactoring/common-core/trunk/tools/lib/README	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-core/trunk/tools/lib/README	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,14 +0,0 @@
-Please refer to the Ant manual under Installing Ant / Library
-Dependencies for a list of the jar requirements for various optional
-tasks and features.
-
-This directory contains xercesImpl.jar from the 2.6.1 release of
-Apache Xerces.  For more information or newer releases see
-<http://xml.apache.org/xerces2-j/>.  See the file LICENSE.xerces for
-the terms of distribution.
-
-It also contains xml-apis.jar from the 2.6.1 release of Apache Xerces.
-For more information or newer releases see
-<http://xml.apache.org/commons/>.  See the files LICENSE.dom and
-LICENSE.sax for the terms of distribution.
-

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/README (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/README)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-javamail.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-javamail.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/ant-javamail.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-junit.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/ant-junit.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-launcher.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-launcher.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/ant-launcher.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-nodeps.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-nodeps.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/ant-nodeps.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-trax.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-trax.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/ant-trax.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-xslp.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/ant-xslp.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/ant-xslp.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/ant.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/ant.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/ant.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/bsf.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/bsf.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/bsf.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/buildmagic-tasks.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/buildmagic-tasks.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/buildmagic-tasks.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/jbossbuild.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/jbossbuild.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/jbossbuild.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/jdtCompilerAdapter.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/jdtCompilerAdapter.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/jdtCompilerAdapter.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/junit.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/junit.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/pretty.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/pretty.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/pretty.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/resolver.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/resolver.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/resolver.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/xalan.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/xalan.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/xalan.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/xercesImpl.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/xercesImpl.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/xercesImpl.jar)

Deleted: branches/refactor-test-branch/common-core/trunk/tools/lib/xml-apis.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-core/trunk/tools/lib/xml-apis.jar (from rev 1956, branches/logging_refactoring/common-core/trunk/tools/lib/xml-apis.jar)

Copied: branches/refactor-test-branch/common-logging-jdk (from rev 1956, branches/logging_refactoring/common-logging-jdk)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/build-compile.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/build-compile.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/build-compile.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">   
-]>
-
-<project default="main" name="JBoss/Build">
-
-  &buildmagic;
-  &libraries;
-  &targets;
-   <!-- The combined library classpath -->
-      <path id="library.classpath">
-          <path refid="jboss/common.logging.spi.classpath"/>
-          <path refid="jboss/common.core.classpath"/>
-      </path>
-
-        <!-- The combined dependent module classpath -->
-        <path id="dependentmodule.classpath">
-    </path>
-  
-  <target name="compile-classes"
-    depends="_default:compile-classes"/>
-
-</project>

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/build-compile.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/build-compile.xml)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/build-thirdparty.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/build-thirdparty.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/build-thirdparty.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<!-- $Id: build-thirdparty.xml,v 1.113 2006/05/23 23:19:24 jgreene Exp $ -->
-<project name="main.build"
-          default="synchronize"
-          basedir=".">
-
-   <!-- Property File definitions -->
-   <property file="local.properties"/>
-   <property file="synchronize.properties"/>
-   <property environment="env"/>
-
-   <!-- Property Definitions -->
-   <property name="generatedLibrariesFiles" value="thirdparty/libraries.ent"/>
-
-   <!-- Allow jbossbuild.repository to be set from (in order or priority)
-      + Command line -Djbossbuild.repository=...
-      + synchronize.properties jbossbuild.repository setting
-      + JBOSS_REPOSITORY environment variable
-   -->
-   <condition property="jbossbuild.repository" value="${env.JBOSS_REPOSITORY}">
-      <isset property="env.JBOSS_REPOSITORY"/>
-   </condition>
-   <!-- Fall back to default -->
-   <property name="jbossbuild.repository" value="http://repository.jboss.com"/>
-
-   <!-- File Imports -->
-   <import file="tools/etc/jbossbuild/tasks.xml"/>
-
-
-   <!-- Main Definition of dependencies -->
-   <build id="jbossas-thirdparty"
-          impltitle="JBossAS"
-          implversion="jboss-head"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.org"
-          description="JBoss Application Server"
-          cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
-          thirdpartypath="thirdparty/"
-          location="${jbossbuild.repository}"
-          targetdefs="targets">
-
-      <!--
-        The repository is in CVS under the module repository.jboss.com whose contents
-        are pushed to the http://repository.jboss.com site.
-      -->
-
-
-      <componentref name="jboss/common-logging-spi" version="1.0.1.TEST"/>
-      <componentref name="jboss/common-core" version="1.0.1.TEST"/>
-
-   </build>
-
-   <synchronizeinfo/>
-
-   <!-- Generate the targets -->
-   <generate generate="jbossas-thirdparty"/>
-
-
-   <target name="generate-lib-file"
-      description="generate libraries.ent and thirdparty license info"
-      depends="synchronize">
-         <gen-lib-file filename="${generatedLibrariesFiles}" path="tools/etc/buildmagic/" />
-      <visit-componentref-graph
-         componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor" />
-   </target>
-
-</project>

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/build-thirdparty.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/build-thirdparty.xml)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/build.bat
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/build.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/build.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,89 +0,0 @@
- at echo off
-REM  ======================================================================
-REM
-REM  This is the main entry point for the build system.
-REM
-REM  Users should be sure to execute this file rather than 'ant' to ensure
-REM  the correct version is being used with the correct configuration.
-REM
-REM  ======================================================================
-REM
-REM $Id$
-REM
-REM Authors:
-REM     Jason Dillon <jason at planet57.com>
-REM     Sacha Labourey <sacha.labourey at cogito-info.ch>
-REM
-
-REM ******************************************************
-REM Ignore the ANT_HOME variable: we want to use *our*
-REM ANT version and associated JARs.
-REM ******************************************************
-REM Ignore the users classpath, cause it might mess
-REM things up
-REM ******************************************************
-
-SETLOCAL
-
-set CLASSPATH=
-set ANT_HOME=
-set ANT_OPTS=-Djava.protocol.handler.pkgs=org.jboss.net.protocol -Dbuild.script=build.bat
-
-REM ******************************************************
-REM - "for" loops have been unrolled for compatibility
-REM   with some WIN32 systems.
-REM ******************************************************
-
-set NAMES=tools;tools\ant;tools\apache\ant
-set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
-
-REM ******************************************************
-REM ******************************************************
-
-SET EXECUTED=FALSE
-for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
-
-goto :EOF
-
-
-REM ******************************************************
-REM ********* Search for names in the subfolders *********
-REM ******************************************************
-
-:subLoop
-for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %2 %3 %4 %5 %6 %7
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************ Test if ANT Batch file exists ***********
-REM ******************************************************
-
-:testIfExists
-if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************** Batch file has been found *************
-REM ******************************************************
-
-:BatchFound
-if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
-set EXECUTED=TRUE
-
-goto :EOF
-
-REM ******************************************************
-REM ************* Execute Batch file only once ***********
-REM ******************************************************
-
-:ExecuteBatch
-echo Calling %1 %2 %3 %4 %5 %6 %7 %8
-call %1 %2 %3 %4 %5 %6 %7 %8
-
-:end
-
-if "%NOPAUSE%" == "" pause

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/build.bat (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/build.bat)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/build.sh
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/build.sh	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/build.sh	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,173 +0,0 @@
-#!/bin/sh
-### ====================================================================== ###
-##                                                                          ##
-##  This is the main entry point for the build system.                      ##
-##                                                                          ##
-##  Users should be sure to execute this file rather than 'ant' to ensure   ##
-##  the correct version is being used with the correct configuration.       ##
-##                                                                          ##
-### ====================================================================== ###
-#
-
-# $Id$
-
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-GREP="grep"
-ROOT="/"
-
-# Ignore user's ANT_HOME if it is set
-ANT_HOME=""
-
-# the default search path for ant
-ANT_SEARCH_PATH="\
-    tools
-    tools/ant \
-    tools/apache/ant \
-    ant"
-
-# the default build file name
-ANT_BUILD_FILE="build.xml"
-
-# the default arguments
-ANT_OPTIONS="-find $ANT_BUILD_FILE"
-
-# Use the maximum available, or set MAX_FD != -1 to use that
-MAX_FD="maximum"
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-darwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-
-    Darwin*)
-        darwin=true
-        ;;
-esac
-
-#
-# Helper to complain.
-#
-die() {
-    echo "${PROGNAME}: $*"
-    exit 1
-}
-
-#
-# Helper to complain.
-#
-warn() {
-    echo "${PROGNAME}: $*"
-}
-
-#
-# Helper to source a file if it exists.
-#
-maybe_source() {
-    for file in $*; do
-	if [ -f "$file" ]; then
-	    . $file
-	fi
-    done
-}
-
-search() {
-    search="$*"
-    for d in $search; do
-	ANT_HOME="`pwd`/$d"
-	ANT="$ANT_HOME/bin/ant"
-	if [ -x "$ANT" ]; then
-	    # found one
-	    echo $ANT_HOME
-	    break
-	fi
-    done
-}
-
-#
-# Main function.
-#
-main() {
-    # if there is a build config file. then source it
-    maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
-
-    # Increase the maximum file descriptors if we can
-    if [ $cygwin = "false" ]; then
-	MAX_FD_LIMIT=`ulimit -H -n`
-	if [ $? -eq 0 ]; then
-	    if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
-		# use the system max
-		MAX_FD="$MAX_FD_LIMIT"
-	    fi
-
-	    ulimit -n $MAX_FD
-	    if [ $? -ne 0 ]; then
-		warn "Could not set maximum file descriptor limit: $MAX_FD"
-	    fi
-	else
-	    warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-	fi
-    fi
-
-    # try the search path
-    ANT_HOME=`search $ANT_SEARCH_PATH`
-
-    # try looking up to root
-    if [ "x$ANT_HOME" = "x" ]; then
-	target="build"
-	_cwd=`pwd`
-
-	while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
-	    cd ..
-	    cwd=`pwd`
-	    ANT_HOME=`search $ANT_SEARCH_PATH`
-	done
-
-	# make sure we get back
-	cd $_cwd
-
-	if [ "$cwd" != "$ROOT" ]; then
-	    found="true"
-	fi
-
-	# complain if we did not find anything
-	if [ "$found" != "true" ]; then
-	    die "Could not locate Ant; check \$ANT or \$ANT_HOME."
-	fi
-    fi
-
-    # make sure we have one
-    ANT=$ANT_HOME/bin/ant
-    if [ ! -x "$ANT" ]; then
-	die "Ant file is not executable: $ANT"
-    fi
-
-    # need to specify planet57/buildmagic protocol handler package
-    ANT_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
-
-    # setup some build properties
-    ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"
-
-    # change to the directory where the script lives so users are not forced
-    # to be in the same directory as build.xml
-    cd $DIRNAME
-
-    # export some stuff for ant
-    export ANT ANT_HOME ANT_OPTS
-
-    # execute in debug mode, or simply execute
-    if [ "x$ANT_DEBUG" != "x" ]; then
-	/bin/sh -x $ANT $ANT_OPTIONS "$@"
-    else
-	exec $ANT $ANT_OPTIONS "$@"
-    fi
-}
-
-##
-## Bootstrap
-##
-
-main "$@"

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/build.sh (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/build.sh)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/build.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/build.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/build.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">
-]>
-
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-
-<project default="build" name="JBoss/Common">
-
-  <!-- ================================================================== -->
-  <!-- Setup                                                              -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Include the common Buildmagic elements.
-     |
-     | This defines several different targets, properties and paths.
-     | It also sets up the basic extention tasks amoung other things.
-   -->
-
-  &buildmagic;
-
-  <!--
-     | Include the normal targets.
-   -->
-  &targets;
-
-  <!-- ================================================================== -->
-  <!-- Configuration                                                      -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Configure the build system.  
-     |
-     | This target is invoked by the Buildmagic initialization logic and 
-     | should contain module specific configuration elements.
-   -->
-
-  <target name="configure" unless="configure.disable">
-
-    <!-- =================== -->
-    <!-- Basic Configuration -->
-    <!-- =================== -->
-
-    <!-- Module name(s) & version -->
-    <property name="module.name" value="common"/>
-    <property name="module.Name" value="JBoss/Common"/>
-    <property name="module.version" value="DEV"/>
-
-    
-
-    <!-- The combined dependent module classpath -->
-    <path id="dependentmodule.classpath">
-    </path>
-
-    <!-- ===== -->
-    <!-- Tasks -->
-    <!-- ===== -->
-
-    <call target="_default:task-init"/>
-    
-    <!-- Set project specific properties -->
-    <property name="jboss.home" value="../build/output/jboss-${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="server" value="default"/>
-    
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Compile                                                            -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each 
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-  <target name="compile" depends="_default:compile-etc"
-    description="Compile all source files.">
-    <ant antfile="build-compile.xml" target="compile-classes"/>
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="module-jars">
-
-    <!-- Build jboss-common.jar -->
-    <jar jarfile="${build.lib}/common-logging-jdk.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"/>
-    </jar>
-
-  </target>
-  
-  <target name="build" depends="createthirdparty, main"/>
-  
-   <!-- create the thirdparty folder from items in the repository -->
-   <!-- then generate a new libraries.ent file and include it in  -->
-   <!-- the build                                                 -->
-   <target name="createthirdparty" unless="inhibit.downloads"
-      depends="check.inhibit.downloads, set.proxy">
-      
-      <ant antfile="build-thirdparty.xml" target="generate-lib-file"/>
-   </target>
-
-   <!-- check if thirdparty libraries are to be downloaded -->
-   <target name="check.inhibit.downloads">
-      <condition property="inhibit.downloads">
-         <or>
-            <uptodate property="dependencies.current"
- 	      srcfile="build-thirdparty.xml"
-               targetfile="thirdparty/libraries.ent"/>
-            <istrue value="${nodownload}"/>
-         </or>
-      </condition>
-  </target>
-
-  <!-- check if the the user has specied proxy settings -->
-  <target name="check.proxy">
-    <condition property="hasproxy">
-        <and>
-            <isset property="proxy.host"/>
-            <isset property="proxy.port"/>
-            <not>
-                <equals arg1="" arg2="${proxy.host}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.port}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  </target>
-
-  <!-- set proxy settings -->
-  <condition property="hasproxyauth">
-        <and>
-            <isset property="hasproxy"/>
-            <isset property="proxy.username"/>
-            <isset property="proxy.password"/>
-            <not>
-                <equals arg1="" arg2="${proxy.username}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.password}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
-
-  <!-- set proxy settings without auth -->
-  <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
-    <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
-  </target>
-
-  <!-- set proxy settings using auth -->
-  <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
-    <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
-  </target>  
-  
-</project>

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/build.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/build.xml)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/pom.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/pom.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/pom.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,108 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>jboss.logging.jdk</groupId>
-  <artifactId>jboss-logging-jdk</artifactId>
-  <packaging>jar</packaging>
-  <version>1.0.1.TEST</version>
-  <name>JBoss Logging JDK</name>
-  <url>http://www.jboss.org</url>
-  <description>JBoss Logging JDK classes</description>
-  <licenses>
-   <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-   </license>
-  </licenses>
-  <organization>
-    <name>JBoss Inc.</name>
-    <url>http://www.jboss.org</url>
-  </organization>
- 
-  <repositories>
-    <repository>
-      <id>jboss</id>
-      <name>JBoss Inc. Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.com/maven2/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <pluginRepositories>
-     <pluginRepository>
-        <id>jbosspluginrepo</id>
-        <name>jboss plugin repository</name>
-        <url>http://repository.jboss.com/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-      <pluginRepository>
-        <id>central</id>
-        <name>LSU maven2 mirror</name>
-        <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-  </pluginRepositories>
-
-  
-  <build>
-     <sourceDirectory>src/main/java</sourceDirectory>
-  <plugins>
-  
-
-    
-      <!-- define how we want compilation to take place
-           here, we accept most of the defaults but say that we want the
-           optimization flag set, and define the source and target to be 1.4,
-           these setting will be inherited by child projects -->
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0</version>
-          <configuration>
-              <optimize>true</optimize>
-              <source>1.4</source>
-              <target>1.4</target>
-          </configuration>
-      </plugin>  
-
-      <!-- define that we wish to create src jars -->
-      <plugin>
-        <artifactId>maven-source-plugin</artifactId>
-        <inherited>true</inherited>
-       <executions>
-        <execution>
-          <goals>
-            <goal>jar</goal>
-          </goals>
-        </execution>
-      </executions>
-      </plugin>     
-    
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-      <version>1.0.1.TEST</version>
-    </dependency>
-    <dependency>
-      <groupId>jboss.common.core</groupId>
-      <artifactId>jboss-common-core</artifactId>
-      <version>1.0.1.TEST</version>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>  
-
-</project>
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/pom.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/pom.xml)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/etc (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/etc)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/etc/default.mf
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/etc/default.mf	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/etc/default.mf	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Created-By: @java.vm.version@ (@java.vm.vendor@)
-Specification-Title: @specification.title@
-Specification-Version: @specification.version@
-Specification-Vendor: @specification.vendor@
-Implementation-Title: @implementation.title@
-Implementation-URL: @implementation.url@
-Implementation-Version: @implementation.version@
-Implementation-Vendor: @implementation.vendor@
-Implementation-Vendor-Id: @implementation.vendor.id@

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/etc/default.mf (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/etc/default.mf)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JBossJDKLogManager.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JBossJDKLogManager.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JBossJDKLogManager.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,61 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging;
-
-import java.util.logging.LogManager;
-
-/**
- * A simple extension to the default JDK LogManager that overrides the reset
- * call to a noop to avoid the current behavior of the LogManager installing
- * a shutdown hook which calls reset. The problem with this behavior is that
- * all usage of the logging api during shutdown produces no output.
- * 
- * The #doReset() method can be called after the jboss shutdown hook operates
- * to allow the logging layer to cleanup while still allowing jboss components
- * to use the jdk logging layer.
- * 
- * Install using -Djava.util.logging.manager=org.jboss.logging.JBossJDKLogManager
- * 
- * @see LogManager
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class JBossJDKLogManager extends LogManager
-{
-   /**
-    * Ignore the reset operation
-    * 
-    * @see #doReset() to force a reset
-    */
-   public void reset()
-   {
-   }
-
-   /**
-    * Invokes the LogManager.reset() method.
-    */
-   public void doReset()
-   {
-      super.reset();
-   }
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JBossJDKLogManager.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JBossJDKLogManager.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,118 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.logging.jdk;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import org.jboss.logging.LoggerPlugin;
-
-/** An example LoggerPlugin which uses the JDK java.util.logging framework.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revison:$
- */
-public class JDK14LoggerPlugin implements LoggerPlugin
-{
-   private Logger log;
-
-   public void init(String name)
-   {
-      log = Logger.getLogger(name);
-   }
-
-   public boolean isTraceEnabled()
-   {
-      return log.isLoggable(Level.FINER);
-   }
-
-   public void trace(Object message)
-   {
-      log.finer(message.toString());
-   }
-
-   public void trace(Object message, Throwable t)
-   {
-      log.log(Level.FINER, message.toString(), t);
-   }
-
-   public boolean isDebugEnabled()
-   {
-      return log.isLoggable(Level.FINE);
-   }
-
-   public void debug(Object message)
-   {
-      log.fine(message.toString());
-   }
-
-   public void debug(Object message, Throwable t)
-   {
-      log.log(Level.FINE, message.toString(), t);
-   }
-
-   public boolean isInfoEnabled()
-   {
-      return log.isLoggable(Level.INFO);
-   }
-
-   public void info(Object message)
-   {
-      log.info(message.toString());
-   }
-
-   public void info(Object message, Throwable t)
-   {
-      log.log(Level.INFO, message.toString(), t);
-   }
-
-   public void warn(Object message)
-   {
-      log.warning(message.toString());
-   }
-
-   public void warn(Object message, Throwable t)
-   {
-      log.log(Level.WARNING, message.toString(), t);
-   }
-
-   public void error(Object message)
-   {
-      log.severe(message.toString());
-   }
-
-   public void error(Object message, Throwable t)
-   {
-      log.log(Level.SEVERE, message.toString(), t);
-   }
-
-   public void fatal(Object message)
-   {
-      log.severe(message.toString());
-   }
-
-   public void fatal(Object message, Throwable t)
-   {
-      log.log(Level.SEVERE, message.toString(), t);
-   }
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDK14LoggerPlugin.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDKLogManager.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDKLogManager.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDKLogManager.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,157 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.logging.jdk;
-
-import java.util.logging.LogManager;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.FileInputStream;
-import java.io.BufferedInputStream;
-import java.io.FileNotFoundException;
-import java.io.File;
-import java.net.URL;
-import org.jboss.logging.jdk.xml.DOMConfigurator;
-
-/**
- @author Scott.Stark at jboss.org
- @version $Revision$
- */
-public class JDKLogManager extends LogManager
-{
-   private static final String DEFAULT_CONFIG_PROPS = "jdklogger.properties";
-   private static final String DEFAULT_CONFIG_XML = "jdklogger.xml";
-
-   public JDKLogManager()
-   {
-   }
-
-   /**
-    * Overriden to attempt to load the java.util.logging.config.file property value
-    * as a classpath resource before treating this as a file as is done by the
-    * standard jdk LogManager.
-    * 
-    * In additional, if the resource ends in a .xml suffix, the
-    * org.jboss.logging.jdk.xml.DOMConfigurator is used to parse a logging
-    * configuration that is similar to the 1.2 log4j.xml format. 
-    * 
-    * @throws IOException
-    * @throws SecurityException
-    */
-   public void readConfiguration()
-      throws IOException, SecurityException
-   {
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      String config = SecurityActions.getProperty("java.util.logging.config.file");
-      URL configURL = null;
-      if( config == null )
-      {
-         // Search for a default configuration on the classpath
-         config = DEFAULT_CONFIG_XML;
-         configURL = loader.getResource(DEFAULT_CONFIG_XML);
-         if( configURL == null )
-         {
-            config = DEFAULT_CONFIG_PROPS;
-            configURL = loader.getResource(DEFAULT_CONFIG_PROPS);
-         }
-
-         // Search for a default configuration as a file
-         if( configURL == null )
-         {
-            config = DEFAULT_CONFIG_XML;
-            File test = new File(DEFAULT_CONFIG_XML);
-            if( test.exists() == true )
-               configURL = test.toURL();
-            else
-            {
-               config = DEFAULT_CONFIG_PROPS;
-               test = new File(DEFAULT_CONFIG_PROPS);
-               if( test.exists() == true )
-                  configURL = test.toURL();
-            }
-            // If there still is no file, throw an exception
-            if( configURL == null )
-            {
-               String msg = "No java.util.logging.config.file specified, and neither the default "
-                  + DEFAULT_CONFIG_XML + " or " + DEFAULT_CONFIG_PROPS + " was found";
-               throw new FileNotFoundException(msg);
-            }
-         }
-      }
-
-      // If there was a config specified, try to load it from the classpath
-      if( configURL == null )
-         configURL = loader.getResource(config);
-      InputStream is = null;
-      if( configURL == null )
-      {
-         // If the config was not on the classpath try it as a file
-         InputStream in = new FileInputStream(config);
-         is = new BufferedInputStream(in);
-      }
-      else
-      {
-         // Use the located config URL
-         is = configURL.openStream();
-      }
-
-      // Is this an xml file?
-      boolean isXML = config.endsWith(".xml");
-      try
-      {
-         if( isXML )
-         {
-            DOMConfigurator.configure(is);
-         }
-         else
-         {
-            // Parse the standard jdk properties file format
-            super.readConfiguration(is);
-         }
-      }
-      finally
-      {
-         if( is != null )
-            is.close();
-      }
-   }
-
-   /**
-    * Ignore the reset operation because the default behavior by the jdk LogManager
-    * is to close all handlers. This results in loss of logging information during
-    * the jdk shutdown. The jboss kernel can call doReset to cause a reset of the
-    * logging layer as the last step in shutdown.
-    * 
-    * @see #doReset() to force a reset
-    */
-   public void reset()
-   {
-   }
-
-   /**
-    * Invokes the LogManager.reset() method.
-    */
-   public void doReset()
-   {
-      super.reset();
-   }
-}
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDKLogManager.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/JDKLogManager.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/SecurityActions.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/SecurityActions.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/SecurityActions.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.logging.jdk;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-class SecurityActions
-{
-   interface Actions
-   {
-      Actions NON_PRIVILEGED = new Actions()
-      {
-         public String getProperty(final String name)
-         {
-            return System.getProperty(name);
-         }
-
-         public String getProperty(final String name, final String def)
-         {
-            return System.getProperty(name, def);
-         }
-      };
-
-      Actions PRIVILEGED = new Actions()
-      {
-         public String getProperty(final String name)
-         {
-            return (String) AccessController.doPrivileged(new PrivilegedAction()
-            {
-               public Object run()
-               {
-                  return System.getProperty(name);
-               }
-            });
-         }
-         public String getProperty(final String name, final String def)
-         {
-            return (String)AccessController.doPrivileged(new PrivilegedAction()
-            {
-               public Object run()
-               {
-                  return System.getProperty(name, def);
-               }
-            });
-         }
-      };
-
-      String getProperty(String name);
-      String getProperty(String name, String def);
-   }
-
-
-   static String getProperty(String name)
-   {
-      String value;
-      if( System.getSecurityManager() == null )
-         value = Actions.NON_PRIVILEGED.getProperty(name);
-      else
-         value = Actions.PRIVILEGED.getProperty(name);
-      return value;
-   }
-   static String getProperty(String name, String def)
-   {
-      String value;
-      if( System.getSecurityManager() == null )
-         value = Actions.NON_PRIVILEGED.getProperty(name, def);
-      else
-         value = Actions.PRIVILEGED.getProperty(name, def);
-      return value;
-   }
-}
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/SecurityActions.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/SecurityActions.java)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/AbsoluteTimeDateFormat.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/AbsoluteTimeDateFormat.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/AbsoluteTimeDateFormat.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,147 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.logging.jdk.format;
-
-import java.text.DateFormat;
-import java.text.FieldPosition;
-import java.text.ParsePosition;
-import java.util.Calendar;
-import java.util.TimeZone;
-import java.util.Date;
-
-/**
- * Formats a {@link Date} in the format "HH:mm:ss,SSS" for example,
- * "15:49:37,459".
- *
- * @author Ceki G&uuml;lc&uuml;
- * @author Andrew Vajoczki
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class AbsoluteTimeDateFormat extends DateFormat
-{
-
-   /**
-    * String constant used to specify {@link
-    * org.apache.log4j.helpers.AbsoluteTimeDateFormat} in layouts. Current
-    * value is <b>ABSOLUTE</b>.
-    */
-   public final static String ABS_TIME_DATE_FORMAT = "ABSOLUTE";
-
-   /**
-    * String constant used to specify {@link
-    * org.apache.log4j.helpers.DateTimeDateFormat} in layouts.  Current
-    * value is <b>DATE</b>.
-    */
-   public final static String DATE_AND_TIME_DATE_FORMAT = "DATE";
-
-   /**
-    * String constant used to specify {@link
-    * org.apache.log4j.helpers.ISO8601DateFormat} in layouts. Current
-    * value is <b>ISO8601</b>.
-    */
-   public final static String ISO8601_DATE_FORMAT = "ISO8601";
-
-   public AbsoluteTimeDateFormat()
-   {
-      setCalendar(Calendar.getInstance());
-   }
-
-   public AbsoluteTimeDateFormat(TimeZone timeZone)
-   {
-      setCalendar(Calendar.getInstance(timeZone));
-   }
-
-   private static long previousTime;
-   private static char[] previousTimeWithoutMillis = new char[9]; // "HH:mm:ss."
-
-   /**
-    * Appends to <code>sbuf</code> the time in the format
-    * "HH:mm:ss,SSS" for example, "15:49:37,459"
-    *
-    * @param date          the date to format
-    * @param sbuf          the string buffer to write to
-    * @param fieldPosition remains untouched
-    */
-   public StringBuffer format(Date date, StringBuffer sbuf,
-      FieldPosition fieldPosition)
-   {
-
-      long now = date.getTime();
-      int millis = (int) (now % 1000);
-
-      if ((now - millis) != previousTime)
-      {
-         // We reach this point at most once per second
-         // across all threads instead of each time format()
-         // is called. This saves considerable CPU time.
-
-         calendar.setTime(date);
-
-         int start = sbuf.length();
-
-         int hour = calendar.get(Calendar.HOUR_OF_DAY);
-         if (hour < 10)
-         {
-            sbuf.append('0');
-         }
-         sbuf.append(hour);
-         sbuf.append(':');
-
-         int mins = calendar.get(Calendar.MINUTE);
-         if (mins < 10)
-         {
-            sbuf.append('0');
-         }
-         sbuf.append(mins);
-         sbuf.append(':');
-
-         int secs = calendar.get(Calendar.SECOND);
-         if (secs < 10)
-         {
-            sbuf.append('0');
-         }
-         sbuf.append(secs);
-         sbuf.append(',');
-
-         // store the time string for next time to avoid recomputation
-         sbuf.getChars(start, sbuf.length(), previousTimeWithoutMillis, 0);
-
-         previousTime = now - millis;
-      }
-      else
-      {
-         sbuf.append(previousTimeWithoutMillis);
-      }
-
-
-      if (millis < 100)
-         sbuf.append('0');
-      if (millis < 10)
-         sbuf.append('0');
-
-      sbuf.append(millis);
-      return sbuf;
-   }
-
-   /**
-    This method does not do anything but return <code>null</code>.
-    */
-   public Date parse(String s, ParsePosition pos)
-   {
-      return null;
-   }
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/AbsoluteTimeDateFormat.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/AbsoluteTimeDateFormat.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/DateTimeDateFormat.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/DateTimeDateFormat.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/DateTimeDateFormat.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,85 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.logging.jdk.format;
-
-import java.text.DateFormatSymbols;
-import java.text.FieldPosition;
-import java.text.ParsePosition;
-import java.util.TimeZone;
-import java.util.Calendar;
-import java.util.Date;
-
-/**
- * Formats a {@link Date} in the format "dd MMM YYYY HH:mm:ss,SSS" for example,
- * "06 Nov 1994 15:49:37,459".
- *
- * @author Ceki G&uuml;lc&uuml;
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class DateTimeDateFormat extends AbsoluteTimeDateFormat
-{
-
-   String[] shortMonths;
-
-   public DateTimeDateFormat()
-   {
-      super();
-      shortMonths = new DateFormatSymbols().getShortMonths();
-   }
-
-   public DateTimeDateFormat(TimeZone timeZone)
-   {
-      this();
-      setCalendar(Calendar.getInstance(timeZone));
-   }
-
-   /**
-    * Appends to <code>sbuf</code> the date in the format "dd MMM YYYY
-    * HH:mm:ss,SSS" for example, "06 Nov 1994 08:49:37,459".
-    *
-    * @param sbuf the string buffer to write to
-    */
-   public StringBuffer format(Date date, StringBuffer sbuf,
-      FieldPosition fieldPosition)
-   {
-
-      calendar.setTime(date);
-
-      int day = calendar.get(Calendar.DAY_OF_MONTH);
-      if (day < 10)
-         sbuf.append('0');
-      sbuf.append(day);
-      sbuf.append(' ');
-      sbuf.append(shortMonths[calendar.get(Calendar.MONTH)]);
-      sbuf.append(' ');
-
-      int year = calendar.get(Calendar.YEAR);
-      sbuf.append(year);
-      sbuf.append(' ');
-
-      return super.format(date, sbuf, fieldPosition);
-   }
-
-   /**
-    * This method does not do anything but return <code>null</code>.
-    */
-   public Date parse(java.lang.String s, ParsePosition pos)
-   {
-      return null;
-   }
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/DateTimeDateFormat.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/DateTimeDateFormat.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/FormattingInfo.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/FormattingInfo.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/FormattingInfo.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.logging.jdk.format;
-
-
-/**
- * FormattingInfo instances contain the information obtained when parsing
- * formatting modifiers in conversion modifiers.
- *
- * @author <a href=mailto:jim_cakalic at na.biomerieux.com>Jim Cakalic</a>
- * @author Ceki G&uuml;lc&uuml;
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class FormattingInfo
-{
-   int min = -1;
-   int max = 0x7FFFFFFF;
-   boolean leftAlign = false;
-
-   void reset()
-   {
-      min = -1;
-      max = 0x7FFFFFFF;
-      leftAlign = false;
-   }
-
-   void dump()
-   {
-      System.err.println("min=" + min + ", max=" + max + ", leftAlign=" + leftAlign);
-   }
-}
- 

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/FormattingInfo.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/FormattingInfo.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/ISO8601DateFormat.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/ISO8601DateFormat.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/ISO8601DateFormat.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,186 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.logging.jdk.format;
-
-import java.util.TimeZone;
-import java.util.Date;
-import java.util.Calendar;
-import java.text.FieldPosition;
-import java.text.ParsePosition;
-
-// Contributors: Arndt Schoenewald <arndt at ibm23093i821.mc.schoenewald.de>
-
-/**
- * Formats a {@link java.util.Date} in the format "YYYY-mm-dd HH:mm:ss,SSS" for example
- * "1999-11-27 15:49:37,459".
- * <p/>
- * <p>Refer to the <a
- * href=http://www.cl.cam.ac.uk/~mgk25/iso-time.html>summary of the
- * International Standard Date and Time Notation</a> for more
- * information on this format.
- *
- * @author Ceki G&uuml;lc&uuml;
- * @author Andrew Vajoczki
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class ISO8601DateFormat extends AbsoluteTimeDateFormat
-{
-
-   public ISO8601DateFormat()
-   {
-   }
-
-   public ISO8601DateFormat(TimeZone timeZone)
-   {
-      super(timeZone);
-   }
-
-   static private long lastTime;
-   static private char[] lastTimeString = new char[20];
-
-   /**
-    * Appends a date in the format "YYYY-mm-dd HH:mm:ss,SSS"
-    * to <code>sbuf</code>. For example: "1999-11-27 15:49:37,459".
-    *
-    * @param sbuf the <code>StringBuffer</code> to write to
-    */
-   public StringBuffer format(Date date, StringBuffer sbuf,
-      FieldPosition fieldPosition)
-   {
-
-      long now = date.getTime();
-      int millis = (int) (now % 1000);
-
-      if ((now - millis) != lastTime)
-      {
-         // We reach this point at most once per second
-         // across all threads instead of each time format()
-         // is called. This saves considerable CPU time.
-
-         calendar.setTime(date);
-
-         int start = sbuf.length();
-
-         int year = calendar.get(Calendar.YEAR);
-         sbuf.append(year);
-
-         String month;
-         switch (calendar.get(Calendar.MONTH))
-         {
-            case Calendar.JANUARY:
-               month = "-01-";
-               break;
-            case Calendar.FEBRUARY:
-               month = "-02-";
-               break;
-            case Calendar.MARCH:
-               month = "-03-";
-               break;
-            case Calendar.APRIL:
-               month = "-04-";
-               break;
-            case Calendar.MAY:
-               month = "-05-";
-               break;
-            case Calendar.JUNE:
-               month = "-06-";
-               break;
-            case Calendar.JULY:
-               month = "-07-";
-               break;
-            case Calendar.AUGUST:
-               month = "-08-";
-               break;
-            case Calendar.SEPTEMBER:
-               month = "-09-";
-               break;
-            case Calendar.OCTOBER:
-               month = "-10-";
-               break;
-            case Calendar.NOVEMBER:
-               month = "-11-";
-               break;
-            case Calendar.DECEMBER:
-               month = "-12-";
-               break;
-            default:
-               month = "-NA-";
-               break;
-         }
-         sbuf.append(month);
-
-         int day = calendar.get(Calendar.DAY_OF_MONTH);
-         if (day < 10)
-            sbuf.append('0');
-         sbuf.append(day);
-
-         sbuf.append(' ');
-
-         int hour = calendar.get(Calendar.HOUR_OF_DAY);
-         if (hour < 10)
-         {
-            sbuf.append('0');
-         }
-         sbuf.append(hour);
-         sbuf.append(':');
-
-         int mins = calendar.get(Calendar.MINUTE);
-         if (mins < 10)
-         {
-            sbuf.append('0');
-         }
-         sbuf.append(mins);
-         sbuf.append(':');
-
-         int secs = calendar.get(Calendar.SECOND);
-         if (secs < 10)
-         {
-            sbuf.append('0');
-         }
-         sbuf.append(secs);
-
-         sbuf.append(',');
-
-         // store the time string for next time to avoid recomputation
-         sbuf.getChars(start, sbuf.length(), lastTimeString, 0);
-         lastTime = now - millis;
-      }
-      else
-      {
-         sbuf.append(lastTimeString);
-      }
-
-
-      if (millis < 100)
-         sbuf.append('0');
-      if (millis < 10)
-         sbuf.append('0');
-
-      sbuf.append(millis);
-      return sbuf;
-   }
-
-   /**
-    * This method does not do anything but return <code>null</code>.
-    */
-   public Date parse(java.lang.String s, ParsePosition pos)
-   {
-      return null;
-   }
-}
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/ISO8601DateFormat.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/ISO8601DateFormat.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternConverter.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternConverter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternConverter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,117 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.logging.jdk.format;
-
-import java.util.logging.LogRecord;
-
-/**
- * <p>PatternConverter is an abtract class that provides the
- * formatting functionality that derived classes need.
- * <p/>
- * <p>Conversion specifiers in a conversion patterns are parsed to
- * individual PatternConverters. Each of which is responsible for
- * converting a logging event in a converter specific manner.
- *
- * @author <a href="mailto:cakalijp at Maritz.com">James P. Cakalic</a>
- * @author Ceki G&uuml;lc&uuml;
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public abstract class PatternConverter
-{
-   public PatternConverter next;
-   int min = -1;
-   int max = 0x7FFFFFFF;
-   boolean leftAlign = false;
-
-   protected PatternConverter()
-   {
-   }
-
-   protected PatternConverter(FormattingInfo fi)
-   {
-      min = fi.min;
-      max = fi.max;
-      leftAlign = fi.leftAlign;
-   }
-
-   /**
-    * Derived pattern converters must override this method in order to
-    * convert conversion specifiers in the correct way.
-    */
-   abstract
-   protected String convert(LogRecord event);
-
-   /**
-    * A template method for formatting in a converter specific way.
-    */
-   public void format(StringBuffer sbuf, LogRecord e)
-   {
-      String s = convert(e);
-
-      if (s == null)
-      {
-         if (0 < min)
-            spacePad(sbuf, min);
-         return;
-      }
-
-      int len = s.length();
-
-      if (len > max)
-         sbuf.append(s.substring(len - max));
-      else if (len < min)
-      {
-         if (leftAlign)
-         {
-            sbuf.append(s);
-            spacePad(sbuf, min - len);
-         }
-         else
-         {
-            spacePad(sbuf, min - len);
-            sbuf.append(s);
-         }
-      }
-      else
-         sbuf.append(s);
-   }
-
-   static String[] SPACES = {" ", "  ", "    ", "        ", //1,2,4,8 spaces
-      "                ", // 16 spaces
-      "                                "}; // 32 spaces
-
-   /**
-    * Fast space padding method.
-    */
-   public void spacePad(StringBuffer sbuf, int length)
-   {
-      while (length >= 32)
-      {
-         sbuf.append(SPACES[5]);
-         length -= 32;
-      }
-
-      for (int i = 4; i >= 0; i--)
-      {
-         if ((length & (1 << i)) != 0)
-         {
-            sbuf.append(SPACES[i]);
-         }
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternConverter.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternConverter.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternFormatter.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternFormatter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternFormatter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,505 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.logging.jdk.format;
-
-import java.util.logging.Formatter;
-import java.util.logging.LogRecord;
-
-// Contributors:   Nelson Minar <nelson at monkey.org>
-//                 Anders Kristensen <akristensen at dynamicsoft.com>
-
-/**
- * A flexible layout configurable with pattern string.
- * <p/>
- * <p>The goal of this class is to {@link #format format} a {@link
- * LoggingEvent} and return the results as a String. The results
- * depend on the <em>conversion pattern</em>.
- * <p/>
- * <p>The conversion pattern is closely related to the conversion
- * pattern of the printf function in C. A conversion pattern is
- * composed of literal text and format control expressions called
- * <em>conversion specifiers</em>.
- * <p/>
- * <p><i>You are free to insert any literal text within the conversion
- * pattern.</i>
- * <p/>
- * <p>Each conversion specifier starts with a percent sign (%) and is
- * followed by optional <em>format modifiers</em> and a <em>conversion
- * character</em>. The conversion character specifies the type of
- * data, e.g. category, priority, date, thread name. The format
- * modifiers control such things as field width, padding, left and
- * right justification. The following is a simple example.
- * <p/>
- * <p>Let the conversion pattern be <b>"%-5p [%t]: %m%n"</b> and assume
- * that the log4j environment was set to use a PatternLayout. Then the
- * statements
- * <pre>
- * Category root = Category.getRoot();
- * root.debug("Message 1");
- * root.warn("Message 2");
- * </pre>
- * would yield the output
- * <pre>
- * DEBUG [main]: Message 1
- * WARN  [main]: Message 2
- * </pre>
- * <p/>
- * <p>Note that there is no explicit separator between text and
- * conversion specifiers. The pattern parser knows when it has reached
- * the end of a conversion specifier when it reads a conversion
- * character. In the example above the conversion specifier
- * <b>%-5p</b> means the priority of the logging event should be left
- * justified to a width of five characters.
- * <p/>
- * The recognized conversion characters are
- * <p/>
- * <p/>
- * <table border="1" CELLPADDING="8">
- * <th>Conversion Character</th>
- * <th>Effect</th>
- * <p/>
- * <tr>
- * <td align=center><b>c</b></td>
- * <p/>
- * <td>Used to output the category of the logging event. The
- * category conversion specifier can be optionally followed by
- * <em>precision specifier</em>, that is a decimal constant in
- * brackets.
- * <p/>
- * <p>If a precision specifier is given, then only the corresponding
- * number of right most components of the category name will be
- * printed. By default the category name is printed in full.
- * <p/>
- * <p>For example, for the category name "a.b.c" the pattern
- * <b>%c{2}</b> will output "b.c".
- * <p/>
- * </td>
- * </tr>
- * <p/>
- * <tr>
- * <td align=center><b>C</b></td>
- * <p/>
- * <td>Used to output the fully qualified class name of the caller
- * issuing the logging request. This conversion specifier
- * can be optionally followed by <em>precision specifier</em>, that
- * is a decimal constant in brackets.
- * <p/>
- * <p>If a precision specifier is given, then only the corresponding
- * number of right most components of the class name will be
- * printed. By default the class name is output in fully qualified form.
- * <p/>
- * <p>For example, for the class name "org.apache.xyz.SomeClass", the
- * pattern <b>%C{1}</b> will output "SomeClass".
- * <p/>
- * <p><b>WARNING</b> Generating the caller class information is
- * slow. Thus, it's use should be avoided unless execution speed is
- * not an issue.
- * <p/>
- * </td>
- * </tr>
- * <p/>
- * <tr> <td align=center><b>d</b></td> <td>Used to output the date of
- * the logging event. The date conversion specifier may be
- * followed by a <em>date format specifier</em> enclosed between
- * braces. For example, <b>%d{HH:mm:ss,SSS}</b> or
- * <b>%d{dd&nbsp;MMM&nbsp;yyyy&nbsp;HH:mm:ss,SSS}</b>.  If no
- * date format specifier is given then ISO8601 format is
- * assumed.
- * <p/>
- * <p>The date format specifier admits the same syntax as the
- * time pattern string of the {@link
- * java.text.SimpleDateFormat}. Although part of the standard
- * JDK, the performance of <code>SimpleDateFormat</code> is
- * quite poor.
- * <p/>
- * <p>For better results it is recommended to use the log4j date
- * formatters. These can be specified using one of the strings
- * "ABSOLUTE", "DATE" and "ISO8601" for specifying {@link
- * org.apache.log4j.helpers.AbsoluteTimeDateFormat
- * AbsoluteTimeDateFormat}, {@link
- * org.apache.log4j.helpers.DateTimeDateFormat DateTimeDateFormat}
- * and respectively {@link
- * org.apache.log4j.helpers.ISO8601DateFormat
- * ISO8601DateFormat}. For example, <b>%d{ISO8601}</b> or
- * <b>%d{ABSOLUTE}</b>.
- * <p/>
- * <p>These dedicated date formatters perform significantly
- * better than {@link java.text.SimpleDateFormat}.
- * </td>
- * </tr>
- * <p/>
- * <tr>
- * <td align=center><b>F</b></td>
- * <p/>
- * <td>Used to output the file name where the logging request was
- * issued.
- * <p/>
- * <p><b>WARNING</b> Generating caller location information is
- * extremely slow. It's use should be avoided unless execution speed
- * is not an issue.
- * <p/>
- * </tr>
- * <p/>
- * <tr>
- * <td align=center><b>l</b></td>
- * <p/>
- * <td>Used to output location information of the caller which generated
- * the logging event.
- * <p/>
- * <p>The location information depends on the JVM implementation but
- * usually consists of the fully qualified name of the calling
- * method followed by the callers source the file name and line
- * number between parentheses.
- * <p/>
- * <p>The location information can be very useful. However, it's
- * generation is <em>extremely</em> slow. It's use should be avoided
- * unless execution speed is not an issue.
- * <p/>
- * </td>
- * </tr>
- * <p/>
- * <tr>
- * <td align=center><b>L</b></td>
- * <p/>
- * <td>Used to output the line number from where the logging request
- * was issued.
- * <p/>
- * <p><b>WARNING</b> Generating caller location information is
- * extremely slow. It's use should be avoided unless execution speed
- * is not an issue.
- * <p/>
- * </tr>
- * <p/>
- * <p/>
- * <tr>
- * <td align=center><b>m</b></td>
- * <td>Used to output the application supplied message associated with
- * the logging event.</td>
- * </tr>
- * <p/>
- * <tr>
- * <td align=center><b>M</b></td>
- * <p/>
- * <td>Used to output the method name where the logging request was
- * issued.
- * <p/>
- * <p><b>WARNING</b> Generating caller location information is
- * extremely slow. It's use should be avoided unless execution speed
- * is not an issue.
- * <p/>
- * </tr>
- * <p/>
- * <tr>
- * <td align=center><b>n</b></td>
- * <p/>
- * <td>Outputs the platform dependent line separator character or
- * characters.
- * <p/>
- * <p>This conversion character offers practically the same
- * performance as using non-portable line separator strings such as
- * "\n", or "\r\n". Thus, it is the preferred way of specifying a
- * line separator.
- * <p/>
- * <p/>
- * </tr>
- * <p/>
- * <tr>
- * <td align=center><b>p</b></td>
- * <td>Used to output the priority of the logging event.</td>
- * </tr>
- * <p/>
- * <tr>
- * <p/>
- * <td align=center><b>r</b></td>
- * <p/>
- * <td>Used to output the number of milliseconds elapsed since the start
- * of the application until the creation of the logging event.</td>
- * </tr>
- * <p/>
- * <p/>
- * <tr>
- * <td align=center><b>t</b></td>
- * <p/>
- * <td>Used to output the name of the thread that generated the
- * logging event.</td>
- * <p/>
- * </tr>
- * <p/>
- * <tr>
- * <p/>
- * <td align=center><b>x</b></td>
- * <p/>
- * <td>Used to output the NDC (nested diagnostic context) associated
- * with the thread that generated the logging event.
- * </td>
- * </tr>
- * <p/>
- * <p/>
- * <tr>
- * <td align=center><b>X</b></td>
- * <p/>
- * <td>
- * <p/>
- * <p>Used to output the MDC (mapped diagnostic context) associated
- * with the thread that generated the logging event. The <b>X</b>
- * conversion character <em>must</em> be followed by the key for the
- * map placed between braces, as in <b>%X{clientNumber}</b> where
- * <code>clientNumber</code> is the key. The value in the MDC
- * corresponding to the key will be output.</p>
- * <p/>
- * <p>See {@link MDC} class for more details.
- * </p>
- * <p/>
- * </td>
- * </tr>
- * <p/>
- * <tr>
- * <p/>
- * <td align=center><b>%</b></td>
- * <p/>
- * <td>The sequence %% outputs a single percent sign.
- * </td>
- * </tr>
- * <p/>
- * </table>
- * <p/>
- * <p>By default the relevant information is output as is. However,
- * with the aid of format modifiers it is possible to change the
- * minimum field width, the maximum field width and justification.
- * <p/>
- * <p>The optional format modifier is placed between the percent sign
- * and the conversion character.
- * <p/>
- * <p>The first optional format modifier is the <em>left justification
- * flag</em> which is just the minus (-) character. Then comes the
- * optional <em>minimum field width</em> modifier. This is a decimal
- * constant that represents the minimum number of characters to
- * output. If the data item requires fewer characters, it is padded on
- * either the left or the right until the minimum width is
- * reached. The default is to pad on the left (right justify) but you
- * can specify right padding with the left justification flag. The
- * padding character is space. If the data item is larger than the
- * minimum field width, the field is expanded to accommodate the
- * data. The value is never truncated.
- * <p/>
- * <p>This behavior can be changed using the <em>maximum field
- * width</em> modifier which is designated by a period followed by a
- * decimal constant. If the data item is longer than the maximum
- * field, then the extra characters are removed from the
- * <em>beginning</em> of the data item and not from the end. For
- * example, it the maximum field width is eight and the data item is
- * ten characters long, then the first two characters of the data item
- * are dropped. This behavior deviates from the printf function in C
- * where truncation is done from the end.
- * <p/>
- * <p>Below are various format modifier examples for the category
- * conversion specifier.
- * <p/>
- * <p/>
- * <TABLE BORDER=1 CELLPADDING=8>
- * <th>Format modifier
- * <th>left justify
- * <th>minimum width
- * <th>maximum width
- * <th>comment
- * <p/>
- * <tr>
- * <td align=center>%20c</td>
- * <td align=center>false</td>
- * <td align=center>20</td>
- * <td align=center>none</td>
- * <p/>
- * <td>Left pad with spaces if the category name is less than 20
- * characters long.
- * <p/>
- * <tr> <td align=center>%-20c</td> <td align=center>true</td> <td
- * align=center>20</td> <td align=center>none</td> <td>Right pad with
- * spaces if the category name is less than 20 characters long.
- * <p/>
- * <tr>
- * <td align=center>%.30c</td>
- * <td align=center>NA</td>
- * <td align=center>none</td>
- * <td align=center>30</td>
- * <p/>
- * <td>Truncate from the beginning if the category name is longer than 30
- * characters.
- * <p/>
- * <tr>
- * <td align=center>%20.30c</td>
- * <td align=center>false</td>
- * <td align=center>20</td>
- * <td align=center>30</td>
- * <p/>
- * <td>Left pad with spaces if the category name is shorter than 20
- * characters. However, if category name is longer than 30 characters,
- * then truncate from the beginning.
- * <p/>
- * <tr>
- * <td align=center>%-20.30c</td>
- * <td align=center>true</td>
- * <td align=center>20</td>
- * <td align=center>30</td>
- * <p/>
- * <td>Right pad with spaces if the category name is shorter than 20
- * characters. However, if category name is longer than 30 characters,
- * then truncate from the beginning.
- * <p/>
- * </table>
- * <p/>
- * <p>Below are some examples of conversion patterns.
- * <p/>
- * <dl>
- * <p/>
- * <p><dt><b>%r [%t] %-5p %c %x - %m\n</b>
- * <p><dd>This is essentially the TTCC layout.
- * <p/>
- * <p><dt><b>%-6r [%15.15t] %-5p %30.30c %x - %m\n</b>
- * <p/>
- * <p><dd>Similar to the TTCC layout except that the relative time is
- * right padded if less than 6 digits, thread name is right padded if
- * less than 15 characters and truncated if longer and the category
- * name is left padded if shorter than 30 characters and truncated if
- * longer.
- * <p/>
- * </dl>
- * <p/>
- * <p>The above text is largely inspired from Peter A. Darnell and
- * Philip E. Margolis' highly recommended book "C -- a Software
- * Engineering Approach", ISBN 0-387-97389-3.
- *
- * @author <a href="mailto:cakalijp at Maritz.com">James P. Cakalic</a>
- * @author Ceki G&uuml;lc&uuml;
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- * 
- */
-public class PatternFormatter extends Formatter
-{
-
-   /**
-    * Default pattern string for log output. Currently set to the
-    * string <b>"%m%n"</b> which just prints the application supplied
-    * message.
-    */
-   public final static String DEFAULT_CONVERSION_PATTERN = "%m%n";
-
-   /**
-    * A conversion pattern equivalent to the TTCCCLayout.
-    * Current value is <b>%r [%t] %p %c %x - %m%n</b>.
-    */
-   public final static String TTCC_CONVERSION_PATTERN
-      = "%r [%t] %p %c %x - %m%n";
-
-
-   protected final int BUF_SIZE = 256;
-   protected final int MAX_CAPACITY = 1024;
-
-   private String pattern;
-
-   private PatternConverter head;
-
-   private String timezone;
-
-   /**
-    * Constructs a PatternLayout using the DEFAULT_LAYOUT_PATTERN.
-    * <p/>
-    * The default pattern just produces the application supplied message.
-    */
-   public PatternFormatter()
-   {
-      this(DEFAULT_CONVERSION_PATTERN);
-   }
-
-   /**
-    * Constructs a PatternLayout using the supplied conversion pattern.
-    */
-   public PatternFormatter(String pattern)
-   {
-      this.pattern = pattern;
-      head = createPatternParser((pattern == null) ? DEFAULT_CONVERSION_PATTERN :
-         pattern).parse();
-   }
-
-   /**
-    * Set the <b>ConversionPattern</b> option. This is the string which
-    * controls formatting and consists of a mix of literal content and
-    * conversion specifiers.
-    */
-   public void setConversionPattern(String conversionPattern)
-   {
-      pattern = conversionPattern;
-      head = createPatternParser(conversionPattern).parse();
-   }
-
-   /**
-    * Returns the value of the <b>ConversionPattern</b> option.
-    */
-   public String getConversionPattern()
-   {
-      return pattern;
-   }
-
-   /**
-    * Does not do anything as options become effective
-    */
-   public void activateOptions()
-   {
-      // nothing to do.
-   }
-
-   /**
-    * The PatternLayout does not handle the throwable contained within
-    * {@link LoggingEvent LoggingEvents}. Thus, it returns
-    * <code>true</code>.
-    *
-    * @since 0.8.4
-    */
-   public boolean ignoresThrowable()
-   {
-      return true;
-   }
-
-   /**
-    * Returns PatternParser used to parse the conversion string. Subclasses
-    * may override this to return a subclass of PatternParser which recognize
-    * custom conversion characters.
-    *
-    * @since 0.9.0
-    */
-   protected PatternParser createPatternParser(String pattern)
-   {
-      return new PatternParser(pattern);
-   }
-
-
-   /**
-    * Produces a formatted string as specified by the conversion pattern.
-    */
-   public String format(LogRecord event)
-   {
-      // output buffer appended to when format() is invoked
-      StringBuffer sbuf = new StringBuffer(BUF_SIZE);
-      PatternConverter c = head;
-      while (c != null)
-      {
-         c.format(sbuf, event);
-         c = c.next;
-      }
-      return sbuf.toString();
-   }
-}
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternFormatter.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternFormatter.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternParser.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternParser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternParser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,615 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.logging.jdk.format;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.logging.LogRecord;
-
-// Contributors:   Nelson Minar <(nelson at monkey.org>
-//                 Igor E. Poteryaev <jah at mail.ru>
-//                 Reinhard Deschler <reinhard.deschler at web.de>
-
-/**
- * Most of the work of the {@link org.apache.log4j.PatternLayout} class
- * is delegated to the PatternParser class.
- * <p/>
- * <p>It is this class that parses conversion patterns and creates
- * a chained list of {@link OptionConverter OptionConverters}.
- *
- * @author <a href=mailto:"cakalijp at Maritz.com">James P. Cakalic</a>
- * @author Ceki G&uuml;lc&uuml;
- * @author Anders Kristensen
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class PatternParser
-{
-   public final static String LINE_SEP = System.getProperty("line.separator");
-
-   private static long startTime = System.currentTimeMillis();
-
-   private static final char ESCAPE_CHAR = '%';
-
-   private static final int LITERAL_STATE = 0;
-   private static final int CONVERTER_STATE = 1;
-   private static final int MINUS_STATE = 2;
-   private static final int DOT_STATE = 3;
-   private static final int MIN_STATE = 4;
-   private static final int MAX_STATE = 5;
-
-   static final int FULL_LOCATION_CONVERTER = 1000;
-   static final int METHOD_LOCATION_CONVERTER = 1001;
-   static final int CLASS_LOCATION_CONVERTER = 1002;
-   static final int LINE_LOCATION_CONVERTER = 1003;
-   static final int FILE_LOCATION_CONVERTER = 1004;
-
-   static final int RELATIVE_TIME_CONVERTER = 2000;
-   static final int THREAD_CONVERTER = 2001;
-   static final int LEVEL_CONVERTER = 2002;
-   static final int NDC_CONVERTER = 2003;
-   static final int MESSAGE_CONVERTER = 2004;
-   static final int THREAD_NAME_CONVERTER = 2005;
-
-   int state;
-   protected StringBuffer currentLiteral = new StringBuffer(32);
-   protected int patternLength;
-   protected int i;
-   PatternConverter head;
-   PatternConverter tail;
-   protected FormattingInfo formattingInfo = new FormattingInfo();
-   protected String pattern;
-
-   public PatternParser(String pattern)
-   {
-      this.pattern = pattern;
-      patternLength = pattern.length();
-      state = LITERAL_STATE;
-   }
-
-   private void addToList(PatternConverter pc)
-   {
-      if (head == null)
-      {
-         head = tail = pc;
-      }
-      else
-      {
-         tail.next = pc;
-         tail = pc;
-      }
-   }
-
-   protected String extractOption()
-   {
-      if ((i < patternLength) && (pattern.charAt(i) == '{'))
-      {
-         int end = pattern.indexOf('}', i);
-         if (end > i)
-         {
-            String r = pattern.substring(i + 1, end);
-            i = end + 1;
-            return r;
-         }
-      }
-      return null;
-   }
-
-
-   /**
-    * The option is expected to be in decimal and positive. In case of
-    * error, zero is returned.
-    */
-   protected int extractPrecisionOption()
-   {
-      String opt = extractOption();
-      int r = 0;
-      if (opt != null)
-      {
-         try
-         {
-            r = Integer.parseInt(opt);
-            if (r <= 0)
-            {
-               System.err.println("Precision option (" + opt + ") isn't a positive integer.");
-               r = 0;
-            }
-         }
-         catch (NumberFormatException e)
-         {
-            System.err.println("Category option '" + opt + "' not a decimal integer." + e.getMessage());
-         }
-      }
-      return r;
-   }
-
-   public PatternConverter parse()
-   {
-      char c;
-      i = 0;
-      while (i < patternLength)
-      {
-         c = pattern.charAt(i++);
-         switch (state)
-         {
-            case LITERAL_STATE:
-               // In literal state, the last char is always a literal.
-               if (i == patternLength)
-               {
-                  currentLiteral.append(c);
-                  continue;
-               }
-               if (c == ESCAPE_CHAR)
-               {
-                  // peek at the next char.
-                  switch (pattern.charAt(i))
-                  {
-                     case ESCAPE_CHAR:
-                        currentLiteral.append(c);
-                        i++; // move pointer
-                        break;
-                     case 'n':
-                        currentLiteral.append(LINE_SEP);
-                        i++; // move pointer
-                        break;
-                     default:
-                        if (currentLiteral.length() != 0)
-                        {
-                           addToList(new LiteralPatternConverter(
-                              currentLiteral.toString()));
-                           //LogLog.debug("Parsed LITERAL converter: \""
-                           //           +currentLiteral+"\".");
-                        }
-                        currentLiteral.setLength(0);
-                        currentLiteral.append(c); // append %
-                        state = CONVERTER_STATE;
-                        formattingInfo.reset();
-                  }
-               }
-               else
-               {
-                  currentLiteral.append(c);
-               }
-               break;
-            case CONVERTER_STATE:
-               currentLiteral.append(c);
-               switch (c)
-               {
-                  case '-':
-                     formattingInfo.leftAlign = true;
-                     break;
-                  case '.':
-                     state = DOT_STATE;
-                     break;
-                  default:
-                     if (c >= '0' && c <= '9')
-                     {
-                        formattingInfo.min = c - '0';
-                        state = MIN_STATE;
-                     }
-                     else
-                        finalizeConverter(c);
-               } // switch
-               break;
-            case MIN_STATE:
-               currentLiteral.append(c);
-               if (c >= '0' && c <= '9')
-                  formattingInfo.min = formattingInfo.min * 10 + (c - '0');
-               else if (c == '.')
-                  state = DOT_STATE;
-               else
-               {
-                  finalizeConverter(c);
-               }
-               break;
-            case DOT_STATE:
-               currentLiteral.append(c);
-               if (c >= '0' && c <= '9')
-               {
-                  formattingInfo.max = c - '0';
-                  state = MAX_STATE;
-               }
-               else
-               {
-                  System.err.println("Error occured in position " + i
-                     + ".\n Was expecting digit, instead got char \"" + c + "\".");
-                  state = LITERAL_STATE;
-               }
-               break;
-            case MAX_STATE:
-               currentLiteral.append(c);
-               if (c >= '0' && c <= '9')
-                  formattingInfo.max = formattingInfo.max * 10 + (c - '0');
-               else
-               {
-                  finalizeConverter(c);
-                  state = LITERAL_STATE;
-               }
-               break;
-         } // switch
-      } // while
-      if (currentLiteral.length() != 0)
-      {
-         addToList(new LiteralPatternConverter(currentLiteral.toString()));
-         //LogLog.debug("Parsed LITERAL converter: \""+currentLiteral+"\".");
-      }
-      return head;
-   }
-
-   protected void finalizeConverter(char c)
-   {
-      PatternConverter pc = null;
-      switch (c)
-      {
-         case 'c':
-            pc = new CategoryPatternConverter(formattingInfo,
-               extractPrecisionOption());
-            //LogLog.debug("CATEGORY converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'C':
-            pc = new ClassNamePatternConverter(formattingInfo,
-               extractPrecisionOption());
-            //LogLog.debug("CLASS_NAME converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'd':
-            String dateFormatStr = AbsoluteTimeDateFormat.ISO8601_DATE_FORMAT;
-            DateFormat df;
-            String dOpt = extractOption();
-            if (dOpt != null)
-               dateFormatStr = dOpt;
-
-            if (dateFormatStr.equalsIgnoreCase(
-               AbsoluteTimeDateFormat.ISO8601_DATE_FORMAT))
-               df = new ISO8601DateFormat();
-            else if (dateFormatStr.equalsIgnoreCase(
-               AbsoluteTimeDateFormat.ABS_TIME_DATE_FORMAT))
-               df = new AbsoluteTimeDateFormat();
-            else if (dateFormatStr.equalsIgnoreCase(
-               AbsoluteTimeDateFormat.DATE_AND_TIME_DATE_FORMAT))
-               df = new DateTimeDateFormat();
-            else
-            {
-               try
-               {
-                  df = new SimpleDateFormat(dateFormatStr);
-               }
-               catch (IllegalArgumentException e)
-               {
-                  System.err.println("Could not instantiate SimpleDateFormat with " +
-                     dateFormatStr + ", ex=" + e.getMessage());
-                  df = new ISO8601DateFormat();
-               }
-            }
-            pc = new DatePatternConverter(formattingInfo, df);
-            //LogLog.debug("DATE converter {"+dateFormatStr+"}.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'F':
-            pc = new LocationPatternConverter(formattingInfo,
-               FILE_LOCATION_CONVERTER);
-            //LogLog.debug("File name converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'l':
-            pc = new LocationPatternConverter(formattingInfo,
-               FULL_LOCATION_CONVERTER);
-            //LogLog.debug("Location converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'L':
-            pc = new LocationPatternConverter(formattingInfo,
-               LINE_LOCATION_CONVERTER);
-            //LogLog.debug("LINE NUMBER converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'm':
-            pc = new BasicPatternConverter(formattingInfo, MESSAGE_CONVERTER);
-            //LogLog.debug("MESSAGE converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'M':
-            pc = new LocationPatternConverter(formattingInfo,
-               METHOD_LOCATION_CONVERTER);
-            //LogLog.debug("METHOD converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'p':
-            pc = new BasicPatternConverter(formattingInfo, LEVEL_CONVERTER);
-            //LogLog.debug("LEVEL converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 'r':
-            pc = new BasicPatternConverter(formattingInfo,
-               RELATIVE_TIME_CONVERTER);
-            //LogLog.debug("RELATIVE time converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-         case 't':
-            pc = new BasicPatternConverter(formattingInfo, THREAD_CONVERTER);
-            //LogLog.debug("THREAD converter.");
-            //formattingInfo.dump();
-            currentLiteral.setLength(0);
-            break;
-            /*case 'u':
-            if(i < patternLength) {
-         char cNext = pattern.charAt(i);
-         if(cNext >= '0' && cNext <= '9') {
-           pc = new UserFieldPatternConverter(formattingInfo, cNext - '0');
-           LogLog.debug("USER converter ["+cNext+"].");
-           formattingInfo.dump();
-           currentLiteral.setLength(0);
-           i++;
-         }
-         else
-           System.err.println("Unexpected char" +cNext+" at position "+i);
-            }
-            break;*/
-         case 'x':
-            pc = new BasicPatternConverter(formattingInfo, NDC_CONVERTER);
-            //LogLog.debug("NDC converter.");
-            currentLiteral.setLength(0);
-            break;
-         case 'X':
-            String xOpt = extractOption();
-            pc = new MDCPatternConverter(formattingInfo, xOpt);
-            currentLiteral.setLength(0);
-            break;
-         default:
-            System.err.println("Unexpected char [" + c + "] at position " + i
-               + " in conversion patterrn.");
-            pc = new LiteralPatternConverter(currentLiteral.toString());
-            currentLiteral.setLength(0);
-      }
-
-      addConverter(pc);
-   }
-
-   protected void addConverter(PatternConverter pc)
-   {
-      currentLiteral.setLength(0);
-      // Add the pattern converter to the list.
-      addToList(pc);
-      // Next pattern is assumed to be a literal.
-      state = LITERAL_STATE;
-      // Reset formatting info
-      formattingInfo.reset();
-   }
-
-   // ---------------------------------------------------------------------
-   //                      PatternConverters
-   // ---------------------------------------------------------------------
-
-   private static class BasicPatternConverter extends PatternConverter
-   {
-      int type;
-
-      BasicPatternConverter(FormattingInfo formattingInfo, int type)
-      {
-         super(formattingInfo);
-         this.type = type;
-      }
-
-      public String convert(LogRecord event)
-      {
-         switch (type)
-         {
-            case RELATIVE_TIME_CONVERTER:
-               return (Long.toString(event.getMillis() - startTime));
-            case THREAD_CONVERTER:
-               StringBuffer tmp = new StringBuffer("tid(");
-               tmp.append(event.getThreadID());
-               tmp.append(')');
-               return tmp.toString();
-            case THREAD_NAME_CONVERTER:
-               // @todo figure how to map the thread id to its name
-               return "null";
-            case LEVEL_CONVERTER:
-               return event.getLevel().toString();
-            case NDC_CONVERTER:
-               return "NDC not supported";
-            case MESSAGE_CONVERTER:
-            {
-               return event.getMessage();
-            }
-            default:
-               return null;
-         }
-      }
-   }
-
-   private static class LiteralPatternConverter extends PatternConverter
-   {
-      private String literal;
-
-      LiteralPatternConverter(String value)
-      {
-         literal = value;
-      }
-
-      public
-      final void format(StringBuffer sbuf, LogRecord event)
-      {
-         sbuf.append(literal);
-      }
-
-      public String convert(LogRecord event)
-      {
-         return literal;
-      }
-   }
-
-   private static class DatePatternConverter extends PatternConverter
-   {
-      private DateFormat df;
-      private Date date;
-
-      DatePatternConverter(FormattingInfo formattingInfo, DateFormat df)
-      {
-         super(formattingInfo);
-         date = new Date();
-         this.df = df;
-      }
-
-      public String convert(LogRecord event)
-      {
-         date.setTime(event.getMillis());
-         String converted = null;
-         try
-         {
-            converted = df.format(date);
-         }
-         catch (Exception ex)
-         {
-            System.err.println("Error occured while converting date, " + ex.getMessage());
-         }
-         return converted;
-      }
-   }
-
-   /**
-    * @todo how can this functionality be restored
-    */
-   private static class MDCPatternConverter extends PatternConverter
-   {
-      private String key;
-
-      MDCPatternConverter(FormattingInfo formattingInfo, String key)
-      {
-         super(formattingInfo);
-         this.key = key;
-      }
-
-      public String convert(LogRecord event)
-      {
-         Object val = null; // event.getMDC(key);
-         if (val == null)
-         {
-            return null;
-         }
-         else
-         {
-            return val.toString();
-         }
-      }
-   }
-
-
-   private class LocationPatternConverter extends PatternConverter
-   {
-      int type;
-
-      LocationPatternConverter(FormattingInfo formattingInfo, int type)
-      {
-         super(formattingInfo);
-         this.type = type;
-      }
-
-      public String convert(LogRecord event)
-      {
-         switch (type)
-         {
-            case FULL_LOCATION_CONVERTER:
-               return "Class: " + event.getSourceClassName() + "." + event.getSourceMethodName();
-            case METHOD_LOCATION_CONVERTER:
-               return event.getSourceMethodName();
-            case LINE_LOCATION_CONVERTER:
-               return "0";
-            case FILE_LOCATION_CONVERTER:
-               return event.getSourceClassName();
-            default:
-               return null;
-         }
-      }
-   }
-
-   private static abstract class NamedPatternConverter extends PatternConverter
-   {
-      int precision;
-
-      NamedPatternConverter(FormattingInfo formattingInfo, int precision)
-      {
-         super(formattingInfo);
-         this.precision = precision;
-      }
-
-      abstract String getFullyQualifiedName(LogRecord event);
-
-      public String convert(LogRecord event)
-      {
-         String n = getFullyQualifiedName(event);
-         if (precision <= 0)
-            return n;
-         else
-         {
-            int len = n.length();
-
-            // We substract 1 from 'len' when assigning to 'end' to avoid out of
-            // bounds exception in return r.substring(end+1, len). This can happen if
-            // precision is 1 and the category name ends with a dot.
-            int end = len - 1;
-            for (int i = precision; i > 0; i--)
-            {
-               end = n.lastIndexOf('.', end - 1);
-               if (end == -1)
-                  return n;
-            }
-            return n.substring(end + 1, len);
-         }
-      }
-   }
-
-   private class ClassNamePatternConverter extends NamedPatternConverter
-   {
-
-      ClassNamePatternConverter(FormattingInfo formattingInfo, int precision)
-      {
-         super(formattingInfo, precision);
-      }
-
-      String getFullyQualifiedName(LogRecord event)
-      {
-         return event.getSourceClassName();
-      }
-   }
-
-   private class CategoryPatternConverter extends NamedPatternConverter
-   {
-
-      CategoryPatternConverter(FormattingInfo formattingInfo, int precision)
-      {
-         super(formattingInfo, precision);
-      }
-
-      String getFullyQualifiedName(LogRecord event)
-      {
-         return event.getLoggerName();
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternParser.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/format/PatternParser.java)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/DailyRollingFileHandler.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/DailyRollingFileHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/DailyRollingFileHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,481 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.logging.jdk.handlers;
-
-import java.util.Date;
-import java.util.TimeZone;
-import java.util.Locale;
-import java.util.GregorianCalendar;
-import java.util.Calendar;
-import java.util.logging.Formatter;
-import java.util.logging.ErrorManager;
-import java.util.logging.LogRecord;
-import java.text.SimpleDateFormat;
-import java.io.IOException;
-import java.io.File;
-
-/**
-   DailyRollingFileAppender extends {@link FileAppender} so that the
-   underlying file is rolled over at a user chosen frequency.
-
-   <p>The rolling schedule is specified by the <b>DatePattern</b>
-   option. This pattern should follow the {@link SimpleDateFormat}
-   conventions. In particular, you <em>must</em> escape literal text
-   within a pair of single quotes. A formatted version of the date
-   pattern is used as the suffix for the rolled file name.
-
-   <p>For example, if the <b>File</b> option is set to
-   <code>/foo/bar.log</code> and the <b>DatePattern</b> set to
-   <code>'.'yyyy-MM-dd</code>, on 2001-02-16 at midnight, the logging
-   file <code>/foo/bar.log</code> will be copied to
-   <code>/foo/bar.log.2001-02-16</code> and logging for 2001-02-17
-   will continue in <code>/foo/bar.log</code> until it rolls over
-   the next day.
-
-   <p>Is is possible to specify monthly, weekly, half-daily, daily,
-   hourly, or minutely rollover schedules.
-
-   <p><table border="1" cellpadding="2">
-   <tr>
-   <th>DatePattern</th>
-   <th>Rollover schedule</th>
-   <th>Example</th>
-
-   <tr>
-   <td><code>'.'yyyy-MM</code>
-   <td>Rollover at the beginning of each month</td>
-
-   <td>At midnight of May 31st, 2002 <code>/foo/bar.log</code> will be
-   copied to <code>/foo/bar.log.2002-05</code>. Logging for the month
-   of June will be output to <code>/foo/bar.log</code> until it is
-   also rolled over the next month.
-
-   <tr>
-   <td><code>'.'yyyy-ww</code>
-
-   <td>Rollover at the first day of each week. The first day of the
-   week depends on the locale.</td>
-
-   <td>Assuming the first day of the week is Sunday, on Saturday
-   midnight, June 9th 2002, the file <i>/foo/bar.log</i> will be
-   copied to <i>/foo/bar.log.2002-23</i>.  Logging for the 24th week
-   of 2002 will be output to <code>/foo/bar.log</code> until it is
-   rolled over the next week.
-
-   <tr>
-   <td><code>'.'yyyy-MM-dd</code>
-
-   <td>Rollover at midnight each day.</td>
-
-   <td>At midnight, on March 8th, 2002, <code>/foo/bar.log</code> will
-   be copied to <code>/foo/bar.log.2002-03-08</code>. Logging for the
-   9th day of March will be output to <code>/foo/bar.log</code> until
-   it is rolled over the next day.
-
-   <tr>
-   <td><code>'.'yyyy-MM-dd-a</code>
-
-   <td>Rollover at midnight and midday of each day.</td>
-
-   <td>At noon, on March 9th, 2002, <code>/foo/bar.log</code> will be
-   copied to <code>/foo/bar.log.2002-03-09-AM</code>. Logging for the
-   afternoon of the 9th will be output to <code>/foo/bar.log</code>
-   until it is rolled over at midnight.
-
-   <tr>
-   <td><code>'.'yyyy-MM-dd-HH</code>
-
-   <td>Rollover at the top of every hour.</td>
-
-   <td>At approximately 11:00.000 o'clock on March 9th, 2002,
-   <code>/foo/bar.log</code> will be copied to
-   <code>/foo/bar.log.2002-03-09-10</code>. Logging for the 11th hour
-   of the 9th of March will be output to <code>/foo/bar.log</code>
-   until it is rolled over at the beginning of the next hour.
-
-
-   <tr>
-   <td><code>'.'yyyy-MM-dd-HH-mm</code>
-
-   <td>Rollover at the beginning of every minute.</td>
-
-   <td>At approximately 11:23,000, on March 9th, 2001,
-   <code>/foo/bar.log</code> will be copied to
-   <code>/foo/bar.log.2001-03-09-10-22</code>. Logging for the minute
-   of 11:23 (9th of March) will be output to
-   <code>/foo/bar.log</code> until it is rolled over the next minute.
-
-   </table>
-
-   <p>Do not use the colon ":" character in anywhere in the
-   <b>DatePattern</b> option. The text before the colon is interpeted
-   as the protocol specificaion of a URL which is probably not what
-   you want.
-
-
-   @author Eirik Lygre
-   @author Ceki G&uuml;lc&uuml;
-   @author Scott.Stark at jboss.org
-   @version $Revision$
- */
-public class DailyRollingFileHandler extends FileHandler
-{
-   // The code assumes that the following constants are in a increasing
-   // sequence.
-   static final int TOP_OF_TROUBLE = -1;
-   static final int TOP_OF_MINUTE = 0;
-   static final int TOP_OF_HOUR = 1;
-   static final int HALF_DAY = 2;
-   static final int TOP_OF_DAY = 3;
-   static final int TOP_OF_WEEK = 4;
-   static final int TOP_OF_MONTH = 5;
-
-
-   /**
-    * The date pattern. By default, the pattern is set to
-    * "'.'yyyy-MM-dd" meaning daily rollover.
-    */
-   private String datePattern = "'.'yyyy-MM-dd";
-
-   /**
-    * The log file will be renamed to the value of the
-    * scheduledFilename variable when the next interval is entered. For
-    * example, if the rollover period is one hour, the log file will be
-    * renamed to the value of "scheduledFilename" at the beginning of
-    * the next hour.
-    * <p/>
-    * The precise time when a rollover occurs depends on logging
-    * activity.
-    */
-   private String scheduledFilename;
-
-   /**
-    * The next time we estimate a rollover should occur.
-    */
-   private long nextCheck = System.currentTimeMillis() - 1;
-
-   Date now = new Date();
-
-   SimpleDateFormat sdf;
-
-   RollingCalendar rc = new RollingCalendar();
-
-   int checkPeriod = TOP_OF_TROUBLE;
-
-   // The gmtTimeZone is used only in computeCheckPeriod() method.
-   static final TimeZone gmtTimeZone = TimeZone.getTimeZone("GMT");
-
-
-   /**
-    * The default constructor does nothing.
-    */
-   public DailyRollingFileHandler()
-   {
-   }
-
-   /**
-    * Instantiate a <code>DailyRollingFileAppender</code> and open the
-    * file designated by <code>filename</code>. The opened filename will
-    * become the ouput destination for this appender.
-    */
-   public DailyRollingFileHandler(Formatter layout, String filename,
-      String datePattern) throws IOException
-   {
-      super(layout, filename, true);
-      this.datePattern = datePattern;
-      activateOptions();
-   }
-
-   /**
-    * The <b>DatePattern</b> takes a string in the same format as
-    * expected by {@link SimpleDateFormat}. This options determines the
-    * rollover schedule.
-    */
-   public void setDatePattern(String pattern)
-   {
-      datePattern = pattern;
-   }
-
-   /**
-    * Returns the value of the <b>DatePattern</b> option.
-    */
-   public String getDatePattern()
-   {
-      return datePattern;
-   }
-
-   public void activateOptions()
-   {
-      super.activateOptions();
-      if (datePattern != null && fileName != null)
-      {
-         now.setTime(System.currentTimeMillis());
-         sdf = new SimpleDateFormat(datePattern);
-         int type = computeCheckPeriod();
-         printPeriodicity(type);
-         rc.setType(type);
-         File file = new File(fileName);
-         scheduledFilename = fileName + sdf.format(new Date(file.lastModified()));
-      }
-      else
-      {
-         reportError("Either File or DatePattern options are not set for appender ["
-            + name + "].", null, ErrorManager.OPEN_FAILURE);
-      }
-   }
-
-   void printPeriodicity(int type)
-   {
-      switch (type)
-      {
-         case TOP_OF_MINUTE:
-            debug("Appender [" + name + "] to be rolled every minute.");
-            break;
-         case TOP_OF_HOUR:
-            debug("Appender [" + name
-               + "] to be rolled on top of every hour.");
-            break;
-         case HALF_DAY:
-            debug("Appender [" + name
-               + "] to be rolled at midday and midnight.");
-            break;
-         case TOP_OF_DAY:
-            debug("Appender [" + name
-               + "] to be rolled at midnight.");
-            break;
-         case TOP_OF_WEEK:
-            debug("Appender [" + name
-               + "] to be rolled at start of week.");
-            break;
-         case TOP_OF_MONTH:
-            debug("Appender [" + name
-               + "] to be rolled at start of every month.");
-            break;
-         default:
-            reportError("Unknown periodicity for appender [" + name + "].",
-               null, ErrorManager.FORMAT_FAILURE);
-      }
-   }
-
-   // This method computes the roll over period by looping over the
-   // periods, starting with the shortest, and stopping when the r0 is
-   // different from from r1, where r0 is the epoch formatted according
-   // the datePattern (supplied by the user) and r1 is the
-   // epoch+nextMillis(i) formatted according to datePattern. All date
-   // formatting is done in GMT and not local format because the test
-   // logic is based on comparisons relative to 1970-01-01 00:00:00
-   // GMT (the epoch).
-
-   int computeCheckPeriod()
-   {
-      RollingCalendar rollingCalendar = new RollingCalendar(gmtTimeZone, Locale.ENGLISH);
-      // set sate to 1970-01-01 00:00:00 GMT
-      Date epoch = new Date(0);
-      if (datePattern != null)
-      {
-         for (int i = TOP_OF_MINUTE; i <= TOP_OF_MONTH; i++)
-         {
-            SimpleDateFormat simpleDateFormat = new SimpleDateFormat(datePattern);
-            simpleDateFormat.setTimeZone(gmtTimeZone); // do all date formatting in GMT
-            String r0 = simpleDateFormat.format(epoch);
-            rollingCalendar.setType(i);
-            Date next = new Date(rollingCalendar.getNextCheckMillis(epoch));
-            String r1 = simpleDateFormat.format(next);
-            //System.out.println("Type = "+i+", r0 = "+r0+", r1 = "+r1);
-            if (r0 != null && r1 != null && !r0.equals(r1))
-            {
-               return i;
-            }
-         }
-      }
-      return TOP_OF_TROUBLE; // Deliberately head for trouble...
-   }
-
-   /**
-    * Rollover the current file to a new file.
-    */
-   void rollOver() throws IOException
-   {
-
-      /* Compute filename, but only if datePattern is specified */
-      if (datePattern == null)
-      {
-         reportError("Missing DatePattern option in rollOver().", null, ErrorManager.OPEN_FAILURE);
-         return;
-      }
-
-      String datedFilename = fileName + sdf.format(now);
-      // It is too early to roll over because we are still within the
-      // bounds of the current interval. Rollover will occur once the
-      // next interval is reached.
-      if (scheduledFilename.equals(datedFilename))
-      {
-         return;
-      }
-
-      // close current file, and rename it to datedFilename
-      this.close();
-
-      File target = new File(scheduledFilename);
-      if (target.exists())
-      {
-         target.delete();
-      }
-
-      File file = new File(fileName);
-      boolean result = file.renameTo(target);
-      if (result)
-      {
-         debug(fileName + " -> " + scheduledFilename);
-      }
-      else
-      {
-         reportError("Failed to rename [" + fileName + "] to [" + scheduledFilename + "].",
-            null, ErrorManager.OPEN_FAILURE);
-      }
-
-      try
-      {
-         // This will also close the file. This is OK since multiple
-         // close operations are safe.
-         this.setFile(fileName, false, this.bufferedIO, this.bufferSize);
-      }
-      catch (IOException e)
-      {
-         reportError("setFile(" + fileName + ", false) call failed.",
-            null, ErrorManager.OPEN_FAILURE);
-      }
-      scheduledFilename = datedFilename;
-   }
-
-   /**
-    * This method differentiates DailyRollingFileAppender from its
-    * super class.
-    * <p/>
-    * <p>Before actually logging, this method will check whether it is
-    * time to do a rollover. If it is, it will schedule the next
-    * rollover time and then rollover.
-    */
-   protected void subPublish(LogRecord event)
-   {
-      long n = System.currentTimeMillis();
-      if (n >= nextCheck)
-      {
-         now.setTime(n);
-         nextCheck = rc.getNextCheckMillis(now);
-         try
-         {
-            rollOver();
-         }
-         catch (IOException ioe)
-         {
-            reportError("rollOver() failed.", ioe, ErrorManager.OPEN_FAILURE);
-         }
-      }
-      super.subPublish(event);
-   }
-}
-
-/**
- *  RollingCalendar is a helper class to DailyRollingFileAppender.
- *  Given a periodicity type and the current time, it computes the
- *  start of the next interval.  
- * */
-class RollingCalendar extends GregorianCalendar
-{
-
-   int type = DailyRollingFileHandler.TOP_OF_TROUBLE;
-
-   RollingCalendar()
-   {
-      super();
-   }
-
-   RollingCalendar(TimeZone tz, Locale locale)
-   {
-      super(tz, locale);
-   }
-
-   void setType(int type)
-   {
-      this.type = type;
-   }
-
-   public long getNextCheckMillis(Date now)
-   {
-      return getNextCheckDate(now).getTime();
-   }
-
-   public Date getNextCheckDate(Date now)
-   {
-      this.setTime(now);
-
-      switch (type)
-      {
-         case DailyRollingFileHandler.TOP_OF_MINUTE:
-            this.set(Calendar.SECOND, 0);
-            this.set(Calendar.MILLISECOND, 0);
-            this.add(Calendar.MINUTE, 1);
-            break;
-         case DailyRollingFileHandler.TOP_OF_HOUR:
-            this.set(Calendar.MINUTE, 0);
-            this.set(Calendar.SECOND, 0);
-            this.set(Calendar.MILLISECOND, 0);
-            this.add(Calendar.HOUR_OF_DAY, 1);
-            break;
-         case DailyRollingFileHandler.HALF_DAY:
-            this.set(Calendar.MINUTE, 0);
-            this.set(Calendar.SECOND, 0);
-            this.set(Calendar.MILLISECOND, 0);
-            int hour = get(Calendar.HOUR_OF_DAY);
-            if (hour < 12)
-            {
-               this.set(Calendar.HOUR_OF_DAY, 12);
-            }
-            else
-            {
-               this.set(Calendar.HOUR_OF_DAY, 0);
-               this.add(Calendar.DAY_OF_MONTH, 1);
-            }
-            break;
-         case DailyRollingFileHandler.TOP_OF_DAY:
-            this.set(Calendar.HOUR_OF_DAY, 0);
-            this.set(Calendar.MINUTE, 0);
-            this.set(Calendar.SECOND, 0);
-            this.set(Calendar.MILLISECOND, 0);
-            this.add(Calendar.DATE, 1);
-            break;
-         case DailyRollingFileHandler.TOP_OF_WEEK:
-            this.set(Calendar.DAY_OF_WEEK, getFirstDayOfWeek());
-            this.set(Calendar.HOUR_OF_DAY, 0);
-            this.set(Calendar.SECOND, 0);
-            this.set(Calendar.MILLISECOND, 0);
-            this.add(Calendar.WEEK_OF_YEAR, 1);
-            break;
-         case DailyRollingFileHandler.TOP_OF_MONTH:
-            this.set(Calendar.DATE, 1);
-            this.set(Calendar.HOUR_OF_DAY, 0);
-            this.set(Calendar.SECOND, 0);
-            this.set(Calendar.MILLISECOND, 0);
-            this.add(Calendar.MONTH, 1);
-            break;
-         default:
-            throw new IllegalStateException("Unknown periodicity type.");
-      }
-      return getTime();
-  }
-}
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/DailyRollingFileHandler.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/DailyRollingFileHandler.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/FileHandler.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/FileHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/FileHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,237 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.logging.jdk.handlers;
-
-import java.io.IOException;
-import java.io.FileOutputStream;
-import java.io.FileNotFoundException;
-import java.io.File;
-import java.io.Writer;
-import java.io.BufferedWriter;
-import java.util.logging.Formatter;
-import java.util.logging.ErrorManager;
-
-/**
- *  FileAppender appends log events to a file.
- *
- * @author Ceki G&uuml;lc&uuml; 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class FileHandler extends WriterHandler
-{
-   /**
-    * Controls file truncatation. The default value for this variable
-    * is <code>true</code>, meaning that by default a
-    * <code>FileAppender</code> will append to an existing file and not
-    * truncate it.
-    * <p/>
-    * <p>This option is meaningful only if the FileAppender opens the
-    * file.
-    */
-   protected boolean fileAppend = true;
-
-   /**
-    * The name of the log file.
-    */
-   protected String fileName = null;
-
-   /**
-    * The default constructor does not do anything.
-    */
-   public FileHandler()
-   {
-   }
-
-   /**
-    * Instantiate a <code>FileHandler</code> and open the file
-    * designated by <code>filename</code>. The opened filename will
-    * become the output destination for this appender.
-    * <p/>
-    * <p>If the <code>append</code> parameter is true, the file will be
-    * appended to. Otherwise, the file designated by
-    * <code>filename</code> will be truncated before being opened.
-    * <p/>
-    * <p>If the <code>bufferedIO</code> parameter is <code>true</code>,
-    * then buffered IO will be used to write to the output file.
-    */
-   public FileHandler(Formatter layout, String filename, boolean append, boolean bufferedIO,
-      int bufferSize)
-      throws IOException
-   {
-      super.setFormatter(layout);
-      this.setFile(filename, append, bufferedIO, bufferSize);
-   }
-
-   /**
-    * Instantiate a FileHandler and open the file designated by
-    * <code>filename</code>. The opened filename will become the output
-    * destination for this appender.
-    * <p/>
-    * <p>If the <code>append</code> parameter is true, the file will be
-    * appended to. Otherwise, the file designated by
-    * <code>filename</code> will be truncated before being opened.
-    */
-   public FileHandler(Formatter layout, String filename, boolean append)
-      throws IOException
-   {
-      this(layout, filename, append, true, 2048);
-   }
-
-   /**
-    * Instantiate a FileHandler and open the file designated by
-    * <code>filename</code>. The opened filename will become the output
-    * destination for this appender.
-    * <p/>
-    * <p>The file will be appended to.
-    */
-   public FileHandler(Formatter layout, String filename) throws IOException
-   {
-      this(layout, filename, true);
-   }
-
-   /**
-    * The <b>File</b> property takes a string value which should be the
-    * name of the file to append to.
-    * <p/>
-    * <p>Note: Actual opening of the file is made when {@link
-    * #activateOptions} is called, not when the options are set.
-    */
-   public void setFile(String file)
-   {
-      // Trim spaces from both ends. The users probably does not want
-      // trailing spaces in file names.
-      String val = file.trim();
-      fileName = val;
-   }
-
-   /**
-    * Returns the value of the <b>Append</b> option.
-    */
-   public boolean getAppend()
-   {
-      return fileAppend;
-   }
-
-
-   /**
-    * Returns the value of the <b>File</b> option.
-    */
-   public String getFile()
-   {
-      return fileName;
-   }
-
-   /**
-    * If the value of <b>File</b> is not <code>null</code>, then {@link
-    * #setFile} is called with the values of <b>File</b>  and
-    * <b>Append</b> properties.
-    *
-    */
-   public void activateOptions()
-   {
-      if (fileName != null)
-      {
-         try
-         {
-            setFile(fileName, fileAppend, bufferedIO, bufferSize);
-         }
-         catch (java.io.IOException e)
-         {
-            reportError("setFile(" + fileName + "," + fileAppend + ") call failed.",
-               e, ErrorManager.OPEN_FAILURE);
-         }
-      }
-      else
-      {
-         reportError("File option not set for appender [" + name + "]."
-            +" Are you using FileHandler instead of ConsoleAppender?",
-            null, ErrorManager.OPEN_FAILURE);
-      }
-   }
-
-   /**
-    * The <b>Append</b> option takes a boolean value. It is set to
-    * <code>true</code> by default. If true, then <code>File</code>
-    * will be opened in append mode by {@link #setFile setFile} (see
-    * above). Otherwise, {@link #setFile setFile} will open
-    * <code>File</code> in truncate mode.
-    * <p/>
-    * <p>Note: Actual opening of the file is made when {@link
-    * #activateOptions} is called, not when the options are set.
-    */
-   public void setAppend(boolean flag)
-   {
-      fileAppend = flag;
-   }
-
-   /**
-    * <p>Sets and <i>opens</i> the file where the log output will
-    * go. The specified file must be writable.
-    * <p/>
-    * <p>If there was already an opened file, then the previous file
-    * is closed first.
-    * <p/>
-    * <p><b>Do not use this method directly. To configure a FileHandler
-    * or one of its subclasses, set its properties one by one and then
-    * call activateOptions.</b>
-    *
-    * @param fileName The path to the log file.
-    * @param append   If true will append to fileName. Otherwise will
-    *                 truncate fileName.
-    */
-   public synchronized void setFile(String fileName, boolean append, boolean bufferedIO, int bufferSize)
-      throws IOException
-   {
-//      reportError("setFile called: " + fileName + ", " + append, null, ErrorManager.GENERIC_FAILURE);
-      super.setBufferedIO(bufferedIO);
-      super.setBufferSize(bufferSize);
-      FileOutputStream ostream = null;
-      try
-      {
-         //   attempt to create file
-         ostream = new FileOutputStream(fileName, append);
-      }
-      catch (FileNotFoundException ex)
-      {
-         //   if parent directory does not exist then
-         //      attempt to create it and try to create file
-         String parentName = new File(fileName).getParent();
-         if (parentName != null)
-         {
-            File parentDir = new File(parentName);
-            if (!parentDir.exists() && parentDir.mkdirs())
-            {
-               ostream = new FileOutputStream(fileName, append);
-            }
-            else
-            {
-               throw ex;
-            }
-         }
-         else
-         {
-            throw ex;
-         }
-      }
-      super.setOutputStream(ostream);
-      this.fileName = fileName;
-      this.fileAppend = append;
-      // LogLog.debug("setFile ended");
-   }
-
-}
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/FileHandler.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/FileHandler.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/HandlerSkeleton.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/HandlerSkeleton.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/HandlerSkeleton.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2005 Your Corporation. All Rights Reserved.
- */
-package org.jboss.logging.jdk.handlers;
-
-import java.util.logging.Handler;
-
-/**
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public abstract class HandlerSkeleton extends Handler
-{
-   protected String name;
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public void activateOptions()
-   {
-   }
-
-   protected void debug(String msg)
-   {
-      System.out.println(msg);
-   }
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/HandlerSkeleton.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/HandlerSkeleton.java)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/WriterHandler.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/WriterHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/WriterHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,276 +0,0 @@
-package org.jboss.logging.jdk.handlers;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.util.logging.ErrorManager;
-import java.util.logging.Formatter;
-import java.util.logging.LogRecord;
-
-/**
- * A base handler that outputs log messages to a Writer
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class WriterHandler extends HandlerSkeleton
-{
-   /**
-    * Immediate flush means that the underlying writer or output stream
-    * will be flushed at the end of each append operation. Immediate
-    * flush is slower but ensures that each append request is actually
-    * written. If <code>immediateFlush</code> is set to
-    * <code>false</code>, then there is a good chance that the last few
-    * logs events are not actually written to persistent media if and
-    * when the application crashes.
-    * <p/>
-    * <p>The <code>immediateFlush</code> variable is set to
-    * <code>true</code> by default.
-    */
-   protected boolean immediateFlush = true;
-   /**
-    * Do we do bufferedIO?
-    */
-   protected boolean bufferedIO = false;
-   /**
-    * Determines the size of IO buffer be. Default is 8K.
-    */
-   protected int bufferSize = 8 * 1024;
-
-   private OutputStream msgOutput;
-   private Writer msgWriter;
-   /**
-    * Has the
-    */
-   private boolean wroteHeader;
-
-   public WriterHandler()
-   {
-      super();
-   }
-
-   public WriterHandler(OutputStream output, Formatter formatter)
-   {
-      setFormatter(formatter);
-      setOutputStream(output);
-   }
-
-   /**
-    * If the <b>ImmediateFlush</b> option is set to
-    * <code>true</code>, the appender will flush at the end of each
-    * write. This is the default behavior. If the option is set to
-    * <code>false</code>, then the underlying stream can defer writing
-    * to physical medium to a later time.
-    * <p/>
-    * <p>Avoiding the flush operation at the end of each append results in
-    * a performance gain of 10 to 20 percent. However, there is safety
-    * tradeoff involved in skipping flushing. Indeed, when flushing is
-    * skipped, then it is likely that the last few log events will not
-    * be recorded on disk when the application exits. This is a high
-    * price to pay even for a 20% performance gain.
-    */
-   public void setImmediateFlush(boolean value)
-   {
-      immediateFlush = value;
-   }
-
-   /**
-    * Returns value of the <b>ImmediateFlush</b> option.
-    */
-   public boolean getImmediateFlush()
-   {
-      return immediateFlush;
-   }
-
-   public boolean isBufferedIO()
-   {
-      return bufferedIO;
-   }
-
-   /**
-    * The <b>BufferedIO</b> option takes a boolean value. It is set to
-    * <code>false</code> by default. If true, then <code>File</code>
-    * will be opened and the resulting {@link java.io.Writer} wrapped
-    * around a {@link java.io.BufferedWriter}.
-    * <p/>
-    * BufferedIO will significatnly increase performance on heavily
-    * loaded systems.
-    */
-   public void setBufferedIO(boolean bufferedIO)
-   {
-      this.bufferedIO = bufferedIO;
-      if (bufferedIO)
-      {
-         immediateFlush = false;
-      }
-   }
-
-   public int getBufferSize()
-   {
-      return bufferSize;
-   }
-
-   /**
-    * Set the size of the IO buffer.
-    */
-   public void setBufferSize(int bufferSize)
-   {
-      this.bufferSize = bufferSize;
-   }
-
-   public void setEncoding(String encoding)
-      throws SecurityException, UnsupportedEncodingException
-   {
-      super.setEncoding(encoding);
-      if (msgOutput == null)
-      {
-         return;
-      }
-      // Replace the current writer with a writer for the new encoding.
-      flush();
-      if (encoding == null)
-      {
-         msgWriter = new OutputStreamWriter(msgOutput);
-      }
-      else
-      {
-         msgWriter = new OutputStreamWriter(msgOutput, encoding);
-      }
-   }
-
-   public synchronized void flush()
-   {
-      if (msgWriter != null)
-      {
-         try
-         {
-            msgWriter.flush();
-         }
-         catch (IOException e)
-         {
-            reportError("Failed to flush writer", e, ErrorManager.FLUSH_FAILURE);
-         }
-      }
-   }
-
-   public synchronized void close()
-   {
-      if (msgWriter != null)
-      {
-         try
-         {
-            if (!wroteHeader)
-            {
-               msgWriter.write(getFormatter().getHead(this));
-               wroteHeader = true;
-            }
-            msgWriter.write(getFormatter().getTail(this));
-            msgWriter.flush();
-            msgWriter.close();
-         }
-         catch (Exception ex)
-         {
-            // We don't want to throw an exception here, but we
-            // report the exception to any registered ErrorManager.
-            reportError(null, ex, ErrorManager.CLOSE_FAILURE);
-         }
-         msgWriter = null;
-         msgOutput = null;
-      }
-
-   }
-
-   public void publish(LogRecord record)
-   {
-      if(checkEntryConditions(record) == false)
-      {
-         return;
-      }
-      subPublish(record);
-   }
-
-   protected boolean checkEntryConditions(LogRecord record)
-   {
-      boolean canWrite = super.isLoggable(record);
-      if( canWrite )
-      {
-         canWrite = msgWriter != null;
-      }
-      return canWrite;
-   }
-
-   /**
-    * Actual writing occurs here.
-    * Most subclasses of WriterHandler will need to
-    * override this method.
-    */
-   protected void subPublish(LogRecord record)
-   {
-      Formatter fmt = getFormatter();
-      String msg = fmt.format(record);
-      synchronized (this)
-      {
-         try
-         {
-            msgWriter.write(msg);
-         }
-         catch (IOException e)
-         {
-            reportError("Failed to publish recored", e, ErrorManager.WRITE_FAILURE);
-         }
-         if (this.immediateFlush)
-         {
-            flush();
-         }
-      }
-   }
-
-   /**
-    * Change the output stream.
-    * <p/>
-    * If there is a current output stream then the <tt>Formatter</tt>'s
-    * tail string is written and the stream is flushed and closed.
-    * Then the output stream is replaced with the new output stream.
-    *
-    * @param out New output stream.  May not be null.
-    * @throws SecurityException if a security manager exists and if
-    *                           the caller does not have <tt>LoggingPermission("control")</tt>.
-    */
-   protected synchronized void setOutputStream(OutputStream out)
-   {
-      if (out == null)
-      {
-         throw new NullPointerException("The out argument cannot be null");
-      }
-      close();
-      msgOutput = out;
-      wroteHeader = false;
-      String encoding = getEncoding();
-      if (encoding == null)
-      {
-         msgWriter = new OutputStreamWriter(msgOutput);
-      }
-      else
-      {
-         try
-         {
-            msgWriter = new OutputStreamWriter(msgOutput, encoding);
-         }
-         catch (UnsupportedEncodingException ex)
-         {
-            // This shouldn't happen.  The setEncoding method
-            // should have validated that the encoding is OK.
-            throw new Error("Unexpected exception " + ex);
-         }
-      }
-      if (bufferedIO)
-      {
-         msgWriter = new BufferedWriter(msgWriter, bufferSize);
-      }
-   }
-
-
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/WriterHandler.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/handlers/WriterHandler.java)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/DOMConfigurator.java
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/DOMConfigurator.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/DOMConfigurator.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1022 +0,0 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.logging.jdk.xml;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.reflect.Constructor;
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.Properties;
-import java.util.logging.ErrorManager;
-import java.util.logging.Filter;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.LogManager;
-import java.util.logging.Logger;
-import java.util.logging.Formatter;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-
-import org.jboss.util.propertyeditor.PropertyEditors;
-import org.jboss.util.StringPropertyReplacer;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.logging.jdk.handlers.HandlerSkeleton;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-// Contributors:   Mark Womack
-//                 Arun Katkere 
-
-/**
- * Use this class to initialize the log4j environment using a DOM tree.
- * <p/>
- * <p>The DTD is specified in <a
- * href="log4j.dtd"><b>log4j.dtd</b></a>.
- * <p/>
- * <p>Sometimes it is useful to see how log4j is reading configuration
- * files. You can enable log4j internal logging by defining the
- * <b>log4j.debug</b> variable on the java command
- * line. Alternatively, set the <code>debug</code> attribute in the
- * <code>jdk:configuration</code> element. As in
- * <pre>
- * &lt;log4j:configuration <b>debug="true"</b> xmlns:log4j="http://jakarta.apache.org/log4j/">
- * ...
- * &lt;/log4j:configuration>
- * </pre>
- * <p/>
- * <p>There are sample XML files included in the package.
- *
- * @author Christopher Taylor
- * @author Ceki G&uuml;lc&uuml;
- * @author Anders Kristensen
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class DOMConfigurator
-{
-
-   static final String CONFIGURATION_TAG = "jdk:configuration";
-   static final String OLD_CONFIGURATION_TAG = "configuration";
-   static final String RENDERER_TAG = "renderer";
-   static final String APPENDER_TAG = "appender";
-   static final String APPENDER_REF_TAG = "appender-ref";
-   static final String PARAM_TAG = "param";
-   static final String LAYOUT_TAG = "layout";
-   static final String CATEGORY = "category";
-   static final String LOGGER = "logger";
-   static final String LOGGER_REF = "logger-ref";
-   static final String CATEGORY_FACTORY_TAG = "categoryFactory";
-   static final String NAME_ATTR = "name";
-   static final String CLASS_ATTR = "class";
-   static final String VALUE_ATTR = "value";
-   static final String ROOT_TAG = "root";
-   static final String ROOT_REF = "root-ref";
-   static final String LEVEL_TAG = "level";
-   static final String PRIORITY_TAG = "priority";
-   static final String FILTER_TAG = "filter";
-   static final String ERROR_HANDLER_TAG = "errorHandler";
-   static final String REF_ATTR = "ref";
-   static final String ADDITIVITY_ATTR = "additivity";
-   static final String THRESHOLD_ATTR = "threshold";
-   static final String CONFIG_DEBUG_ATTR = "configDebug";
-   static final String INTERNAL_DEBUG_ATTR = "debug";
-   static final String RENDERING_CLASS_ATTR = "renderingClass";
-   static final String RENDERED_CLASS_ATTR = "renderedClass";
-
-   static final String EMPTY_STR = "";
-   static final Class[] ONE_STRING_PARAM = new Class[]{String.class};
-
-   final static String dbfKey = "javax.xml.parsers.DocumentBuilderFactory";
-
-
-   // key: appenderName, value: appender
-   private Hashtable appenderBag;
-   private ErrorManager errorLog;
-   private Properties props;
-   private LogManager repository;
-   private boolean debug;
-
-   /**
-    * Configure jdk using a <code>configuration</code> element as
-    * defined in the jdk.dtd.
-    */
-   static public void configure(Element element)
-   {
-      DOMConfigurator configurator = new DOMConfigurator();
-      configurator.doConfigure(element, LogManager.getLogManager());
-   }
-
-   /**
-    * A static version of {@link #doConfigure(String, LogManager)}.
-    */
-   static public void configure(String filename)
-      throws FactoryConfigurationError
-   {
-      new DOMConfigurator().doConfigure(filename,
-         LogManager.getLogManager());
-   }
-
-   /**
-    * A static version of {@link #doConfigure(java.net.URL, LogManager)}.
-    */
-   static public void configure(URL url)
-      throws FactoryConfigurationError
-   {
-      new DOMConfigurator().doConfigure(url, LogManager.getLogManager());
-   }
-
-   /**
-    * A static version of {@link #doConfigure(java.net.URL, LogManager)}.
-    */
-   static public void configure(InputStream is)
-      throws FactoryConfigurationError
-   {
-      new DOMConfigurator().doConfigure(is, LogManager.getLogManager());
-   }
-
-   /**
-    * No argument constructor.
-    */
-   public DOMConfigurator()
-   {
-      this(new ErrorManager());
-   }
-
-   public DOMConfigurator(ErrorManager errorLog)
-   {
-      appenderBag = new Hashtable();
-      this.errorLog = errorLog;
-   }
-
-   /**
-    * Used internally to parse appenders by IDREF name.
-    */
-   protected Handler findHandlerByName(Document doc, String appenderName)
-   {
-      Handler appender = (Handler) appenderBag.get(appenderName);
-
-      if (appender != null)
-      {
-         return appender;
-      }
-      else
-      {
-         // Doesn't work on DOM Level 1 :
-         Element element = doc.getElementById(appenderName);
-         if (element == null)
-         {
-            errorLog.error("No appender named [" + appenderName + "] could be found.",
-               null, ErrorManager.GENERIC_FAILURE);
-            return null;
-         }
-         else
-         {
-            appender = parseHandler(element);
-            appenderBag.put(appenderName, appender);
-            return appender;
-         }
-      }
-   }
-
-   /**
-    * Used internally to parse appenders by IDREF element.
-    */
-   protected Handler findHandlerByReference(Element appenderRef)
-   {
-      String appenderName = subst(appenderRef.getAttribute(REF_ATTR));
-      Document doc = appenderRef.getOwnerDocument();
-      return findHandlerByName(doc, appenderName);
-   }
-
-   /**
-    * Used internally to parse an appender element.
-    */
-   protected Handler parseHandler(Element appenderElement)
-   {
-      String className = subst(appenderElement.getAttribute(CLASS_ATTR));
-      debug("Class name: [" + className + ']');
-      try
-      {
-         Object instance = instantiateByClassName(className, Handler.class, null);
-         Handler appender = (Handler) instance;
-         Properties beanProps = new Properties();
-         String name = subst(appenderElement.getAttribute(NAME_ATTR));
-         HandlerSkeleton handlerSkeleton = null;
-         if( appender instanceof HandlerSkeleton )
-         {
-            handlerSkeleton = (HandlerSkeleton) appender;
-            handlerSkeleton.setName(name);
-         }
-
-         NodeList children = appenderElement.getChildNodes();
-         final int length = children.getLength();
-
-         for (int loop = 0; loop < length; loop++)
-         {
-            Node currentNode = children.item(loop);
-
-            /* We're only interested in Elements */
-            if (currentNode.getNodeType() == Node.ELEMENT_NODE)
-            {
-               Element currentElement = (Element) currentNode;
-
-               // Parse appender parameters 
-               if (currentElement.getTagName().equals(PARAM_TAG))
-               {
-                  setParameter(currentElement, beanProps);
-               }
-               // Set appender layout
-               else if (currentElement.getTagName().equals(LAYOUT_TAG))
-               {
-                  Formatter format = parseLayout(currentElement);
-                  appender.setFormatter(format);
-               }
-               // Add filters
-               else if (currentElement.getTagName().equals(FILTER_TAG))
-               {
-                  parseFilters(currentElement, appender);
-               }
-               else if (currentElement.getTagName().equals(ERROR_HANDLER_TAG))
-               {
-                  parseErrorManager(currentElement, appender);
-               }
-               else if (currentElement.getTagName().equals(APPENDER_REF_TAG))
-               {
-                  String refName = subst(currentElement.getAttribute(REF_ATTR));
-                  errorLog.error("Requesting attachment of handler named [" +
-                     refName + "] to handler named [" + appender +
-                     "] which does not implement org.apache.jdk.spi.HandlerAttachable.",
-                     null, ErrorManager.GENERIC_FAILURE);
-               }
-            }
-         }
-         PropertyEditors.mapJavaBeanProperties(appender, beanProps);
-         if( handlerSkeleton != null )
-            handlerSkeleton.activateOptions();
-         return appender;
-      }
-      /* Yes, it's ugly, but all of these exceptions point to the same
-      problem: we can't create an Handler
-      */
-      catch (Exception oops)
-      {
-         errorLog.error("Could not create an Handler. Reported error follows.",
-            oops, ErrorManager.GENERIC_FAILURE);
-         return null;
-      }
-   }
-
-   /**
-    * Used internally to parse an {@link ErrorManager} element.
-    */
-   protected void parseErrorManager(Element element, Handler appender)
-      throws Exception
-   {
-      String className = subst(element.getAttribute(CLASS_ATTR));
-      ClassLoader loader = Thread.currentThread().getContextClassLoader();
-      Class ehClazz = loader.loadClass(className);
-      ErrorManager eh = (ErrorManager) ehClazz.newInstance();
-      appender.setErrorManager(eh);
-   }
-
-   /**
-    * Used internally to parse a filter element.
-    */
-   protected void parseFilters(Element element, Handler appender)
-      throws Exception
-   {
-      String clazz = subst(element.getAttribute(CLASS_ATTR));
-      Filter filter = (Filter) instantiateByClassName(clazz,
-         Filter.class, null);
-
-      if (filter != null)
-      {
-         Properties beanProps = new Properties();
-         NodeList children = element.getChildNodes();
-         final int length = children.getLength();
-
-         for (int loop = 0; loop < length; loop++)
-         {
-            Node currentNode = children.item(loop);
-            if (currentNode.getNodeType() == Node.ELEMENT_NODE)
-            {
-               Element currentElement = (Element) currentNode;
-               String tagName = currentElement.getTagName();
-               if (tagName.equals(PARAM_TAG))
-               {
-                  setParameter(currentElement, beanProps);
-               }
-            }
-         }
-         PropertyEditors.mapJavaBeanProperties(filter, beanProps);
-         debug("Setting filter of type [" + filter.getClass()
-            + "] to appender named [" + appender + "].");
-         appender.setFilter(filter);
-      }
-   }
-
-   /**
-    * Used internally to parse an category element.
-    */
-   protected void parseCategory(Element loggerElement)
-      throws Exception
-   {
-      // Create a new org.apache.jdk.Category object from the <category> element.
-      String catName = subst(loggerElement.getAttribute(NAME_ATTR));
-
-      Logger logger;
-
-      String className = subst(loggerElement.getAttribute(CLASS_ATTR));
-
-
-      if (EMPTY_STR.equals(className))
-      {
-         debug("Retreiving an instance of java.util.logging.Logger.");
-         logger = repository.getLogger(catName);
-         if( logger == null )
-         {
-            logger = Logger.getLogger(catName);
-            repository.addLogger(logger);
-         }
-      }
-      else
-      {
-         debug("Desired logger sub-class: [" + className + ']');
-         try
-         {
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            Class c = loader.loadClass(className);
-            Class[] sig = {String.class, String.class};
-            Constructor ctor = c.getConstructor(sig);
-            Object[] args =  {catName, null};
-            logger = (Logger) ctor.newInstance(args);
-         }
-         catch (Exception oops)
-         {
-            errorLog.error("Could not retrieve category [" + catName +
-               "]. Reported error follows.", oops, ErrorManager.GENERIC_FAILURE);
-            return;
-         }
-      }
-
-      // Setting up a category needs to be an atomic operation, in order
-      // to protect potential log operations while category
-      // configuration is in progress.
-      synchronized (logger)
-      {
-         String flag = subst(loggerElement.getAttribute(ADDITIVITY_ATTR));
-         boolean additivity = Boolean.valueOf(flag).booleanValue();
-         debug("Setting [" + logger.getName() + "] additivity to [" + additivity + "].");
-         logger.setUseParentHandlers(additivity);
-         parseChildrenOfLoggerElement(loggerElement, logger, false);
-      }
-   }
-
-
-   /**
-    * Used internally to parse the category factory element.
-    */
-   protected void parseCategoryFactory(Element factoryElement)
-      throws Exception
-   {
-      String className = subst(factoryElement.getAttribute(CLASS_ATTR));
-
-      if (EMPTY_STR.equals(className))
-      {
-         errorLog.error("Category Factory tag " + CLASS_ATTR + " attribute not found.",
-            null, ErrorManager.GENERIC_FAILURE);
-      }
-      else
-      {
-         debug("Desired category factory: [" + className + ']');
-         Object catFactory = instantiateByClassName(className,
-            Object.class,
-            null);
-         Properties beanProps = new Properties();
-
-         Element currentElement = null;
-         Node currentNode = null;
-         NodeList children = factoryElement.getChildNodes();
-         final int length = children.getLength();
-
-         for (int loop = 0; loop < length; loop++)
-         {
-            currentNode = children.item(loop);
-            if (currentNode.getNodeType() == Node.ELEMENT_NODE)
-            {
-               currentElement = (Element) currentNode;
-               if (currentElement.getTagName().equals(PARAM_TAG))
-               {
-                  setParameter(currentElement, beanProps);
-               }
-            }
-         }
-         PropertyEditors.mapJavaBeanProperties(catFactory, beanProps);
-      }
-   }
-
-
-   /**
-    * Used internally to parse the root category element.
-    */
-   protected void parseRoot(Element rootElement)
-      throws Exception
-   {
-      Logger root = repository.getLogger("");
-      if( root == null )
-      {
-         root = Logger.getLogger("");
-         repository.addLogger(root);
-      }
-      // category configuration needs to be atomic
-      synchronized (root)
-      {
-         parseChildrenOfLoggerElement(rootElement, root, true);
-      }
-   }
-
-
-   /**
-    * Used internally to parse the children of a category element.
-    */
-   protected void parseChildrenOfLoggerElement(Element catElement,
-      Logger logger, boolean isRoot)
-      throws Exception
-   {
-      Properties beanProps = new Properties();
-
-      // Remove all existing appenders from logger. They will be
-      // reconstructed if need be.
-      Handler[] handlers = logger.getHandlers();
-      for(int n = 0; n < handlers.length; n ++)
-      {
-         Handler h = handlers[n];
-         logger.removeHandler(h);
-      }
-
-      NodeList children = catElement.getChildNodes();
-      final int length = children.getLength();
-
-      for (int loop = 0; loop < length; loop++)
-      {
-         Node currentNode = children.item(loop);
-
-         if (currentNode.getNodeType() == Node.ELEMENT_NODE)
-         {
-            Element currentElement = (Element) currentNode;
-            String tagName = currentElement.getTagName();
-
-            if (tagName.equals(APPENDER_REF_TAG))
-            {
-               Element appenderRef = (Element) currentNode;
-               Handler appender = findHandlerByReference(appenderRef);
-               String refName = subst(appenderRef.getAttribute(REF_ATTR));
-               if (appender != null)
-                  debug("Adding appender named [" + refName +
-                     "] to category [" + logger.getName() + "].");
-               else
-                  debug("Handler named [" + refName + "] not found.");
-
-               logger.addHandler(appender);
-
-            }
-            else if (tagName.equals(LEVEL_TAG))
-            {
-               parseLevel(currentElement, logger, isRoot);
-            }
-            else if (tagName.equals(PRIORITY_TAG))
-            {
-               parseLevel(currentElement, logger, isRoot);
-            }
-            else if (tagName.equals(PARAM_TAG))
-            {
-               setParameter(currentElement, beanProps);
-            }
-         }
-      }
-      PropertyEditors.mapJavaBeanProperties(logger, beanProps);
-   }
-
-   /**
-    * Used internally to parse a layout element.
-    */
-   protected Formatter parseLayout(Element layout_element)
-   {
-      String className = subst(layout_element.getAttribute(CLASS_ATTR));
-      debug("Parsing layout of class: \"" + className + "\"");
-      try
-      {
-         Object instance = instantiateByClassName(className, Formatter.class, null);
-         Formatter layout = (Formatter) instance;
-         Properties beanProps = new Properties();
-
-         NodeList params = layout_element.getChildNodes();
-         final int length = params.getLength();
-
-         for (int loop = 0; loop < length; loop++)
-         {
-            Node currentNode = params.item(loop);
-            if (currentNode.getNodeType() == Node.ELEMENT_NODE)
-            {
-               Element currentElement = (Element) currentNode;
-               String tagName = currentElement.getTagName();
-               if (tagName.equals(PARAM_TAG))
-               {
-                  setParameter(currentElement, beanProps);
-               }
-            }
-         }
-         PropertyEditors.mapJavaBeanProperties(layout, beanProps);
-         return layout;
-      }
-      catch (Exception oops)
-      {
-         errorLog.error("Could not create the Layout. Reported error follows.",
-            oops, ErrorManager.GENERIC_FAILURE);
-         return null;
-      }
-   }
-
-   protected void parseRenderer(Element element)
-   {
-      String renderingClass = subst(element.getAttribute(RENDERING_CLASS_ATTR));
-      String renderedClass = subst(element.getAttribute(RENDERED_CLASS_ATTR));
-   }
-
-   /**
-    * Used internally to parse a level  element.
-    */
-   protected void parseLevel(Element element, Logger logger, boolean isRoot)
-   {
-      String catName = logger.getName();
-      if (isRoot)
-      {
-         catName = "root";
-      }
-
-      String levelName = subst(element.getAttribute(VALUE_ATTR));
-      // Check for a jdk level name
-      levelName = mapLog4jLevel(levelName);
-      debug("Level value for " + catName + " is  [" + levelName + "].");
-
-      if ("INHERITED".equalsIgnoreCase(levelName) || "NULL".equalsIgnoreCase(levelName))
-      {
-         if (isRoot)
-         {
-            errorLog.error("Root level cannot be inherited. Ignoring directive.",
-               null, ErrorManager.GENERIC_FAILURE);
-         }
-         else
-         {
-            logger.setLevel(null);
-         }
-      }
-      else
-      {
-         String className = subst(element.getAttribute(CLASS_ATTR));
-         if (EMPTY_STR.equals(className))
-         {
-            Level level =  Level.parse(levelName);
-            logger.setLevel(level);
-         }
-         else if( className.equals("org.jboss.logging.XLevel") )
-         {
-            // Special handling of the jboss XLevel
-            logger.setLevel(Level.FINER);
-         }
-         else
-         {
-            debug("Desired Level sub-class: [" + className + ']');
-            try
-            {
-               ClassLoader loader = Thread.currentThread().getContextClassLoader();
-               Class clazz = loader.loadClass(className);
-               Class[] sig = {String.class, int.class};
-               Object[] args = {levelName, new Integer(Level.FINEST.intValue())};
-               Constructor ctor = clazz.getConstructor(sig);
-               Level pri = (Level) ctor.newInstance(args);
-               logger.setLevel(pri);
-            }
-            catch (Exception oops)
-            {
-               errorLog.error("Could not create level [" + levelName +
-                  "]. Reported error follows.", oops, ErrorManager.GENERIC_FAILURE);
-               return;
-            }
-         }
-      }
-      debug(catName + " level set to " + logger.getLevel());
-   }
-
-   protected void setParameter(Element elem, Properties beanProps)
-   {
-      String name = subst(elem.getAttribute(NAME_ATTR));
-      String value = (elem.getAttribute(VALUE_ATTR));
-      value = subst(convertSpecialChars(value));
-      beanProps.setProperty(name, value);
-   }
-
-
-   private interface ParseAction
-   {
-      Document parse(final DocumentBuilder parser) throws SAXException, IOException;
-   }
-
-
-   public void doConfigure(final String filename, LogManager repository)
-   {
-      ParseAction action = new ParseAction()
-      {
-         public Document parse(final DocumentBuilder parser) throws SAXException, IOException
-         {
-            return parser.parse(new File(filename));
-         }
-
-         public String toString()
-         {
-            return "file [" + filename + "]";
-         }
-      };
-      doConfigure(action, repository);
-   }
-
-
-   public void doConfigure(final URL url, LogManager repository)
-   {
-      ParseAction action = new ParseAction()
-      {
-         public Document parse(final DocumentBuilder parser) throws SAXException, IOException
-         {
-            return parser.parse(url.toString());
-         }
-
-         public String toString()
-         {
-            return "url [" + url.toString() + "]";
-         }
-      };
-      doConfigure(action, repository);
-   }
-
-   /**
-    * Configure jdk by reading in a jdk.dtd compliant XML
-    * configuration file.
-    */
-   public void doConfigure(final InputStream inputStream, LogManager repository)
-      throws FactoryConfigurationError
-   {
-      ParseAction action = new ParseAction()
-      {
-         public Document parse(final DocumentBuilder parser) throws SAXException, IOException
-         {
-            InputSource inputSource = new InputSource(inputStream);
-            inputSource.setSystemId("dummy://jdk.dtd");
-            return parser.parse(inputSource);
-         }
-
-         public String toString()
-         {
-            return "input stream [" + inputStream.toString() + "]";
-         }
-      };
-      doConfigure(action, repository);
-   }
-
-   /**
-    * Configure jdk by reading in a jdk.dtd compliant XML
-    * configuration file.
-    */
-   public void doConfigure(final Reader reader, LogManager repository)
-      throws FactoryConfigurationError
-   {
-      ParseAction action = new ParseAction()
-      {
-         public Document parse(final DocumentBuilder parser) throws SAXException, IOException
-         {
-            InputSource inputSource = new InputSource(reader);
-            inputSource.setSystemId("dummy://jdk.dtd");
-            return parser.parse(inputSource);
-         }
-
-         public String toString()
-         {
-            return "reader [" + reader.toString() + "]";
-         }
-      };
-      doConfigure(action, repository);
-   }
-
-   /**
-    * Configure jdk by reading in a jdk.dtd compliant XML
-    * configuration file.
-    */
-   protected void doConfigure(final InputSource inputSource, LogManager repository)
-      throws FactoryConfigurationError
-   {
-      if (inputSource.getSystemId() == null)
-      {
-         inputSource.setSystemId("dummy://jdk.dtd");
-      }
-      ParseAction action = new ParseAction()
-      {
-         public Document parse(final DocumentBuilder parser) throws SAXException, IOException
-         {
-            return parser.parse(inputSource);
-         }
-
-         public String toString()
-         {
-            return "input source [" + inputSource.toString() + "]";
-         }
-      };
-      doConfigure(action, repository);
-   }
-
-
-   private final void doConfigure(final ParseAction action, final LogManager repository)
-      throws FactoryConfigurationError
-   {
-      DocumentBuilderFactory dbf = null;
-      this.repository = repository;
-      try
-      {
-         dbf = DocumentBuilderFactory.newInstance();
-         debug("Standard DocumentBuilderFactory search succeded.");
-         debug("DocumentBuilderFactory is: " + dbf.getClass().getName());
-      }
-      catch (FactoryConfigurationError fce)
-      {
-         Exception e = fce.getException();
-         errorLog.error("Could not instantiate a DocumentBuilderFactory.", e, ErrorManager.GENERIC_FAILURE);
-         throw fce;
-      }
-
-      try
-      {
-         dbf.setValidating(true);
-
-         DocumentBuilder docBuilder = dbf.newDocumentBuilder();
-         JBossEntityResolver resolver = new JBossEntityResolver();
-         resolver.registerLocalEntity("urn:jboss:jdklogger.dtd", "jdklogger.dtd");
-         docBuilder.setEntityResolver(resolver);
-
-         Document doc = action.parse(docBuilder);
-         parse(doc.getDocumentElement());
-      }
-      catch (Exception e)
-      {
-         // I know this is miserable...
-         errorLog.error("Could not parse " + action.toString() + ".", e, ErrorManager.GENERIC_FAILURE);
-      }
-   }
-
-   /**
-    * Configure by taking in an DOM element.
-    */
-   public void doConfigure(Element element, LogManager repository)
-   {
-      this.repository = repository;
-      parse(element);
-   }
-
-   /**
-    * Used internally to configure the jdk framework by parsing a DOM
-    * tree of XML elements based on <a
-    * href="doc-files/jdk.dtd">jdk.dtd</a>.
-    */
-   protected void parse(Element element)
-   {
-
-      String rootElementName = element.getTagName();
-
-      if (!rootElementName.equals(CONFIGURATION_TAG))
-      {
-         if (rootElementName.equals(OLD_CONFIGURATION_TAG))
-         {
-            errorLog.error("The <" + OLD_CONFIGURATION_TAG +
-               "> element has been deprecated."
-               + ", use the <" + CONFIGURATION_TAG + "> element instead.", null,
-               ErrorManager.GENERIC_FAILURE);
-         }
-         else
-         {
-            errorLog.error("DOM element is - not a <" + CONFIGURATION_TAG + "> element.", null,
-               ErrorManager.GENERIC_FAILURE);
-            return;
-         }
-      }
-
-      String debugAttrib = subst(element.getAttribute(INTERNAL_DEBUG_ATTR));
-
-      debug("debug attribute= '" + debugAttrib + "'.");
-      // if the jdk.dtd is not specified in the XML file, then the
-      // "debug" attribute is returned as the empty string.
-      if (!debugAttrib.equals("") && !debugAttrib.equals("null"))
-      {
-         debug = Boolean.valueOf(debugAttrib).booleanValue();
-      }
-      else
-      {
-         debug("Ignoring " + INTERNAL_DEBUG_ATTR + " attribute.");
-      }
-
-
-      String confDebug = subst(element.getAttribute(CONFIG_DEBUG_ATTR));
-      if (!confDebug.equals("") && !confDebug.equals("null"))
-      {
-         debug = true;
-      }
-
-      String thresholdStr = subst(element.getAttribute(THRESHOLD_ATTR));
-      debug("Threshold ='" + thresholdStr + "'.");
-      if (!"".equals(thresholdStr) && !"null".equals(thresholdStr))
-      {
-         Level threshold = Level.parse(thresholdStr);
-         Logger root = repository.getLogger("");
-         root.setLevel(threshold);
-      }
-
-      // First configure each category factory under the root element.
-      // Category factories need to be configured before any of
-      // categories they support.
-      //
-      String tagName = null;
-      Element currentElement = null;
-      Node currentNode = null;
-      NodeList children = element.getChildNodes();
-      final int length = children.getLength();
-
-      for (int loop = 0; loop < length; loop++)
-      {
-         currentNode = children.item(loop);
-         if (currentNode.getNodeType() == Node.ELEMENT_NODE)
-         {
-            currentElement = (Element) currentNode;
-            tagName = currentElement.getTagName();
-
-            if (tagName.equals(CATEGORY_FACTORY_TAG))
-            {
-               try
-               {
-                  parseCategoryFactory(currentElement);
-               }
-               catch(Exception e)
-               {
-                  errorLog.error("Failed to parse: "+tagName, e, ErrorManager.GENERIC_FAILURE);
-               }
-            }
-         }
-      }
-
-      for (int loop = 0; loop < length; loop++)
-      {
-         currentNode = children.item(loop);
-         if (currentNode.getNodeType() == Node.ELEMENT_NODE)
-         {
-            currentElement = (Element) currentNode;
-            tagName = currentElement.getTagName();
-
-            try
-            {
-               if (tagName.equals(CATEGORY) || tagName.equals(LOGGER))
-               {
-                  parseCategory(currentElement);
-               }
-               else if (tagName.equals(ROOT_TAG))
-               {
-                  parseRoot(currentElement);
-               }
-               else if (tagName.equals(RENDERER_TAG))
-               {
-                  parseRenderer(currentElement);
-               }
-            }
-            catch(Exception e)
-            {
-               errorLog.error("Failed to parse element: "+tagName, e, ErrorManager.GENERIC_FAILURE);
-            }
-         }
-      }
-   }
-
-
-   protected String subst(String value)
-   {
-      if( value == null )
-         return null;
-
-      try
-      {
-         return StringPropertyReplacer.replaceProperties(value);
-      }
-      catch (Exception e)
-      {
-         errorLog.error("Could not perform variable substitution.", e, ErrorManager.GENERIC_FAILURE);
-         return value;
-      }
-   }
-
-   static String mapLog4jLevel(String name)
-   {
-      String jdkName = null;
-      if( name.equals("OFF") )
-         jdkName = Level.OFF.getName();
-      else if( name.equals("FATAL") )
-         jdkName = Level.SEVERE.getName();
-      else if( name.equals("ERROR") )
-         jdkName = Level.WARNING.getName();
-      else if( name.equals("ERROR") )
-         jdkName = Level.WARNING.getName();
-      else if( name.equals("WARN") )
-         jdkName = Level.WARNING.getName();
-      else if( name.equals("INFO") )
-         jdkName = Level.INFO.getName();
-      else if( name.equals("DEBUG") )
-         jdkName = Level.FINE.getName();
-      else if( name.equals("TRACE") )
-         jdkName = Level.FINER.getName();
-      return jdkName;
-   }
-
-   static String convertSpecialChars(String s)
-   {
-     char c;
-     int len = s.length();
-     StringBuffer sbuf = new StringBuffer(len);
-
-     int i = 0;
-     while(i < len) {
-       c = s.charAt(i++);
-       if (c == '\\') {
-    c =  s.charAt(i++);
-    if(c == 'n')      c = '\n';
-    else if(c == 'r') c = '\r';
-    else if(c == 't') c = '\t';
-    else if(c == 'f') c = '\f';
-    else if(c == '\b') c = '\b';
-    else if(c == '\"') c = '\"';
-    else if(c == '\'') c = '\'';
-    else if(c == '\\') c = '\\';
-       }
-       sbuf.append(c);
-     }
-     return sbuf.toString();
-   }
-
-   protected void debug(String msg)
-   {
-      if( debug )
-         System.out.println(msg);
-   }
-   Object instantiateByClassName(String className, Class superClass,
-      Object defaultValue)
-   {
-      if (className != null)
-      {
-         try
-         {
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            Class classObj = loader.loadClass(className);
-            if (!superClass.isAssignableFrom(classObj))
-            {
-               errorLog.error("A \"" + className + "\" object is not assignable to a \"" +
-                  superClass.getName() + "\" variable."
-                  +"The class \"" + superClass.getName() + "\" was loaded by "
-               +"[" + superClass.getClassLoader() + "] whereas object of type "
-               +"'" + classObj.getName() + "\" was loaded by ["
-                  + classObj.getClassLoader() + "].", null, ErrorManager.GENERIC_FAILURE);
-               return defaultValue;
-            }
-            return classObj.newInstance();
-         }
-         catch (Exception e)
-         {
-            errorLog.error("Could not instantiate class [" + className + "].", e, ErrorManager.GENERIC_FAILURE);
-         }
-      }
-      return defaultValue;
-   }
-
-}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/DOMConfigurator.java (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/src/main/java/org/jboss/logging/jdk/xml/DOMConfigurator.java)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/.project
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/.project	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/.project	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>tools</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/.project (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/.project)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/bin)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/ant	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,299 +0,0 @@
-#! /bin/sh
-
-#   Copyright 2001-2005 The Apache Software Foundation
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-# Extract launch and ant arguments, (see details below).
-ant_exec_args=
-no_config=false
-use_jikes_default=false
-ant_exec_debug=false
-show_help=false
-for arg in "$@" ; do
-  if [ "$arg" = "--noconfig" ] ; then
-    no_config=true
-  elif [ "$arg" = "--usejikes" ] ; then
-    use_jikes_default=true
-  elif [ "$arg" = "--execdebug" ] ; then
-    ant_exec_debug=true
-  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
-    show_help=true
-    ant_exec_args="$ant_exec_args -h"
-  else
-    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
-      show_help=true
-    fi
-    ant_exec_args="$ant_exec_args \"$arg\""
-  fi
-done
-
-# Source/default ant configuration
-if $no_config ; then
-  rpm_mode=false
-  usejikes=$use_jikes_default
-else
-  # load system-wide ant configuration
-  if [ -f "/etc/ant.conf" ] ; then
-    . /etc/ant.conf
-  fi
-
-  # load user ant configuration
-  if [ -f "$HOME/.ant/ant.conf" ] ; then
-    . $HOME/.ant/ant.conf
-  fi
-  if [ -f "$HOME/.antrc" ] ; then
-    . "$HOME/.antrc"
-  fi
-
-  # provide default configuration values
-  if [ -z "$rpm_mode" ] ; then
-    rpm_mode=false
-  fi
-  if [ -z "$usejikes" ] ; then
-    usejikes=$use_jikes_default
-  fi
-fi
-
-# Setup Java environment in rpm mode
-if $rpm_mode ; then
-  if [ -f /usr/share/java-utils/java-functions ] ; then
-    . /usr/share/java-utils/java-functions
-    set_jvm
-    set_javacmd
-  fi
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
-  ## resolve links - $0 may be a link to ant's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ANT_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ANT_HOME" ] &&
-    ANT_HOME=`cygpath --unix "$ANT_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# Build local classpath using just the launcher in non-rpm mode or
-# use the Jpackage helper in rpm mode with basic and default jars
-# specified in the ant.conf configuration. Because the launcher is
-# used, libraries linked in ANT_HOME will also be include, but this
-# is discouraged as it is not java-version safe. A user should
-# request optional jars and their dependencies via the OPT_JAR_LIST
-# variable
-if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
-  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
-  # If the user requested to try to add some other jars to the classpath
-  if [ -n "$OPT_JAR_LIST" ] ; then
-    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
-    if [ -n "$_OPTCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
-    fi
-  fi
-
-  # Explicitly add javac path to classpath, assume JAVA_HOME set
-  # properly in rpm mode
-  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
-  fi
-  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
-  fi
-
-  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-  # user CLASSPATH first and ant-found jars after.
-  # In that case, the user CLASSPATH will override ant-found jars
-  #
-  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-  # with ant-found jars first and user CLASSPATH after
-  if [ -n "$CLASSPATH" ] ; then
-    # merge local and specified classpath 
-    if [ -z "$LOCALCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$CLASSPATH"
-    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-    else
-      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-    fi
-
-    # remove class path from launcher -cp option
-    CLASSPATH=""
-  fi
-else
-  # not using rpm_mode; use launcher to determine classpaths
-  if [ -z "$LOCALCLASSPATH" ] ; then
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
-  else
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
-  fi
-fi
-
-if [ -n "$JAVA_HOME" ] ; then
-  # OSX hack to make Ant work with jikes
-  if $darwin ; then
-    OSXHACK="${JAVA_HOME}/../Classes"
-    if [ -d "${OSXHACK}" ] ; then
-      for i in "${OSXHACK}"/*.jar
-      do
-        JIKESPATH="$JIKESPATH:$i"
-      done
-    fi
-  fi
-fi
-
-# Allow Jikes support (off by default)
-if $usejikes; then
-  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  ANT_HOME=`cygpath --$format "$ANT_HOME"`
-  ANT_LIB=`cygpath --$format "$ANT_LIB"`
-  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# Show script help if requested
-if $show_help ; then
-  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
-  echo 'Script Options:'
-  echo '  --help, --h            print this message and ant help'
-  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
-  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
-  echo '                         configuration files'
-  echo '  --usejikes             enable use of jikes by default, unless'
-  echo '                         set explicitly in configuration files'
-  echo '  --execdebug            print ant exec line generated by this'
-  echo '                         launch script'
-  echo '  '
-fi
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$ANT_HOME" in
-    *\\ )
-    ANT_HOME="$ANT_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$JIKESPATH" in
-    *\\ )
-    JIKESPATH="$JIKESPATH\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-# Execute ant using eval/exec to preserve spaces in paths,
-# java options, and ant args
-ant_sys_opts=
-if [ -n "$CYGHOME" ]; then
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
-  else
-    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
-  fi
-else
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
-  fi
-fi
-ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
-if $ant_exec_debug ; then
-    echo $ant_exec_command
-fi
-eval $ant_exec_command

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/ant)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant.bat
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/ant.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,126 +0,0 @@
- at echo off
-
-REM  Copyright 2001,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-
-if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ANT_HOME=%~dp0..
-
-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
-
-set _USE_CLASSPATH=yes
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of arguments (up to the command line limit, anyway).
-set ANT_CMD_LINE_ARGS=%1
-if ""%1""=="""" goto doneStart
-shift
-:setupArgs
-if ""%1""=="""" goto doneStart
-if ""%1""==""-noclasspath"" goto clearclasspath
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
-shift
-goto setupArgs
-
-rem here is there is a -noclasspath in the options
-:clearclasspath
-set _USE_CLASSPATH=no
-shift
-goto setupArgs
-
-rem This label provides a place for the argument list loop to break out
-rem and for NT handling to skip to.
-
-:doneStart
-rem find ANT_HOME if it does not exist due to either an invalid value passed
-rem by the user or the %0 problem on Windows 9x
-if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
-
-rem check for ant in Program Files
-if not exist "%ProgramFiles%\ant" goto checkSystemDrive
-set ANT_HOME=%ProgramFiles%\ant
-goto checkJava
-
-:checkSystemDrive
-rem check for ant in root directory of system drive
-if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
-set ANT_HOME=%SystemDrive%\ant
-goto checkJava
-
-:checkCDrive
-rem check for ant in C:\ant for Win9X users
-if not exist C:\ant\lib\ant.jar goto noAntHome
-set ANT_HOME=C:\ant
-goto checkJava
-
-:noAntHome
-echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
-goto end
-
-:checkJava
-set _JAVACMD=%JAVACMD%
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
-goto checkJikes
-
-:noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=java.exe
-
-:checkJikes
-if not "%JIKESPATH%"=="" goto runAntWithJikes
-
-:runAnt
-if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikes
-if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
-
-:runAntWithJikesNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikesAndClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:end
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-
-:mainEnd
-if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/ant.bat (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/ant.bat)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/antRun	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#
-#  Copyright  2001-2002,2004 The Apache Software Foundation
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#       http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# 
-#
-
-# Args: DIR command
-cd "$1"
-CMD="$2"
-shift
-shift
-
-exec "$CMD" "$@"

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/antRun)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun.bat
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/antRun.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
- at echo off
-
-REM
-REM Copyright  2001-2002,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-if ""%1""=="""" goto runCommand
-
-rem Change drive and directory to %1
-if "%OS%"=="Windows_NT" cd /d ""%1""
-if not "%OS%"=="Windows_NT" cd ""%1""
-shift
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of agruments (up to the command line limit, anyway).
-set ANT_RUN_CMD=%1
-if ""%1""=="""" goto runCommand
-shift
-:loop
-if ""%1""=="""" goto runCommand
-set ANT_RUN_CMD=%ANT_RUN_CMD% %1
-shift
-goto loop
-
-:runCommand
-rem echo %ANT_RUN_CMD%
-%ANT_RUN_CMD%
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antRun.bat (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/antRun.bat)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antx.bat
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/antx.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antx.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,6 +0,0 @@
- at echo off
- at setlocal
-set CLASSPATH=%~dp0..\lib\ant.jar;%CLASSPATH%
-java org.apache.tools.ant.Launcher %*
-rem java -jar %ANT_HOME%\lib\ant.jar org.apache.tools.ant.Launcher
- at endlocal

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/antx.bat (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/antx.bat)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/lcp.bat
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/lcp.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/lcp.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,30 +0,0 @@
-REM
-REM Copyright  2001-2004 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-set _CLASSPATHCOMPONENT=%1
-if ""%1""=="""" goto gotAllArgs
-shift
-
-:argCheck
-if ""%1""=="""" goto gotAllArgs
-set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
-shift
-goto argCheck
-
-:gotAllArgs
-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/bin/lcp.bat (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/bin/lcp.bat)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildfragments (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildfragments)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/aliases.ent
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,97 +0,0 @@
-<!-- list of aliases used to bridge gap between buildmagic defs and jbossbuild -->
-
-
-<path id="apache.commons.classpath">
-  <pathelement path="${apache.collections.lib}/commons-collections.jar"/>
-  <pathelement path="${apache.logging.lib}/commons-logging.jar"/>
-  <pathelement path="${apache.httpclient.lib}/commons-httpclient.jar"/>
-  <pathelement path="${apache.pool.lib}/commons-pool.jar"/>
-  <pathelement path="${apache.discovery.lib}/commons-discovery.jar"/>
-  <pathelement path="${apache.fileupload.lib}/commons-fileupload.jar"/>
-  <pathelement path="${apache.lang.lib}/commons-lang-2.0.jar"/>  
-</path>
-
-<path id="sax.classpath">
-  <pathelement path="${xml-sax.classpath}"/>
-</path>
- 
-<property name="xdoclet-xdoclet.lib" value="${xdoclet.xdoclet.lib}"/>
-<path id="xdoclet.task.classpath">
-  <path refid="xdoclet.xdoclet.classpath"/>
-</path>
-   
-<property name="gjt.jpl-util.lib" value="${gjt.jpl.util.lib}"/>   
-<path id="gjt.jpl-util.classpath">
-   <path refid="gjt.jpl.util.classpath"/>
-</path>   
-
-<property name="opennms.joesnmp.lib" value="${joesnmp.joesnmp.lib}"/>   
-<path id="opennms.joesnmp.classpath">
-   <path refid="joesnmp.joesnmp.classpath"/>
-</path>   
-
-<path id="jacorb.idl.classpath">
-   <path refid="apache.avalon.logkit.classpath"/>
-   <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-</path>
-
-<property name="jacorb.idl.include" value="${jacorb.jacorb.resources}"/>
-<property name="jacorb.jacorb.properties" value="${jacorb.jacorb.resources}"/>
-  
-<property name="sleepycat.lib" value="${sleepycat.sleepycat.lib}"/>
-<path id="sleepycat.classpath">
-   <path refid="sleepycat.sleepycat.classpath"/>
-</path>
-  
-<property name="apache.tomcat55.root" value="${apache.tomcat.root}"/>
-<property name="apache.tomcat55.lib" value="${apache.tomcat.lib}"/>
-<path id="apache.tomcat55.classpath">
-   <path refid="apache.tomcat.classpath"/>
-</path>
-  
-<property name="trove.lib" value="${trove.trove.lib}"/>  
-<path id="trove.classpath">
-   <path refid="trove.trove.classpath"/>
-</path>
-  
-<path id="qdox.classpath">
-   <path refid="qdox.qdox.classpath"/>
-</path>
-  
-<property name="javassist.lib" value="${javassist.javassist.lib}"/>
-<path id="javassist.classpath">
-  <path refid="javassist.javassist.classpath"/>
-</path>
-  
-<property name="hibernate.lib" value="${hibernate.hibernate.lib}"/>  
-<path id="hibernate3.classpath">
-  <path refid="hibernate.hibernate.classpath"/>
-</path>
-
-<property name="odmg.lib" value="${odmg.odmg.lib}"/>
-<path id="odmg.classpath">
-  <path refid="odmg.odmg.classpath"/>
-</path>
-
-<property name="cglib.lib" value="${cglib.cglib.lib}"/>
-<path id="cglib.classpath">
-  <path refid="cglib.cglib.classpath"/>  
-</path>
-
-<path id="ejb3-persistence.classpath">
-   <path refid="hibernate.annotations.classpath"/>
-   <path refid="hibernate.entitymanager.classpath"/>
-</path>
-
-<property name="spring.lib" value="${spring.spring.lib}"/>
-<path id="spring.classpath">
-  <path refid="spring.spring.classpath"/>  
-</path>
-
-<!-- Ant -->
-<property name="apache.ant.root" value="${project.tools}"/>
-<property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-<path id="apache.ant.classpath">
-  <pathelement path="${apache.ant.lib}/ant.jar"/>
-</path>
-  

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/aliases.ent (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/aliases.ent)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/autoload.properties
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  BuildMagic tasks which will be autoloaded.                              ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: autoload.properties,v 1.8 2004/11/24 02:07:35 starksm Exp $ ###
-
-### Stuff that glues things together  ###
-
-resolveproperties=org.jboss.tools.buildmagic.task.ResolveProperties
-resolver=org.jboss.tools.buildmagic.task.ResolveProperties
-propertyfilter=org.jboss.tools.buildmagic.task.PropertyFilter
-require=org.jboss.tools.buildmagic.task.Require
-call=org.jboss.tools.buildmagic.task.CallTarget
-Ant=org.jboss.tools.buildmagic.task.Ant
-
-### Project/Module tasks ###
-
-execmodules=org.jboss.tools.buildmagic.task.module.ExecuteModules
-projectinfo=org.jboss.tools.buildmagic.task.module.ProjectInfo
-moduleinfo=org.jboss.tools.buildmagic.task.module.ModuleInfo
-moduleconfig=org.jboss.tools.buildmagic.task.module.ModuleConfig
-moduleinit=org.jboss.tools.buildmagic.task.module.ModuleInit
-
-### Configuration Helpers ###
-library=org.jboss.tools.buildmagic.task.config.Library
-modulelibrary=org.jboss.tools.buildmagic.task.config.ModuleLibrary
-libraryset=org.jboss.tools.buildmagic.task.config.LibrarySet
-
-### Misc ###
-
-projecthelp=org.jboss.tools.buildmagic.task.ProjectHelp
-_puke=org.jboss.tools.buildmagic.task.util.Puke
-_dump=org.jboss.tools.buildmagic.task.util.Dump
-
-### Unused ??? ###
-
-#set=org.jboss.tools.buildmagic.task.Set
-#unset=org.jboss.tools.buildmagic.task.Unset
-#appendpath=org.jboss.tools.buildmagic.task.AppendPath
-#findroot=org.jboss.tools.buildmagic.task.FindRoot

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/autoload.properties (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/autoload.properties)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/build-common.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,905 +0,0 @@
-<project name="common tasks">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}" 
-	        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-  Unsupported Ant version:
-    ${ant.version}
-  Please install a version which is compatible with Ant ${buildmagic.ant16.baseversion}.
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Define the environment varaible. This needs to be first. -->
-  <property environment="env"/>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-  <property name="project.build" value="${project.root}/build"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-
-  <!-- Include user and project property overrides. -->
-  <import file="version-info.xml" />
-  <property file="${project.build}/local.properties"/>
-
-    <available file="${module.root}/etc/local.properties-example"
-	       property="init.have-local-properties"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" unless="build-bypass.disabled">
-
-   <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="**/*"/>
-      <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-      <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-      <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-      <srcfiles dir="${project.tools}" includes="**/*"/>
-   </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-   <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-   </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean">
-   <available file="${module.output}" property="module.output.present"/>  
-   <antcall target="_buildmagic:clean-internal"/>
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal" if="module.output.present">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes/**"/>
-      </fileset>
-    </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-	zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-    <!-- Where source files live -->
-    <property name="source.java" value="${module.source}/main"/>
-    <property name="source.etc" value="${module.source}/etc"/>
-    <property name="source.bin" value="${module.source}/bin"/>
-    <property name="source.docs" value="${module.source}/docs"/>
-    <property name="source.resources" value="${module.source}/resources"/>
-    <property name="source.examples" value="${module.source}/examples"/>
-
-    <!-- Where build generated files will go -->
-    <property name="build.classes" value="${module.output}/classes"/>
-    <property name="build.lib" value="${module.output}/lib"/>
-    <property name="build.api" value="${module.output}/api"/>
-    <property name="build.etc" value="${module.output}/etc"/>
-    <property name="build.bin" value="${module.output}/bin"/>
-    <property name="build.docs" value="${module.output}/docs"/>
-    <property name="build.parsers" value="${module.output}/gen-parsers"/>
-    <property name="build.resources" value="${module.output}/resources"/>
-    <property name="build.examples" value="${module.output}/examples"/>
-    <property name="build.reports" value="${module.output}/reports"/>
-    <property name="build.gen" value="${module.output}/gen"/>
-    <property name="build.gen-src" value="${module.output}/gen-src"/>
-    <property name="build.todo" value="${module.output}/todo"/>
-
-    <!-- Install/Release structure -->
-    <property name="install.id" value="${module.name}-${module.version}"/>
-    <property name="release.id" value="${install.id}"/>
-    <property name="install.root" value="${module.output}/${install.id}"/>
-
-    <!-- The combined thirdparty classpath -->
-    <path id="thirdparty.classpath">
-      <path refid="library.classpath"/>
-      <path refid="dependentmodule.classpath"/>
-    </path>
-
-    <!-- This module is based on Java 1.4 -->
-    <property name="javac.target" value="1.4"/>
-    <property name="javac.source" value="1.4"/>
-
-    <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-    <property name="rmic.stubVersion" value="1.2"/>
-
-    <!-- classpath and local.classpath must have a value using with a path -->
-    <property name="classpath" value=""/>
-    <property name="local.classpath" value=""/>
-
-    <!-- The classpath required to build classes. -->
-    <path id="javac.classpath">
-      <pathelement path="${classpath}"/>
-      <pathelement path="${local.classpath}"/>
-      <path refid="thirdparty.classpath"/>
-    </path>
-
-    <!-- The classpath required to build javadocs. -->
-    <path id="javadoc.classpath">
-      <path refid="javac.classpath"/>
-    </path>
-
-    <!-- The default prefix -->
-    <property name="jar.prefix" value="jboss-${module.name}"/>
-
-    <!-- The default server and client jar name -->
-    <property name="jar.server.name" value="${jar.prefix}.jar"/>
-    <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-    <!-- Packages to include when generating api documentation -->
-    <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <javac destdir="${build.classes}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-         depend="${javac.depend}"
-         verbose="${javac.verbose}"
-         deprecation="${javac.deprecation}"
-         includeAntRuntime="${javac.include.ant.runtime}"
-         includeJavaRuntime="${javac.include.java.runtime}"
-         failonerror="${javac.fail.onerror}">
-     <src path="${source.java}:${build.gen-src}"/>
-     <classpath refid="javac.classpath"/>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" unless="mbean-bypass.disabled">
-
-   <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="${mbean.includes}"/>
-   </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-        depends="_buildmagic:mbean-bypass-checker" 
-        unless="mbean-bypass.on">
-
-    <taskdef name="jmxdoclet"
-             classname="xdoclet.modules.jmx.JMXDocletTask"
-             classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.gen-src}"/>
-    
-    <jmxdoclet destdir="${build.gen-src}"
-               excludedtags="@version, at author">
-      <fileset dir="${source.java}" 
-               includes="${mbean.includes}"/>
-      <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    </jmxdoclet>
-    
-    <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <javac destdir="${build.test}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    failonerror="${javac.fail.onerror}">
-     <src path="${source.test}:${build.gen.test}"/>
-     <classpath>
-       <path refid="javac.classpath"/>
-       <pathelement location="${build.classes}"/>
-     </classpath>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-       <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-
-</target>
-
-<target name="_default:fix-bin">
-  <fixcrlf srcdir="${build.bin}"
-        eol="lf" eof="remove"
-        includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}" 
-        eol="crlf" eof="remove"
-        includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-       <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" unless="compile.disable">
-  <rmic base="${build.classes}"
-        verify="${rmic.verify}"
-   iiop="${rmic.iiop}"
-   iiopopts="${rmic.iiopops}"
-   idl="${rmic.idl}"
-   idlopts="${rmic.idlops}"
-   debug="${rmic.debug}"
-        stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-    <!-- Build the server jar -->
-    <jar jarfile="${build.lib}/${jar.server.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.server.includes}"/>
-    </jar>
-
-    <!-- Build jbossmq-client.jar -->
-    <jar jarfile="${build.lib}/${jar.client.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.client.includes}"/>
-    </jar>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-   depends="docs-api, docs-todo"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-
-<target name="docs-javadocs-check">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-         targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-  <!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs" 
-     depends="docs-javadocs-check" 
-     unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="${javadoc.packages}"
-             sourcepath="${source.java}:${module.output}/gen-src"
-             destdir="${build.api}"
-             classpathref="javadoc.classpath"
-             windowtitle="${javadoc.windowtitle}"
-        splitindex="${javadoc.splitindex}"
-             author="${javadoc.author}"
-             version="${javadoc.version}"
-             public="${javadoc.public}"
-             package="${javadoc.package}"
-             protected="${javadoc.protected}"
-             private="${javadoc.private}"
-             use="${javadoc.use}"
-        verbose="${javadoc.verbose}"> 
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2002 JBoss Group, LLC. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-    
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-      
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false" />
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false" />
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false" />
-    <tag name="ejb.pk" description="ejb" enabled="false" />
-    <tag name="ejb.bean" description="ejb" enabled="false" />
-    <tag name="ejb.transaction" description="ejb" enabled="false" />
-    <tag name="ejb.finder" description="ejb" enabled="false" />
-    <tag name="ejb.relation" description="ejb" enabled="false" />
-    <tag name="ejb.create-method" description="ejb" enabled="false" />
-    
-    <tag name="jboss.query" description="jboss" enabled="false" />
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false" />
-    <tag name="jboss.load-group" description="jboss" enabled="false" />
-    <tag name="jboss.persistence" description="jboss" enabled="false" />
-    <tag name="jboss.entity-command" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false" />
-    <tag name="jboss.relation-table" description="jboss" enabled="false" />
-    <tag name="jboss.table-attribute" description="jboss" enabled="false" />
-    
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false" />
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false" />
-    <tag name="jboss.method-attributes" description="jboss" enabled="false" />
-    
-  </javadoc>
-</target>
-
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-<target name="xdoclet-task-classpath-check" unless="xdoclet.task.classpath">
-    <path id="xdoclet.task.classpath">
-      <path refid="xdoclet.base.classpath"/>
-      <path refid="apache.commons.classpath"/>
-      <path refid="javac.classpath" />
-    </path>
-    <property name="xdoclet.task.classpath" 
-	      refid="xdoclet.task.classpath"/>
-</target>
-
-<target name="docs-todo-check">
-      <!-- if index.html is newer than the sources we are up to date -->
-      <uptodate property="docs-todo.disable"
-         targetfile="${build.todo}/index.html">
-         <srcfiles dir="${source.java}" includes="**/*.java"/>
-      </uptodate>
-  </target>
-
-  <!-- Generate TODO list from @todo tags -->
-  <target name="docs-todo" 
-     depends="docs-todo-check" 
-     unless="docs-todo.disable">
-
-  <taskdef name="todo"
-               classname="xdoclet.modules.doc.DocumentDocletTask"
-               classpath="${xdoclet.task.classpath}"/>
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-
-    <info/>
-  </todo>
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-  <target name="jmx-docs">
-    <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.jmx-doc}"/>
-    <jmxdoclet
-        destdir="${build.jmx-doc}"
-             force="false"
-        excludedtags="@version, at author">
-      <fileset dir="${source.java}">
-        <include name="**/*.java"/>
-      </fileset>
-      <jbossXmlDoc/>
-    </jmxdoclet>
-
-  </target>
-
-  <!-- Generate the plain HTML jmx docs -->
-  <target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-    <!-- Force the use of SAXON XSLT -->
-    <property system="true" 
-         name="javax.xml.transform.TransformerFactory"
-         value="com.icl.saxon.TransformerFactoryImpl"/>
-
-    <mkdir dir="${build.jmx-api}"/>
-    <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-      processor="trax"
-      extension=".html"
-      basedir="${build.jmx-doc}"
-      destdir="${build.jmx-api}">
-       <include name="**/*.xml"/>
-       <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-       <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-    </style>
-
-  </target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean" 
-     depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber" 
-     depends="_buildmagic:clobber, clean">
-</target>
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-  <!-- ================================================================== -->
-  <!-- Project (build module) Targets                                     -->
-  <!-- ================================================================== -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-    <!-- Skip any missing modules and issue a warning -->
-    <property name="executemodules.skipmissing" value="true"/>
-
-    <!-- The header and footer displayed during each module execution -->
-    <property name="executemodules.header"><![CDATA[
- ============================================================== 
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-    <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-    ]]></property>
-
-    <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag, 
-       version.name, 
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-    </property>
-
-    <!-- Show the module configuration -->
-    <echo>groups:  ${groups}</echo>
-    <echo>modules: ${modules}</echo>
-
-    <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean">
-  <execmodules target="clean" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-</project>
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/build-common.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/build-common.xml)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1137 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-  <property name="javac.debug" value="true"/>
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-  
-  
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent~
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1137 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-
-   <echo message="hereiam"/>
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="off"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent~ (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/buildmagic.ent~)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.properties
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Copyright (c) 1998-2000 by Jason Dillon <jason at planet57.com>            ##
-##                                                                          ##
-##  This file is part of BuildMagic; an extension to Ant.                   ##
-##                                                                          ##
-##  This library is free software; you can redistribute it and/or modify    ##
-##  it under the terms of the GNU Lesser General Public License as          ##
-##  published by the Free Software Foundation; either version 2 of the      ##
-##  License, or (at your option) any later version.                         ##
-##                                                                          ##
-##  This library is distributed in the hope that it will be useful, but     ##
-##  WITHOUT ANY WARRANTY; without even the implied warranty of              ##
-##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       ##
-##  Lesser General Public License for more details.                         ##
-##                                                                          ##
-### ====================================================================== ###
-##                                                                          ##
-##  Common Properties                                                       ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: common.properties,v 1.4 2004/11/24 02:07:36 starksm Exp $ ###
-
-buildmagic.resolveproperties.force=false
-buildmagic.propertyfilter.all=true
-
-### Jython Support ###
-
-true=1
-false=0
-
-### Misc ###
-
-/=${file.separator}
-sun.boot.classpath=${sun.boot.class.path}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.properties (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/common.properties)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,324 +0,0 @@
-<!-- $Id: common.xml,v 1.7 2004/11/24 02:07:36 starksm Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Load Buildmagic extention tasks. -->
-<taskdef resource="org/jboss/tools/buildmagic/task/autoload.properties"/>
-<taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"/>
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init">
-  <!-- fail unless we have been started from the build script -->
-  <require property="build.script">
-
-    The build system MUST be executed with one of the provided build scripts.
-
-  </require>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.Void" property="HAVE_JDK_1.1"/>
-  <available classname="java.lang.ThreadLocal" property="HAVE_JDK_1.2"/>
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <!-- Setup the basic project roots. -->
-  <property name="_project.root" value=".."/>
-  <path id="project.root"><pathelement location="${_project.root}"/></path>
-  <property name="project.root" refid="project.root"/> 
-  <property name="project.build" value="${project.root}/build"/>
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the project environment. -->
-  <property file="${project.build}/local.properties"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-
-  <available file="${module.root}/etc/local.properties-example"
-        property="init.have-local-properties"/>
-  <call target="_buildmagic:init:local-properties" if="init.have-local-properties"/>
-
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property resource="org/jboss/tools/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property resource="org/jboss/tools/buildmagic/task.properties"/>
-
-  <!-- Late bind properties & install filters -->
-  <resolver force="${buildmagic.resolveproperties.force}"/>
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-        tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <record name="${basedir}/build.log" append="no"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-  <delete dir="${module.output}"/>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-
-  <!-- 
-     | Try to stop the build log before we delete the file.
-   -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-   zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/common.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/common.xml)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/libraries.ent
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,633 +0,0 @@
-<!-- $Id: libraries.ent,v 1.79 2005/11/04 15:36:44 alesj Exp $ -->
-
-  <!-- Spring -->
-  <property name="spring.root" value="${project.thirdparty}/spring"/>
-  <property name="spring.lib" value="${spring.root}/lib"/>
-  <path id="spring.classpath">
-     <pathelement path="${spring.lib}/spring-beans.jar"/>
-     <pathelement path="${spring.lib}/spring-core.jar"/>
-     <pathelement path="${spring.lib}/spring-context.jar"/>
-  </path>
-  <path id="spring-example.classpath">
-     <pathelement path="${spring.lib}/spring-aop.jar"/>
-     <pathelement path="${spring.lib}/spring-web.jar"/>
-     <pathelement path="${spring.lib}/spring-webmvc.jar"/>
-   </path>
-
-  <!-- Dom4j -->
-  <property name="dom4j.dom4j.root" value="${project.thirdparty}/dom4j-dom4j"/>
-  <property name="dom4j.dom4j.lib" value="${dom4j.dom4j.root}/lib"/>
-  <path id="dom4j.dom4j.classpath">
-    <pathelement path="${dom4j.dom4j.lib}/dom4j.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="jaxen.jaxen.lib" value="${dom4j.dom4j.root}/lib"/>  
-
-  <!-- Javassist -->
-  <property name="javassist.root" value="${project.thirdparty}/javassist"/>
-  <property name="javassist.lib" value="${javassist.root}/lib"/>
-  <path id="javassist.classpath">
-    <pathelement path="${javassist.lib}/javassist.jar"/>
-  </path>
-
-  <!-- qdox -->
-  <property name="qdox.root" value="${project.thirdparty}/qdox"/>
-  <property name="qdox.lib" value="${qdox.root}/lib"/>
-  <path id="qdox.classpath">
-    <pathelement path="${qdox.lib}/qdox.jar"/>
-  </path>
-
-  <!-- hibernate3 -->
-  <property name="hibernate.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.lib" value="${hibernate.root}/lib"/>
-  <path id="hibernate3.classpath">
-    <pathelement path="${hibernate.lib}/hibernate3.jar"/>
-    <pathelement path="${hibernate.lib}/asm.jar"/>
-    <pathelement path="${hibernate.lib}/asm-attrs.jar"/>
-    <pathelement path="${hibernate.lib}/antlr*.jar"/>
-  </path>
-  
-  <!-- hibernate entity manager -->
-  <property name="hibernate.entitymanager.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.entitymanager.lib" value="${hibernate.entitymanager.root}/lib"/>
-  <path id="hibernate.entitymanager.classpath">
-    <pathelement path="${hibernate.entitymanager.lib}/ejb3-persistence.jar"/>
-    <pathelement path="${hibernate.entitymanager.lib}/hibernate-entitymanager.jar"/>
-  </path>
-  
-  <!-- hibernate annotations manager -->
-  <property name="hibernate.annotations.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.annotations.lib" value="${hibernate.annotations.root}/lib"/>
-  <path id="hibernate.annotations.classpath">
-    <pathelement path="${hibernate.annotations.lib}/hibernate-annotations.jar"/>
-  </path>  
-  
-  <!-- asm alias used for bridging to thirdparty build-->
-  <property name="asm.asm.root" value="${project.thirdparty}/hibernate"/>
-  <property name="asm.asm.lib" value="${asm.asm.root}/lib/"/>
-  <property name="asm.asm.resources" value="${asm.asm.root}/resources/"/>
-  <path id="asm.asm.classpath">
-     <pathelement path="${asm.asm.lib}/asm.jar"/>
-     <pathelement path="${asm.asm.lib}/asm-attrs.jar"/>
-  </path>
-  
-
-  <!-- ejb3-persistence -->
-  <path id="ejb3-persistence.classpath">
-    <pathelement path="${hibernate.lib}/hibernate-annotations.jar"/>
-    <pathelement path="${hibernate.lib}/hibernate-entitymanager.jar"/>
-    <pathelement path="${hibernate.lib}/ejb3-persistence.jar"/>
-  </path>
-
-  <!-- ODMG (needed for Hibernate) -->
-  <property name="odmg.root" value="${project.thirdparty}/odmg"/>
-  <property name="odmg.lib" value="${odmg.root}/lib"/>
-  <path id="odmg.classpath">
-    <pathelement path="${odmg.lib}/odmg-3.0.jar"/>
-  </path>
-
-  <!-- CGLIB (needed for Hibernate) -->
-  <property name="cglib.root" value="${project.thirdparty}/cglib"/>
-  <property name="cglib.lib" value="${cglib.root}/lib"/>
-  <path id="cglib.classpath">
-    <pathelement path="${cglib.lib}/cglib-2.1.1.jar"/>
-  </path>
-
-
-  <!-- Trove -->
-  <property name="trove.root" value="${project.thirdparty}/trove"/>
-  <property name="trove.lib" value="${trove.root}/lib"/>
-  <path id="trove.classpath">
-    <pathelement path="${trove.lib}/trove.jar"/>
-  </path>
-
-  <!-- Ant -->
-  <property name="apache.ant.root" value="${project.tools}"/>
-  <property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-  <path id="apache.ant.classpath">
-    <pathelement path="${apache.ant.lib}/ant.jar"/>
-  </path>
-
-  <!-- Apache Avalon -->
-  <property name="apache.avalon.root" value="${project.thirdparty}/apache-avalon"/>
-  <property name="apache.avalon.lib" value="${apache.avalon.root}/lib"/>
-  <path id="apache.avalon.classpath">
-    <pathelement path="${apache.avalon.lib}/avalon-framework.jar"/>
-  </path>
-  <property name="apache.avalon.logkit.lib" value="${apache.avalon.lib}"/>  
-  <path id="apache.avalon.logkit.classpath">
-    <pathelement path="${apache.avalon.logkit.lib}/logkit.jar"/>
-  </path>
-
-  <!-- Apache BCEL -->
-  <property name="apache.bcel.root" value="${project.thirdparty}/apache-bcel"/>
-  <property name="apache.bcel.lib" value="${apache.bcel.root}/lib"/>
-  <path id="apache.bcel.classpath">
-    <pathelement path="${apache.bcel.lib}/bcel.jar"/>
-  </path>
-
-  <!-- Apache Commons -->
-  <property name="apache.commons.root" value="${project.thirdparty}/apache-commons"/>
-  <property name="apache.commons.lib" value="${apache.commons.root}/lib"/>
-  <path id="apache.commons.classpath">
-    <pathelement path="${apache.commons.lib}/commons-collections.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-pool.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-discovery.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-fileupload.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-lang-2.0.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-vfs.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="apache.collections.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.codec.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.beanutils.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.digester.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.httpclient.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.logging.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.pool.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.fileupload.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.lang.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.vfs.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.discovery.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.validator.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.logging.api.lib" value="${apache.commons.root}/lib"/>
-  
-  <path id="apache.httpclient.classpath">
-     <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <path id="apache.logging.classpath">
-     <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-  </path>
-  
-  <path id="apache.beanutils.classpath">
-     <pathelement path="${apache.commons.lib}/commons-beanutils.jar"/>
-  </path>
-  
-  <path id="apache.validator.classpath">
-       <pathelement path="${apache.commons.lib}/commons-validator-1.1.3.jar"/>
-  </path>
-
-  <!-- Apache Log4j -->
-  <property name="apache.log4j.root" value="${project.thirdparty}/apache-log4j"/>
-  <property name="apache.log4j.lib" value="${apache.log4j.root}/lib"/>
-  <path id="apache.log4j.classpath">
-    <pathelement path="${apache.log4j.lib}/log4j.jar"/>
-  </path>
-
-  <!-- Apache Lucene -->
-  <property name="apache.lucene.root"
-    value="${project.thirdparty}/apache-lucene"/>
-  <property name="apache.lucene.lib" value="${apache.lucene.root}/lib"/>
-  <path id="apache.lucene.classpath">
-    <pathelement path="${apache.lucene.lib}/lucene.jar"/>
-  </path>
-
-   <!-- Apache Myfaces -->
-   <property name="apache.myfaces.root"
-     value="${project.thirdparty}/apache-myfaces"/>
-   <property name="apache.myfaces.lib" value="${apache.myfaces.root}/lib"/>
-
-  <!-- Apache Tomcat 5.5.x -->
-  <property name="apache.tomcat55.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.tomcat55.lib" value="${apache.tomcat55.root}"/>  
-  <path id="apache.tomcat55.classpath">
-    <fileset dir="${apache.tomcat55.root}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-  
-  <!-- Apache commons-el -->
-  <property name="commons.el.root" value="${apache.tomcat55.root}"/>
-  <property name="commons.el.lib" value="${apache.tomcat55.root}"/>
-  <path id="commons.el.classpath">
-     <pathelement path="${commons.el.lib}/commons-el.jar"/>
-  </path> 
-  
-  <!-- Apache Modeler -->
-  <property name="apache.modeler.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.modeler.lib" value="${apache.modeler.root}"/>
-  <path id="apache.modeler.classpath">
-    <fileset dir="${apache.modeler.root}">
-      <include name="commons-modeler.jar" />
-    </fileset>
-  </path>
-
-  <!-- Apache Velocity -->
-  <property name="apache.velocity.root" value="${project.thirdparty}/apache-velocity"/>
-  <property name="apache.velocity.lib" value="${apache.velocity.root}/lib"/>
-  <path id="apache.velocity.classpath">
-    <pathelement path="${apache.velocity.lib}/velocity.jar"/>
-  </path>
-
-  <!-- Apache Xerces -->
-  <property name="apache.xerces.root" value="${project.thirdparty}/apache-xerces"/>
-  <property name="apache.xerces.lib" value="${apache.xerces.root}/lib"/>
-  <path id="apache.xerces.classpath">
-    <pathelement path="${apache.xerces.lib}/xml-apis.jar"/>
-    <pathelement path="${apache.xerces.lib}/xercesImpl.jar"/>
-    <pathelement path="${apache.xerces.lib}/resolver.jar"/>
-  </path>
-
-  <!-- Apache Xalan -->
-  <property name="apache.xalan.root" value="${project.thirdparty}/apache-xalan"/>
-  <property name="apache.xalan.lib" value="${apache.xalan.root}/lib"/>
-  <path id="apache.xalan.classpath">
-    <pathelement path="${apache.xalan.lib}/xalan.jar"/>
-    <path refid="apache.xerces.classpath"/>
-  </path>
-
-   <!-- Apache Scout -->
-    <property name="apache.scout.root" value="${project.thirdparty}/apache-scout"/>
-    <property name="apache.scout.lib" value="${apache.scout.root}/lib"/>
-    <path id="apache.scout.classpath">
-      <pathelement path="${apache.scout.lib}/scout.jar"/>
-    </path>
-
-  <!-- Apache Slide -->
-  <property name="apache.slide.root" value="${project.thirdparty}/apache-slide"/>
-  <property name="apache.slide.lib" value="${apache.slide.root}/client/lib"/>
-  <path id="apache.slide.classpath">
-    <pathelement path="${apache.slide.lib}/webdavlib.jar"/>
-    <pathelement path="${apache.slide.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <!-- Apache JaxMe2 -->
-  <property name="apache.jaxme.root" value="${project.thirdparty}/apache-jaxme"/>
-  <property name="apache.jaxme.lib" value="${apache.jaxme.root}/lib"/>
-  <path id="apache.jaxme.classpath">
-    <pathelement path="${apache.jaxme.lib}/jaxmexs.jar"/>
-  </path>
-
-  <!-- Apache WSS4J -->
-  <property name="apache.wss4j.root" value="${project.thirdparty}/apache-wss4j"/>
-  <property name="apache.wss4j.lib" value="${apache.wss4j.root}/lib"/>
-  <path id="apache.wss4j.classpath">
-    <pathelement path="${apache.wss4j.lib}/wss4j.jar"/>
-  </path>
-
-  <!-- Apache XMLSec -->
-  <property name="apache.xmlsec.root" value="${project.thirdparty}/apache-xmlsec"/>
-  <property name="apache.xmlsec.lib" value="${apache.xmlsec.root}/lib"/>
-  <path id="apache.xmlsec.classpath">
-    <pathelement path="${apache.xmlsec.lib}/xmlsec.jar"/>
-  </path>
-
-  <!-- Bouncy Castle JCE Provider -->
-  <property name="bouncycastle.root" value="${project.thirdparty}/bouncycastle"/>
-  <property name="bouncycastle.lib" value="${bouncycastle.root}/lib"/>
-  <path id="bouncycastle.classpath">
-    <pathelement path="${bouncycastle.lib}/bcprov-jdk14-122.jar"/>
-  </path>
-
-  <!-- OpenSAML -->
-  <property name="opensaml.root" value="${project.thirdparty}/opensaml"/>
-  <property name="opensaml.lib" value="${opensaml.root}/lib"/>
-  <path id="opensaml.classpath">
-    <pathelement path="${opensaml.lib}/opensaml.jar"/>
-  </path>
-
-  <!-- GNU Regex -->
-  <property name="gnu.regexp.root" value="${project.thirdparty}/gnu-regexp"/>
-  <property name="gnu.regexp.lib" value="${gnu.regexp.root}/lib"/>
-  <path id="gnu.regexp.classpath">
-    <pathelement path="${gnu.regexp.lib}/gnu-regexp.jar"/>
-  </path>
-
-  <!-- GNU Getopt -->
-  <property name="gnu.getopt.root" value="${project.thirdparty}/gnu-getopt"/>
-  <property name="gnu.getopt.lib" value="${gnu.getopt.root}/lib"/>
-  <path id="gnu.getopt.classpath">
-    <pathelement path="${gnu.getopt.lib}/getopt.jar"/>
-  </path>
-
-  <!-- org.jdom -->
-  <property name="jdom.root" value="${project.thirdparty}/jdom-beta-7"/>
-  <property name="jdom.lib" value="${jdom.root}/lib"/>
-  <path id="jdom.classpath">
-    <pathelement path="${jdom.lib}/jdom.jar"/>
-  </path>
-
-  <!-- JBoss -->
-  <property name="jboss.external.root" value="${project.thirdparty}/jboss"/>
-  <property name="jboss.remoting.root" value="${jboss.external.root}/remoting"/>
-  <property name="jboss.remoting.lib" value="${jboss.remoting.root}/lib"/>
-  <path id="jboss.remoting.classpath">
-    <pathelement path="${jboss.remoting.lib}/jboss-remoting.jar"/>
-  </path>
-  <property name="jboss.serialization.root" value="${jboss.external.root}/serialization"/>
-  <property name="jboss.serialization.lib" value="${jboss.serialization.root}/lib"/>
-  <path id="jboss.serialization.classpath">
-    <pathelement path="${jboss.serialization.lib}/jboss-serialization.jar"/>
-  </path>
-  <property name="jboss.axis.root" value="${jboss.external.root}/axis"/>
-  <property name="jboss.axis.lib" value="${jboss.axis.root}/lib"/>
-  <path id="jboss.axis.classpath">
-    <pathelement path="${jboss.axis.lib}/axis-ws4ee.jar"/>
-  </path>
-
-  <!-- JUnit -->
-  <property name="junit.junit.root" value="${project.thirdparty}/junit-junit"/>
-  <property name="junit.junit.lib" value="${junit.junit.root}/lib"/>
-  <path id="junit.junit.classpath">
-    <pathelement path="${junit.junit.lib}/junit.jar"/>
-  </path>
-
-  <!-- EDU.oswego.cs.dl.util.concurrent -->
-  <property name="oswego.concurrent.root" value="${project.thirdparty}/oswego-concurrent"/>
-  <property name="oswego.concurrent.lib" value="${oswego.concurrent.root}/lib"/>
-  <path id="oswego.concurrent.classpath">
-    <pathelement path="${oswego.concurrent.lib}/concurrent.jar"/>
-  </path>
-
-  <!-- org.xml.sax (SAX2 & SAX2 Extensions) -->
-  <property name="sax.root" value="${project.thirdparty}/xml-sax"/>
-  <property name="sax.lib" value="${sax.root}/lib"/>
-  <path id="sax.classpath">
-    <pathelement path="${sax.lib}/sax2.jar"/>
-    <pathelement path="${sax.lib}/sax2-ext.jar"/>
-  </path>
-
-  <!-- IBM WSDL4j -->
-  <property name="ibm.wsdl4j.root" value="${project.thirdparty}/ibm-wsdl4j"/>
-  <property name="ibm.wsdl4j.lib" value="${ibm.wsdl4j.root}/lib"/>
-  <path id="ibm.wsdl4j.classpath">
-    <pathelement path="${ibm.wsdl4j.lib}/wsdl4j.jar"/>
-  </path>
-
-  <!-- GJT JPL-Util -->
-  <property name="gjt.jpl-util.root" value="${project.thirdparty}/gjt-jpl-util"/>
-  <property name="gjt.jpl-util.lib" value="${gjt.jpl-util.root}/lib"/>
-  <path id="gjt.jpl-util.classpath">
-    <pathelement path="${gjt.jpl-util.lib}/jpl-util.jar"/>
-    <pathelement path="${gjt.jpl-util.lib}/jpl-pattern.jar"/>
-  </path>
-
-  <!-- Hypersonic SQL -->
-  <property name="hsqldb.hsqldb.root" value="${project.thirdparty}/hsqldb-hsqldb"/>
-  <property name="hsqldb.hsqldb.lib" value="${hsqldb.hsqldb.root}/lib"/>
-  <path id="hsqldb.hsqldb.classpath">
-    <pathelement path="${hsqldb.hsqldb.lib}/hsqldb.jar"/>
-  </path>
-
-  <!-- JacORB -->
-  <property name="jacorb.jacorb.root" value="${project.thirdparty}/jacorb-jacorb"/>
-  <property name="jacorb.jacorb.lib" value="${jacorb.jacorb.root}/lib"/>
-  <path id="jacorb.jacorb.classpath">
-    <pathelement path="${jacorb.jacorb.lib}/jacorb.jar"/>
-  </path>
-  <path id="jacorb.idl.classpath">
-    <path refid="apache.avalon.logkit.classpath"/>
-    <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-  </path>
-  <property name="jacorb.idl.include" value="${jacorb.jacorb.root}/idl"/>
-  <property name="jacorb.jacorb.resources" value="${jacorb.jacorb.root}/conf/default"/>
-
-  <!-- JGroups -->
-  <property name="jgroups.jgroups.root" value="${project.thirdparty}/javagroups-javagroups"/>
-  <property name="jgroups.jgroups.lib" value="${jgroups.jgroups.root}/lib"/>
-  <path id="jgroups.jgroups.classpath">
-    <pathelement path="${jgroups.jgroups.lib}/jgroups.jar"/>
-  </path>
-
-  <!-- Sleepycat -->
-  <property name="sleepycat.root" value="${project.thirdparty}/sleepycat"/>
-  <property name="sleepycat.lib" value="${sleepycat.root}/lib"/>
-  <path id="sleepycat.classpath">
-     <pathelement path="${sleepycat.lib}/je.jar"/>
-  </path>
-
-
-  <!-- jUDDI -->
-  <property name="juddi.juddi.root" value="${project.thirdparty}/juddi-juddi"/>
-  <property name="juddi.juddi.lib" value="${juddi.juddi.root}/lib"/>
-  <path id="juddi.juddi.classpath">
-    <pathelement path="${juddi.juddi.lib}/juddi.jar"/>
-  </path>
-
-  <!-- JUnitEJB -->
-  <property name="junitejb.junitejb.root" value="${project.thirdparty}/junitejb/junitejb"/>
-  <property name="junitejb.junitejb.lib" value="${junitejb.junitejb.root}/lib"/>
-  <path id="junitejb.junitejb.classpath">
-    <pathelement path="${junitejb.junitejb.lib}/junitejb.jar"/>
-  </path>
-
-  <!-- Sun JavaBeans Activation Framework (JAF) -->
-  <property name="sun.jaf.root" value="${project.thirdparty}/sun-jaf"/>
-  <property name="sun.jaf.lib" value="${sun.jaf.root}/lib"/>
-  <path id="sun.jaf.classpath">
-    <pathelement path="${sun.jaf.lib}/activation.jar"/>
-  </path>
-
-   <!-- Sun JavaMail -->
-   <property name="sun.javamail.root" value="${project.thirdparty}/sun-javamail"/>
-   <property name="sun.javamail.lib" value="${sun.javamail.root}/lib"/>
-   <path id="sun.javamail.classpath">
-     <pathelement path="${sun.javamail.lib}/mail.jar"/>
-   </path>
-
-  <!-- Sun Java XML Parser (JAXP) -->
-  <property name="sun.jaxp.root" value="${project.thirdparty}/sun-jaxp"/>
-  <property name="sun.jaxp.lib" value="${sun.jaxp.root}/lib"/>
-  <path id="sun.jaxp.classpath">
-    <pathelement path="${sun.jaxp.lib}/jaxp.jar"/>
-    <pathelement path="${sun.jaxp.lib}/crimson.jar"/>
-    <pathelement path="${sun.jaxp.lib}/xalan.jar"/>
-  </path>
-
-  <!-- Sun Java Media Framework (JMF) -->
-  <property name="sun.jmf.root" value="${project.thirdparty}/sun-jmf"/>
-  <property name="sun.jmf.lib" value="${sun.jmf.root}/lib"/>
-  <path id="sun.jmf.classpath">
-    <pathelement path="${sun.jmf.lib}/jmf.jar"/>
-  </path>
-
-  <!-- Sun Java Management Extensions (JMX) -->
-  <property name="sun.jmx.root" value="${project.thirdparty}/sun-jmx"/>
-  <property name="sun.jmx.lib" value="${sun.jmx.root}/lib"/>
-  <path id="sun.jmx.classpath">
-    <pathelement path="${sun.jmx.lib}/jmxri.jar"/>
-    <pathelement path="${sun.jmx.lib}/jmxtools.jar"/>
-  </path>
-
-  <!-- Sun Java Servlet Technology  -->
-  <property name="sun.servlet.root" value="${project.thirdparty}/sun-servlet"/>
-  <property name="sun.servlet.lib" value="${sun.servlet.root}/lib"/>
-  <path id="sun.servlet.classpath">
-    <pathelement path="${sun.servlet.lib}/servlet-api.jar"/>
-    <pathelement path="${sun.servlet.lib}/jsp-api.jar"/>
-  </path>
-
-  <!-- JavaCC -->
-  <property name="sun.javacc.root" value="${project.thirdparty}/sun-javacc"/>
-  <property name="sun.javacc.lib" value="${sun.javacc.root}/lib"/>
-
-  <!-- BeanShell -->
-  <property name="beanshell.beanshell.root" value="${project.thirdparty}/beanshell-beanshell"/>
-  <property name="beanshell.beanshell.lib" value="${beanshell.beanshell.root}/lib"/>
-  <path id="beanshell.beanshell.classpath">
-    <fileset dir="${beanshell.beanshell.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
-  <!-- Joe SNMP lib -->
-  <property name="opennms.joesnmp.root" value="${project.thirdparty}/opennms/joesnmp"/>
-  <property name="opennms.joesnmp.lib" value="${opennms.joesnmp.root}/lib"/>
-  <path id="opennms.joesnmp.classpath">
-    <pathelement path="${opennms.joesnmp.lib}/joesnmp.jar"/>
-  </path>
-
-  <!-- XDoclet -->
-
-  <!--
-     | xdoclet has appended a version string to all their jars.
-     | I'm using jb4 so we don't have to track them so carefully
-   -->
-  <property name="xdoclet.version" value="jb4"/>
-
-  <!--
-
-  jason: it seems like this hack is better defaulting to the default in thirdparty, if you
-         want to build from CVS then change this to the value below in build/local.properties.
-
-  <!- - this may be overridden by the build/local.properties file to use version from cvs- ->
-  <property name="xdoclet.xdoclet.root" value="${project.root}/xdoclet/output"/>
-
-  -->
-  <property name="xdoclet.xdoclet.root" value="${project.thirdparty}/xdoclet-xdoclet"/>
-
-  <property name="xdoclet.xdoclet.lib" value="${xdoclet.xdoclet.root}/lib"/>
-  <path id="xdoclet.xdoclet.classpath">
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xjavadoc-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-bea-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-ejb-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-java-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jboss-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jdo-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jmx-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-web-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xdoclet-module-${xdoclet.version}.jar"/>
-    <path refid="apache.commons.classpath"/>
-    <path refid="sun.servlet.classpath"/>
-  </path>
-  <path id="xdoclet.task.classpath">
-    <path refid="xdoclet.xdoclet.classpath"/>
-  </path>
-
-  <!-- Informa RSS -->
-  <property name="informa.rss.root" value="${project.thirdparty}/informa-rss"/>
-  <property name="informa.rss.lib" value="${informa.rss.root}/lib"/>
-  <path id="informa.rss.classpath">
-    <pathelement path="${informa.rss.lib}/informa.jar"/>
-  </path>
-
-  <!-- JRegex -->
-  <property name="jregex.jregex.root" value="${project.thirdparty}/jregex-jregex"/>
-  <property name="jregex.jregex.lib" value="${jregex.jregex.root}/lib"/>
-  <path id="jregex.jregex.classpath">
-    <pathelement path="${jregex.jregex.lib}/jregex.jar"/>
-  </path>
-
-  <!-- DNSJava -->
-  <property name="sourceforge.dnsjava.root" value="${project.thirdparty}/sourceforge-dnsjava"/>
-  <property name="sourceforge.dnsjava.lib" value="${sourceforge.dnsjava.root}/lib"/>
-  <path id="sourceforge.dnsjava.classpath">
-    <pathelement path="${sourceforge.dnsjava.lib}/dnsjava-1.4.3.jar"/>
-  </path>
-
-  <!-- M.Wutka's DTD parser -->
-  <property name="wutka.dtdparser.root" value="${project.thirdparty}/wutka-dtdparser"/>
-  <property name="wutka.dtdparser.lib" value="${wutka.dtdparser.root}/lib"/>
-  <path id="wutka.dtdparser.classpath">
-    <pathelement path="${wutka.dtdparser.lib}/dtdparser121.jar"/>
-  </path>
-
-  <!-- JFreeChart -->
-  <property name="jfreechart.jfreechart.root" value="${project.thirdparty}/jfreechart"/>
-  <property name="jfreechart.jfreechart.lib" value="${jfreechart.jfreechart.root}/lib"/>
-  <path id="jfreechart.jfreechart.classpath">
-    <fileset dir="${jfreechart.jfreechart.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
- <!-- ebxmlrr -->
-  <property name="ebxmlrr.ebxmlrr.root" value="${project.thirdparty}/sun-ebxmlrr"/>
-  <property name="ebxmlrr.ebxmlrr.lib" value="${ebxmlrr.ebxmlrr.root}/lib"/>
-  <path id="ebxmlrr.ebxmlrr.classpath">
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/ebxmlrr.jar"/>
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/jaxr-client.jar"/>
-  </path>
-
-  <!-- ANTLR -->
-  <property name="antlr.antlr.root" value="${project.thirdparty}/antlr"/>
-  <property name="antlr.antlr.lib" value="${antlr.antlr.root}/lib"/>
-  <path id="antlr.antlr.classpath">
-    <pathelement path="${antlr.antlr.lib}/antlr-2.7.5H3.jar"/>
-  </path>
-
-  <!-- Apache Taglibs -->
-  <property name="apache.taglibs.root" value="${project.thirdparty}/apache-taglibs"/>
-  <property name="apache.taglibs.lib" value="${apache.taglibs.root}/lib"/>
-  <path id="apache.taglibs.classpath">
-    <pathelement path="${apache.taglibs.lib}/jstl-1.1.2.jar"/>
-    <pathelement path="${apache.taglibs.lib}/standard-1.1.2.jar"/>
-  </path>
-
-  <!-- Apache ORO -->
-  <property name="apache.oro.root" value="${project.thirdparty}/apache-oro"/>
-  <property name="apache.oro.lib" value="${apache.oro.root}/lib"/>
-  <path id="apache.oro.classpath">
-    <pathelement path="${apache.oro.lib}/jakarta-oro-2.0.8.jar"/>
-  </path>
-
-  <!-- Apache Struts -->
-  <property name="apache.struts.root" value="${project.thirdparty}/apache-struts"/>
-  <property name="apache.struts.lib" value="${apache.struts.root}/lib"/>
-  <path id="apache.struts.classpath">
-    <pathelement path="${apache.struts.lib}/struts-1.2.6.jar"/>
-  </path>
-
-  <!-- StAX -->
-  <property name="codehaus.stax.root" value="${project.thirdparty}/codehaus-stax"/>
-  <property name="codehaus.stax.lib" value="${codehaus.stax.root}/lib"/>
-  <path id="codehaus.stax.classpath">
-    <pathelement path="${codehaus.stax.lib}/stax-1.1.1.jar"/>
-  </path>
-
-  <!-- XMLUnit -->
-  <property name="xmlunit.xmlunit.root" value="${project.thirdparty}/xmlunit-xmlunit"/>
-  <property name="xmlunit.xmlunit.lib" value="${xmlunit.xmlunit.root}/lib"/>
-  <path id="xmlunit.xmlunit.classpath">
-    <pathelement path="${xmlunit.xmlunit.lib}/xmlunit1.0.jar"/>
-  </path>
-  
-  <!-- easymock -->
-  <property name="easymock.easymock.root" value="${project.thirdparty}/easymock"/>
-  <property name="easymock.easymock.lib" value="${easymock.easymock.root}/lib/"/>
-  <property name="easymock.easymock.resources" value="${easymock.easymock.root}/resources/"/>
-  <path id="easymock.easymock.classpath">
-     <pathelement path="${easymock.easymock.lib}/easymockclassextension.jar"/>
-     <pathelement path="${easymock.easymock.lib}/easymock-1.1.jar"/>
-  </path>
-  
-  <!-- struts-test-case -->
-  <property name="struts.test.case.root" value="${project.thirdparty}/struts-test-case"/>
-  <property name="struts.test.case.lib" value="${struts.test.case.root}/lib/"/>
-  <property name="struts.test.case.resources" value="${struts.test.case.root}/resources/"/>
-  <path id="struts.test.case.classpath">
-     <pathelement path="${struts.test.case.lib}/strutstest-2.1.3.jar"/>
-  </path>  
-  
-  <!-- cache -->
-  <property name="jboss.cache.root" value="${project.thirdparty}/jboss/cache"/>
-  <property name="jboss.cache.lib" value="${jboss.cache.root}/lib"/>
-  <path id="jboss.cache.classpath">
-    <pathelement path="${jboss.cache.lib}/jboss-cache.jar"/>
-  </path>  

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/libraries.ent (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/libraries.ent)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/modules.ent
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,305 +0,0 @@
-<!-- $Id: modules.ent,v 1.56 2006/05/23 20:20:41 asaldhana Exp $ -->
-
-<!-- AOP -->
-<property name="jboss.aop.root" value="${project.root}/aop/output"/>
-<property name="jboss.aop.lib" value="${jboss.aop.root}/lib"/>
-<path id="jboss.aop.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop.jar"/>
-</path>
-<path id="jboss.aop50.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop-jdk50.jar"/>
-</path>
-
-<property name="jboss.aspects.root" value="${project.root}/aspects/output"/>
-<property name="jboss.aspects.lib" value="${jboss.aspects.root}/lib"/>
-<path id="jboss.aspects.classpath">
-  <pathelement path="${jboss.aspects.lib}/jboss-aspect-library.jar"/>
-</path>
-
-<!-- tomcat -->
-<property name="jboss.tomcat.root" value="${project.root}/tomcat/output"/>
-  <property name="jboss.tomcat.lib" value="${jboss.tomcat.root}/lib"/>
-<path id="jboss.tomcat.classpath">
-  <pathelement path="${jboss.tomcat.lib}/tc5-cluster.aop"/>
-  <pathelement path="${jboss.tomcat.root}/resource"/>
-</path>
-
-<!-- Cluster -->
-<property name="jboss.cluster.root" value="${project.root}/cluster/output"/>
-<property name="jboss.cluster.lib" value="${jboss.cluster.root}/lib"/>
-<path id="jboss.cluster.classpath">
-  <pathelement path="${jboss.cluster.lib}/jbossha.jar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-httpsession.sar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-singleton.jar"/>
-</path>
-
-<!-- Common -->
-<property name="jboss.common.root" value="${project.root}/common/output"/>
-<property name="jboss.common.lib" value="${jboss.common.root}/lib"/>
-<path id="jboss.common.classpath">
-  <pathelement path="${jboss.common.lib}/jboss-common.jar"/>
-  <pathelement path="${jboss.common.lib}/jboss-xml-binding.jar"/>
-  <pathelement path="${jboss.common.lib}/namespace.jar"/>
-</path>
-
-<!-- Compatibility -->
-<property name="jboss.compatibility.root" value="${project.root}/compatibility/output"/>
-<property name="jboss.compatibility.lib" value="${jboss.compatibility.root}/lib"/>
-<path id="jboss.compatibility.classpath">
-</path>
-
-<!-- Iiop -->
-<property name="jboss.iiop.root" value="${project.root}/iiop/output"/>
-<property name="jboss.iiop.lib" value="${jboss.iiop.root}/lib"/>
-<path id="jboss.iiop.classpath">
-  <pathelement path="${jboss.iiop.lib}/jboss-iiop.jar"/>
-</path>
-
-<!-- J2EE -->
-<property name="jboss.j2ee.root" value="${project.root}/j2ee/output"/>
-<property name="jboss.j2ee.lib" value="${jboss.j2ee.root}/lib"/>
-<path id="jboss.j2ee.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-jaxrpc.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-saaj.jar"/>
-</path>
-
-<!-- J2EE Extensions-->
-<path id="jboss.j2ee.ext.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-auth.jar"/>
-</path>
-
-<!-- J2SE -->
-<property name="jboss.j2se.root" value="${project.root}/j2se/output"/>
-<property name="jboss.j2se.lib" value="${jboss.j2se.root}/lib"/>
-<path id="jboss.j2se.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-j2se.jar"/>
-</path>
-<path id="jboss.jmxcompliance.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-jmx-compliance.jar"/>
-</path>
-
-<!-- Deployment -->
-<property name="jboss.deployment.root" value="${project.root}/deployment/output"/>
-<property name="jboss.deployment.lib" value="${jboss.deployment.root}/lib"/>
-<path id="jboss.deployment.classpath">
-  <pathelement path="${jboss.deployment.lib}/jboss-deployment.jar"/>
-</path>
-
-<!-- EJB3 -->
-<property name="jboss.ejb3.root" value="${project.root}/ejb3/output"/>
-<property name="jboss.ejb3.lib" value="${jboss.ejb3.root}/lib"/>
-<path id="jboss.ejb3.classpath">
-  <pathelement path="${jboss.ejb3.lib}/jboss-ejb3.jar"/>
-  <pathelement path="${jboss.ejb3.lib}/jboss-annotations-ejb3.jar"/>
-</path>
-
-<!-- EJB3X -->
-<property name="jboss.ejb3x.root" value="${project.root}/ejb3x/output"/>
-<property name="jboss.ejb3x.lib" value="${jboss.ejb3x.root}/lib"/>
-<path id="jboss.ejb3x.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x.jar"/>
-</path>
-<path id="jboss.ejb3x.jdk14.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x-jdk14.jar"/>
-</path>
-
-<!-- JCA -->
-<property name="jboss.jca.root" value="${project.root}/connector/output"/>
-<property name="jboss.jca.lib" value="${jboss.jca.root}/lib"/>
-<path id="jboss.jca.classpath">
-  <pathelement path="${jboss.jca.lib}/jboss-jca.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-local-jdbc.jar"/>
-    <pathelement path="${jboss.jca.lib}/jboss-ha-local-jdbc.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-common-jdbc-wrapper.jar"/>
-</path>
-
-<!-- JMX -->
-<property name="jboss.jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.jmx.lib" value="${jboss.jmx.root}/lib"/>
-<path id="jboss.jmx.classpath">
-  <pathelement path="${jboss.jmx.lib}/jboss-jmx.jar"/>
-</path>
-
-<!-- JMX Remoting -->
-<property name="jboss.jmx-remoting.root" value="${project.root}/jmx-remoting/output"/>
-<property name="jboss.jmx-remoting.lib" value="${jboss.jmx-remoting.root}/lib"/>
-<path id="jboss.jmx-remoting.classpath">
-  <pathelement path="${jboss.jmx-remoting.lib}/jboss-jmx-remoting.jar"/>
-</path>
-
-<!-- Management -->
-<property name="jboss.management.root" value="${project.root}/management/output"/>
-<property name="jboss.management.lib" value="${jboss.management.root}/lib"/>
-<path id="jboss.management.classpath">
-  <pathelement path="${jboss.management.lib}/jboss-jsr77-client.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-jsr77.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-management.jar"/>
-</path>
-
-<!-- MBeans -->
-<property name="jboss.mbeans.root" value="${project.root}/mbeans/output"/>
-<property name="jboss.mbeans.lib" value="${jboss.mbeans.root}/lib"/>
-<path id="jboss.mbeans.classpath">
-  <pathelement path="${jboss.mbeans.lib}/jboss-mbeans.jar"/>
-</path>
-
-<!-- Messaging -->
-<property name="jboss.messaging.root" value="${project.root}/messaging/output"/>
-<property name="jboss.messaging.lib" value="${jboss.messaging.root}/lib"/>
-<path id="jboss.messaging.classpath">
-  <pathelement path="${jboss.messaging.lib}/jbossmq.jar"/>
-</path>
-
-<!-- Messaging 5 -->
-<property name="jboss.jms.root" value="${project.root}/jms/output"/>
-<property name="jboss.jms.lib" value="${jboss.jms.root}/lib"/>
-<path id="jboss.jms.classpath">
-  <pathelement path="${jboss.jms.lib}/jboss-messaging.jar"/>
-</path>
-
-<!-- Naming -->
-<property name="jboss.naming.root" value="${project.root}/naming/output"/>
-<property name="jboss.naming.lib" value="${jboss.naming.root}/lib"/>
-<path id="jboss.naming.classpath">
-  <pathelement path="${jboss.naming.lib}/jnpserver.jar"/>
-</path>
-
-<!-- Security -->
-<property name="jboss.security.root" value="${project.root}/security/output"/>
-<property name="jboss.security.lib" value="${jboss.security.root}/lib"/>
-<path id="jboss.security.classpath">
-  <pathelement path="${jboss.security.lib}/jbosssx.jar"/>
-</path>
-
-<!-- Server -->
-<property name="jboss.server.root" value="${project.root}/server/output"/>
-<property name="jboss.server.lib" value="${jboss.server.root}/lib"/>
-<path id="jboss.server.classpath">
-  <pathelement path="${jboss.server.lib}/jboss.jar"/>
-  <pathelement path="${jboss.server.lib}/jmx-adaptor-plugin.jar"/>
-</path>
-
-<!-- Spring -->
-<property name="jboss.spring.root" value="${project.root}/spring-int/output"/>
-<property name="jboss.spring.lib" value="${jboss.spring.root}/lib"/>
-
-<!-- System -->
-<property name="jboss.system.root" value="${project.root}/system/output"/>
-<property name="jboss.system.lib" value="${jboss.system.root}/lib"/>
-<path id="jboss.system.classpath">
-  <pathelement path="${jboss.system.lib}/jboss-system.jar"/>
-</path>
-<property name="jboss.system.xdocletpath"
-  value="${project.root}/system/src/main"/>
-
-<!-- Test -->
-<property name="jboss.test.root" value="${project.root}/test/output"/>
-<property name="jboss.test.lib" value="${jboss.test.root}/lib"/>
-<path id="jboss.test.classpath">
-  <pathelement path="${jboss.test.lib}/jboss-test.jar"/>
-</path>
-
-<!-- Transaction -->
-<property name="jboss.transaction.root" value="${project.root}/transaction/output"/>
-<property name="jboss.transaction.lib" value="${jboss.transaction.root}/lib"/>
-<path id="jboss.transaction.classpath">
-  <pathelement path="${jboss.transaction.lib}/jboss-transaction.jar"/>
-</path>
-
-<!-- Varia -->
-<property name="jboss.varia.root" value="${project.root}/varia/output"/>
-<property name="jboss.varia.lib" value="${jboss.varia.root}/lib"/>
-<path id="jboss.varia.classpath">
-  <pathelement path="${jboss.varia.root}/classes"/>
-</path>
-
-<!-- Hibernate2 integration module -->
-<property name="jboss.hibernate.root" value="${project.root}/hibernate-int/output"/>
-<property name="jboss.hibernate.lib" value="${jboss.hibernate.root}/lib"/>
-<path id="jboss.hibernate.classpath">
-  <pathelement path="${jboss.hibernate.lib}/jboss-hibernate.jar"/>
-</path>
-
-
-<!-- below this line starts the kingdom of nukes ***************************************************************** -->
-
-<!-- Nukes on JBoss -->
-<property name="jboss.nukes.root" value="${project.root}/nukes/output"/>
-<property name="jboss.nukes.lib" value="${jboss.nukes.root}/lib"/>
-<path id="jboss.nukes.classpath">
-  <pathelement path="${jboss.nukes.lib}/nukes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss adminmessages -->
-<property name="jboss.nukes-adminmessages.root" value="${project.root}/adminmessages/output"/>
-<property name="jboss.nukes-adminmessages.lib" value="${jboss.nukes-adminmessages.root}/lib"/>
-<path id="jboss.nukes-adminmessages.classpath">
-  <pathelement path="${jboss.nukes-adminmessages.lib}/nukes-adminmessages-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss faq -->
-<property name="jboss.nukes-faq.root" value="${project.root}/faq/output"/>
-<property name="jboss.nukes-faq.lib" value="${jboss.nukes-faq.root}/lib"/>
-<path id="jboss.nukes-faq.classpath">
-  <pathelement path="${jboss.nukes-faq.lib}/nukes-faq-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss jmx -->
-<property name="jboss.nukes-jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.nukes-jmx.lib" value="${jboss.nukes-jmx.root}/lib"/>
-<path id="jboss.nukes-jmx.classpath">
-  <pathelement path="${jboss.nukes-jmx.lib}/nukes-jmx-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss journal -->
-<property name="jboss.nukes-journal.root" value="${project.root}/journal/output"/>
-<property name="jboss.nukes-journal.lib" value="${jboss.nukes-journal.root}/lib"/>
-<path id="jboss.nukes-journal.classpath">
-  <pathelement path="${jboss.nukes-journal.lib}/nukes-journal-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss mp3player -->
-<property name="jboss.nukes-mp3player.root" value="${project.root}/mp3player/output"/>
-<property name="jboss.nukes-mp3player.lib" value="${jboss.nukes-mp3player.root}/lib"/>
-<path id="jboss.nukes-mp3player.classpath">
-  <pathelement path="${jboss.nukes-mp3player.lib}/nukes-mp3player-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss news -->
-<property name="jboss.nukes-news.root" value="${project.root}/news/output"/>
-<property name="jboss.nukes-news.lib" value="${jboss.nukes-news.root}/lib"/>
-<path id="jboss.nukes-news.classpath">
-  <pathelement path="${jboss.nukes-news.lib}/nukes-news-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss quotes -->
-<property name="jboss.nukes-quotes.root" value="${project.root}/quotes/output"/>
-<property name="jboss.nukes-quotes.lib" value="${jboss.nukes-quotes.root}/lib"/>
-<path id="jboss.nukes-quotes.classpath">
-  <pathelement path="${jboss.nukes-quotes.lib}/nukes-quotes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss list -->
-<property name="jboss.nukes-list.root" value="${project.root}/list/output"/>
-<property name="jboss.nukes-list.lib" value="${jboss.nukes-list.root}/lib"/>
-<path id="jboss.nukes-list.classpath">
-  <pathelement path="${jboss.nukes-list.lib}/nukes-list-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss script -->
-<property name="jboss.nukes-script.root" value="${project.root}/script/output"/>
-<property name="jboss.nukes-script.lib" value="${jboss.nukes-script.root}/lib"/>
-<path id="jboss.nukes-script.classpath">
-  <pathelement path="${jboss.nukes-script.lib}/nukes-script-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss sections -->
-<property name="jboss.nukes-sections.root" value="${project.root}/sections/output"/>
-<property name="jboss.nukes-sections.lib" value="${jboss.nukes-sections.root}/lib"/>
-<path id="jboss.nukes-sections.classpath">
-  <pathelement path="${jboss.nukes-sections.lib}/nukes-sections-lib.jar"/>
-</path>
-
-
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/modules.ent (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/modules.ent)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/targets.ent
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,116 +0,0 @@
-<!-- $Id: targets.ent,v 1.5 2004/11/24 02:07:36 starksm Exp $ -->
-<!--
-   $Log: targets.ent,v $
-   Revision 1.5  2004/11/24 02:07:36  starksm
-   Restore the tools module content after the errant removal
-
-   Revision 1.3  2004/03/29 19:49:17  ejort
-   Bring build into line with jboss-3.2
-
-   Revision 1.1.2.2  2003/12/07 22:12:53  ejort
-   Make a start on simplifying the build,
-   including incremental xdoclet MBean generation
-
-   Revision 1.1.2.1  2003/05/18 06:24:13  starksm
-   
-   Standard targets
--->
-
-  <!-- ================================================================== -->
-  <!-- Initialization                                                     -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Initialize the build system.  Must depend on '_buildmagic:init'.  
-     | Other targets should depend on 'init' or things will mysteriously fail.
-   -->
-
-  <target name="init" unless="init.disable" depends="_buildmagic:init">
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="jars" 
-	  description="Builds all jar files."
-     depends="_buildmagic:build-bypass-check"
-	  unless="build-bypass.on">
-
-    <call target="compile"/>
-
-    <mkdir dir="${build.lib}"/>
-
-    <call target="module-jars"/>
-
-    <!-- Update the build marker to allow bypassing -->
-    <touch file="${build-bypass.marker}"/>
-
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Install & Release                                                  -->
-  <!-- ================================================================== -->
-
-  <target name="install" 
-	  description="Install the structure for a release."
-	  depends="all, _buildmagic:install:default"/>
-
-  <target name="release" depends="install"/>
-
-  <target name="release-zip" 
-	  description="Builds a ZIP distribution."
-	  depends="release, _buildmagic:release:zip"/>
-
-  <target name="release-tar" 
-	  description="Builds a TAR distribution."
-	  depends="release, _buildmagic:release:tar"/>
-
-  <target name="release-tgz" 
-	  description="Builds a TAR-GZ distribution."
-	  depends="release, _buildmagic:release:tgz"/>
-
-  <target name="release-all"
-	  description="Builds a distribution for each archive type."
-	  depends="release-zip, release-tgz"/>
-
-
-  <!-- ================================================================== -->
-  <!-- Cleaning                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- Clean up all build output -->
-  <target name="clean" 
-	  description="Cleans up most generated files."
-	  depends="_buildmagic:clean">
-  </target>
-
-  <!-- Clean up all generated files -->
-  <target name="clobber" 
-	  description="Cleans up all generated files."
-	  depends="_buildmagic:clobber, clean">
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Misc.                                                              -->
-  <!-- ================================================================== -->
-
-  <target name="main"
-	  description="Executes the default target (most)."
-	  depends="most"/>
-    
-  <target name="all"
-	  description="Builds everything."
-	  depends="jars, docs"/>
-
-  <target name="most" 
-	  description="Builds almost everything."
-	  depends="jars"/>
-
-  <target name="help" 
-          description="Show this help message."
-	  depends="_buildmagic:help:standard"/>

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/targets.ent (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/targets.ent)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/task.properties
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,91 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Default Task Properties                                                 ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: task.properties,v 1.8 2005/10/05 18:45:32 rloehr Exp $ ###
-
-### Javac Defaults ###
-
-javac.includes=**/*.java
-javac.excludes=
-javac.defaultexcludes=yes
-
-javac.boot.classpath=${sun.boot.classpath}
-javac.classpath=${classpath}
-
-javac.debug=off
-javac.optimize=on
-javac.deprecation=on
-javac.target=1.4
-javac.verbose=off
-javac.depend=off
-javac.source=1.4
-
-javac.include.ant.runtime=no
-javac.include.java.runtime=no
-javac.fail.onerror=true
-
-classpath=
-classpath.local=
-classpath.thirdparty=
-
-### Javadoc Defaults ###
-
-javadoc.classpath=${javac.classpath}
-javadoc.sourcepath=
-javadoc.source.path=
-javadoc.source.files=
-
-javadoc.public=false
-javadoc.package=false
-javadoc.protected=true
-javadoc.private=false
-javadoc.version=true
-javadoc.author=true
-javadoc.use=true
-javadoc.verbose=false
-
-javadoc.windowtitle=${module.Name} API
-javadoc.doctitle=${module.Name}
-javadoc.splitindex=no
-
-### MBean Defaults ###
-mbean.includes=
-mbean.excludes=
-
-### Jar Defaults ###
-jar.server.includes=
-jar.client.includes=
-
-### RMIC Defaults ###
-
-rmic.base=${build.classes}
-rmic.stubVersion=${javac.target}
-rmic.verify=true
-rmic.sourcebase=
-rmic.debug=false
-rmic.iiop=false
-rmic.iiopopts=
-rmic.idl=false
-rmic.idlopts=
-rmic.includes=
-rmic.excludes=
-
-### JUnit Defaults ###
-
-junit.printsummary=true
-junit.haltonerror=false
-junit.haltonfailure=false
-junit.fork=true
-junit.timeout=300000
-junit.jvm=java
-junit.jvm.options=-Dnone
-
-junit.formatter.type=xml
-junit.formatter.usefile=true
-
-junit.batchtest.fork=${junit.fork}
-junit.batchtest.haltonerror=${junit.haltonerror}
-junit.batchtest.haltonfailure=${junit.haltonfailure}

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/task.properties (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/task.properties)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/version-info.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,56 +0,0 @@
-<!-- $Id: version-info.xml,v 1.8 2006/02/23 15:07:21 dimitris Exp $ -->
-
-<project name="Common Build Defs">
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-    <!-- Version identifiers for the server. -->
-    <property name="version.major" value="5"/>
-    <property name="version.minor" value="0"/>
-    <property name="version.revision" value="0"/>
-    <property name="version.tag" value="Alpha"/>
-    <property name="version.name" value="Morpheus"/>
-    <!-- This must be set to the CVS tag for any release -->
-    <property name="version.cvstag" value="HEAD"/>
-
-    <!-- Manifest version info -->
-    <property name="specification.title" value="JBoss"/>
-    <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-    <property name="implementation.title" value="JBoss [${version.name}]"/>
-    <property name="implementation.url" value="http://www.jboss.org/"/>
-    <property name="implementation.version" 
-         value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-    <property name="implementation.vendor" value="JBoss Inc."/>
-    <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-    <target name="print-version-info">
-      <echo>
-    version.major=${version.major}
-    version.minor=${version.minor}
-    version.revision=${version.revision}
-    version.tag=${version.tag}
-    version.name=${version.name}
-    version.cvstag=${version.cvstag}
-    specification.title=${specification.title}
-    specification.version=${specification.version}
-    specification.vendor=${specification.vendor}
-    implementation.title=${implementation.title}
-    implementation.url=${implementation.url}
-    implementation.version=${implementation.version} 
-    implementation.vendor=${implementation.vendor}
-    implementation.vendor.id=${implementation.vendor.id}
-      </echo>
-    </target>
-</project>
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/buildmagic/version-info.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/buildmagic/version-info.xml)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/jbossbuild)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/jbossbuild.properties
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-
-# The location of the thirdparty (prebuilt artifacts) directory relative to the project root
-jbossbuild.thirdparty.dir=thirdparty
-
-# The name of the component info file
-jbossbuild.component.info=component-info.xml
-
-# The targetdefs to use
-jbossbuild.targetdefs.refid=targets
-
-external.project=true;
\ No newline at end of file

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/jbossbuild.properties (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/jbossbuild/jbossbuild.properties)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/release.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,152 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-
-<!-- ================================================================== -->
-<!-- JBoss AOP release build definition                                 -->
-<!-- ================================================================== -->
-
-<project name="main.build"
-         default="build" 
-         basedir="."
->
-   <!-- Import the types -->
-   <import file="../tools/etc/jbossbuild/tasks.xml"/>
-
-   <!-- =============================================================== -->
-   <!-- The Main project definition                                     -->
-   <!-- =============================================================== -->
-
-   <build id="jboss-aop"
-          impltitle="JBoss AOP"
-          implversion="1.0.0-FINAL"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.com/products/aop"
-          description="JBoss Aspect Oriented Programming Framewoork"
-          cvsroot="cvs.sourceforge.net:/cvsroot/jboss"
-          thirdpartypath="../thirdparty/"
-          location="http://cruisecontrol.jboss.com/repository/"
-          targetdefs="targets">
-
-      <!-- ============================================================ -->
-      <!-- Common utilities                                             -->
-      <!-- ============================================================ -->
-
-      <component id="common"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-common.jar" release="lib"/>
-         <artifact id="jboss-common-client.jar"/>
-         <artifact id="namespace.jar"/>
-      </component>
-
-      <includes id="common-project">
-         <include input="jboss-common.jar"/>
-         <include input="namespace.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Container                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="container"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-container.jar"/>
-      </component>
-
-      <includes id="container-project">
-         <include input="jboss-container.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- AOP                                                          -->
-      <!-- ============================================================ -->
-
-      <component id="aop"
-                 module="jboss-aop"
-                 version="1.0.0-FINAL"
-      >
-         <artifact id="jboss-aop.jar" release="lib"/>
-      </component>
-
-      <includes id="aop-project">
-         <include input="jboss-aop.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- QDox                                                         -->
-      <!-- ============================================================ -->
-
-      <component id="qdox"
-                 version="1.4">
-         <artifact id="qdox.jar" release="lib"/>
-      </component>
-
-      <includes id="qdox-lib">
-         <include input="qdox.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Javassist                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="javassist"
-                 version="3.0beta">
-         <artifact id="javassist.jar" release="lib"/>
-      </component>
-
-      <includes id="javassist-lib">
-         <include input="javassist.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Trove                                                        -->
-      <!-- ============================================================ -->
-      
-      <component id="trove"
-                 version="2.1.1">
-         <artifact id="trove.jar" release="lib"/>
-      </component>
-
-      <includes id="trove-lib">
-         <include input="trove.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Oswego Concurrent Library                                    -->
-      <!-- ============================================================ -->
-
-      <component id="oswego-concurrent"
-                 version="1.0">
-         <artifact id="concurrent.jar" release="lib"/>
-      </component>
-
-      <includes id="concurrent">
-         <include input="concurrent.jar"/>
-      </includes>
-
-
-      <!-- ============================================================ -->
-      <!-- JUnit                                                        -->
-      <!-- ============================================================ -->
-
-      <component id="junit-junit"
-                 version="3.8.1">
-         <artifact id="junit.jar" release="lib"/>
-      </component>
-
-      <includes id="junit">
-         <include input="junit.jar"/>
-      </includes>
-   </build>
-
-   <!-- Generate the targets -->
-   <generate generate="jboss-aop"/>
-   
-</project>

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/release.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/jbossbuild/release.xml)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/tasks.xml
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1023 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-<project name="jboss.ant.tasks"
-         default="help-fragment"
->
-<!-- ================================================================== -->
-<!-- Properties                                                         -->
-<!-- ================================================================== -->
-
-   <!-- because this file may be imported from various locations
-     locations must be referenced in an absolute fashion   -->
-   <dirname property="imported.basedir" file="${ant.file.jboss.ant.tasks}"/>
-
-
-   <property file="${imported.basedir}/jbossbuild.properties"/>
-
-   <property name="jboss.tasks.path" 
-      value="${imported.basedir}/../../../tools/lib/jbossbuild.jar"   />
-
-   <!-- items required for javcc task --> 
-   <property name="sun.javacc.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/sun-javacc/lib/"/>
-             
-   <property name="jacorb.root"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/jacorb"/> 
-
-   <property name="apache.logkit.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/apache-avalon-logkit/lib"/>              
-
-      
-    <path id="jacorb.idl.classpath">
-       <pathelement path="${jacorb.root}/lib/idl.jar"/>
-       <pathelement path="${apache.logkit.lib}/logkit.jar"/>
-    </path>
-
-
-<!-- ================================================================== -->
-<!-- Type Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- The generate type -->
-   <typedef name="generate"
-            classname="org.jboss.ant.types.Generate" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build type -->
-   <typedef name="build"
-            classname="org.jboss.ant.types.build.Build" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The artifact type definition type -->
-   <typedef name="artifacttype"
-            classname="org.jboss.ant.types.build.ArtifactType" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component definition type -->
-   <typedef name="componentdef"
-            classname="org.jboss.ant.types.component.ComponentDefinition" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component type -->
-   <typedef name="component"
-            classname="org.jboss.ant.types.build.Component" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The includes type -->
-   <typedef name="includes"
-            classname="org.jboss.ant.types.Includes" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build targets type -->
-   <typedef name="targets"
-            classname="org.jboss.ant.types.target.TargetDefinitions" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-<!-- ================================================================== -->
-<!-- Task Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- Update ide info for the main build -->
-   <taskdef name="idemain"
-            classname="org.jboss.ant.tasks.build.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- Update ide info for the component -->
-   <taskdef name="idecomponent"
-            classname="org.jboss.ant.tasks.component.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- Generate a componentref graph and resolve the dependencies -->
-   <taskdef name="synchronizeinfo"
-            classname="org.jboss.ant.tasks.build.SynchronizeComponentsTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- A task which allows a visitor to visit the graph -->
-   <taskdef name="visit-componentref-graph"
-            classname="org.jboss.ant.tasks.build.VisitComponentRefGraphTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />   
-   
-   <!-- Generate libraries.ent with version number in paths -->
-   <taskdef name="gen-lib-file"
-            classname="org.jboss.ant.tasks.build.GenerateLibrariesFile"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-     
-   <!-- RMIC compilation logic -->
-   <taskdef name="rmic-helper"
-            classname="org.jboss.ant.tasks.build.RMICHelper"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />     
-
-   <!-- Executes a given target without reparsing the project file -->
-   <taskdef name="execute-target"
-            classname="org.jboss.ant.tasks.build.TargetExecutor"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-  
-   <!-- Copy with support for zipfile sets -->
-   <taskdef name="copy-zfs"
-            classname="org.jboss.ant.tasks.build.CopyWithZipFileSetSupport"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-   
-   <!-- File release task -->
-   <taskdef name="copy-release"
-            classname="org.jboss.ant.tasks.build.CopyRelease"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-   
-  
-   
-
-   
-
-<!-- ================================================================== -->
-<!-- Artifact Definitions                                               -->
-<!-- ================================================================== -->
-
-   <artifacttype type="jar" outputtype="lib"/>
-   <artifacttype type="zip" outputtype="lib"/>
-   <artifacttype type="sar" outputtype="lib"/>
-   <artifacttype type="rar" outputtype="lib"/>
-   <artifacttype type="war" outputtype="lib"/>
-   <artifacttype type="deployer" outputtype="lib"/>   
-   <artifacttype type="api" outputtype="api"/>
-   <artifacttype type="xml" outputtype="resource"/>
-   <artifacttype type="policy" outputtype="resource"/>
-   <artifacttype type="properties" outputtype="resource"/>
-   <artifacttype type="sh" outputtype="bin"/>
-   <artifacttype type="bat" outputtype="bin"/>
-   <artifacttype type="conf" outputtype="bin"/>
-   <artifacttype type="dtd" outputtype="dtd"/>
-   <artifacttype type="xsd" outputtype="schema"/>
-   <artifacttype type="aop" outputtype="resource"/>
-   <artifacttype type="idl" outputtype="resource"/>   
-   <artifacttype type="md5" outputtype="bin"/>      
-   <artifacttype type="dir" outputtype="lib"/>
-   <artifacttype type="ddl" outputtype="resource"/>
-   
-<!-- ================================================================== -->
-<!-- Target Definitions                                                 -->
-<!-- ================================================================== -->
-
-   <targets id="targets">
-
-      <!-- ============================================================ -->
-      <!-- Build All                                                    -->
-      <!-- Builds everything (build, docs, tests and release archives)  -->
-      <!-- ============================================================ -->
-
-      <targetdef target="all" description="Build All">
-         <main depends="build, doc, test, archives" components="none"/>
-         <component depends="build, doc, test"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!--  Init                                                        -->
-      <!--  Basic initilization tasks and property setup                -->
-      <!-- ============================================================ -->      
-      <targetdef target="build.init" description="initilization tasks and property setup">
-
-         <!-- for each componentdef in jbossbuild file, setup properties 
-              in case a use wishes to access them    
-         -->
-         <component>
-            <property name="build.module" value="@{parentDir}"/>
-            <property name="build.module.src" value="${build.module}/src"/>
-            <property name="build.module.resources" value="${build.module}/src/resources"/>
-            <property name="build.module.etc" value="${build.module}/src/etc"/>
-            <property name="build.module.output" value="@{output}"/>
-            <property name="build.module.output.gen-src" value="${build.module.output}/gen-src"/>            
-            <property name="build.module.dir" value="@{output}"/>
-            <property name="build.module.output.resources" value="${build.module.output}/resources"/>                        
-            <property name="build.module.output.lib" value="${build.module.output}/lib"/>                                    
-            <property name="build.module.output.classes" value="${build.module.output}/classes"/> 
-         </component>
-      </targetdef>      
-
-      <!-- ============================================================ -->
-      <!-- Build                                                        -->
-      <!-- Builds the artifacts and compiles all source                 -->
-      <!-- ============================================================ -->
-
-      <targetdef target="build" description="Build" >
-
-         <!-- Build the main release
-              Creates the main release directory and copies artifacts
-              to the specified location
-         -->
-         <main>
-            <mkdir dir="@{releaseDir}"/>
-            <antCall target="release"/>
-         </main>
-
-
-         <!-- 
-         Build the component
-              Just makes the output folder
-         -->         
-         <component depends="build.init, build.etc">
-            <mkdir dir="@{output}/etc"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-            </copy>
-         </component>
-
-         <!-- Build resources if the component has a 
-              resource node -->
-         <resource depends="build.resources"/>
-         
-         <!-- JTREE-JAVACC source generation  -->
-         <generatedsource when="@{jtree-javacc}">
-
-            <dirname file="/@{jtree-javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-            <jjtree
-               target="src/@{srcdir}/@{jtree-javacc}"
-               outputdirectory="${@{id}.output.path}"
-               javacchome="${sun.javacc.lib}"/>
-
-            <basename file="@{jtree-javacc}" 
-               property="@{id}.basename"
-               suffix="jjt"/>
-
-            <javacc
-               target="${@{id}.output.path}/${@{id}.basename}.jj"
-               javacchome="${sun.javacc.lib}"/>
-
-         </generatedsource>
-
-         <!-- JAVACC source generation -->
-         <generatedsource when="@{javacc}">
-
-            <dirname file="/@{javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <javacc
-               target="src/@{srcdir}/@{javacc}"
-               javacchome="${sun.javacc.lib}"
-               static="@{static}"
-               outputdirectory="${@{id}.output.path}"/>
-
-         </generatedsource>
-
-         <!-- IDL compilation -->         
-         <generatedsource when="@{idl}">
-
-            <!-- Task to compile idl files required by jacorb -->
-            <taskdef name="jacidl"
-               classname="org.jacorb.idl.JacIDL"
-               classpathref="jacorb.idl.classpath"
-            />             
-            
-            <property name="@{id}.output.path" value="@{output}/@{id}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <jacidl
-               srcdir ="src/@{idl}"
-               destdir="${@{id}.output.path}"
-               includes="*.idl"
-               includepath="${jacorb.root}/resources/"
-             />
-         
-         </generatedsource> 
-         
- 
-         <!-- Compile the source
-              Runs depend on the source output then compiles the source
-         -->
-         <source if="@{compileable}">
-             
-            <mkdir dir="@{output}"/>
-            <depend srcdir="@{sourcePath}"
-                    destdir="@{output}"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-            </depend>
-            <javac srcdir="@{sourcePath}" 
-                   destdir="@{output}"
-                   debug="true"
-                   deprecation="true"
-                   excludes="@{excludes}"
-                   target="@{jvmTarget}"
-                   source="@{jvmSource}"
-                   fork="true"
-                   memoryMaximumSize="512M"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               <src path="@{sourcePath}"/>
-               <!-- allow multiple sources to be compiled at once to handle circular references -->
-               <srcelements/>
-            </javac>
-
-           <copy toDir="@{output}">
-               <fileset dir="@{sourcePath}">
-                <include name="**/*.properties"/>
-              </fileset>
-           </copy>
-         </source>
-         
-        <source when="@{stubversion}">
-	    <property name="jb.stubversion" value="@{stubversion}"/>
-        </source>         
-         
-
-         <!-- Remote method call compilation.   -->
-         <source when="@{rmic}">
-            <rmic-helper
-                  base="@{output}"
-                  includes="@{rmic}"
-                  verify="true"
-                  debug="false"
-                  iiop="@{iiop}"
-                  idl="false"
-                  external="@{external}"
-                  stubversion="${jb.stubversion}"
-                  
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               </rmic-helper>
-         </source>
-
-         <!-- Create a jar archive
-              Jars the inputs of the jar artifact
-         -->
-         <jar null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </jar>
-
-         <!-- Create an aop archive
-              Jars the inputs of the aop artifact
-         -->
-         <aop  if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-                <filesets/>
-            </jar>
-         </aop>         
-
-         <jar when="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}"
-                 manifest="@{component.output}/etc/manifest/@{manifest}">
-               <filesets/>
-            </jar>
-         </jar>
-         
-         
-
-         <!-- Create a sar archive
-              Jars the inputs of the sar artifact
-         -->
-         <sar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </sar>
-
-
-         <!-- Create a rar archive
-              Jars the inputs of the rar artifact
-         -->
-         <rar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </rar>
-
-         <!-- Create a war archive
-              Jars the inputs of the war artifact
-         -->
-         <war null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </war>
-         
-         <!-- Create a deployer archive
-              Jars the inputs of the war artifact
-         -->
-         <deployer null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by" value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title" value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version" value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor" value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title" value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL" value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version" value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor" value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path" value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </deployer>       
-         
-         <!-- Create a md5 checksumarchive  -->
-         <md5 null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <checksum>
-              <filesets/>
-            </checksum>
-         </md5>         
-         
-         <!-- create a directory and copy into it all of the filesets or zipfilesets -->
-         <dir if="@{buildable}">
-            <mkdir dir="@{output}"/>
-            <copy-zfs todir="@{output}">
-               <filesets/>
-            </copy-zfs>
-         </dir>
-         
-         
-         <!-- this is a hack.  jbbuild will not allow artifacts with same id
-            varia requires a dir to be created called kernel, but cannot be created
-            because kernel already exists as a component.  Only option is to create the dir
-            and rename it to kernel -->
-         <dir if="@{buildable}" when="@{rename}">
-            <mkdir dir="@{parentDir}/@{rename}"/>
-            <copy-zfs todir="@{parentDir}/@{rename}">
-               <filesets/>
-            </copy-zfs>
-         </dir>     
-      
-         <!-- copying of artifacts to new name -->         
-         <artifactdef when="@{toname}">
-            <mkdir dir="@{parentDir}"/>
-            <copy toFile="@{parentDir}/@{toname}">
-               <filesets/>
-            </copy>
-         </artifactdef>
-         
-         <sh depends="build.bin"/>
-         <bat depends="build.bin"/>
-      </targetdef>
-
-      <!-- Copy the etc -->
-      <targetdef target="build.etc">
-
-         <component>
-              
-            <mkdir dir="@{output}/etc"/>
-            <mkdir dir="@{component.dir}/src/etc/"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-               <filterset>
-                  <filter token="java.vm.version"           value="@{component.VMVersion}"/>
-                  <filter token="java.vm.vendor"            value="@{component.VMVendor}"/>
-                  <filter token="specification.title"       value="@{component.specTitle}"/>
-                  <filter token="specification.version"     value="@{component.specVersion}"/>
-                  <filter token="specification.vendor"      value="@{component.specVendor}"/>
-                  <filter token="implementation.title"      value="@{component.implTitle}"/>
-                  <filter token="implementation.url"        value="@{component.implURL}"/>
-                  <filter token="implementation.version"    value="@{component.implVersion}"/>
-                  <filter token="implementation.vendor"     value="@{component.implVendor}"/>
-                  <filter token="implementation.vendor.id"  value="@{component.implURL}"/>
-               </filterset>
-            </copy>
-         </component>
-
-      </targetdef>
-
-      <targetdef target="build.resources">
-     
-         <component>
-            <mkdir dir="@{output}/resources"/>
-            <copy todir="@{output}" filtering="yes">
-               <fileset dir="@{component.dir}/src" includes="resources/**"/>
-            </copy>
-         </component>
-      </targetdef>
-      
-
-
-      <targetdef target="build.bin">
-         <component>
-            <mkdir dir="@{output}/bin"/>
-            <copy todir="@{output}/bin" filtering="yes">
-              <fileset dir="@{component.dir}/src/bin">
-                <include name="**/*"/>
-              </fileset>
-            </copy>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="lf" eof="remove"
-              includes="**/*.sh"/>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="crlf" eof="remove"
-              includes="**/*.bat, **/*.cmd"/>
-
-            <chmod perm="+x">
-              <fileset dir="@{output}/bin">
-                <include name="**/*.sh"/>
-              </fileset>
-            </chmod>
-
-         </component>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Release                                                      -->
-      <!-- Create the release by copying all artifacts that have a      -->
-      <!-- release tag to that specified location.                      -->
-      <!-- ============================================================ -->
-
-      <targetdef target="release">
-      
-
-          <!-- Copy the artifact into the release -->
-         <artifact when="@{tofile}">
-             <copy-release release="@{release}" tofile="@{tofile}" requiredJDK="@{requiredJDK}"
-             exploded="@{exploded}" overwrite="@{overwrite}">
-                <output/>
-             </copy-release>
-         </artifact>
-         
-       <artifact null="@{tofile}" when="@{release}" >
-            <copy-release release="@{release}"
-              exploded="@{exploded}"
-              requiredJDK="@{requiredJDK}"
-              overwrite="@{overwrite}"
-              >
-               <output/>
-            </copy-release>
-         </artifact>         
-
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Publish                                                      -->
-      <!-- Copy an artifact to the location specified by                -->
-      <!-- ${jbossbuild.repository.root}                                -->
-      <!-- Used by the continous build to publish to the repository.    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="publish" if="@{local}">
-
-         <!-- copy the component-info.xml into the repository -->
-         <componentmain if="@{local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy failonerror="false" file="@{dir}/${jbossbuild.component.info}"
-                  todir="${repository.root}/@{relativePath}"
-            />
-
-         </componentmain>
-
-         <!-- Copy the artifact into the release -->
-         <artifact if="@{component.local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy todir="${repository.root}/@{relativePath}">
-               <output/>
-            </copy>
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Archives                                                     -->
-      <!-- Builds the release archive(s)                                -->
-      <!-- ============================================================ -->
-
-      <!-- Build the release archives -->
-      <targetdef target="archives" description="Build the release archives">
-
-         <!-- Make the archives -->
-         <main>
-         
-            <!-- Create the zip file -->
-            <zip destfile="@{output}/@{releaseName}.zip"
-                 basedir="@{releaseDir}"
-            />
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Doc                                                          -->
-      <!-- Creates the documentation.                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="doc" description="Documentation">
-
-         <!-- Generate the documentation -->
-         <component depends="api"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- API                                                          -->
-      <!-- Creates the javadoc                                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="api" description="Javadoc">
-
-         <!-- Generate the javadoc -->
-         <component/>
-         <api>
-            <mkdir dir="@{output}"/>
-            <javadoc packagenames="*"
-                     destdir="@{output}"
-            >
-               <doctitle>
-                  <![CDATA[<h1>@{description} API Documentation</h1>]]>
-               </doctitle>
-               <bottom>
-                  <![CDATA[
-                     <i>
-                        <div align="center">
-                           <font size="-1">
-                              Copyright &#169; 2005 JBoss Inc. All Rights Reservered.
-                           </font>
-                        </div>
-                     </i>
-                  ]]>
-               </bottom>
-               <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
-               <sourcepath>
-                  <sourcepaths/>
-               </sourcepath>
-               <classpath>
-                  <sourcepathelements/>
-               </classpath>
-            </javadoc>
-         </api>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clean                                                        -->
-      <!-- Deletes the output folder                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clean" description="Clean">
-         <common>
-            <delete dir="@{output}" failonerror="false"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clobber                                                      -->
-      <!-- Deletes the output folder and removes thirdparty             -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clobber" description="Clobber">
-         <main depends="clean">
-            <delete dir="@{thirdparty}"/>
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize                                                  -->
-      <!-- Resynchronizes the project with cvs                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="synchronize" description="Synchronize">
-
-         <!-- Update the main build folder and tools from cvs
-              then do the same for the components before running
-              the after synchronization processing
-              NOTE: Does not automatically invoke component builds
-              as the list of components maybe out-of-date at this point
-              and we need to conditionally do cvs co/update
-         -->
-         <main components="none">
-            <!-- cvs command="update -dP" failonerror="true"/-->
-            <!--invoke target="synchronize" dir="../tools"/-->
-            <execute-target target="synchronize.components" />
-            <!-- execant target="synchronize.after.main"/-->
-         </main>
-
-         <componentmain unless="@{local}">
-            <mkdir dir="thirdparty"/>
-            <get src="@{location}/${jbossbuild.component.info}"
-                 dest="@{thirdpartyDir}/${jbossbuild.component.info}"
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </componentmain>
-
-         <!-- If the component exists we just do a cvs update -->
-         <componentmain if="@{exists}">
-           <cvs dest="@{dir}" command="update"/>
-            <!-- NOTE: unable to delegate to component until JBBUILD-62 is resolved -->
-            <!--invoke target="synchronize" dir="@{dir}"/--> 
-            <!--execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- If the component doesn't exist and we want to
-              get the source build check it out from cvs
-         -->
-         <componentmain unless="@{exists}" if="@{local}">
-            <cvs dest="@{dir.parent}">
-               <commandline>
-                  <argument value="-d"/>
-                  <argument value="@{build.cvsroot}"/>
-                  <argument value="co"/>
-                  <argument value="-d"/>
-                  <argument value="@{id}"/>
-                  <argument value="@{module}"/>
-               </commandline>
-            </cvs>
-            <!-- execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- The component already exists do a cvs update
-              and run the after synchronization
-         -->
-         <component nomain="true">
-            <cvs command="update -dP" failonerror="true"/>
-            <!--execant target="synchronize.after"/-->
-         </component>
-
-         <!-- If we are not doing a source checkout of this
-              component, download the artifacts to thirdparty
-         -->
-         <artifact unless="@{component.local}">
-            <mkdir dir="@{parentDir}"/>
-            <get src="@{location}" 
-                 dest="@{output}" 
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Commit                                                       -->
-      <!-- Commits the changes to cvs                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="commit" description="Commit">
-         <!-- Commit the main build and tools -->
-         <main>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-            <invoke target="commit" dir="../tools"/>
-         </main>
-         <!-- Commit the component -->
-         <component>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-         </component>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Test                                                         -->
-      <!-- Builds and runs the tests                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="test" description="Build and run the tests">
-         <component depends="build, runtest"/>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RunTest                                                      -->
-      <!-- Runs the tests for sources marked with a test attribute      -->
-      <!-- ============================================================ -->
-      
-      <!-- Run the Test -->
-      <targetdef target="runtest" description="Run tests">
-         <component/>
-         <source when="@{test}">
-            <mkdir dir="@{testDir}"/>
-            <delete file="@{testDir}/test.log"/>
-            <junit fork="true"
-                   printSummary="true">
-               <sysproperty key="org.jboss.test.logfile" value="@{testDir}/test.log"/>
-               <formatter type="plain"/>
-               <classpath>
-                  <pathElements/>
-               </classpath>
-               <batchtest todir="@{testDir}">
-                  <fileset dir="@{sourceDir}" includes="@{test}"/>
-               </batchtest>
-            </junit>
-         </source>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Rebuild                                                      -->
-      <!-- Synchronizes then builds                                     -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild -->
-      <targetdef target="rebuild" description="Synchronize then build">
-         <common depends="synchronize">
-            <execant target="build"/>
-         </common>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RebuildAll                                                   -->
-      <!-- Synchronizes then builds all                                 -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild all -->
-      <targetdef target="rebuildall" description="Synchronize then build all">
-         <common depends="synchronize">
-            <execant target="all"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize.After                                            -->
-      <!-- After synchronization processing                             -->
-      <!-- ============================================================ -->
-
-      <!-- After synchronization processing -->
-      <targetdef target="synchronize.after" description="After synchronization processing">
-              <main>
-                 <idemain/>
-              </main>
-              <component>
-                 <idecomponent/>
-              </component>
-      </targetdef>
-      
-
-      
- </targets>   
-
-<!-- ================================================================== -->
-<!-- Macro Definitions                                                  -->
-<!-- ================================================================== -->
-
-   <condition property="execant-executable" value="cmd.exe">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-executable" value="ant"/>
-   <condition property="execant-prefix" value="/c ant">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-prefix" value=""/>
-   <!-- Set the execant.args to empty unless it already exists -->
-   <condition property="execant.args" value="">
-      <not><isset property="execant.args"/></not>
-   </condition>
-
-   <!-- The execant macro -->
-   <macrodef name="execant">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <attribute name="filename"
-                 default="jbossbuild.xml"
-                 description="The ant file to execute"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <exec dir="@{dir}" 
-               executable="${execant-executable}"
-         >
-            <arg line="${execant-prefix} ${execant.args} -f @{filename} @{target}"/>
-         </exec>
-      </sequential>
-   </macrodef>
-
-   <!-- The invoke macro -->
-   <macrodef name="invoke">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <ant antfile="jbossbuild.xml" dir="@{dir}" target="@{target}"/>
-      </sequential>
-   </macrodef>
-
-<!-- ================================================================== -->
-<!-- Targets                                                            -->
-<!-- ================================================================== -->
-
-   <target name="help-fragment">
-      <fail message="Do not execute this build fragment directly!"/>
-   </target>
-   
-</project>
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/etc/jbossbuild/tasks.xml (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/etc/jbossbuild/tasks.xml)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/README
===================================================================
--- branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/README	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/README	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,14 +0,0 @@
-Please refer to the Ant manual under Installing Ant / Library
-Dependencies for a list of the jar requirements for various optional
-tasks and features.
-
-This directory contains xercesImpl.jar from the 2.6.1 release of
-Apache Xerces.  For more information or newer releases see
-<http://xml.apache.org/xerces2-j/>.  See the file LICENSE.xerces for
-the terms of distribution.
-
-It also contains xml-apis.jar from the 2.6.1 release of Apache Xerces.
-For more information or newer releases see
-<http://xml.apache.org/commons/>.  See the files LICENSE.dom and
-LICENSE.sax for the terms of distribution.
-

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/README (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/README)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-javamail.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-javamail.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/ant-javamail.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-junit.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/ant-junit.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-launcher.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-launcher.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/ant-launcher.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-nodeps.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-nodeps.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/ant-nodeps.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-trax.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-trax.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/ant-trax.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-xslp.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant-xslp.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/ant-xslp.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/ant.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/ant.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/bsf.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/bsf.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/bsf.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/buildmagic-tasks.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/buildmagic-tasks.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/buildmagic-tasks.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/jbossbuild.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/jbossbuild.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/jbossbuild.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/jdtCompilerAdapter.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/jdtCompilerAdapter.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/jdtCompilerAdapter.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/junit.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/junit.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/pretty.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/pretty.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/pretty.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/resolver.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/resolver.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/resolver.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xalan.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xalan.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/xalan.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xercesImpl.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xercesImpl.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/xercesImpl.jar)

Deleted: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xml-apis.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-jdk/trunk/tools/lib/xml-apis.jar (from rev 1956, branches/logging_refactoring/common-logging-jdk/trunk/tools/lib/xml-apis.jar)

Copied: branches/refactor-test-branch/common-logging-log4j (from rev 1956, branches/logging_refactoring/common-logging-log4j)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/build-compile.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/build-compile.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/build-compile.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">   
-]>
-
-<project default="main" name="JBoss/Build">
-
-  &buildmagic;
-  &libraries;
-  &targets;
-   <!-- The combined library classpath -->
-      <path id="library.classpath">
-          <path refid="jboss/common.logging.spi.classpath"/>
-          <path refid="jboss/common.core.classpath"/>
-          <path refid="apache.log4j.classpath"/>
-      </path>
-
-        <!-- The combined dependent module classpath -->
-        <path id="dependentmodule.classpath">
-    </path>
-  
-  <target name="compile-classes"
-    depends="_default:compile-classes"/>
-
-</project>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/build-compile.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/build-compile.xml)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/build-thirdparty.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/build-thirdparty.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/build-thirdparty.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-<!-- $Id: build-thirdparty.xml,v 1.113 2006/05/23 23:19:24 jgreene Exp $ -->
-<project name="main.build"
-          default="synchronize"
-          basedir=".">
-
-   <!-- Property File definitions -->
-   <property file="local.properties"/>
-   <property file="synchronize.properties"/>
-   <property environment="env"/>
-
-   <!-- Property Definitions -->
-   <property name="generatedLibrariesFiles" value="thirdparty/libraries.ent"/>
-
-   <!-- Allow jbossbuild.repository to be set from (in order or priority)
-      + Command line -Djbossbuild.repository=...
-      + synchronize.properties jbossbuild.repository setting
-      + JBOSS_REPOSITORY environment variable
-   -->
-   <condition property="jbossbuild.repository" value="${env.JBOSS_REPOSITORY}">
-      <isset property="env.JBOSS_REPOSITORY"/>
-   </condition>
-   <!-- Fall back to default -->
-   <property name="jbossbuild.repository" value="http://repository.jboss.com"/>
-
-   <!-- File Imports -->
-   <import file="tools/etc/jbossbuild/tasks.xml"/>
-
-
-   <!-- Main Definition of dependencies -->
-   <build id="jbossas-thirdparty"
-          impltitle="JBossAS"
-          implversion="jboss-head"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.org"
-          description="JBoss Application Server"
-          cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
-          thirdpartypath="thirdparty/"
-          location="${jbossbuild.repository}"
-          targetdefs="targets">
-
-      <!--
-        The repository is in CVS under the module repository.jboss.com whose contents
-        are pushed to the http://repository.jboss.com site.
-      -->
-      <componentref name="apache-log4j" version="1.2.8"/>  
-      <componentref name="jboss/common-logging-spi" version="1.0.1.TEST"/> 
-      <componentref name="jboss/common-core" version="1.0.1.TEST"/>   
-
-   </build>
-
-   <synchronizeinfo/>
-
-   <!-- Generate the targets -->
-   <generate generate="jbossas-thirdparty"/>
-
-
-   <target name="generate-lib-file"
-      description="generate libraries.ent and thirdparty license info"
-      depends="synchronize">
-         <gen-lib-file filename="${generatedLibrariesFiles}" path="tools/etc/buildmagic/" />
-      <visit-componentref-graph
-         componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor" />
-   </target>
-
-</project>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/build-thirdparty.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/build-thirdparty.xml)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/build.bat
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/build.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/build.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,89 +0,0 @@
- at echo off
-REM  ======================================================================
-REM
-REM  This is the main entry point for the build system.
-REM
-REM  Users should be sure to execute this file rather than 'ant' to ensure
-REM  the correct version is being used with the correct configuration.
-REM
-REM  ======================================================================
-REM
-REM $Id$
-REM
-REM Authors:
-REM     Jason Dillon <jason at planet57.com>
-REM     Sacha Labourey <sacha.labourey at cogito-info.ch>
-REM
-
-REM ******************************************************
-REM Ignore the ANT_HOME variable: we want to use *our*
-REM ANT version and associated JARs.
-REM ******************************************************
-REM Ignore the users classpath, cause it might mess
-REM things up
-REM ******************************************************
-
-SETLOCAL
-
-set CLASSPATH=
-set ANT_HOME=
-set ANT_OPTS=-Djava.protocol.handler.pkgs=org.jboss.net.protocol -Dbuild.script=build.bat
-
-REM ******************************************************
-REM - "for" loops have been unrolled for compatibility
-REM   with some WIN32 systems.
-REM ******************************************************
-
-set NAMES=tools;tools\ant;tools\apache\ant
-set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
-
-REM ******************************************************
-REM ******************************************************
-
-SET EXECUTED=FALSE
-for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
-
-goto :EOF
-
-
-REM ******************************************************
-REM ********* Search for names in the subfolders *********
-REM ******************************************************
-
-:subLoop
-for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %2 %3 %4 %5 %6 %7
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************ Test if ANT Batch file exists ***********
-REM ******************************************************
-
-:testIfExists
-if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************** Batch file has been found *************
-REM ******************************************************
-
-:BatchFound
-if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
-set EXECUTED=TRUE
-
-goto :EOF
-
-REM ******************************************************
-REM ************* Execute Batch file only once ***********
-REM ******************************************************
-
-:ExecuteBatch
-echo Calling %1 %2 %3 %4 %5 %6 %7 %8
-call %1 %2 %3 %4 %5 %6 %7 %8
-
-:end
-
-if "%NOPAUSE%" == "" pause

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/build.bat (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/build.bat)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/build.sh
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/build.sh	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/build.sh	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,173 +0,0 @@
-#!/bin/sh
-### ====================================================================== ###
-##                                                                          ##
-##  This is the main entry point for the build system.                      ##
-##                                                                          ##
-##  Users should be sure to execute this file rather than 'ant' to ensure   ##
-##  the correct version is being used with the correct configuration.       ##
-##                                                                          ##
-### ====================================================================== ###
-#
-
-# $Id$
-
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-GREP="grep"
-ROOT="/"
-
-# Ignore user's ANT_HOME if it is set
-ANT_HOME=""
-
-# the default search path for ant
-ANT_SEARCH_PATH="\
-    tools
-    tools/ant \
-    tools/apache/ant \
-    ant"
-
-# the default build file name
-ANT_BUILD_FILE="build.xml"
-
-# the default arguments
-ANT_OPTIONS="-find $ANT_BUILD_FILE"
-
-# Use the maximum available, or set MAX_FD != -1 to use that
-MAX_FD="maximum"
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-darwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-
-    Darwin*)
-        darwin=true
-        ;;
-esac
-
-#
-# Helper to complain.
-#
-die() {
-    echo "${PROGNAME}: $*"
-    exit 1
-}
-
-#
-# Helper to complain.
-#
-warn() {
-    echo "${PROGNAME}: $*"
-}
-
-#
-# Helper to source a file if it exists.
-#
-maybe_source() {
-    for file in $*; do
-	if [ -f "$file" ]; then
-	    . $file
-	fi
-    done
-}
-
-search() {
-    search="$*"
-    for d in $search; do
-	ANT_HOME="`pwd`/$d"
-	ANT="$ANT_HOME/bin/ant"
-	if [ -x "$ANT" ]; then
-	    # found one
-	    echo $ANT_HOME
-	    break
-	fi
-    done
-}
-
-#
-# Main function.
-#
-main() {
-    # if there is a build config file. then source it
-    maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
-
-    # Increase the maximum file descriptors if we can
-    if [ $cygwin = "false" ]; then
-	MAX_FD_LIMIT=`ulimit -H -n`
-	if [ $? -eq 0 ]; then
-	    if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
-		# use the system max
-		MAX_FD="$MAX_FD_LIMIT"
-	    fi
-
-	    ulimit -n $MAX_FD
-	    if [ $? -ne 0 ]; then
-		warn "Could not set maximum file descriptor limit: $MAX_FD"
-	    fi
-	else
-	    warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-	fi
-    fi
-
-    # try the search path
-    ANT_HOME=`search $ANT_SEARCH_PATH`
-
-    # try looking up to root
-    if [ "x$ANT_HOME" = "x" ]; then
-	target="build"
-	_cwd=`pwd`
-
-	while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
-	    cd ..
-	    cwd=`pwd`
-	    ANT_HOME=`search $ANT_SEARCH_PATH`
-	done
-
-	# make sure we get back
-	cd $_cwd
-
-	if [ "$cwd" != "$ROOT" ]; then
-	    found="true"
-	fi
-
-	# complain if we did not find anything
-	if [ "$found" != "true" ]; then
-	    die "Could not locate Ant; check \$ANT or \$ANT_HOME."
-	fi
-    fi
-
-    # make sure we have one
-    ANT=$ANT_HOME/bin/ant
-    if [ ! -x "$ANT" ]; then
-	die "Ant file is not executable: $ANT"
-    fi
-
-    # need to specify planet57/buildmagic protocol handler package
-    ANT_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
-
-    # setup some build properties
-    ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"
-
-    # change to the directory where the script lives so users are not forced
-    # to be in the same directory as build.xml
-    cd $DIRNAME
-
-    # export some stuff for ant
-    export ANT ANT_HOME ANT_OPTS
-
-    # execute in debug mode, or simply execute
-    if [ "x$ANT_DEBUG" != "x" ]; then
-	/bin/sh -x $ANT $ANT_OPTIONS "$@"
-    else
-	exec $ANT $ANT_OPTIONS "$@"
-    fi
-}
-
-##
-## Bootstrap
-##
-
-main "$@"

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/build.sh (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/build.sh)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/build.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/build.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/build.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,179 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">
-]>
-
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-
-<project default="build" name="JBoss/Common">
-
-  <!-- ================================================================== -->
-  <!-- Setup                                                              -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Include the common Buildmagic elements.
-     |
-     | This defines several different targets, properties and paths.
-     | It also sets up the basic extention tasks amoung other things.
-   -->
-
-  &buildmagic;
-
-  <!--
-     | Include the normal targets.
-   -->
-  &targets;
-
-  <!-- ================================================================== -->
-  <!-- Configuration                                                      -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Configure the build system.  
-     |
-     | This target is invoked by the Buildmagic initialization logic and 
-     | should contain module specific configuration elements.
-   -->
-
-  <target name="configure" unless="configure.disable">
-
-    <!-- =================== -->
-    <!-- Basic Configuration -->
-    <!-- =================== -->
-
-    <!-- Module name(s) & version -->
-    <property name="module.name" value="common"/>
-    <property name="module.Name" value="JBoss/Common"/>
-    <property name="module.version" value="DEV"/>
-
-    
-
-    <!-- The combined dependent module classpath -->
-    <path id="dependentmodule.classpath">
-    </path>
-
-    <!-- ===== -->
-    <!-- Tasks -->
-    <!-- ===== -->
-
-    <call target="_default:task-init"/>
-    
-    <!-- Set project specific properties -->
-    <property name="jboss.home" value="../build/output/jboss-${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="server" value="default"/>
-    
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Compile                                                            -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each 
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-  <target name="compile" depends="_default:compile-etc"
-    description="Compile all source files.">
-    <ant antfile="build-compile.xml" target="compile-classes"/>
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="module-jars"> 
-    <!-- Build jboss-common.jar -->
-    <jar jarfile="${build.lib}/common-logging-log4j.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"/>
-    </jar>
-
-  </target>
-  
-  <target name="build" depends="createthirdparty, main"/>
-  
-   <!-- create the thirdparty folder from items in the repository -->
-   <!-- then generate a new libraries.ent file and include it in  -->
-   <!-- the build                                                 -->
-   <target name="createthirdparty" unless="inhibit.downloads"
-      depends="check.inhibit.downloads, set.proxy">
-      
-      <ant antfile="build-thirdparty.xml" target="generate-lib-file"/>
-   </target>
-
-   <!-- check if thirdparty libraries are to be downloaded -->
-   <target name="check.inhibit.downloads">
-      <condition property="inhibit.downloads">
-         <or>
-            <uptodate property="dependencies.current"
- 	      srcfile="build-thirdparty.xml"
-               targetfile="thirdparty/libraries.ent"/>
-            <istrue value="${nodownload}"/>
-         </or>
-      </condition>
-  </target>
-
-  <!-- check if the the user has specied proxy settings -->
-  <target name="check.proxy">
-    <condition property="hasproxy">
-        <and>
-            <isset property="proxy.host"/>
-            <isset property="proxy.port"/>
-            <not>
-                <equals arg1="" arg2="${proxy.host}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.port}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  </target>
-
-  <!-- set proxy settings -->
-  <condition property="hasproxyauth">
-        <and>
-            <isset property="hasproxy"/>
-            <isset property="proxy.username"/>
-            <isset property="proxy.password"/>
-            <not>
-                <equals arg1="" arg2="${proxy.username}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.password}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
-
-  <!-- set proxy settings without auth -->
-  <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
-    <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
-  </target>
-
-  <!-- set proxy settings using auth -->
-  <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
-    <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
-  </target>  
-  
-</project>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/build.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/build.xml)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/pom.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/pom.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/pom.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,114 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>jboss.logging.log4j</groupId>
-  <artifactId>jboss-logging-log4j</artifactId>
-  <packaging>jar</packaging>
-  <version>1.0.1.TEST</version>
-  <name>JBoss Logging JDK</name>
-  <url>http://www.jboss.org</url>
-  <description>JBoss Logging JDK classes</description>
-  <licenses>
-   <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-   </license>
-  </licenses>
-  <organization>
-    <name>JBoss Inc.</name>
-    <url>http://www.jboss.org</url>
-  </organization>
- 
-  <repositories>
-    <repository>
-      <id>jboss</id>
-      <name>JBoss Inc. Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.com/maven2/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <pluginRepositories>
-     <pluginRepository>
-        <id>jbosspluginrepo</id>
-        <name>jboss plugin repository</name>
-        <url>http://repository.jboss.com/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-      <pluginRepository>
-        <id>central</id>
-        <name>LSU maven2 mirror</name>
-        <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-  </pluginRepositories>
-
-  
-  <build>
-     <sourceDirectory>src/main/java</sourceDirectory>
-  <plugins>
-  
-
-    
-      <!-- define how we want compilation to take place
-           here, we accept most of the defaults but say that we want the
-           optimization flag set, and define the source and target to be 1.4,
-           these setting will be inherited by child projects -->
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0</version>
-          <configuration>
-              <optimize>true</optimize>
-              <source>1.4</source>
-              <target>1.4</target>
-          </configuration>
-      </plugin>  
-
-      <!-- define that we wish to create src jars -->
-      <plugin>
-        <artifactId>maven-source-plugin</artifactId>
-        <inherited>true</inherited>
-       <executions>
-        <execution>
-          <goals>
-            <goal>jar</goal>
-          </goals>
-        </execution>
-      </executions>
-      </plugin>     
-    
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-      <version>1.0.1.TEST</version>
-    </dependency>
-    <dependency>
-      <groupId>jboss.common.core</groupId>
-      <artifactId>jboss-common-core</artifactId>
-      <version>1.0.1.TEST</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>apache-log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>1.2.8</version>
-      <scope>compile</scope>
-    </dependency>    
-  </dependencies>  
-
-</project>
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/pom.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/pom.xml)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/etc (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/etc)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/etc/default.mf
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/etc/default.mf	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/etc/default.mf	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Created-By: @java.vm.version@ (@java.vm.vendor@)
-Specification-Title: @specification.title@
-Specification-Version: @specification.version@
-Specification-Vendor: @specification.vendor@
-Implementation-Title: @implementation.title@
-Implementation-URL: @implementation.url@
-Implementation-Version: @implementation.version@
-Implementation-Vendor: @implementation.vendor@
-Implementation-Vendor-Id: @implementation.vendor.id@

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/etc/default.mf (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/etc/default.mf)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/XLevel.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/XLevel.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/XLevel.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,121 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging;
-
-import org.apache.log4j.Level;
-
-/** 
- * Provides custom extention levels for use with the Log4j logging framework.
- *
- * <p>
- * Adds a trace level that is below the standard Log4j <tt>DEBUG</tt> level.
- *
- * <p>
- * This is a custom level that is 100 below the {@link Level#DEBUG_INT} 
- * and represents a lower level useful for logging events that should only
- * be displayed when deep debugging is required.
- *
- * @see org.apache.log4j.Level
- *
- * @author  <a href="mailto:Scott.Stark at jboss.org">Scott Stark</a>
- * @version $Revision$
- */
-public class XLevel 
-   extends Level
-{
-   /** The integer representation of the level, ({@link Level#DEBUG_INT} - 100) */
-   public static final int TRACE_INT = Level.DEBUG_INT - 100;
-
-   /** The string name of the trace level. */
-   public static final String TRACE_STR = "TRACE";
-   
-   /** The TRACE level object singleton */
-   public static final XLevel TRACE = new XLevel(TRACE_INT, TRACE_STR, 7);
-
-   /**
-    * Construct a <tt>XLevel</tt>.
-    */
-   protected XLevel(final int level, final String strLevel, final int syslogEquiv)
-   {
-      super(level, strLevel, syslogEquiv);
-   }
-   
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Factory Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /** 
-    * Convert an integer passed as argument to a level. If the conversion
-    * fails, then this method returns the specified default.
-    * 
-    * @return the Level object for name if one exists, defaultLevel otherwize.
-    */
-   public static Level toLevel(final String name, final Level defaultLevel)
-   {
-      if (name == null)
-         return defaultLevel;
-
-      String upper = name.toUpperCase();
-      if (upper.equals(TRACE_STR)) {
-         return TRACE;
-      }
-
-      return Level.toLevel(name, defaultLevel);
-   }
-
-   /** 
-    * Convert an integer passed as argument to a level.
-    * 
-    * @return the Level object for name if one exists
-    */
-   public static Level toLevel(final String name)
-   {
-      return toLevel(name, TRACE);
-   }
-   
-   /**
-    * Convert an integer passed as argument to a priority. If the conversion
-    * fails, then this method returns the specified default.
-    * @return the Level object for i if one exists, defaultLevel otherwize.
-    */
-   public static Level toLevel(int i)
-   {
-      return toLevel(i, TRACE);
-   }
-
-   /** 
-    * Convert an integer passed as argument to a level. If the conversion
-    * fails, then this method returns the specified default.
-    * 
-    * @return the Level object for i if one exists, defaultLevel otherwize.
-    */
-   public static Level toLevel(final int i, final Level defaultLevel)
-   {
-      Level p;
-      if (i == TRACE_INT)
-         p = TRACE;
-      else
-         p = Level.toLevel(i);
-      return p;
-   }
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/XLevel.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/XLevel.java)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/DailyRollingFileAppender.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/DailyRollingFileAppender.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/DailyRollingFileAppender.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,39 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.appender;
-
-/** 
- * An extention of the default Log4j DailyRollingFileAppender 
- * which will make the directory structure for the set log file. 
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class DailyRollingFileAppender
-   extends org.apache.log4j.DailyRollingFileAppender
-{
-   public void setFile(final String filename)
-   {
-      FileAppender.Helper.makePath(filename);
-      super.setFile(filename);
-   }
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/DailyRollingFileAppender.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/DailyRollingFileAppender.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/FileAppender.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/FileAppender.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/FileAppender.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,72 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.appender;
-
-import java.io.File;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import org.apache.log4j.helpers.LogLog;
-
-/** 
- * An extention of the default Log4j FileAppender which
- * will make the directory structure for the set log file. 
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class FileAppender
-   extends org.apache.log4j.FileAppender
-{
-   public void setFile(final String filename)
-   {
-      FileAppender.Helper.makePath(filename);
-      super.setFile(filename);
-   }
-
-   /**
-    * A helper for FileAppenders.
-    */
-   public static class Helper
-   {
-      public static void makePath(final String filename)
-      {
-         File dir;
-
-         try {
-            URL url = new URL(filename.trim());
-            dir = new File(url.getFile()).getParentFile();
-         }
-         catch (MalformedURLException e) {
-            dir = new File(filename.trim()).getParentFile();
-         }
-
-         if (!dir.exists()) {
-            boolean success = dir.mkdirs();
-            if (!success) {
-               LogLog.error("Failed to create directory structure: " + dir);
-            }
-         }
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/FileAppender.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/FileAppender.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RegexEventEvaluator.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RegexEventEvaluator.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RegexEventEvaluator.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,78 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.appender;
-
-import java.util.HashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.log4j.spi.LoggingEvent;
-import org.apache.log4j.spi.TriggeringEventEvaluator;
-
-/** An implementation of the log4j TriggeringEventEvaluator that matches the
- * LoggingEvent message against the MDB{RegexEventEvaluator} regular
- * expression.
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class RegexEventEvaluator implements TriggeringEventEvaluator
-{
-   /** A cache HashMap<String, RE> of previously compiled REs */
-   private HashMap regexMap = new HashMap();
-
-   /** Lookup the current MDC 'RegexEventEvaluator' to determine the regular
-    * expression context that should be applied to determine if the logging
-    * event should be considered a triggering event. If there is no value
-    * for the 'RegexEventEvaluator' key then no comparision is made.
-    *
-    * @param event the logging event to check
-    * @return true if MDC{RegexEventEvaluator} is a regex expression that
-    * matches the event.getRenderedMessage(), false otherwise.
-    */
-   public boolean isTriggeringEvent(LoggingEvent event)
-   {
-      String regex = (String) event.getMDC("RegexEventEvaluator");
-      boolean isTriggeringEvent = false;
-      if( regex != null )
-      {
-         // Look for a cached regex pattern
-         Pattern re = (Pattern) regexMap.get(regex);
-         if( re == null )
-         {
-            re = Pattern.compile(regex);
-            regexMap.put(regex, re);
-         }
-
-         if( re != null )
-         {
-            String msg = event.getRenderedMessage();
-            if( msg != null )
-            {
-               Matcher m = re.matcher(msg);
-               isTriggeringEvent = m.matches();
-            }
-         }
-      }
-      return isTriggeringEvent;
-   }
-}
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RegexEventEvaluator.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RegexEventEvaluator.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RollingFileAppender.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RollingFileAppender.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RollingFileAppender.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,39 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.appender;
-
-/** 
- * An extention of the default Log4j RollingFileAppender which
- * will make the directory structure for the set log file. 
- *
- * @version <tt>$Revision$</tt>
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class RollingFileAppender
-   extends org.apache.log4j.RollingFileAppender
-{
-   public void setFile(final String filename)
-   {
-      FileAppender.Helper.makePath(filename);
-      super.setFile(filename);
-   }
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RollingFileAppender.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/RollingFileAppender.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/package.html
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Log4j appenders.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/package.html (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/appender/package.html)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/TCLFilter.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/TCLFilter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/TCLFilter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,315 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.filter;
-
-
-
-import java.lang.reflect.Method;
-
-import java.net.URL;
-
-
-
-import org.apache.log4j.spi.Filter;
-
-import org.apache.log4j.spi.LoggingEvent;
-
-
-
-import org.jboss.util.collection.WeakSet;
-
-
-
-/** An appender filter that accepts log events based on whether the thread
-
- context class loader has a classpath URL that has the DeployURL
-
- attribute as a substring. A sample usage would be:
-
-
-
-   <appender name="JMX-CONSOLE" class="org.jboss.logging.appender.FileAppender">
-
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-
-      <param name="File" value="${jboss.server.home.dir}/log/jmx-console.log"/>
-
-      <layout class="org.apache.log4j.PatternLayout">
-
-         <!-- The default pattern: Date Priority [Category] Message\n -->
-
-         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
-
-      </layout>
-
-      <filter class="org.jboss.logging.filter.TCLFilter">
-
-         <param name="AcceptOnMatch" value="true"/>
-
-         <param name="DeployURL" value="jmx-console.war"/>
-
-      </filter>
-
-   </appender>
-
-
-
- @author Scott.Stark at jboss.org
-
- @version $Revison:$
-
- */
-
-public class TCLFilter extends Filter
-
-{
-
-   /** The set of TCLs seen to match DeployURL */
-
-   private WeakSet matchSet = new WeakSet();
-
-   /** The set of TCLs seen to not match DeployURL */
-
-   private WeakSet missSet = new WeakSet();
-
-   /** The deployment URL string fragment to match against */
-
-   private String deployURL;
-
-   /** Whether a match should return ACCEPT or DENY */
-
-   private boolean acceptOnMatch = true;
-
-
-
-   public boolean isAcceptOnMatch()
-
-   {
-
-      return acceptOnMatch;
-
-   }
-
-   public void setAcceptOnMatch(boolean acceptOnMatch)
-
-   {
-
-      this.acceptOnMatch = acceptOnMatch;
-
-   }
-
-   public String getDeployURL()
-
-   {
-
-      return deployURL;
-
-   }
-
-   public void setDeployURL(String deployURL)
-
-   {
-
-      this.deployURL = deployURL;
-
-   }
-
-
-
-   public int decide(LoggingEvent event)
-
-   {
-
-      int ok = Filter.DENY;
-
-      if( acceptOnMatch == true )
-
-      {
-
-         ok = Filter.DENY;
-
-         if( isMatchingTCL() )
-
-            ok = Filter.ACCEPT;
-
-      }
-
-      else
-
-      {
-
-         ok = Filter.ACCEPT;
-
-         if( isMatchingTCL() )
-
-            ok = Filter.DENY;
-
-      }
-
-      return ok;
-
-   }
-
-
-
-   /** Start with the current thread context class loader 
-
-    * @return true if the caller tcl has a url matching our deployURL
-
-    */ 
-
-   private boolean isMatchingTCL()
-
-   {
-
-      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-
-      if( matchSet.contains(tcl) )
-
-         return true;
-
-      if( missSet.contains(tcl) )
-
-         return false;
-
-
-
-      // Search the class loader URLs for a match
-
-      ClassLoader cl = tcl;
-
-      boolean match = false;
-
-      while( cl != null )
-
-      {
-
-         URL[] urls = getClassLoaderURLs(cl);
-
-         for(int n = 0; n < urls.length; n ++)
-
-         {
-
-            URL u = urls[n];
-
-            String file = u.getFile();
-
-            if( file.indexOf(deployURL) > 0 )
-
-            {
-
-               match = true;
-
-               break;
-
-            }
-
-         }
-
-         cl = cl.getParent();
-
-      }
-
-      if( match == true )
-
-         matchSet.add(tcl);
-
-      else
-
-         missSet.add(tcl);
-
-
-
-      return match;
-
-   }
-
-
-
-   /** Use reflection to access a URL[] getURLs method so that non-URLClassLoader
-
-    class loaders that support this method can provide info.
-
-    */
-
-   private static URL[] getClassLoaderURLs(ClassLoader cl)
-
-   {
-
-      URL[] urls = {};
-
-      try
-
-      {
-
-         Class returnType = urls.getClass();
-
-         Class[] parameterTypes = {};
-
-         Method getURLs = cl.getClass().getMethod("getURLs", parameterTypes);
-
-         if( returnType.isAssignableFrom(getURLs.getReturnType()) )
-
-         {
-
-            Object[] args = {};
-
-            urls = (URL[]) getURLs.invoke(cl, args);
-
-         }
-
-         if( urls == null || urls.length == 0 )
-
-         {
-
-            getURLs = cl.getClass().getMethod("getClasspath", parameterTypes);
-
-            if( returnType.isAssignableFrom(getURLs.getReturnType()) )
-
-            {
-
-               Object[] args = {};
-
-               urls = (URL[]) getURLs.invoke(cl, args);
-
-            }
-
-         }
-
-      }
-
-      catch(Exception ignore)
-
-      {
-
-      }
-
-      return urls;
-
-   }
-
-
-
-}
-
-
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/TCLFilter.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/filter/TCLFilter.java)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternLayout.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternLayout.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternLayout.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,63 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.layout;
-
-import org.apache.log4j.helpers.PatternParser;
-
-/** A subclass of the log4j PatternLayout that add the following conversion
-characters:
-
-   <p>
-   <table border="1" CELLPADDING="8">
-   <th>Conversion Character</th>
-   <th>Effect</th>
-
-   <tr>
-     <td align=center><b>z</b></td>
-     <td>Used to output current thread NDC value. This can be used to obtain
-      an NDC to augment any NDC associated with the LoggingEvent. This might
-      be necessary if the LoggingEvent has been serialized between VMs.
-     </td>
-   </tr>
-   <tr>
-     <td align=center><b>Z</b></td>
-     <td>Used to output current thread MDC value. This can be used to obtain
-      an MDC to augment any MDC associated with the LoggingEvent. This might
-      be necessary if the LoggingEvent has been serialized between VMs.
-      The Z conversion character must be followed by the key for the map placed
-      between braces, as in %Z{theKey} where theKey is the key.
-      The value in the MDC corresponding to the key will be output.
-     </td>
-   </tr>
-
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class PatternLayout extends org.apache.log4j.PatternLayout
-{
-
-  protected PatternParser createPatternParser(String pattern)
-  {
-    return new PatternParserEx(pattern);
-  }
-
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternLayout.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternLayout.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternParserEx.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternParserEx.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternParserEx.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,84 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.layout;
-
-import org.apache.log4j.helpers.PatternConverter;
-import org.apache.log4j.helpers.PatternParser;
-
-/** A subclass of the log4j PatternParser that add the following conversion
-characters:
-
-   <p>
-   <table border="1" CELLPADDING="8">
-   <th>Conversion Character</th>
-   <th>Effect</th>
-
-   <tr>
-     <td align=center><b>z</b></td>
-     <td>Used to output current thread NDC value. This can be used to obtain
-      an NDC to augment any NDC associated with the LoggingEvent. This might
-      be necessary if the LoggingEvent has been serialized between VMs.
-     </td>
-   </tr>
-   <tr>
-     <td align=center><b>Z</b></td>
-     <td>Used to output current thread MDC value. This can be used to obtain
-      an MDC to augment any MDC associated with the LoggingEvent. This might
-      be necessary if the LoggingEvent has been serialized between VMs.
-      The Z conversion character must be followed by the key for the map placed
-      between braces, as in %Z{theKey} where theKey is the key.
-      The value in the MDC corresponding to the key will be output.
-     </td>
-   </tr>
-
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class PatternParserEx extends PatternParser
-{
-   /** Creates a new instance of PatternParser */
-   public PatternParserEx(String pattern)
-   {
-      super(pattern);
-   }
-
-   protected void finalizeConverter(char c)
-   {
-      PatternConverter pc = null;
-      switch(c)
-      {
-         case 'z':
-            pc = new ThreadNDCConverter(formattingInfo);
-            currentLiteral.setLength(0);
-         break;
-         case 'Z':
-            String key = extractOption();
-            pc = new ThreadMDCConverter(formattingInfo, key);
-            currentLiteral.setLength(0);
-         break;
-         default:
-            super.finalizeConverter(c);
-         return;
-      }
-      addConverter(pc);
-   }
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternParserEx.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/PatternParserEx.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadMDCConverter.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadMDCConverter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadMDCConverter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,54 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.layout;
-
-import org.apache.log4j.MDC;
-import org.apache.log4j.helpers.FormattingInfo;
-import org.apache.log4j.helpers.PatternConverter;
-import org.apache.log4j.spi.LoggingEvent;
-
-/** A PatternConverter that uses the current thread MDC rather than the
- * LoggingEvent MDC value.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class ThreadMDCConverter extends PatternConverter
-{
-   private String key;
-   /** Creates a new instance of ThreadMDCPatternConverter */
-   public ThreadMDCConverter(FormattingInfo formattingInfo, String key)
-   {
-      super(formattingInfo);
-      this.key = key;
-   }
-
-   protected String convert(LoggingEvent loggingEvent)
-   {
-      Object val = MDC.get(key);
-      String strVal = null;
-      if( val != null )
-         strVal = val.toString();
-      return strVal;
-   }
-
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadMDCConverter.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadMDCConverter.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadNDCConverter.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadNDCConverter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadNDCConverter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,52 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.layout;
-
-import org.apache.log4j.NDC;
-import org.apache.log4j.helpers.FormattingInfo;
-import org.apache.log4j.helpers.PatternConverter;
-import org.apache.log4j.spi.LoggingEvent;
-
-/** A PatternConverter that uses the current thread NDC rather than the
- * LoggingEvent NDC value.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class ThreadNDCConverter extends PatternConverter
-{
-   /** Creates a new instance of ThreadMDCPatternConverter */
-   public ThreadNDCConverter(FormattingInfo formattingInfo)
-   {
-      super(formattingInfo);
-   }
-
-   protected String convert(LoggingEvent loggingEvent)
-   {
-      Object val = NDC.get();
-      String strVal = null;
-      if( val != null )
-         strVal = val.toString();
-      return strVal;
-   }
-
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadNDCConverter.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/layout/ThreadNDCConverter.java)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/Log4jLoggerPlugin.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/Log4jLoggerPlugin.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/Log4jLoggerPlugin.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,290 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging;
-
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Level;
-import org.apache.log4j.Category;
-import org.apache.log4j.Priority;
-
-/**
- * Delegate for org.jboss.logging.Logger logging to log4j. Body of implementation
- * mainly copied from old Logger implementation.
- *
- * @see org.jboss.logging.Logger
- * @see org.jboss.logging.LoggerPlugin
- *
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @version $Revision$
- *
- * <p><b>Revisions:</b>
- *
- * <p><b>3. mai 2002 Sacha Labourey:</b>
- * <ul>
- * <li> First implementation </li>
- * </ul>
- * </p>
- * <p><b>4. february 2003 Dag Liodden:</b>
- * <ul>
- *   <li>Fixed Log4J locationinfo by sending the fully qualified classname of <code>Logger</code> to Log4J</li>
- * </ul>
- * </p>
- */
-
-public class Log4jLoggerPlugin implements LoggerPlugin
-{
-   
-   // Constants -----------------------------------------------------
-
-   /** 
-    *  Fully qualified classname for this class so Log4J locationinfo will be
-    *  correct
-    */
-   private static final String FQCN = Logger.class.getName();
-   
-   // Attributes ----------------------------------------------------
-   
-   /** The Log4j delegate logger. */
-   private transient org.apache.log4j.Logger log;
-
-   // Static --------------------------------------------------------
-   
-   // Constructors --------------------------------------------------
-   
-   public Log4jLoggerPlugin () { }
-   
-   public void init (String name)
-   {
-      log = LogManager.getLogger(name);
-   }
-   
-   // Public --------------------------------------------------------
-
-   public Category getCategory()
-   {
-      return log;
-   }
-
-   /**
-    * Exposes the delegate Log4j Logger.
-    */
-   public org.apache.log4j.Logger getLogger()
-   {
-      return log;
-   }
-   
-   // LoggerPlugin implementation ----------------------------------------------
-   
-   public boolean isTraceEnabled()
-   {      
-      if (log.isEnabledFor(XLevel.TRACE) == false)
-         return false;
-      return XLevel.TRACE.isGreaterOrEqual(log.getEffectiveLevel());
-   }
-
-   /** 
-    * Issue a log msg with a level of TRACE.
-    * Invokes log.log(XLevel.TRACE, message);
-    */
-   public void trace(Object message)
-   {
-      log.log(FQCN, XLevel.TRACE, message, null);
-   }
-
-   /** 
-    * Issue a log msg and throwable with a level of TRACE.
-    * Invokes log.log(XLevel.TRACE, message, t);
-    */
-   public void trace(Object message, Throwable t)
-   {
-      log.log(FQCN, XLevel.TRACE, message, t);
-   }
-
-   /**
-    * Check to see if the TRACE level is enabled for this logger.
-    *
-    * @return true if a {@link #trace(Object)} method invocation would pass
-    * the msg to the configured appenders, false otherwise.
-    */
-   public boolean isDebugEnabled()
-   {
-      Level l = Level.DEBUG;
-      if (log.isEnabledFor(l) == false)
-         return false;
-      return l.isGreaterOrEqual(log.getEffectiveLevel());
-   }
-
-   /** 
-    * Issue a log msg with a level of DEBUG.
-    * Invokes log.log(Level.DEBUG, message);
-    */
-   public void debug(Object message)
-   {
-      log.log(FQCN, Level.DEBUG, message, null);
-   }
-
-   /** 
-    * Issue a log msg and throwable with a level of DEBUG.
-    * Invokes log.log(Level.DEBUG, message, t);
-    */
-   public void debug(Object message, Throwable t)
-   {
-      log.log(FQCN, Level.DEBUG, message, t);
-   }
-
-   /** 
-    * Check to see if the INFO level is enabled for this logger.
-    *
-    * @return true if a {@link #info(Object)} method invocation would pass
-    * the msg to the configured appenders, false otherwise.
-    */
-   public boolean isInfoEnabled()
-   {
-      Level l = Level.INFO;
-      if (log.isEnabledFor(l) == false)
-         return false;
-      return l.isGreaterOrEqual(log.getEffectiveLevel());
-   }
-
-   /** 
-    * Issue a log msg with a level of INFO.
-    * Invokes log.log(Level.INFO, message);
-    */
-   public void info(Object message)
-   {
-      log.log(FQCN, Level.INFO, message, null);
-   }
-
-   /**
-    * Issue a log msg and throwable with a level of INFO.
-    * Invokes log.log(Level.INFO, message, t);
-    */
-   public void info(Object message, Throwable t)
-   {
-      log.log(FQCN, Level.INFO, message, t);
-   }
-
-   /** 
-    * Issue a log msg with a level of WARN.
-    * Invokes log.log(Level.WARN, message);
-    */
-   public void warn(Object message)
-   {
-      log.log(FQCN, Level.WARN, message, null);
-   }
-
-   /** 
-    * Issue a log msg and throwable with a level of WARN.
-    * Invokes log.log(Level.WARN, message, t);
-    */
-   public void warn(Object message, Throwable t)
-   {
-      log.log(FQCN, Level.WARN, message, t);
-   }
-
-   /** 
-    * Issue a log msg with a level of ERROR.
-    * Invokes log.log(Level.ERROR, message);
-    */
-   public void error(Object message)
-   {
-      log.log(FQCN, Level.ERROR, message, null);
-   }
-
-   /** 
-    * Issue a log msg and throwable with a level of ERROR.
-    * Invokes log.log(Level.ERROR, message, t);
-    */
-   public void error(Object message, Throwable t)
-   {
-      log.log(FQCN, Level.ERROR, message, t);
-   }
-
-   /** 
-    * Issue a log msg with a level of FATAL.
-    * Invokes log.log(Level.FATAL, message);
-    */
-   public void fatal(Object message)
-   {
-      log.log(FQCN, Level.FATAL, message, null);
-   }
-
-   /** 
-    * Issue a log msg and throwable with a level of FATAL.
-    * Invokes log.log(Level.FATAL, message, t);
-    */
-   public void fatal(Object message, Throwable t)
-   {
-      log.log(FQCN, Level.FATAL, message, t);
-   }
-
-   /** 
-    * Issue a log msg with the given level.
-    * Invokes log.log(p, message);
-    *
-    * @deprecated  Use Level versions.
-    */
-   public void log(Priority p, Object message)
-   {
-      log.log(FQCN, p, message, null);
-   }
-
-   /** 
-    * Issue a log msg with the given priority.
-    * Invokes log.log(p, message, t);
-    *
-    * @deprecated  Use Level versions.
-    */
-   public void log(Priority p, Object message, Throwable t)
-   {
-      log.log(FQCN, p, message, t);
-   }
-
-   /** 
-    * Issue a log msg with the given level.
-    * Invokes log.log(l, message);
-    */
-   public void log(Level l, Object message)
-   {
-      log.log(FQCN, l, message, null);
-   }
-
-   /** 
-    * Issue a log msg with the given level.
-    * Invokes log.log(l, message, t);
-    */
-   public void log(Level l, Object message, Throwable t)
-   {
-      log.log(FQCN, l, message, t);
-   }
-
-   // Y overrides ---------------------------------------------------
-   
-   // Package protected ---------------------------------------------
-   
-   // Protected -----------------------------------------------------
-   
-   // Private -------------------------------------------------------
-   
-   // Inner classes -------------------------------------------------
-   
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/Log4jLoggerPlugin.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/log4j/Log4jLoggerPlugin.java)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryStream.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryStream.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryStream.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,157 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.util;
-
-import java.io.IOException;
-import java.io.PrintStream;
-
-import org.apache.log4j.Category;
-import org.apache.log4j.Priority;
-
-
-/**
- * A subclass of PrintStream that redirects its output to a log4j Category.
- * 
- * <p>This class is used to map PrintStream/PrintWriter oriented logging onto
- *    the log4j Categories. Examples include capturing System.out/System.err
- *
- * @deprecated Use {@link LoggerStream} instead.
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:Scott.Stark at jboss.org">Scott Stark</a>.
- * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class CategoryStream
-    extends PrintStream
-{
-   /**
-    * Default flag to enable/disable tracing println calls.
-    * from the system property <tt>org.jboss.logging.util.CategoryStream.trace</tt>
-    * or if not set defaults to <tt>false</tt>.
-    */
-   public static final boolean TRACE =
-      getBoolean(CategoryStream.class.getName() + ".trace", false);
-
-   /** Helper to get boolean value from system property or use default if not set. */
-   private static boolean getBoolean(String name, boolean defaultValue)
-   {
-      String value = System.getProperty(name, null);
-      if (value == null)
-         return defaultValue;
-      return new Boolean(value).booleanValue();
-   }
-   
-   private Category category;
-   private Priority priority;
-   private boolean issuedWarning;
-   
-   /**
-    * Redirect logging to the indicated category using Priority.INFO
-    */
-   public CategoryStream(final Category category)
-   {
-      this(category, Priority.INFO, System.out);
-   } 
-    
-   /**
-    * Redirect logging to the indicated category using the given
-    * priority. The ps is simply passed to super but is not used.
-    */
-   public CategoryStream(final Category category,
-                         final Priority priority,
-                         final PrintStream ps)
-   {
-      super(ps);
-      this.category = category;
-      this.priority = priority;
-   }
-    
-   public void println(String msg)
-   {
-      if( msg == null )
-         msg = "null";
-      byte[] bytes = msg.getBytes();
-      write(bytes, 0, bytes.length);
-   }
-    
-   public void println(Object msg)
-   {
-      if( msg == null )
-         msg = "null";
-      byte[] bytes = msg.toString().getBytes();
-      write(bytes, 0, bytes.length);
-   }
-    
-   public void write(byte b)
-   {
-      byte[] bytes = {b};
-      write(bytes, 0, 1);
-   }
-
-   private ThreadLocal recursiveCheck = new ThreadLocal();
-   public void write(byte[] b, int off, int len)
-   {
-      Boolean recursed = (Boolean)recursiveCheck.get();
-      if (recursed != null && recursed.equals(Boolean.TRUE))
-      {
-         /* There is a configuration error that is causing looping. Most
-            likely there are two console appenders so just return to prevent
-            spinning.
-         */
-         if( issuedWarning == false )
-         {
-            String msg = "ERROR: invalid console appender config detected, console stream is looping";
-            try
-            {
-               out.write(msg.getBytes());
-            }
-            catch(IOException ignore)
-            {
-            }
-            issuedWarning = true;
-         }
-         return;
-      }
-
-      // Remove the end of line chars
-      while( len > 0 && (b[len-1] == '\n' || b[len-1] == '\r') && len > off )
-         len --;
-
-      // HACK, something is logging exceptions line by line (including
-      // blanks), but I can't seem to find it, so for now just ignore
-      // empty lines... they aren't very useful.
-      if (len != 0)
-      {
-         String msg = new String(b, off, len);
-         recursiveCheck.set(Boolean.TRUE);
-         if (TRACE)
-         {
-            category.log(priority, msg, new Throwable());
-         }
-         else
-         {
-            category.log(priority, msg);
-         }
-         recursiveCheck.set(Boolean.FALSE);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryStream.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryStream.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryWriter.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryWriter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryWriter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,115 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.util;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.Writer;
-
-import org.apache.log4j.Category;
-import org.apache.log4j.Priority;
-
-/**
- *  A subclass of PrintWriter that redirects its output to a log4j Category. <p>
- *
- *  This class is used to have something to give api methods that require a
- *  PrintWriter for logging. JBoss-owned classes of this nature generally ignore
- *  the PrintWriter and do their own log4j logging.
- *
- * @deprecated Use {@link LoggerWriter} instead.
- *
- * @author     <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
- *      .
- * @created    August 19, 2001
- * @version    $$
- */
-public class CategoryWriter
-       extends PrintWriter {
-   private Category category;
-   private Priority priority;
-   private boolean  inWrite;
-   private boolean  issuedWarning;
-
-   /**
-    *  Redirect logging to the indicated category using Priority.INFO
-    *
-    * @param  category  Description of Parameter
-    */
-   public CategoryWriter( final Category category ) {
-      this( category, Priority.INFO );
-   }
-
-   /**
-    *  Redirect logging to the indicated category using the given priority. The
-    *  ps is simply passed to super but is not used.
-    *
-    * @param  category  Description of Parameter
-    * @param  priority  Description of Parameter
-    */
-   public CategoryWriter( final Category category,
-         final Priority priority ) {
-      super( new InternalCategoryWriter( category, priority ), true );
-   }
-
-   /**
-    * @created    August 19, 2001
-    */
-   static class InternalCategoryWriter extends Writer {
-      private Category category;
-      private Priority priority;
-      private boolean closed;
-
-      public InternalCategoryWriter( final Category category, final Priority priority ) {
-         lock = category;
-         //synchronize on this category
-         this.category = category;
-         this.priority = priority;
-      }
-
-      public void write( char[] cbuf, int off, int len )
-         throws IOException {
-         if ( closed ) {
-            throw new IOException( "Called write on closed Writer" );
-         }
-         // Remove the end of line chars
-         while ( len > 0 && ( cbuf[len - 1] == '\n' || cbuf[len - 1] == '\r' ) ) {
-            len--;
-         }
-         if ( len > 0 ) {
-            category.log( priority, String.copyValueOf( cbuf, off, len ) );
-         }
-      }
-
-
-      public void flush()
-         throws IOException {
-         if ( closed ) {
-            throw new IOException( "Called flush on closed Writer" );
-         }
-      }
-
-      public void close() {
-         closed = true;
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryWriter.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/CategoryWriter.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerPluginWriter.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerPluginWriter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerPluginWriter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,94 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.util;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.Writer;
-
-import org.jboss.logging.LoggerPlugin;
-
-/** A subclass of PrintWriter that redirects its output to a LoggerPlugin at
- * INFO level. The only usecase for this is legacy java apis which require
- * integration with the logging layer through a Writer.
- *
- * @author David Jencks
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class LoggerPluginWriter
-   extends PrintWriter
-{
-   /**
-    *
-    * @param  logger the logging plugin used to write messages
-    */
-   public LoggerPluginWriter(final LoggerPlugin logger)
-   {
-      super(new PluginWriter(logger), true);
-   }
-
-   static class PluginWriter extends Writer
-   {
-      private LoggerPlugin logger;
-      private boolean closed;
-
-      public PluginWriter(final LoggerPlugin logger)
-      {
-         lock = logger;
-         this.logger = logger;
-      }
-
-      public void write(char[] cbuf, int off, int len)
-         throws IOException
-      {
-         if (closed)
-         {
-            throw new IOException("Called write on closed Writer");
-         }
-         // Remove the end of line chars
-         while (len > 0 && (cbuf[len - 1] == '\n' || cbuf[len - 1] == '\r'))
-         {
-            len--;
-         }
-         if (len > 0)
-         {
-            logger.info(String.copyValueOf(cbuf, off, len));
-         }
-      }
-
-      public void flush()
-         throws IOException
-      {
-         if (closed)
-         {
-            throw new IOException("Called flush on closed Writer");
-         }
-      }
-
-      public void close()
-      {
-         closed = true;
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerPluginWriter.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerPluginWriter.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerStream.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerStream.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerStream.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,156 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.util;
-
-import java.io.IOException;
-import java.io.PrintStream;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Level;
-
-
-/**
- * A subclass of PrintStream that redirects its output to a log4j Logger.
- * 
- * <p>This class is used to map PrintStream/PrintWriter oriented logging onto
- *    the log4j Categories. Examples include capturing System.out/System.err
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:Scott.Stark at jboss.org">Scott Stark</a>.
- * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
- */
-public class LoggerStream
-    extends PrintStream
-{
-   /**
-    * Default flag to enable/disable tracing println calls.
-    * from the system property <tt>org.jboss.logging.util.LoggerStream.trace</tt>
-    * or if not set defaults to <tt>false</tt>.
-    */
-   public static final boolean TRACE =
-      getBoolean(LoggerStream.class.getName() + ".trace", false);
-
-   /** Helper to get boolean value from system property or use default if not set. */
-   private static boolean getBoolean(String name, boolean defaultValue)
-   {
-      String value = System.getProperty(name, null);
-      if (value == null)
-         return defaultValue;
-      return new Boolean(value).booleanValue();
-   }
-   
-   private Logger logger;
-   private Level level;
-   private boolean inWrite;
-   private boolean issuedWarning;
-   
-   /**
-    * Redirect logging to the indicated logger using Level.INFO
-    */
-   public LoggerStream(final Logger logger)
-   {
-      this(logger, Level.INFO, System.out);
-   } 
-    
-   /**
-    * Redirect logging to the indicated logger using the given
-    * level. The ps is simply passed to super but is not used.
-    */
-   public LoggerStream(final Logger logger,
-                       final Level level,
-                       final PrintStream ps)
-   {
-      super(ps);
-      this.logger = logger;
-      this.level = level;
-   }
-    
-   public void println(String msg)
-   {
-      if( msg == null )
-         msg = "null";
-      byte[] bytes = msg.getBytes();
-      write(bytes, 0, bytes.length);
-   }
-    
-   public void println(Object msg)
-   {
-      if( msg == null )
-         msg = "null";
-      byte[] bytes = msg.toString().getBytes();
-      write(bytes, 0, bytes.length);
-   }
-    
-   public void write(byte b)
-   {
-      byte[] bytes = {b};
-      write(bytes, 0, 1);
-   }
-    
-   private ThreadLocal recursiveCheck = new ThreadLocal();
-   public void write(byte[] b, int off, int len)
-   {
-      Boolean recursed = (Boolean)recursiveCheck.get();
-      if (recursed != null && recursed.equals(Boolean.TRUE))
-      {
-         /* There is a configuration error that is causing looping. Most
-            likely there are two console appenders so just return to prevent
-            spinning.
-         */
-         if( issuedWarning == false )
-         {
-            String msg = "ERROR: invalid console appender config detected, console stream is looping";
-            try
-            {
-               out.write(msg.getBytes());
-            }
-            catch(IOException ignore)
-            {
-            }
-            issuedWarning = true;
-         }
-         return;
-      }
-
-      // Remove the end of line chars
-      while( len > 0 && (b[len-1] == '\n' || b[len-1] == '\r') && len > off )
-         len --;
-
-      // HACK, something is logging exceptions line by line (including
-      // blanks), but I can't seem to find it, so for now just ignore
-      // empty lines... they aren't very useful.
-      if (len != 0)
-      {
-         String msg = new String(b, off, len);
-         recursiveCheck.set(Boolean.TRUE);
-         if (TRACE)
-         {
-            logger.log(level, msg, new Throwable());
-         }
-         else
-         {
-            logger.log(level, msg);
-         }
-         recursiveCheck.set(Boolean.FALSE);
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerStream.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerStream.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerWriter.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerWriter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerWriter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,114 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging.util;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.Writer;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.Level;
-
-/**
- *  A subclass of PrintWriter that redirects its output to a log4j Logger. <p>
- *
- *  This class is used to have something to give api methods that require a
- *  PrintWriter for logging. JBoss-owned classes of this nature generally ignore
- *  the PrintWriter and do their own log4j logging.
- *
- * @author     <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
- *      .
- * @created    August 19, 2001
- * @version    $$
- */
-public class LoggerWriter
-   extends PrintWriter
-{
-   private Logger logger;
-   private Level level;
-   private boolean  inWrite;
-   private boolean  issuedWarning;
-
-   /**
-    *  Redirect logging to the indicated logger using Level.INFO
-    *
-    * @param  logger  Description of Parameter
-    */
-   public LoggerWriter( final Logger logger ) {
-      this( logger, Level.INFO );
-   }
-
-   /**
-    *  Redirect logging to the indicated logger using the given level. The
-    *  ps is simply passed to super but is not used.
-    *
-    * @param  logger  Description of Parameter
-    * @param  level  Description of Parameter
-    */
-   public LoggerWriter( final Logger logger,
-         final Level level ) {
-      super( new InternalLoggerWriter( logger, level ), true );
-   }
-
-   /**
-    * @created    August 19, 2001
-    */
-   static class InternalLoggerWriter extends Writer {
-      private Logger logger;
-      private Level level;
-      private boolean closed;
-
-      public InternalLoggerWriter( final Logger logger, final Level level ) {
-         lock = logger;
-         //synchronize on this logger
-         this.logger = logger;
-         this.level = level;
-      }
-
-      public void write( char[] cbuf, int off, int len )
-         throws IOException {
-         if ( closed ) {
-            throw new IOException( "Called write on closed Writer" );
-         }
-         // Remove the end of line chars
-         while ( len > 0 && ( cbuf[len - 1] == '\n' || cbuf[len - 1] == '\r' ) ) {
-            len--;
-         }
-         if ( len > 0 ) {
-            logger.log( level, String.copyValueOf( cbuf, off, len ) );
-         }
-      }
-
-
-      public void flush()
-         throws IOException {
-         if ( closed ) {
-            throw new IOException( "Called flush on closed Writer" );
-         }
-      }
-
-      public void close() {
-         closed = true;
-      }
-   }
-
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerWriter.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/LoggerWriter.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/OnlyOnceErrorHandler.java
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/OnlyOnceErrorHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/OnlyOnceErrorHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,124 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-
-package org.jboss.logging.util;
-
-import java.io.PrintStream;
-
-import  org.apache.log4j.spi.ErrorHandler;
-import  org.apache.log4j.spi.LoggingEvent;
-import  org.apache.log4j.Logger;
-import  org.apache.log4j.Appender;
-
-/**
-
-   The <code>OnlyOnceErrorHandler</code> implements log4j's default
-   error handling policy which consists of emitting a message for the
-   first error in an appender and ignoring all following errors.
-
-   <p>The error message is printed on the specified print stream. 
-
-   <p>This policy aims at protecting an otherwise working application
-   from being flooded with error messages when logging fails.
-
-   @author Ceki G&uuml;lc&uuml;
-   @author Adrian Brock (adrian at jboss.org);
-   @since 0.9.0 */
-public class OnlyOnceErrorHandler implements ErrorHandler {
-
-
-  final String WARN_PREFIX = "log4j warning: ";
-  final String ERROR_PREFIX = "log4j error: ";
-
-  boolean firstTime = true;
-
-  static PrintStream output = System.err;
-
-  public static void setOutput(PrintStream out)
-  {
-     output = out;
-  }
-
-  /**
-     Does not do anything.
-   */
-  public 
-  void setLogger(Logger logger) {
-  }
-
-
-  /**
-     No options to activate.
-  */
-  public 
-  void activateOptions() {
-  }
-
-
-  /**
-     Prints the message and the stack trace of the exception on
-     <code>System.err</code>.  */
-  public
-  void error(String message, Exception e, int errorCode) { 
-    error(message, e, errorCode, null);
-  }
-
-  /**
-     Prints the message and the stack trace of the exception on
-     <code>System.err</code>.
-   */
-  public
-  void error(String message, Exception e, int errorCode, LoggingEvent event) {
-    if(firstTime) {
-      output.println(ERROR_PREFIX + message);
-      e.printStackTrace(output);
-      firstTime = false;
-    }
-  }
-
-
-  /**
-     Print a the error message passed as parameter on
-     <code>System.err</code>.  
-  */
-  public 
-  void error(String message) {
-    if(firstTime) {
-      output.println(ERROR_PREFIX + message);
-      firstTime = false;
-    }
-  }
-  
-  /**
-     Does not do anything.
-   */
-  public
-  void setAppender(Appender appender) {
-  }
-
-  /**
-     Does not do anything.
-   */
-  public
-  void setBackupAppender(Appender appender) {
-  }
-}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/OnlyOnceErrorHandler.java (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/OnlyOnceErrorHandler.java)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/package.html
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/package.html	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/package.html	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <!-- $Id$ -->
-    <!--
-
-    JBoss: The OpenSource J2EE WebOS 
-
-    Distributable under LGPL license.
-    See terms of license at gnu.org.
-
-    -->
-  </head>
-
-  <body bgcolor="white">
-    <p>Logging utilties and helpers.
-
-    <h2>Package Specification</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-      
-    <h2>Related Documentation</h2>
-    <ul>
-      <li><a href="javascript: alert('not available')">Not Available</a>
-    </ul>
-
-    <h2>Package Status</h2>
-    <ul>
-      <li><font color="green"><b>STABLE</b></font>
-    </ul>
-
-    <h2>Todo</h2>
-    <ul>
-      <li>???
-    </ul>
-
-    <!-- Put @see and @since tags down here. -->
-
-  </body>
-</html>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/package.html (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/src/main/java/org/jboss/logging/util/package.html)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/.project
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/.project	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/.project	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>tools</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/.project (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/.project)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/bin)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/ant	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,299 +0,0 @@
-#! /bin/sh
-
-#   Copyright 2001-2005 The Apache Software Foundation
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-# Extract launch and ant arguments, (see details below).
-ant_exec_args=
-no_config=false
-use_jikes_default=false
-ant_exec_debug=false
-show_help=false
-for arg in "$@" ; do
-  if [ "$arg" = "--noconfig" ] ; then
-    no_config=true
-  elif [ "$arg" = "--usejikes" ] ; then
-    use_jikes_default=true
-  elif [ "$arg" = "--execdebug" ] ; then
-    ant_exec_debug=true
-  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
-    show_help=true
-    ant_exec_args="$ant_exec_args -h"
-  else
-    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
-      show_help=true
-    fi
-    ant_exec_args="$ant_exec_args \"$arg\""
-  fi
-done
-
-# Source/default ant configuration
-if $no_config ; then
-  rpm_mode=false
-  usejikes=$use_jikes_default
-else
-  # load system-wide ant configuration
-  if [ -f "/etc/ant.conf" ] ; then
-    . /etc/ant.conf
-  fi
-
-  # load user ant configuration
-  if [ -f "$HOME/.ant/ant.conf" ] ; then
-    . $HOME/.ant/ant.conf
-  fi
-  if [ -f "$HOME/.antrc" ] ; then
-    . "$HOME/.antrc"
-  fi
-
-  # provide default configuration values
-  if [ -z "$rpm_mode" ] ; then
-    rpm_mode=false
-  fi
-  if [ -z "$usejikes" ] ; then
-    usejikes=$use_jikes_default
-  fi
-fi
-
-# Setup Java environment in rpm mode
-if $rpm_mode ; then
-  if [ -f /usr/share/java-utils/java-functions ] ; then
-    . /usr/share/java-utils/java-functions
-    set_jvm
-    set_javacmd
-  fi
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
-  ## resolve links - $0 may be a link to ant's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ANT_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ANT_HOME" ] &&
-    ANT_HOME=`cygpath --unix "$ANT_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# Build local classpath using just the launcher in non-rpm mode or
-# use the Jpackage helper in rpm mode with basic and default jars
-# specified in the ant.conf configuration. Because the launcher is
-# used, libraries linked in ANT_HOME will also be include, but this
-# is discouraged as it is not java-version safe. A user should
-# request optional jars and their dependencies via the OPT_JAR_LIST
-# variable
-if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
-  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
-  # If the user requested to try to add some other jars to the classpath
-  if [ -n "$OPT_JAR_LIST" ] ; then
-    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
-    if [ -n "$_OPTCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
-    fi
-  fi
-
-  # Explicitly add javac path to classpath, assume JAVA_HOME set
-  # properly in rpm mode
-  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
-  fi
-  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
-  fi
-
-  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-  # user CLASSPATH first and ant-found jars after.
-  # In that case, the user CLASSPATH will override ant-found jars
-  #
-  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-  # with ant-found jars first and user CLASSPATH after
-  if [ -n "$CLASSPATH" ] ; then
-    # merge local and specified classpath 
-    if [ -z "$LOCALCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$CLASSPATH"
-    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-    else
-      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-    fi
-
-    # remove class path from launcher -cp option
-    CLASSPATH=""
-  fi
-else
-  # not using rpm_mode; use launcher to determine classpaths
-  if [ -z "$LOCALCLASSPATH" ] ; then
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
-  else
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
-  fi
-fi
-
-if [ -n "$JAVA_HOME" ] ; then
-  # OSX hack to make Ant work with jikes
-  if $darwin ; then
-    OSXHACK="${JAVA_HOME}/../Classes"
-    if [ -d "${OSXHACK}" ] ; then
-      for i in "${OSXHACK}"/*.jar
-      do
-        JIKESPATH="$JIKESPATH:$i"
-      done
-    fi
-  fi
-fi
-
-# Allow Jikes support (off by default)
-if $usejikes; then
-  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  ANT_HOME=`cygpath --$format "$ANT_HOME"`
-  ANT_LIB=`cygpath --$format "$ANT_LIB"`
-  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# Show script help if requested
-if $show_help ; then
-  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
-  echo 'Script Options:'
-  echo '  --help, --h            print this message and ant help'
-  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
-  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
-  echo '                         configuration files'
-  echo '  --usejikes             enable use of jikes by default, unless'
-  echo '                         set explicitly in configuration files'
-  echo '  --execdebug            print ant exec line generated by this'
-  echo '                         launch script'
-  echo '  '
-fi
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$ANT_HOME" in
-    *\\ )
-    ANT_HOME="$ANT_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$JIKESPATH" in
-    *\\ )
-    JIKESPATH="$JIKESPATH\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-# Execute ant using eval/exec to preserve spaces in paths,
-# java options, and ant args
-ant_sys_opts=
-if [ -n "$CYGHOME" ]; then
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
-  else
-    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
-  fi
-else
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
-  fi
-fi
-ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
-if $ant_exec_debug ; then
-    echo $ant_exec_command
-fi
-eval $ant_exec_command

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/ant)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant.bat
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/ant.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,126 +0,0 @@
- at echo off
-
-REM  Copyright 2001,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-
-if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ANT_HOME=%~dp0..
-
-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
-
-set _USE_CLASSPATH=yes
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of arguments (up to the command line limit, anyway).
-set ANT_CMD_LINE_ARGS=%1
-if ""%1""=="""" goto doneStart
-shift
-:setupArgs
-if ""%1""=="""" goto doneStart
-if ""%1""==""-noclasspath"" goto clearclasspath
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
-shift
-goto setupArgs
-
-rem here is there is a -noclasspath in the options
-:clearclasspath
-set _USE_CLASSPATH=no
-shift
-goto setupArgs
-
-rem This label provides a place for the argument list loop to break out
-rem and for NT handling to skip to.
-
-:doneStart
-rem find ANT_HOME if it does not exist due to either an invalid value passed
-rem by the user or the %0 problem on Windows 9x
-if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
-
-rem check for ant in Program Files
-if not exist "%ProgramFiles%\ant" goto checkSystemDrive
-set ANT_HOME=%ProgramFiles%\ant
-goto checkJava
-
-:checkSystemDrive
-rem check for ant in root directory of system drive
-if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
-set ANT_HOME=%SystemDrive%\ant
-goto checkJava
-
-:checkCDrive
-rem check for ant in C:\ant for Win9X users
-if not exist C:\ant\lib\ant.jar goto noAntHome
-set ANT_HOME=C:\ant
-goto checkJava
-
-:noAntHome
-echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
-goto end
-
-:checkJava
-set _JAVACMD=%JAVACMD%
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
-goto checkJikes
-
-:noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=java.exe
-
-:checkJikes
-if not "%JIKESPATH%"=="" goto runAntWithJikes
-
-:runAnt
-if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikes
-if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
-
-:runAntWithJikesNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikesAndClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:end
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-
-:mainEnd
-if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/ant.bat (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/ant.bat)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/antRun	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#
-#  Copyright  2001-2002,2004 The Apache Software Foundation
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#       http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# 
-#
-
-# Args: DIR command
-cd "$1"
-CMD="$2"
-shift
-shift
-
-exec "$CMD" "$@"

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/antRun)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun.bat
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/antRun.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
- at echo off
-
-REM
-REM Copyright  2001-2002,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-if ""%1""=="""" goto runCommand
-
-rem Change drive and directory to %1
-if "%OS%"=="Windows_NT" cd /d ""%1""
-if not "%OS%"=="Windows_NT" cd ""%1""
-shift
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of agruments (up to the command line limit, anyway).
-set ANT_RUN_CMD=%1
-if ""%1""=="""" goto runCommand
-shift
-:loop
-if ""%1""=="""" goto runCommand
-set ANT_RUN_CMD=%ANT_RUN_CMD% %1
-shift
-goto loop
-
-:runCommand
-rem echo %ANT_RUN_CMD%
-%ANT_RUN_CMD%
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antRun.bat (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/antRun.bat)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antx.bat
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/antx.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antx.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,6 +0,0 @@
- at echo off
- at setlocal
-set CLASSPATH=%~dp0..\lib\ant.jar;%CLASSPATH%
-java org.apache.tools.ant.Launcher %*
-rem java -jar %ANT_HOME%\lib\ant.jar org.apache.tools.ant.Launcher
- at endlocal

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/antx.bat (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/antx.bat)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/lcp.bat
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/lcp.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/lcp.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,30 +0,0 @@
-REM
-REM Copyright  2001-2004 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-set _CLASSPATHCOMPONENT=%1
-if ""%1""=="""" goto gotAllArgs
-shift
-
-:argCheck
-if ""%1""=="""" goto gotAllArgs
-set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
-shift
-goto argCheck
-
-:gotAllArgs
-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/bin/lcp.bat (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/bin/lcp.bat)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildfragments (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildfragments)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/aliases.ent
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,96 +0,0 @@
-<!-- list of aliases used to bridge gap between buildmagic defs and jbossbuild -->
-
-
-<path id="apache.commons.classpath">
-  <pathelement path="${apache.collections.lib}/commons-collections.jar"/>
-  <pathelement path="${apache.logging.lib}/commons-logging.jar"/>
-  <pathelement path="${apache.httpclient.lib}/commons-httpclient.jar"/>
-  <pathelement path="${apache.pool.lib}/commons-pool.jar"/>
-  <pathelement path="${apache.discovery.lib}/commons-discovery.jar"/>
-  <pathelement path="${apache.fileupload.lib}/commons-fileupload.jar"/>
-  <pathelement path="${apache.lang.lib}/commons-lang-2.0.jar"/>  
-</path>
-
-<path id="sax.classpath">
-  <pathelement path="${xml-sax.classpath}"/>
-</path>
- 
-<property name="xdoclet-xdoclet.lib" value="${xdoclet.xdoclet.lib}"/>
-<path id="xdoclet.task.classpath">
-  <path refid="xdoclet.xdoclet.classpath"/>
-</path>
-   
-<property name="gjt.jpl-util.lib" value="${gjt.jpl.util.lib}"/>   
-<path id="gjt.jpl-util.classpath">
-   <path refid="gjt.jpl.util.classpath"/>
-</path>   
-
-<property name="opennms.joesnmp.lib" value="${joesnmp.joesnmp.lib}"/>   
-<path id="opennms.joesnmp.classpath">
-   <path refid="joesnmp.joesnmp.classpath"/>
-</path>   
-
-<path id="jacorb.idl.classpath">
-   <path refid="apache.avalon.logkit.classpath"/>
-   <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-</path>
-
-<property name="jacorb.idl.include" value="${jacorb.jacorb.resources}"/>
-<property name="jacorb.jacorb.properties" value="${jacorb.jacorb.resources}"/>
-  
-<property name="sleepycat.lib" value="${sleepycat.sleepycat.lib}"/>
-<path id="sleepycat.classpath">
-   <path refid="sleepycat.sleepycat.classpath"/>
-</path>
-  
-<property name="apache.tomcat55.root" value="${apache.tomcat.root}"/>
-<property name="apache.tomcat55.lib" value="${apache.tomcat.lib}"/>
-<path id="apache.tomcat55.classpath">
-   <path refid="apache.tomcat.classpath"/>
-</path>
-  
-<property name="trove.lib" value="${trove.trove.lib}"/>  
-<path id="trove.classpath">
-   <path refid="trove.trove.classpath"/>
-</path>
-  
-<path id="qdox.classpath">
-   <path refid="qdox.qdox.classpath"/>
-</path>
-  
-<property name="javassist.lib" value="${javassist.javassist.lib}"/>
-<path id="javassist.classpath">
-  <path refid="javassist.javassist.classpath"/>
-</path>
-  
-<property name="hibernate.lib" value="${hibernate.hibernate.lib}"/>  
-<path id="hibernate3.classpath">
-  <path refid="hibernate.hibernate.classpath"/>
-</path>
-
-<property name="odmg.lib" value="${odmg.odmg.lib}"/>
-<path id="odmg.classpath">
-  <path refid="odmg.odmg.classpath"/>
-</path>
-
-<property name="cglib.lib" value="${cglib.cglib.lib}"/>
-<path id="cglib.classpath">
-  <path refid="cglib.cglib.classpath"/>  
-</path>
-
-<path id="ejb3-persistence.classpath">
-   <path refid="hibernate.annotations.classpath"/>
-   <path refid="hibernate.entitymanager.classpath"/>
-</path>
-
-<property name="spring.lib" value="${spring.spring.lib}"/>
-<path id="spring.classpath">
-  <path refid="spring.spring.classpath"/>  
-</path>
-
-<!-- Ant -->
-<property name="apache.ant.root" value="${project.tools}"/>
-<property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-<path id="apache.ant.classpath">
-  <pathelement path="${apache.ant.lib}/ant.jar"/>
-</path>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/aliases.ent (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/aliases.ent)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/autoload.properties
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  BuildMagic tasks which will be autoloaded.                              ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: autoload.properties,v 1.8 2004/11/24 02:07:35 starksm Exp $ ###
-
-### Stuff that glues things together  ###
-
-resolveproperties=org.jboss.tools.buildmagic.task.ResolveProperties
-resolver=org.jboss.tools.buildmagic.task.ResolveProperties
-propertyfilter=org.jboss.tools.buildmagic.task.PropertyFilter
-require=org.jboss.tools.buildmagic.task.Require
-call=org.jboss.tools.buildmagic.task.CallTarget
-Ant=org.jboss.tools.buildmagic.task.Ant
-
-### Project/Module tasks ###
-
-execmodules=org.jboss.tools.buildmagic.task.module.ExecuteModules
-projectinfo=org.jboss.tools.buildmagic.task.module.ProjectInfo
-moduleinfo=org.jboss.tools.buildmagic.task.module.ModuleInfo
-moduleconfig=org.jboss.tools.buildmagic.task.module.ModuleConfig
-moduleinit=org.jboss.tools.buildmagic.task.module.ModuleInit
-
-### Configuration Helpers ###
-library=org.jboss.tools.buildmagic.task.config.Library
-modulelibrary=org.jboss.tools.buildmagic.task.config.ModuleLibrary
-libraryset=org.jboss.tools.buildmagic.task.config.LibrarySet
-
-### Misc ###
-
-projecthelp=org.jboss.tools.buildmagic.task.ProjectHelp
-_puke=org.jboss.tools.buildmagic.task.util.Puke
-_dump=org.jboss.tools.buildmagic.task.util.Dump
-
-### Unused ??? ###
-
-#set=org.jboss.tools.buildmagic.task.Set
-#unset=org.jboss.tools.buildmagic.task.Unset
-#appendpath=org.jboss.tools.buildmagic.task.AppendPath
-#findroot=org.jboss.tools.buildmagic.task.FindRoot

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/autoload.properties (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/autoload.properties)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/build-common.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,905 +0,0 @@
-<project name="common tasks">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}" 
-	        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-  Unsupported Ant version:
-    ${ant.version}
-  Please install a version which is compatible with Ant ${buildmagic.ant16.baseversion}.
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Define the environment varaible. This needs to be first. -->
-  <property environment="env"/>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-  <property name="project.build" value="${project.root}/build"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-
-  <!-- Include user and project property overrides. -->
-  <import file="version-info.xml" />
-  <property file="${project.build}/local.properties"/>
-
-    <available file="${module.root}/etc/local.properties-example"
-	       property="init.have-local-properties"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" unless="build-bypass.disabled">
-
-   <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="**/*"/>
-      <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-      <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-      <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-      <srcfiles dir="${project.tools}" includes="**/*"/>
-   </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-   <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-   </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean">
-   <available file="${module.output}" property="module.output.present"/>  
-   <antcall target="_buildmagic:clean-internal"/>
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal" if="module.output.present">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes/**"/>
-      </fileset>
-    </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-	zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-    <!-- Where source files live -->
-    <property name="source.java" value="${module.source}/main"/>
-    <property name="source.etc" value="${module.source}/etc"/>
-    <property name="source.bin" value="${module.source}/bin"/>
-    <property name="source.docs" value="${module.source}/docs"/>
-    <property name="source.resources" value="${module.source}/resources"/>
-    <property name="source.examples" value="${module.source}/examples"/>
-
-    <!-- Where build generated files will go -->
-    <property name="build.classes" value="${module.output}/classes"/>
-    <property name="build.lib" value="${module.output}/lib"/>
-    <property name="build.api" value="${module.output}/api"/>
-    <property name="build.etc" value="${module.output}/etc"/>
-    <property name="build.bin" value="${module.output}/bin"/>
-    <property name="build.docs" value="${module.output}/docs"/>
-    <property name="build.parsers" value="${module.output}/gen-parsers"/>
-    <property name="build.resources" value="${module.output}/resources"/>
-    <property name="build.examples" value="${module.output}/examples"/>
-    <property name="build.reports" value="${module.output}/reports"/>
-    <property name="build.gen" value="${module.output}/gen"/>
-    <property name="build.gen-src" value="${module.output}/gen-src"/>
-    <property name="build.todo" value="${module.output}/todo"/>
-
-    <!-- Install/Release structure -->
-    <property name="install.id" value="${module.name}-${module.version}"/>
-    <property name="release.id" value="${install.id}"/>
-    <property name="install.root" value="${module.output}/${install.id}"/>
-
-    <!-- The combined thirdparty classpath -->
-    <path id="thirdparty.classpath">
-      <path refid="library.classpath"/>
-      <path refid="dependentmodule.classpath"/>
-    </path>
-
-    <!-- This module is based on Java 1.4 -->
-    <property name="javac.target" value="1.4"/>
-    <property name="javac.source" value="1.4"/>
-
-    <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-    <property name="rmic.stubVersion" value="1.2"/>
-
-    <!-- classpath and local.classpath must have a value using with a path -->
-    <property name="classpath" value=""/>
-    <property name="local.classpath" value=""/>
-
-    <!-- The classpath required to build classes. -->
-    <path id="javac.classpath">
-      <pathelement path="${classpath}"/>
-      <pathelement path="${local.classpath}"/>
-      <path refid="thirdparty.classpath"/>
-    </path>
-
-    <!-- The classpath required to build javadocs. -->
-    <path id="javadoc.classpath">
-      <path refid="javac.classpath"/>
-    </path>
-
-    <!-- The default prefix -->
-    <property name="jar.prefix" value="jboss-${module.name}"/>
-
-    <!-- The default server and client jar name -->
-    <property name="jar.server.name" value="${jar.prefix}.jar"/>
-    <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-    <!-- Packages to include when generating api documentation -->
-    <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <javac destdir="${build.classes}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-         depend="${javac.depend}"
-         verbose="${javac.verbose}"
-         deprecation="${javac.deprecation}"
-         includeAntRuntime="${javac.include.ant.runtime}"
-         includeJavaRuntime="${javac.include.java.runtime}"
-         failonerror="${javac.fail.onerror}">
-     <src path="${source.java}:${build.gen-src}"/>
-     <classpath refid="javac.classpath"/>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" unless="mbean-bypass.disabled">
-
-   <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="${mbean.includes}"/>
-   </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-        depends="_buildmagic:mbean-bypass-checker" 
-        unless="mbean-bypass.on">
-
-    <taskdef name="jmxdoclet"
-             classname="xdoclet.modules.jmx.JMXDocletTask"
-             classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.gen-src}"/>
-    
-    <jmxdoclet destdir="${build.gen-src}"
-               excludedtags="@version, at author">
-      <fileset dir="${source.java}" 
-               includes="${mbean.includes}"/>
-      <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    </jmxdoclet>
-    
-    <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <javac destdir="${build.test}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    failonerror="${javac.fail.onerror}">
-     <src path="${source.test}:${build.gen.test}"/>
-     <classpath>
-       <path refid="javac.classpath"/>
-       <pathelement location="${build.classes}"/>
-     </classpath>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-       <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-
-</target>
-
-<target name="_default:fix-bin">
-  <fixcrlf srcdir="${build.bin}"
-        eol="lf" eof="remove"
-        includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}" 
-        eol="crlf" eof="remove"
-        includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-       <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" unless="compile.disable">
-  <rmic base="${build.classes}"
-        verify="${rmic.verify}"
-   iiop="${rmic.iiop}"
-   iiopopts="${rmic.iiopops}"
-   idl="${rmic.idl}"
-   idlopts="${rmic.idlops}"
-   debug="${rmic.debug}"
-        stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-    <!-- Build the server jar -->
-    <jar jarfile="${build.lib}/${jar.server.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.server.includes}"/>
-    </jar>
-
-    <!-- Build jbossmq-client.jar -->
-    <jar jarfile="${build.lib}/${jar.client.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.client.includes}"/>
-    </jar>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-   depends="docs-api, docs-todo"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-
-<target name="docs-javadocs-check">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-         targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-  <!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs" 
-     depends="docs-javadocs-check" 
-     unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="${javadoc.packages}"
-             sourcepath="${source.java}:${module.output}/gen-src"
-             destdir="${build.api}"
-             classpathref="javadoc.classpath"
-             windowtitle="${javadoc.windowtitle}"
-        splitindex="${javadoc.splitindex}"
-             author="${javadoc.author}"
-             version="${javadoc.version}"
-             public="${javadoc.public}"
-             package="${javadoc.package}"
-             protected="${javadoc.protected}"
-             private="${javadoc.private}"
-             use="${javadoc.use}"
-        verbose="${javadoc.verbose}"> 
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2002 JBoss Group, LLC. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-    
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-      
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false" />
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false" />
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false" />
-    <tag name="ejb.pk" description="ejb" enabled="false" />
-    <tag name="ejb.bean" description="ejb" enabled="false" />
-    <tag name="ejb.transaction" description="ejb" enabled="false" />
-    <tag name="ejb.finder" description="ejb" enabled="false" />
-    <tag name="ejb.relation" description="ejb" enabled="false" />
-    <tag name="ejb.create-method" description="ejb" enabled="false" />
-    
-    <tag name="jboss.query" description="jboss" enabled="false" />
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false" />
-    <tag name="jboss.load-group" description="jboss" enabled="false" />
-    <tag name="jboss.persistence" description="jboss" enabled="false" />
-    <tag name="jboss.entity-command" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false" />
-    <tag name="jboss.relation-table" description="jboss" enabled="false" />
-    <tag name="jboss.table-attribute" description="jboss" enabled="false" />
-    
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false" />
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false" />
-    <tag name="jboss.method-attributes" description="jboss" enabled="false" />
-    
-  </javadoc>
-</target>
-
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-<target name="xdoclet-task-classpath-check" unless="xdoclet.task.classpath">
-    <path id="xdoclet.task.classpath">
-      <path refid="xdoclet.base.classpath"/>
-      <path refid="apache.commons.classpath"/>
-      <path refid="javac.classpath" />
-    </path>
-    <property name="xdoclet.task.classpath" 
-	      refid="xdoclet.task.classpath"/>
-</target>
-
-<target name="docs-todo-check">
-      <!-- if index.html is newer than the sources we are up to date -->
-      <uptodate property="docs-todo.disable"
-         targetfile="${build.todo}/index.html">
-         <srcfiles dir="${source.java}" includes="**/*.java"/>
-      </uptodate>
-  </target>
-
-  <!-- Generate TODO list from @todo tags -->
-  <target name="docs-todo" 
-     depends="docs-todo-check" 
-     unless="docs-todo.disable">
-
-  <taskdef name="todo"
-               classname="xdoclet.modules.doc.DocumentDocletTask"
-               classpath="${xdoclet.task.classpath}"/>
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-
-    <info/>
-  </todo>
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-  <target name="jmx-docs">
-    <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.jmx-doc}"/>
-    <jmxdoclet
-        destdir="${build.jmx-doc}"
-             force="false"
-        excludedtags="@version, at author">
-      <fileset dir="${source.java}">
-        <include name="**/*.java"/>
-      </fileset>
-      <jbossXmlDoc/>
-    </jmxdoclet>
-
-  </target>
-
-  <!-- Generate the plain HTML jmx docs -->
-  <target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-    <!-- Force the use of SAXON XSLT -->
-    <property system="true" 
-         name="javax.xml.transform.TransformerFactory"
-         value="com.icl.saxon.TransformerFactoryImpl"/>
-
-    <mkdir dir="${build.jmx-api}"/>
-    <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-      processor="trax"
-      extension=".html"
-      basedir="${build.jmx-doc}"
-      destdir="${build.jmx-api}">
-       <include name="**/*.xml"/>
-       <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-       <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-    </style>
-
-  </target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean" 
-     depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber" 
-     depends="_buildmagic:clobber, clean">
-</target>
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-  <!-- ================================================================== -->
-  <!-- Project (build module) Targets                                     -->
-  <!-- ================================================================== -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-    <!-- Skip any missing modules and issue a warning -->
-    <property name="executemodules.skipmissing" value="true"/>
-
-    <!-- The header and footer displayed during each module execution -->
-    <property name="executemodules.header"><![CDATA[
- ============================================================== 
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-    <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-    ]]></property>
-
-    <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag, 
-       version.name, 
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-    </property>
-
-    <!-- Show the module configuration -->
-    <echo>groups:  ${groups}</echo>
-    <echo>modules: ${modules}</echo>
-
-    <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean">
-  <execmodules target="clean" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-</project>
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/build-common.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/build-common.xml)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1135 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-  <property name="javac.debug" value="true"/>  
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent~
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1137 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-
-   <echo message="hereiam"/>
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="off"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent~ (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/buildmagic.ent~)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.properties
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Copyright (c) 1998-2000 by Jason Dillon <jason at planet57.com>            ##
-##                                                                          ##
-##  This file is part of BuildMagic; an extension to Ant.                   ##
-##                                                                          ##
-##  This library is free software; you can redistribute it and/or modify    ##
-##  it under the terms of the GNU Lesser General Public License as          ##
-##  published by the Free Software Foundation; either version 2 of the      ##
-##  License, or (at your option) any later version.                         ##
-##                                                                          ##
-##  This library is distributed in the hope that it will be useful, but     ##
-##  WITHOUT ANY WARRANTY; without even the implied warranty of              ##
-##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       ##
-##  Lesser General Public License for more details.                         ##
-##                                                                          ##
-### ====================================================================== ###
-##                                                                          ##
-##  Common Properties                                                       ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: common.properties,v 1.4 2004/11/24 02:07:36 starksm Exp $ ###
-
-buildmagic.resolveproperties.force=false
-buildmagic.propertyfilter.all=true
-
-### Jython Support ###
-
-true=1
-false=0
-
-### Misc ###
-
-/=${file.separator}
-sun.boot.classpath=${sun.boot.class.path}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.properties (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/common.properties)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,324 +0,0 @@
-<!-- $Id: common.xml,v 1.7 2004/11/24 02:07:36 starksm Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Load Buildmagic extention tasks. -->
-<taskdef resource="org/jboss/tools/buildmagic/task/autoload.properties"/>
-<taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"/>
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init">
-  <!-- fail unless we have been started from the build script -->
-  <require property="build.script">
-
-    The build system MUST be executed with one of the provided build scripts.
-
-  </require>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.Void" property="HAVE_JDK_1.1"/>
-  <available classname="java.lang.ThreadLocal" property="HAVE_JDK_1.2"/>
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <!-- Setup the basic project roots. -->
-  <property name="_project.root" value=".."/>
-  <path id="project.root"><pathelement location="${_project.root}"/></path>
-  <property name="project.root" refid="project.root"/> 
-  <property name="project.build" value="${project.root}/build"/>
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the project environment. -->
-  <property file="${project.build}/local.properties"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-
-  <available file="${module.root}/etc/local.properties-example"
-        property="init.have-local-properties"/>
-  <call target="_buildmagic:init:local-properties" if="init.have-local-properties"/>
-
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property resource="org/jboss/tools/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property resource="org/jboss/tools/buildmagic/task.properties"/>
-
-  <!-- Late bind properties & install filters -->
-  <resolver force="${buildmagic.resolveproperties.force}"/>
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-        tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <record name="${basedir}/build.log" append="no"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-  <delete dir="${module.output}"/>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-
-  <!-- 
-     | Try to stop the build log before we delete the file.
-   -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-   zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/common.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/common.xml)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/libraries.ent
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,633 +0,0 @@
-<!-- $Id: libraries.ent,v 1.79 2005/11/04 15:36:44 alesj Exp $ -->
-
-  <!-- Spring -->
-  <property name="spring.root" value="${project.thirdparty}/spring"/>
-  <property name="spring.lib" value="${spring.root}/lib"/>
-  <path id="spring.classpath">
-     <pathelement path="${spring.lib}/spring-beans.jar"/>
-     <pathelement path="${spring.lib}/spring-core.jar"/>
-     <pathelement path="${spring.lib}/spring-context.jar"/>
-  </path>
-  <path id="spring-example.classpath">
-     <pathelement path="${spring.lib}/spring-aop.jar"/>
-     <pathelement path="${spring.lib}/spring-web.jar"/>
-     <pathelement path="${spring.lib}/spring-webmvc.jar"/>
-   </path>
-
-  <!-- Dom4j -->
-  <property name="dom4j.dom4j.root" value="${project.thirdparty}/dom4j-dom4j"/>
-  <property name="dom4j.dom4j.lib" value="${dom4j.dom4j.root}/lib"/>
-  <path id="dom4j.dom4j.classpath">
-    <pathelement path="${dom4j.dom4j.lib}/dom4j.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="jaxen.jaxen.lib" value="${dom4j.dom4j.root}/lib"/>  
-
-  <!-- Javassist -->
-  <property name="javassist.root" value="${project.thirdparty}/javassist"/>
-  <property name="javassist.lib" value="${javassist.root}/lib"/>
-  <path id="javassist.classpath">
-    <pathelement path="${javassist.lib}/javassist.jar"/>
-  </path>
-
-  <!-- qdox -->
-  <property name="qdox.root" value="${project.thirdparty}/qdox"/>
-  <property name="qdox.lib" value="${qdox.root}/lib"/>
-  <path id="qdox.classpath">
-    <pathelement path="${qdox.lib}/qdox.jar"/>
-  </path>
-
-  <!-- hibernate3 -->
-  <property name="hibernate.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.lib" value="${hibernate.root}/lib"/>
-  <path id="hibernate3.classpath">
-    <pathelement path="${hibernate.lib}/hibernate3.jar"/>
-    <pathelement path="${hibernate.lib}/asm.jar"/>
-    <pathelement path="${hibernate.lib}/asm-attrs.jar"/>
-    <pathelement path="${hibernate.lib}/antlr*.jar"/>
-  </path>
-  
-  <!-- hibernate entity manager -->
-  <property name="hibernate.entitymanager.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.entitymanager.lib" value="${hibernate.entitymanager.root}/lib"/>
-  <path id="hibernate.entitymanager.classpath">
-    <pathelement path="${hibernate.entitymanager.lib}/ejb3-persistence.jar"/>
-    <pathelement path="${hibernate.entitymanager.lib}/hibernate-entitymanager.jar"/>
-  </path>
-  
-  <!-- hibernate annotations manager -->
-  <property name="hibernate.annotations.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.annotations.lib" value="${hibernate.annotations.root}/lib"/>
-  <path id="hibernate.annotations.classpath">
-    <pathelement path="${hibernate.annotations.lib}/hibernate-annotations.jar"/>
-  </path>  
-  
-  <!-- asm alias used for bridging to thirdparty build-->
-  <property name="asm.asm.root" value="${project.thirdparty}/hibernate"/>
-  <property name="asm.asm.lib" value="${asm.asm.root}/lib/"/>
-  <property name="asm.asm.resources" value="${asm.asm.root}/resources/"/>
-  <path id="asm.asm.classpath">
-     <pathelement path="${asm.asm.lib}/asm.jar"/>
-     <pathelement path="${asm.asm.lib}/asm-attrs.jar"/>
-  </path>
-  
-
-  <!-- ejb3-persistence -->
-  <path id="ejb3-persistence.classpath">
-    <pathelement path="${hibernate.lib}/hibernate-annotations.jar"/>
-    <pathelement path="${hibernate.lib}/hibernate-entitymanager.jar"/>
-    <pathelement path="${hibernate.lib}/ejb3-persistence.jar"/>
-  </path>
-
-  <!-- ODMG (needed for Hibernate) -->
-  <property name="odmg.root" value="${project.thirdparty}/odmg"/>
-  <property name="odmg.lib" value="${odmg.root}/lib"/>
-  <path id="odmg.classpath">
-    <pathelement path="${odmg.lib}/odmg-3.0.jar"/>
-  </path>
-
-  <!-- CGLIB (needed for Hibernate) -->
-  <property name="cglib.root" value="${project.thirdparty}/cglib"/>
-  <property name="cglib.lib" value="${cglib.root}/lib"/>
-  <path id="cglib.classpath">
-    <pathelement path="${cglib.lib}/cglib-2.1.1.jar"/>
-  </path>
-
-
-  <!-- Trove -->
-  <property name="trove.root" value="${project.thirdparty}/trove"/>
-  <property name="trove.lib" value="${trove.root}/lib"/>
-  <path id="trove.classpath">
-    <pathelement path="${trove.lib}/trove.jar"/>
-  </path>
-
-  <!-- Ant -->
-  <property name="apache.ant.root" value="${project.tools}"/>
-  <property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-  <path id="apache.ant.classpath">
-    <pathelement path="${apache.ant.lib}/ant.jar"/>
-  </path>
-
-  <!-- Apache Avalon -->
-  <property name="apache.avalon.root" value="${project.thirdparty}/apache-avalon"/>
-  <property name="apache.avalon.lib" value="${apache.avalon.root}/lib"/>
-  <path id="apache.avalon.classpath">
-    <pathelement path="${apache.avalon.lib}/avalon-framework.jar"/>
-  </path>
-  <property name="apache.avalon.logkit.lib" value="${apache.avalon.lib}"/>  
-  <path id="apache.avalon.logkit.classpath">
-    <pathelement path="${apache.avalon.logkit.lib}/logkit.jar"/>
-  </path>
-
-  <!-- Apache BCEL -->
-  <property name="apache.bcel.root" value="${project.thirdparty}/apache-bcel"/>
-  <property name="apache.bcel.lib" value="${apache.bcel.root}/lib"/>
-  <path id="apache.bcel.classpath">
-    <pathelement path="${apache.bcel.lib}/bcel.jar"/>
-  </path>
-
-  <!-- Apache Commons -->
-  <property name="apache.commons.root" value="${project.thirdparty}/apache-commons"/>
-  <property name="apache.commons.lib" value="${apache.commons.root}/lib"/>
-  <path id="apache.commons.classpath">
-    <pathelement path="${apache.commons.lib}/commons-collections.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-pool.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-discovery.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-fileupload.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-lang-2.0.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-vfs.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="apache.collections.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.codec.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.beanutils.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.digester.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.httpclient.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.logging.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.pool.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.fileupload.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.lang.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.vfs.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.discovery.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.validator.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.logging.api.lib" value="${apache.commons.root}/lib"/>
-  
-  <path id="apache.httpclient.classpath">
-     <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <path id="apache.logging.classpath">
-     <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-  </path>
-  
-  <path id="apache.beanutils.classpath">
-     <pathelement path="${apache.commons.lib}/commons-beanutils.jar"/>
-  </path>
-  
-  <path id="apache.validator.classpath">
-       <pathelement path="${apache.commons.lib}/commons-validator-1.1.3.jar"/>
-  </path>
-
-  <!-- Apache Log4j -->
-  <property name="apache.log4j.root" value="${project.thirdparty}/apache-log4j"/>
-  <property name="apache.log4j.lib" value="${apache.log4j.root}/lib"/>
-  <path id="apache.log4j.classpath">
-    <pathelement path="${apache.log4j.lib}/log4j.jar"/>
-  </path>
-
-  <!-- Apache Lucene -->
-  <property name="apache.lucene.root"
-    value="${project.thirdparty}/apache-lucene"/>
-  <property name="apache.lucene.lib" value="${apache.lucene.root}/lib"/>
-  <path id="apache.lucene.classpath">
-    <pathelement path="${apache.lucene.lib}/lucene.jar"/>
-  </path>
-
-   <!-- Apache Myfaces -->
-   <property name="apache.myfaces.root"
-     value="${project.thirdparty}/apache-myfaces"/>
-   <property name="apache.myfaces.lib" value="${apache.myfaces.root}/lib"/>
-
-  <!-- Apache Tomcat 5.5.x -->
-  <property name="apache.tomcat55.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.tomcat55.lib" value="${apache.tomcat55.root}"/>  
-  <path id="apache.tomcat55.classpath">
-    <fileset dir="${apache.tomcat55.root}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-  
-  <!-- Apache commons-el -->
-  <property name="commons.el.root" value="${apache.tomcat55.root}"/>
-  <property name="commons.el.lib" value="${apache.tomcat55.root}"/>
-  <path id="commons.el.classpath">
-     <pathelement path="${commons.el.lib}/commons-el.jar"/>
-  </path> 
-  
-  <!-- Apache Modeler -->
-  <property name="apache.modeler.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.modeler.lib" value="${apache.modeler.root}"/>
-  <path id="apache.modeler.classpath">
-    <fileset dir="${apache.modeler.root}">
-      <include name="commons-modeler.jar" />
-    </fileset>
-  </path>
-
-  <!-- Apache Velocity -->
-  <property name="apache.velocity.root" value="${project.thirdparty}/apache-velocity"/>
-  <property name="apache.velocity.lib" value="${apache.velocity.root}/lib"/>
-  <path id="apache.velocity.classpath">
-    <pathelement path="${apache.velocity.lib}/velocity.jar"/>
-  </path>
-
-  <!-- Apache Xerces -->
-  <property name="apache.xerces.root" value="${project.thirdparty}/apache-xerces"/>
-  <property name="apache.xerces.lib" value="${apache.xerces.root}/lib"/>
-  <path id="apache.xerces.classpath">
-    <pathelement path="${apache.xerces.lib}/xml-apis.jar"/>
-    <pathelement path="${apache.xerces.lib}/xercesImpl.jar"/>
-    <pathelement path="${apache.xerces.lib}/resolver.jar"/>
-  </path>
-
-  <!-- Apache Xalan -->
-  <property name="apache.xalan.root" value="${project.thirdparty}/apache-xalan"/>
-  <property name="apache.xalan.lib" value="${apache.xalan.root}/lib"/>
-  <path id="apache.xalan.classpath">
-    <pathelement path="${apache.xalan.lib}/xalan.jar"/>
-    <path refid="apache.xerces.classpath"/>
-  </path>
-
-   <!-- Apache Scout -->
-    <property name="apache.scout.root" value="${project.thirdparty}/apache-scout"/>
-    <property name="apache.scout.lib" value="${apache.scout.root}/lib"/>
-    <path id="apache.scout.classpath">
-      <pathelement path="${apache.scout.lib}/scout.jar"/>
-    </path>
-
-  <!-- Apache Slide -->
-  <property name="apache.slide.root" value="${project.thirdparty}/apache-slide"/>
-  <property name="apache.slide.lib" value="${apache.slide.root}/client/lib"/>
-  <path id="apache.slide.classpath">
-    <pathelement path="${apache.slide.lib}/webdavlib.jar"/>
-    <pathelement path="${apache.slide.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <!-- Apache JaxMe2 -->
-  <property name="apache.jaxme.root" value="${project.thirdparty}/apache-jaxme"/>
-  <property name="apache.jaxme.lib" value="${apache.jaxme.root}/lib"/>
-  <path id="apache.jaxme.classpath">
-    <pathelement path="${apache.jaxme.lib}/jaxmexs.jar"/>
-  </path>
-
-  <!-- Apache WSS4J -->
-  <property name="apache.wss4j.root" value="${project.thirdparty}/apache-wss4j"/>
-  <property name="apache.wss4j.lib" value="${apache.wss4j.root}/lib"/>
-  <path id="apache.wss4j.classpath">
-    <pathelement path="${apache.wss4j.lib}/wss4j.jar"/>
-  </path>
-
-  <!-- Apache XMLSec -->
-  <property name="apache.xmlsec.root" value="${project.thirdparty}/apache-xmlsec"/>
-  <property name="apache.xmlsec.lib" value="${apache.xmlsec.root}/lib"/>
-  <path id="apache.xmlsec.classpath">
-    <pathelement path="${apache.xmlsec.lib}/xmlsec.jar"/>
-  </path>
-
-  <!-- Bouncy Castle JCE Provider -->
-  <property name="bouncycastle.root" value="${project.thirdparty}/bouncycastle"/>
-  <property name="bouncycastle.lib" value="${bouncycastle.root}/lib"/>
-  <path id="bouncycastle.classpath">
-    <pathelement path="${bouncycastle.lib}/bcprov-jdk14-122.jar"/>
-  </path>
-
-  <!-- OpenSAML -->
-  <property name="opensaml.root" value="${project.thirdparty}/opensaml"/>
-  <property name="opensaml.lib" value="${opensaml.root}/lib"/>
-  <path id="opensaml.classpath">
-    <pathelement path="${opensaml.lib}/opensaml.jar"/>
-  </path>
-
-  <!-- GNU Regex -->
-  <property name="gnu.regexp.root" value="${project.thirdparty}/gnu-regexp"/>
-  <property name="gnu.regexp.lib" value="${gnu.regexp.root}/lib"/>
-  <path id="gnu.regexp.classpath">
-    <pathelement path="${gnu.regexp.lib}/gnu-regexp.jar"/>
-  </path>
-
-  <!-- GNU Getopt -->
-  <property name="gnu.getopt.root" value="${project.thirdparty}/gnu-getopt"/>
-  <property name="gnu.getopt.lib" value="${gnu.getopt.root}/lib"/>
-  <path id="gnu.getopt.classpath">
-    <pathelement path="${gnu.getopt.lib}/getopt.jar"/>
-  </path>
-
-  <!-- org.jdom -->
-  <property name="jdom.root" value="${project.thirdparty}/jdom-beta-7"/>
-  <property name="jdom.lib" value="${jdom.root}/lib"/>
-  <path id="jdom.classpath">
-    <pathelement path="${jdom.lib}/jdom.jar"/>
-  </path>
-
-  <!-- JBoss -->
-  <property name="jboss.external.root" value="${project.thirdparty}/jboss"/>
-  <property name="jboss.remoting.root" value="${jboss.external.root}/remoting"/>
-  <property name="jboss.remoting.lib" value="${jboss.remoting.root}/lib"/>
-  <path id="jboss.remoting.classpath">
-    <pathelement path="${jboss.remoting.lib}/jboss-remoting.jar"/>
-  </path>
-  <property name="jboss.serialization.root" value="${jboss.external.root}/serialization"/>
-  <property name="jboss.serialization.lib" value="${jboss.serialization.root}/lib"/>
-  <path id="jboss.serialization.classpath">
-    <pathelement path="${jboss.serialization.lib}/jboss-serialization.jar"/>
-  </path>
-  <property name="jboss.axis.root" value="${jboss.external.root}/axis"/>
-  <property name="jboss.axis.lib" value="${jboss.axis.root}/lib"/>
-  <path id="jboss.axis.classpath">
-    <pathelement path="${jboss.axis.lib}/axis-ws4ee.jar"/>
-  </path>
-
-  <!-- JUnit -->
-  <property name="junit.junit.root" value="${project.thirdparty}/junit-junit"/>
-  <property name="junit.junit.lib" value="${junit.junit.root}/lib"/>
-  <path id="junit.junit.classpath">
-    <pathelement path="${junit.junit.lib}/junit.jar"/>
-  </path>
-
-  <!-- EDU.oswego.cs.dl.util.concurrent -->
-  <property name="oswego.concurrent.root" value="${project.thirdparty}/oswego-concurrent"/>
-  <property name="oswego.concurrent.lib" value="${oswego.concurrent.root}/lib"/>
-  <path id="oswego.concurrent.classpath">
-    <pathelement path="${oswego.concurrent.lib}/concurrent.jar"/>
-  </path>
-
-  <!-- org.xml.sax (SAX2 & SAX2 Extensions) -->
-  <property name="sax.root" value="${project.thirdparty}/xml-sax"/>
-  <property name="sax.lib" value="${sax.root}/lib"/>
-  <path id="sax.classpath">
-    <pathelement path="${sax.lib}/sax2.jar"/>
-    <pathelement path="${sax.lib}/sax2-ext.jar"/>
-  </path>
-
-  <!-- IBM WSDL4j -->
-  <property name="ibm.wsdl4j.root" value="${project.thirdparty}/ibm-wsdl4j"/>
-  <property name="ibm.wsdl4j.lib" value="${ibm.wsdl4j.root}/lib"/>
-  <path id="ibm.wsdl4j.classpath">
-    <pathelement path="${ibm.wsdl4j.lib}/wsdl4j.jar"/>
-  </path>
-
-  <!-- GJT JPL-Util -->
-  <property name="gjt.jpl-util.root" value="${project.thirdparty}/gjt-jpl-util"/>
-  <property name="gjt.jpl-util.lib" value="${gjt.jpl-util.root}/lib"/>
-  <path id="gjt.jpl-util.classpath">
-    <pathelement path="${gjt.jpl-util.lib}/jpl-util.jar"/>
-    <pathelement path="${gjt.jpl-util.lib}/jpl-pattern.jar"/>
-  </path>
-
-  <!-- Hypersonic SQL -->
-  <property name="hsqldb.hsqldb.root" value="${project.thirdparty}/hsqldb-hsqldb"/>
-  <property name="hsqldb.hsqldb.lib" value="${hsqldb.hsqldb.root}/lib"/>
-  <path id="hsqldb.hsqldb.classpath">
-    <pathelement path="${hsqldb.hsqldb.lib}/hsqldb.jar"/>
-  </path>
-
-  <!-- JacORB -->
-  <property name="jacorb.jacorb.root" value="${project.thirdparty}/jacorb-jacorb"/>
-  <property name="jacorb.jacorb.lib" value="${jacorb.jacorb.root}/lib"/>
-  <path id="jacorb.jacorb.classpath">
-    <pathelement path="${jacorb.jacorb.lib}/jacorb.jar"/>
-  </path>
-  <path id="jacorb.idl.classpath">
-    <path refid="apache.avalon.logkit.classpath"/>
-    <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-  </path>
-  <property name="jacorb.idl.include" value="${jacorb.jacorb.root}/idl"/>
-  <property name="jacorb.jacorb.resources" value="${jacorb.jacorb.root}/conf/default"/>
-
-  <!-- JGroups -->
-  <property name="jgroups.jgroups.root" value="${project.thirdparty}/javagroups-javagroups"/>
-  <property name="jgroups.jgroups.lib" value="${jgroups.jgroups.root}/lib"/>
-  <path id="jgroups.jgroups.classpath">
-    <pathelement path="${jgroups.jgroups.lib}/jgroups.jar"/>
-  </path>
-
-  <!-- Sleepycat -->
-  <property name="sleepycat.root" value="${project.thirdparty}/sleepycat"/>
-  <property name="sleepycat.lib" value="${sleepycat.root}/lib"/>
-  <path id="sleepycat.classpath">
-     <pathelement path="${sleepycat.lib}/je.jar"/>
-  </path>
-
-
-  <!-- jUDDI -->
-  <property name="juddi.juddi.root" value="${project.thirdparty}/juddi-juddi"/>
-  <property name="juddi.juddi.lib" value="${juddi.juddi.root}/lib"/>
-  <path id="juddi.juddi.classpath">
-    <pathelement path="${juddi.juddi.lib}/juddi.jar"/>
-  </path>
-
-  <!-- JUnitEJB -->
-  <property name="junitejb.junitejb.root" value="${project.thirdparty}/junitejb/junitejb"/>
-  <property name="junitejb.junitejb.lib" value="${junitejb.junitejb.root}/lib"/>
-  <path id="junitejb.junitejb.classpath">
-    <pathelement path="${junitejb.junitejb.lib}/junitejb.jar"/>
-  </path>
-
-  <!-- Sun JavaBeans Activation Framework (JAF) -->
-  <property name="sun.jaf.root" value="${project.thirdparty}/sun-jaf"/>
-  <property name="sun.jaf.lib" value="${sun.jaf.root}/lib"/>
-  <path id="sun.jaf.classpath">
-    <pathelement path="${sun.jaf.lib}/activation.jar"/>
-  </path>
-
-   <!-- Sun JavaMail -->
-   <property name="sun.javamail.root" value="${project.thirdparty}/sun-javamail"/>
-   <property name="sun.javamail.lib" value="${sun.javamail.root}/lib"/>
-   <path id="sun.javamail.classpath">
-     <pathelement path="${sun.javamail.lib}/mail.jar"/>
-   </path>
-
-  <!-- Sun Java XML Parser (JAXP) -->
-  <property name="sun.jaxp.root" value="${project.thirdparty}/sun-jaxp"/>
-  <property name="sun.jaxp.lib" value="${sun.jaxp.root}/lib"/>
-  <path id="sun.jaxp.classpath">
-    <pathelement path="${sun.jaxp.lib}/jaxp.jar"/>
-    <pathelement path="${sun.jaxp.lib}/crimson.jar"/>
-    <pathelement path="${sun.jaxp.lib}/xalan.jar"/>
-  </path>
-
-  <!-- Sun Java Media Framework (JMF) -->
-  <property name="sun.jmf.root" value="${project.thirdparty}/sun-jmf"/>
-  <property name="sun.jmf.lib" value="${sun.jmf.root}/lib"/>
-  <path id="sun.jmf.classpath">
-    <pathelement path="${sun.jmf.lib}/jmf.jar"/>
-  </path>
-
-  <!-- Sun Java Management Extensions (JMX) -->
-  <property name="sun.jmx.root" value="${project.thirdparty}/sun-jmx"/>
-  <property name="sun.jmx.lib" value="${sun.jmx.root}/lib"/>
-  <path id="sun.jmx.classpath">
-    <pathelement path="${sun.jmx.lib}/jmxri.jar"/>
-    <pathelement path="${sun.jmx.lib}/jmxtools.jar"/>
-  </path>
-
-  <!-- Sun Java Servlet Technology  -->
-  <property name="sun.servlet.root" value="${project.thirdparty}/sun-servlet"/>
-  <property name="sun.servlet.lib" value="${sun.servlet.root}/lib"/>
-  <path id="sun.servlet.classpath">
-    <pathelement path="${sun.servlet.lib}/servlet-api.jar"/>
-    <pathelement path="${sun.servlet.lib}/jsp-api.jar"/>
-  </path>
-
-  <!-- JavaCC -->
-  <property name="sun.javacc.root" value="${project.thirdparty}/sun-javacc"/>
-  <property name="sun.javacc.lib" value="${sun.javacc.root}/lib"/>
-
-  <!-- BeanShell -->
-  <property name="beanshell.beanshell.root" value="${project.thirdparty}/beanshell-beanshell"/>
-  <property name="beanshell.beanshell.lib" value="${beanshell.beanshell.root}/lib"/>
-  <path id="beanshell.beanshell.classpath">
-    <fileset dir="${beanshell.beanshell.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
-  <!-- Joe SNMP lib -->
-  <property name="opennms.joesnmp.root" value="${project.thirdparty}/opennms/joesnmp"/>
-  <property name="opennms.joesnmp.lib" value="${opennms.joesnmp.root}/lib"/>
-  <path id="opennms.joesnmp.classpath">
-    <pathelement path="${opennms.joesnmp.lib}/joesnmp.jar"/>
-  </path>
-
-  <!-- XDoclet -->
-
-  <!--
-     | xdoclet has appended a version string to all their jars.
-     | I'm using jb4 so we don't have to track them so carefully
-   -->
-  <property name="xdoclet.version" value="jb4"/>
-
-  <!--
-
-  jason: it seems like this hack is better defaulting to the default in thirdparty, if you
-         want to build from CVS then change this to the value below in build/local.properties.
-
-  <!- - this may be overridden by the build/local.properties file to use version from cvs- ->
-  <property name="xdoclet.xdoclet.root" value="${project.root}/xdoclet/output"/>
-
-  -->
-  <property name="xdoclet.xdoclet.root" value="${project.thirdparty}/xdoclet-xdoclet"/>
-
-  <property name="xdoclet.xdoclet.lib" value="${xdoclet.xdoclet.root}/lib"/>
-  <path id="xdoclet.xdoclet.classpath">
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xjavadoc-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-bea-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-ejb-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-java-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jboss-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jdo-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jmx-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-web-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xdoclet-module-${xdoclet.version}.jar"/>
-    <path refid="apache.commons.classpath"/>
-    <path refid="sun.servlet.classpath"/>
-  </path>
-  <path id="xdoclet.task.classpath">
-    <path refid="xdoclet.xdoclet.classpath"/>
-  </path>
-
-  <!-- Informa RSS -->
-  <property name="informa.rss.root" value="${project.thirdparty}/informa-rss"/>
-  <property name="informa.rss.lib" value="${informa.rss.root}/lib"/>
-  <path id="informa.rss.classpath">
-    <pathelement path="${informa.rss.lib}/informa.jar"/>
-  </path>
-
-  <!-- JRegex -->
-  <property name="jregex.jregex.root" value="${project.thirdparty}/jregex-jregex"/>
-  <property name="jregex.jregex.lib" value="${jregex.jregex.root}/lib"/>
-  <path id="jregex.jregex.classpath">
-    <pathelement path="${jregex.jregex.lib}/jregex.jar"/>
-  </path>
-
-  <!-- DNSJava -->
-  <property name="sourceforge.dnsjava.root" value="${project.thirdparty}/sourceforge-dnsjava"/>
-  <property name="sourceforge.dnsjava.lib" value="${sourceforge.dnsjava.root}/lib"/>
-  <path id="sourceforge.dnsjava.classpath">
-    <pathelement path="${sourceforge.dnsjava.lib}/dnsjava-1.4.3.jar"/>
-  </path>
-
-  <!-- M.Wutka's DTD parser -->
-  <property name="wutka.dtdparser.root" value="${project.thirdparty}/wutka-dtdparser"/>
-  <property name="wutka.dtdparser.lib" value="${wutka.dtdparser.root}/lib"/>
-  <path id="wutka.dtdparser.classpath">
-    <pathelement path="${wutka.dtdparser.lib}/dtdparser121.jar"/>
-  </path>
-
-  <!-- JFreeChart -->
-  <property name="jfreechart.jfreechart.root" value="${project.thirdparty}/jfreechart"/>
-  <property name="jfreechart.jfreechart.lib" value="${jfreechart.jfreechart.root}/lib"/>
-  <path id="jfreechart.jfreechart.classpath">
-    <fileset dir="${jfreechart.jfreechart.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
- <!-- ebxmlrr -->
-  <property name="ebxmlrr.ebxmlrr.root" value="${project.thirdparty}/sun-ebxmlrr"/>
-  <property name="ebxmlrr.ebxmlrr.lib" value="${ebxmlrr.ebxmlrr.root}/lib"/>
-  <path id="ebxmlrr.ebxmlrr.classpath">
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/ebxmlrr.jar"/>
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/jaxr-client.jar"/>
-  </path>
-
-  <!-- ANTLR -->
-  <property name="antlr.antlr.root" value="${project.thirdparty}/antlr"/>
-  <property name="antlr.antlr.lib" value="${antlr.antlr.root}/lib"/>
-  <path id="antlr.antlr.classpath">
-    <pathelement path="${antlr.antlr.lib}/antlr-2.7.5H3.jar"/>
-  </path>
-
-  <!-- Apache Taglibs -->
-  <property name="apache.taglibs.root" value="${project.thirdparty}/apache-taglibs"/>
-  <property name="apache.taglibs.lib" value="${apache.taglibs.root}/lib"/>
-  <path id="apache.taglibs.classpath">
-    <pathelement path="${apache.taglibs.lib}/jstl-1.1.2.jar"/>
-    <pathelement path="${apache.taglibs.lib}/standard-1.1.2.jar"/>
-  </path>
-
-  <!-- Apache ORO -->
-  <property name="apache.oro.root" value="${project.thirdparty}/apache-oro"/>
-  <property name="apache.oro.lib" value="${apache.oro.root}/lib"/>
-  <path id="apache.oro.classpath">
-    <pathelement path="${apache.oro.lib}/jakarta-oro-2.0.8.jar"/>
-  </path>
-
-  <!-- Apache Struts -->
-  <property name="apache.struts.root" value="${project.thirdparty}/apache-struts"/>
-  <property name="apache.struts.lib" value="${apache.struts.root}/lib"/>
-  <path id="apache.struts.classpath">
-    <pathelement path="${apache.struts.lib}/struts-1.2.6.jar"/>
-  </path>
-
-  <!-- StAX -->
-  <property name="codehaus.stax.root" value="${project.thirdparty}/codehaus-stax"/>
-  <property name="codehaus.stax.lib" value="${codehaus.stax.root}/lib"/>
-  <path id="codehaus.stax.classpath">
-    <pathelement path="${codehaus.stax.lib}/stax-1.1.1.jar"/>
-  </path>
-
-  <!-- XMLUnit -->
-  <property name="xmlunit.xmlunit.root" value="${project.thirdparty}/xmlunit-xmlunit"/>
-  <property name="xmlunit.xmlunit.lib" value="${xmlunit.xmlunit.root}/lib"/>
-  <path id="xmlunit.xmlunit.classpath">
-    <pathelement path="${xmlunit.xmlunit.lib}/xmlunit1.0.jar"/>
-  </path>
-  
-  <!-- easymock -->
-  <property name="easymock.easymock.root" value="${project.thirdparty}/easymock"/>
-  <property name="easymock.easymock.lib" value="${easymock.easymock.root}/lib/"/>
-  <property name="easymock.easymock.resources" value="${easymock.easymock.root}/resources/"/>
-  <path id="easymock.easymock.classpath">
-     <pathelement path="${easymock.easymock.lib}/easymockclassextension.jar"/>
-     <pathelement path="${easymock.easymock.lib}/easymock-1.1.jar"/>
-  </path>
-  
-  <!-- struts-test-case -->
-  <property name="struts.test.case.root" value="${project.thirdparty}/struts-test-case"/>
-  <property name="struts.test.case.lib" value="${struts.test.case.root}/lib/"/>
-  <property name="struts.test.case.resources" value="${struts.test.case.root}/resources/"/>
-  <path id="struts.test.case.classpath">
-     <pathelement path="${struts.test.case.lib}/strutstest-2.1.3.jar"/>
-  </path>  
-  
-  <!-- cache -->
-  <property name="jboss.cache.root" value="${project.thirdparty}/jboss/cache"/>
-  <property name="jboss.cache.lib" value="${jboss.cache.root}/lib"/>
-  <path id="jboss.cache.classpath">
-    <pathelement path="${jboss.cache.lib}/jboss-cache.jar"/>
-  </path>  

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/libraries.ent (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/libraries.ent)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/modules.ent
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,305 +0,0 @@
-<!-- $Id: modules.ent,v 1.56 2006/05/23 20:20:41 asaldhana Exp $ -->
-
-<!-- AOP -->
-<property name="jboss.aop.root" value="${project.root}/aop/output"/>
-<property name="jboss.aop.lib" value="${jboss.aop.root}/lib"/>
-<path id="jboss.aop.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop.jar"/>
-</path>
-<path id="jboss.aop50.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop-jdk50.jar"/>
-</path>
-
-<property name="jboss.aspects.root" value="${project.root}/aspects/output"/>
-<property name="jboss.aspects.lib" value="${jboss.aspects.root}/lib"/>
-<path id="jboss.aspects.classpath">
-  <pathelement path="${jboss.aspects.lib}/jboss-aspect-library.jar"/>
-</path>
-
-<!-- tomcat -->
-<property name="jboss.tomcat.root" value="${project.root}/tomcat/output"/>
-  <property name="jboss.tomcat.lib" value="${jboss.tomcat.root}/lib"/>
-<path id="jboss.tomcat.classpath">
-  <pathelement path="${jboss.tomcat.lib}/tc5-cluster.aop"/>
-  <pathelement path="${jboss.tomcat.root}/resource"/>
-</path>
-
-<!-- Cluster -->
-<property name="jboss.cluster.root" value="${project.root}/cluster/output"/>
-<property name="jboss.cluster.lib" value="${jboss.cluster.root}/lib"/>
-<path id="jboss.cluster.classpath">
-  <pathelement path="${jboss.cluster.lib}/jbossha.jar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-httpsession.sar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-singleton.jar"/>
-</path>
-
-<!-- Common -->
-<property name="jboss.common.root" value="${project.root}/common/output"/>
-<property name="jboss.common.lib" value="${jboss.common.root}/lib"/>
-<path id="jboss.common.classpath">
-  <pathelement path="${jboss.common.lib}/jboss-common.jar"/>
-  <pathelement path="${jboss.common.lib}/jboss-xml-binding.jar"/>
-  <pathelement path="${jboss.common.lib}/namespace.jar"/>
-</path>
-
-<!-- Compatibility -->
-<property name="jboss.compatibility.root" value="${project.root}/compatibility/output"/>
-<property name="jboss.compatibility.lib" value="${jboss.compatibility.root}/lib"/>
-<path id="jboss.compatibility.classpath">
-</path>
-
-<!-- Iiop -->
-<property name="jboss.iiop.root" value="${project.root}/iiop/output"/>
-<property name="jboss.iiop.lib" value="${jboss.iiop.root}/lib"/>
-<path id="jboss.iiop.classpath">
-  <pathelement path="${jboss.iiop.lib}/jboss-iiop.jar"/>
-</path>
-
-<!-- J2EE -->
-<property name="jboss.j2ee.root" value="${project.root}/j2ee/output"/>
-<property name="jboss.j2ee.lib" value="${jboss.j2ee.root}/lib"/>
-<path id="jboss.j2ee.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-jaxrpc.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-saaj.jar"/>
-</path>
-
-<!-- J2EE Extensions-->
-<path id="jboss.j2ee.ext.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-auth.jar"/>
-</path>
-
-<!-- J2SE -->
-<property name="jboss.j2se.root" value="${project.root}/j2se/output"/>
-<property name="jboss.j2se.lib" value="${jboss.j2se.root}/lib"/>
-<path id="jboss.j2se.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-j2se.jar"/>
-</path>
-<path id="jboss.jmxcompliance.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-jmx-compliance.jar"/>
-</path>
-
-<!-- Deployment -->
-<property name="jboss.deployment.root" value="${project.root}/deployment/output"/>
-<property name="jboss.deployment.lib" value="${jboss.deployment.root}/lib"/>
-<path id="jboss.deployment.classpath">
-  <pathelement path="${jboss.deployment.lib}/jboss-deployment.jar"/>
-</path>
-
-<!-- EJB3 -->
-<property name="jboss.ejb3.root" value="${project.root}/ejb3/output"/>
-<property name="jboss.ejb3.lib" value="${jboss.ejb3.root}/lib"/>
-<path id="jboss.ejb3.classpath">
-  <pathelement path="${jboss.ejb3.lib}/jboss-ejb3.jar"/>
-  <pathelement path="${jboss.ejb3.lib}/jboss-annotations-ejb3.jar"/>
-</path>
-
-<!-- EJB3X -->
-<property name="jboss.ejb3x.root" value="${project.root}/ejb3x/output"/>
-<property name="jboss.ejb3x.lib" value="${jboss.ejb3x.root}/lib"/>
-<path id="jboss.ejb3x.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x.jar"/>
-</path>
-<path id="jboss.ejb3x.jdk14.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x-jdk14.jar"/>
-</path>
-
-<!-- JCA -->
-<property name="jboss.jca.root" value="${project.root}/connector/output"/>
-<property name="jboss.jca.lib" value="${jboss.jca.root}/lib"/>
-<path id="jboss.jca.classpath">
-  <pathelement path="${jboss.jca.lib}/jboss-jca.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-local-jdbc.jar"/>
-    <pathelement path="${jboss.jca.lib}/jboss-ha-local-jdbc.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-common-jdbc-wrapper.jar"/>
-</path>
-
-<!-- JMX -->
-<property name="jboss.jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.jmx.lib" value="${jboss.jmx.root}/lib"/>
-<path id="jboss.jmx.classpath">
-  <pathelement path="${jboss.jmx.lib}/jboss-jmx.jar"/>
-</path>
-
-<!-- JMX Remoting -->
-<property name="jboss.jmx-remoting.root" value="${project.root}/jmx-remoting/output"/>
-<property name="jboss.jmx-remoting.lib" value="${jboss.jmx-remoting.root}/lib"/>
-<path id="jboss.jmx-remoting.classpath">
-  <pathelement path="${jboss.jmx-remoting.lib}/jboss-jmx-remoting.jar"/>
-</path>
-
-<!-- Management -->
-<property name="jboss.management.root" value="${project.root}/management/output"/>
-<property name="jboss.management.lib" value="${jboss.management.root}/lib"/>
-<path id="jboss.management.classpath">
-  <pathelement path="${jboss.management.lib}/jboss-jsr77-client.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-jsr77.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-management.jar"/>
-</path>
-
-<!-- MBeans -->
-<property name="jboss.mbeans.root" value="${project.root}/mbeans/output"/>
-<property name="jboss.mbeans.lib" value="${jboss.mbeans.root}/lib"/>
-<path id="jboss.mbeans.classpath">
-  <pathelement path="${jboss.mbeans.lib}/jboss-mbeans.jar"/>
-</path>
-
-<!-- Messaging -->
-<property name="jboss.messaging.root" value="${project.root}/messaging/output"/>
-<property name="jboss.messaging.lib" value="${jboss.messaging.root}/lib"/>
-<path id="jboss.messaging.classpath">
-  <pathelement path="${jboss.messaging.lib}/jbossmq.jar"/>
-</path>
-
-<!-- Messaging 5 -->
-<property name="jboss.jms.root" value="${project.root}/jms/output"/>
-<property name="jboss.jms.lib" value="${jboss.jms.root}/lib"/>
-<path id="jboss.jms.classpath">
-  <pathelement path="${jboss.jms.lib}/jboss-messaging.jar"/>
-</path>
-
-<!-- Naming -->
-<property name="jboss.naming.root" value="${project.root}/naming/output"/>
-<property name="jboss.naming.lib" value="${jboss.naming.root}/lib"/>
-<path id="jboss.naming.classpath">
-  <pathelement path="${jboss.naming.lib}/jnpserver.jar"/>
-</path>
-
-<!-- Security -->
-<property name="jboss.security.root" value="${project.root}/security/output"/>
-<property name="jboss.security.lib" value="${jboss.security.root}/lib"/>
-<path id="jboss.security.classpath">
-  <pathelement path="${jboss.security.lib}/jbosssx.jar"/>
-</path>
-
-<!-- Server -->
-<property name="jboss.server.root" value="${project.root}/server/output"/>
-<property name="jboss.server.lib" value="${jboss.server.root}/lib"/>
-<path id="jboss.server.classpath">
-  <pathelement path="${jboss.server.lib}/jboss.jar"/>
-  <pathelement path="${jboss.server.lib}/jmx-adaptor-plugin.jar"/>
-</path>
-
-<!-- Spring -->
-<property name="jboss.spring.root" value="${project.root}/spring-int/output"/>
-<property name="jboss.spring.lib" value="${jboss.spring.root}/lib"/>
-
-<!-- System -->
-<property name="jboss.system.root" value="${project.root}/system/output"/>
-<property name="jboss.system.lib" value="${jboss.system.root}/lib"/>
-<path id="jboss.system.classpath">
-  <pathelement path="${jboss.system.lib}/jboss-system.jar"/>
-</path>
-<property name="jboss.system.xdocletpath"
-  value="${project.root}/system/src/main"/>
-
-<!-- Test -->
-<property name="jboss.test.root" value="${project.root}/test/output"/>
-<property name="jboss.test.lib" value="${jboss.test.root}/lib"/>
-<path id="jboss.test.classpath">
-  <pathelement path="${jboss.test.lib}/jboss-test.jar"/>
-</path>
-
-<!-- Transaction -->
-<property name="jboss.transaction.root" value="${project.root}/transaction/output"/>
-<property name="jboss.transaction.lib" value="${jboss.transaction.root}/lib"/>
-<path id="jboss.transaction.classpath">
-  <pathelement path="${jboss.transaction.lib}/jboss-transaction.jar"/>
-</path>
-
-<!-- Varia -->
-<property name="jboss.varia.root" value="${project.root}/varia/output"/>
-<property name="jboss.varia.lib" value="${jboss.varia.root}/lib"/>
-<path id="jboss.varia.classpath">
-  <pathelement path="${jboss.varia.root}/classes"/>
-</path>
-
-<!-- Hibernate2 integration module -->
-<property name="jboss.hibernate.root" value="${project.root}/hibernate-int/output"/>
-<property name="jboss.hibernate.lib" value="${jboss.hibernate.root}/lib"/>
-<path id="jboss.hibernate.classpath">
-  <pathelement path="${jboss.hibernate.lib}/jboss-hibernate.jar"/>
-</path>
-
-
-<!-- below this line starts the kingdom of nukes ***************************************************************** -->
-
-<!-- Nukes on JBoss -->
-<property name="jboss.nukes.root" value="${project.root}/nukes/output"/>
-<property name="jboss.nukes.lib" value="${jboss.nukes.root}/lib"/>
-<path id="jboss.nukes.classpath">
-  <pathelement path="${jboss.nukes.lib}/nukes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss adminmessages -->
-<property name="jboss.nukes-adminmessages.root" value="${project.root}/adminmessages/output"/>
-<property name="jboss.nukes-adminmessages.lib" value="${jboss.nukes-adminmessages.root}/lib"/>
-<path id="jboss.nukes-adminmessages.classpath">
-  <pathelement path="${jboss.nukes-adminmessages.lib}/nukes-adminmessages-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss faq -->
-<property name="jboss.nukes-faq.root" value="${project.root}/faq/output"/>
-<property name="jboss.nukes-faq.lib" value="${jboss.nukes-faq.root}/lib"/>
-<path id="jboss.nukes-faq.classpath">
-  <pathelement path="${jboss.nukes-faq.lib}/nukes-faq-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss jmx -->
-<property name="jboss.nukes-jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.nukes-jmx.lib" value="${jboss.nukes-jmx.root}/lib"/>
-<path id="jboss.nukes-jmx.classpath">
-  <pathelement path="${jboss.nukes-jmx.lib}/nukes-jmx-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss journal -->
-<property name="jboss.nukes-journal.root" value="${project.root}/journal/output"/>
-<property name="jboss.nukes-journal.lib" value="${jboss.nukes-journal.root}/lib"/>
-<path id="jboss.nukes-journal.classpath">
-  <pathelement path="${jboss.nukes-journal.lib}/nukes-journal-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss mp3player -->
-<property name="jboss.nukes-mp3player.root" value="${project.root}/mp3player/output"/>
-<property name="jboss.nukes-mp3player.lib" value="${jboss.nukes-mp3player.root}/lib"/>
-<path id="jboss.nukes-mp3player.classpath">
-  <pathelement path="${jboss.nukes-mp3player.lib}/nukes-mp3player-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss news -->
-<property name="jboss.nukes-news.root" value="${project.root}/news/output"/>
-<property name="jboss.nukes-news.lib" value="${jboss.nukes-news.root}/lib"/>
-<path id="jboss.nukes-news.classpath">
-  <pathelement path="${jboss.nukes-news.lib}/nukes-news-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss quotes -->
-<property name="jboss.nukes-quotes.root" value="${project.root}/quotes/output"/>
-<property name="jboss.nukes-quotes.lib" value="${jboss.nukes-quotes.root}/lib"/>
-<path id="jboss.nukes-quotes.classpath">
-  <pathelement path="${jboss.nukes-quotes.lib}/nukes-quotes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss list -->
-<property name="jboss.nukes-list.root" value="${project.root}/list/output"/>
-<property name="jboss.nukes-list.lib" value="${jboss.nukes-list.root}/lib"/>
-<path id="jboss.nukes-list.classpath">
-  <pathelement path="${jboss.nukes-list.lib}/nukes-list-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss script -->
-<property name="jboss.nukes-script.root" value="${project.root}/script/output"/>
-<property name="jboss.nukes-script.lib" value="${jboss.nukes-script.root}/lib"/>
-<path id="jboss.nukes-script.classpath">
-  <pathelement path="${jboss.nukes-script.lib}/nukes-script-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss sections -->
-<property name="jboss.nukes-sections.root" value="${project.root}/sections/output"/>
-<property name="jboss.nukes-sections.lib" value="${jboss.nukes-sections.root}/lib"/>
-<path id="jboss.nukes-sections.classpath">
-  <pathelement path="${jboss.nukes-sections.lib}/nukes-sections-lib.jar"/>
-</path>
-
-
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/modules.ent (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/modules.ent)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/targets.ent
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,116 +0,0 @@
-<!-- $Id: targets.ent,v 1.5 2004/11/24 02:07:36 starksm Exp $ -->
-<!--
-   $Log: targets.ent,v $
-   Revision 1.5  2004/11/24 02:07:36  starksm
-   Restore the tools module content after the errant removal
-
-   Revision 1.3  2004/03/29 19:49:17  ejort
-   Bring build into line with jboss-3.2
-
-   Revision 1.1.2.2  2003/12/07 22:12:53  ejort
-   Make a start on simplifying the build,
-   including incremental xdoclet MBean generation
-
-   Revision 1.1.2.1  2003/05/18 06:24:13  starksm
-   
-   Standard targets
--->
-
-  <!-- ================================================================== -->
-  <!-- Initialization                                                     -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Initialize the build system.  Must depend on '_buildmagic:init'.  
-     | Other targets should depend on 'init' or things will mysteriously fail.
-   -->
-
-  <target name="init" unless="init.disable" depends="_buildmagic:init">
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="jars" 
-	  description="Builds all jar files."
-     depends="_buildmagic:build-bypass-check"
-	  unless="build-bypass.on">
-
-    <call target="compile"/>
-
-    <mkdir dir="${build.lib}"/>
-
-    <call target="module-jars"/>
-
-    <!-- Update the build marker to allow bypassing -->
-    <touch file="${build-bypass.marker}"/>
-
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Install & Release                                                  -->
-  <!-- ================================================================== -->
-
-  <target name="install" 
-	  description="Install the structure for a release."
-	  depends="all, _buildmagic:install:default"/>
-
-  <target name="release" depends="install"/>
-
-  <target name="release-zip" 
-	  description="Builds a ZIP distribution."
-	  depends="release, _buildmagic:release:zip"/>
-
-  <target name="release-tar" 
-	  description="Builds a TAR distribution."
-	  depends="release, _buildmagic:release:tar"/>
-
-  <target name="release-tgz" 
-	  description="Builds a TAR-GZ distribution."
-	  depends="release, _buildmagic:release:tgz"/>
-
-  <target name="release-all"
-	  description="Builds a distribution for each archive type."
-	  depends="release-zip, release-tgz"/>
-
-
-  <!-- ================================================================== -->
-  <!-- Cleaning                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- Clean up all build output -->
-  <target name="clean" 
-	  description="Cleans up most generated files."
-	  depends="_buildmagic:clean">
-  </target>
-
-  <!-- Clean up all generated files -->
-  <target name="clobber" 
-	  description="Cleans up all generated files."
-	  depends="_buildmagic:clobber, clean">
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Misc.                                                              -->
-  <!-- ================================================================== -->
-
-  <target name="main"
-	  description="Executes the default target (most)."
-	  depends="most"/>
-    
-  <target name="all"
-	  description="Builds everything."
-	  depends="jars, docs"/>
-
-  <target name="most" 
-	  description="Builds almost everything."
-	  depends="jars"/>
-
-  <target name="help" 
-          description="Show this help message."
-	  depends="_buildmagic:help:standard"/>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/targets.ent (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/targets.ent)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/task.properties
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,91 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Default Task Properties                                                 ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: task.properties,v 1.8 2005/10/05 18:45:32 rloehr Exp $ ###
-
-### Javac Defaults ###
-
-javac.includes=**/*.java
-javac.excludes=
-javac.defaultexcludes=yes
-
-javac.boot.classpath=${sun.boot.classpath}
-javac.classpath=${classpath}
-
-javac.debug=off
-javac.optimize=on
-javac.deprecation=on
-javac.target=1.4
-javac.verbose=off
-javac.depend=off
-javac.source=1.4
-
-javac.include.ant.runtime=no
-javac.include.java.runtime=no
-javac.fail.onerror=true
-
-classpath=
-classpath.local=
-classpath.thirdparty=
-
-### Javadoc Defaults ###
-
-javadoc.classpath=${javac.classpath}
-javadoc.sourcepath=
-javadoc.source.path=
-javadoc.source.files=
-
-javadoc.public=false
-javadoc.package=false
-javadoc.protected=true
-javadoc.private=false
-javadoc.version=true
-javadoc.author=true
-javadoc.use=true
-javadoc.verbose=false
-
-javadoc.windowtitle=${module.Name} API
-javadoc.doctitle=${module.Name}
-javadoc.splitindex=no
-
-### MBean Defaults ###
-mbean.includes=
-mbean.excludes=
-
-### Jar Defaults ###
-jar.server.includes=
-jar.client.includes=
-
-### RMIC Defaults ###
-
-rmic.base=${build.classes}
-rmic.stubVersion=${javac.target}
-rmic.verify=true
-rmic.sourcebase=
-rmic.debug=false
-rmic.iiop=false
-rmic.iiopopts=
-rmic.idl=false
-rmic.idlopts=
-rmic.includes=
-rmic.excludes=
-
-### JUnit Defaults ###
-
-junit.printsummary=true
-junit.haltonerror=false
-junit.haltonfailure=false
-junit.fork=true
-junit.timeout=300000
-junit.jvm=java
-junit.jvm.options=-Dnone
-
-junit.formatter.type=xml
-junit.formatter.usefile=true
-
-junit.batchtest.fork=${junit.fork}
-junit.batchtest.haltonerror=${junit.haltonerror}
-junit.batchtest.haltonfailure=${junit.haltonfailure}

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/task.properties (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/task.properties)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/version-info.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,56 +0,0 @@
-<!-- $Id: version-info.xml,v 1.8 2006/02/23 15:07:21 dimitris Exp $ -->
-
-<project name="Common Build Defs">
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-    <!-- Version identifiers for the server. -->
-    <property name="version.major" value="5"/>
-    <property name="version.minor" value="0"/>
-    <property name="version.revision" value="0"/>
-    <property name="version.tag" value="Alpha"/>
-    <property name="version.name" value="Morpheus"/>
-    <!-- This must be set to the CVS tag for any release -->
-    <property name="version.cvstag" value="HEAD"/>
-
-    <!-- Manifest version info -->
-    <property name="specification.title" value="JBoss"/>
-    <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-    <property name="implementation.title" value="JBoss [${version.name}]"/>
-    <property name="implementation.url" value="http://www.jboss.org/"/>
-    <property name="implementation.version" 
-         value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-    <property name="implementation.vendor" value="JBoss Inc."/>
-    <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-    <target name="print-version-info">
-      <echo>
-    version.major=${version.major}
-    version.minor=${version.minor}
-    version.revision=${version.revision}
-    version.tag=${version.tag}
-    version.name=${version.name}
-    version.cvstag=${version.cvstag}
-    specification.title=${specification.title}
-    specification.version=${specification.version}
-    specification.vendor=${specification.vendor}
-    implementation.title=${implementation.title}
-    implementation.url=${implementation.url}
-    implementation.version=${implementation.version} 
-    implementation.vendor=${implementation.vendor}
-    implementation.vendor.id=${implementation.vendor.id}
-      </echo>
-    </target>
-</project>
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/buildmagic/version-info.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/buildmagic/version-info.xml)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/jbossbuild)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/jbossbuild.properties
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-
-# The location of the thirdparty (prebuilt artifacts) directory relative to the project root
-jbossbuild.thirdparty.dir=thirdparty
-
-# The name of the component info file
-jbossbuild.component.info=component-info.xml
-
-# The targetdefs to use
-jbossbuild.targetdefs.refid=targets
-
-external.project=true;
\ No newline at end of file

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/jbossbuild.properties (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/jbossbuild/jbossbuild.properties)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/release.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,152 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-
-<!-- ================================================================== -->
-<!-- JBoss AOP release build definition                                 -->
-<!-- ================================================================== -->
-
-<project name="main.build"
-         default="build" 
-         basedir="."
->
-   <!-- Import the types -->
-   <import file="../tools/etc/jbossbuild/tasks.xml"/>
-
-   <!-- =============================================================== -->
-   <!-- The Main project definition                                     -->
-   <!-- =============================================================== -->
-
-   <build id="jboss-aop"
-          impltitle="JBoss AOP"
-          implversion="1.0.0-FINAL"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.com/products/aop"
-          description="JBoss Aspect Oriented Programming Framewoork"
-          cvsroot="cvs.sourceforge.net:/cvsroot/jboss"
-          thirdpartypath="../thirdparty/"
-          location="http://cruisecontrol.jboss.com/repository/"
-          targetdefs="targets">
-
-      <!-- ============================================================ -->
-      <!-- Common utilities                                             -->
-      <!-- ============================================================ -->
-
-      <component id="common"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-common.jar" release="lib"/>
-         <artifact id="jboss-common-client.jar"/>
-         <artifact id="namespace.jar"/>
-      </component>
-
-      <includes id="common-project">
-         <include input="jboss-common.jar"/>
-         <include input="namespace.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Container                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="container"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-container.jar"/>
-      </component>
-
-      <includes id="container-project">
-         <include input="jboss-container.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- AOP                                                          -->
-      <!-- ============================================================ -->
-
-      <component id="aop"
-                 module="jboss-aop"
-                 version="1.0.0-FINAL"
-      >
-         <artifact id="jboss-aop.jar" release="lib"/>
-      </component>
-
-      <includes id="aop-project">
-         <include input="jboss-aop.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- QDox                                                         -->
-      <!-- ============================================================ -->
-
-      <component id="qdox"
-                 version="1.4">
-         <artifact id="qdox.jar" release="lib"/>
-      </component>
-
-      <includes id="qdox-lib">
-         <include input="qdox.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Javassist                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="javassist"
-                 version="3.0beta">
-         <artifact id="javassist.jar" release="lib"/>
-      </component>
-
-      <includes id="javassist-lib">
-         <include input="javassist.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Trove                                                        -->
-      <!-- ============================================================ -->
-      
-      <component id="trove"
-                 version="2.1.1">
-         <artifact id="trove.jar" release="lib"/>
-      </component>
-
-      <includes id="trove-lib">
-         <include input="trove.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Oswego Concurrent Library                                    -->
-      <!-- ============================================================ -->
-
-      <component id="oswego-concurrent"
-                 version="1.0">
-         <artifact id="concurrent.jar" release="lib"/>
-      </component>
-
-      <includes id="concurrent">
-         <include input="concurrent.jar"/>
-      </includes>
-
-
-      <!-- ============================================================ -->
-      <!-- JUnit                                                        -->
-      <!-- ============================================================ -->
-
-      <component id="junit-junit"
-                 version="3.8.1">
-         <artifact id="junit.jar" release="lib"/>
-      </component>
-
-      <includes id="junit">
-         <include input="junit.jar"/>
-      </includes>
-   </build>
-
-   <!-- Generate the targets -->
-   <generate generate="jboss-aop"/>
-   
-</project>

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/release.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/jbossbuild/release.xml)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/tasks.xml
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1023 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-<project name="jboss.ant.tasks"
-         default="help-fragment"
->
-<!-- ================================================================== -->
-<!-- Properties                                                         -->
-<!-- ================================================================== -->
-
-   <!-- because this file may be imported from various locations
-     locations must be referenced in an absolute fashion   -->
-   <dirname property="imported.basedir" file="${ant.file.jboss.ant.tasks}"/>
-
-
-   <property file="${imported.basedir}/jbossbuild.properties"/>
-
-   <property name="jboss.tasks.path" 
-      value="${imported.basedir}/../../../tools/lib/jbossbuild.jar"   />
-
-   <!-- items required for javcc task --> 
-   <property name="sun.javacc.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/sun-javacc/lib/"/>
-             
-   <property name="jacorb.root"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/jacorb"/> 
-
-   <property name="apache.logkit.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/apache-avalon-logkit/lib"/>              
-
-      
-    <path id="jacorb.idl.classpath">
-       <pathelement path="${jacorb.root}/lib/idl.jar"/>
-       <pathelement path="${apache.logkit.lib}/logkit.jar"/>
-    </path>
-
-
-<!-- ================================================================== -->
-<!-- Type Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- The generate type -->
-   <typedef name="generate"
-            classname="org.jboss.ant.types.Generate" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build type -->
-   <typedef name="build"
-            classname="org.jboss.ant.types.build.Build" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The artifact type definition type -->
-   <typedef name="artifacttype"
-            classname="org.jboss.ant.types.build.ArtifactType" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component definition type -->
-   <typedef name="componentdef"
-            classname="org.jboss.ant.types.component.ComponentDefinition" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component type -->
-   <typedef name="component"
-            classname="org.jboss.ant.types.build.Component" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The includes type -->
-   <typedef name="includes"
-            classname="org.jboss.ant.types.Includes" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build targets type -->
-   <typedef name="targets"
-            classname="org.jboss.ant.types.target.TargetDefinitions" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-<!-- ================================================================== -->
-<!-- Task Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- Update ide info for the main build -->
-   <taskdef name="idemain"
-            classname="org.jboss.ant.tasks.build.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- Update ide info for the component -->
-   <taskdef name="idecomponent"
-            classname="org.jboss.ant.tasks.component.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- Generate a componentref graph and resolve the dependencies -->
-   <taskdef name="synchronizeinfo"
-            classname="org.jboss.ant.tasks.build.SynchronizeComponentsTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- A task which allows a visitor to visit the graph -->
-   <taskdef name="visit-componentref-graph"
-            classname="org.jboss.ant.tasks.build.VisitComponentRefGraphTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />   
-   
-   <!-- Generate libraries.ent with version number in paths -->
-   <taskdef name="gen-lib-file"
-            classname="org.jboss.ant.tasks.build.GenerateLibrariesFile"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-     
-   <!-- RMIC compilation logic -->
-   <taskdef name="rmic-helper"
-            classname="org.jboss.ant.tasks.build.RMICHelper"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />     
-
-   <!-- Executes a given target without reparsing the project file -->
-   <taskdef name="execute-target"
-            classname="org.jboss.ant.tasks.build.TargetExecutor"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-  
-   <!-- Copy with support for zipfile sets -->
-   <taskdef name="copy-zfs"
-            classname="org.jboss.ant.tasks.build.CopyWithZipFileSetSupport"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-   
-   <!-- File release task -->
-   <taskdef name="copy-release"
-            classname="org.jboss.ant.tasks.build.CopyRelease"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-   
-  
-   
-
-   
-
-<!-- ================================================================== -->
-<!-- Artifact Definitions                                               -->
-<!-- ================================================================== -->
-
-   <artifacttype type="jar" outputtype="lib"/>
-   <artifacttype type="zip" outputtype="lib"/>
-   <artifacttype type="sar" outputtype="lib"/>
-   <artifacttype type="rar" outputtype="lib"/>
-   <artifacttype type="war" outputtype="lib"/>
-   <artifacttype type="deployer" outputtype="lib"/>   
-   <artifacttype type="api" outputtype="api"/>
-   <artifacttype type="xml" outputtype="resource"/>
-   <artifacttype type="policy" outputtype="resource"/>
-   <artifacttype type="properties" outputtype="resource"/>
-   <artifacttype type="sh" outputtype="bin"/>
-   <artifacttype type="bat" outputtype="bin"/>
-   <artifacttype type="conf" outputtype="bin"/>
-   <artifacttype type="dtd" outputtype="dtd"/>
-   <artifacttype type="xsd" outputtype="schema"/>
-   <artifacttype type="aop" outputtype="resource"/>
-   <artifacttype type="idl" outputtype="resource"/>   
-   <artifacttype type="md5" outputtype="bin"/>      
-   <artifacttype type="dir" outputtype="lib"/>
-   <artifacttype type="ddl" outputtype="resource"/>
-   
-<!-- ================================================================== -->
-<!-- Target Definitions                                                 -->
-<!-- ================================================================== -->
-
-   <targets id="targets">
-
-      <!-- ============================================================ -->
-      <!-- Build All                                                    -->
-      <!-- Builds everything (build, docs, tests and release archives)  -->
-      <!-- ============================================================ -->
-
-      <targetdef target="all" description="Build All">
-         <main depends="build, doc, test, archives" components="none"/>
-         <component depends="build, doc, test"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!--  Init                                                        -->
-      <!--  Basic initilization tasks and property setup                -->
-      <!-- ============================================================ -->      
-      <targetdef target="build.init" description="initilization tasks and property setup">
-
-         <!-- for each componentdef in jbossbuild file, setup properties 
-              in case a use wishes to access them    
-         -->
-         <component>
-            <property name="build.module" value="@{parentDir}"/>
-            <property name="build.module.src" value="${build.module}/src"/>
-            <property name="build.module.resources" value="${build.module}/src/resources"/>
-            <property name="build.module.etc" value="${build.module}/src/etc"/>
-            <property name="build.module.output" value="@{output}"/>
-            <property name="build.module.output.gen-src" value="${build.module.output}/gen-src"/>            
-            <property name="build.module.dir" value="@{output}"/>
-            <property name="build.module.output.resources" value="${build.module.output}/resources"/>                        
-            <property name="build.module.output.lib" value="${build.module.output}/lib"/>                                    
-            <property name="build.module.output.classes" value="${build.module.output}/classes"/> 
-         </component>
-      </targetdef>      
-
-      <!-- ============================================================ -->
-      <!-- Build                                                        -->
-      <!-- Builds the artifacts and compiles all source                 -->
-      <!-- ============================================================ -->
-
-      <targetdef target="build" description="Build" >
-
-         <!-- Build the main release
-              Creates the main release directory and copies artifacts
-              to the specified location
-         -->
-         <main>
-            <mkdir dir="@{releaseDir}"/>
-            <antCall target="release"/>
-         </main>
-
-
-         <!-- 
-         Build the component
-              Just makes the output folder
-         -->         
-         <component depends="build.init, build.etc">
-            <mkdir dir="@{output}/etc"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-            </copy>
-         </component>
-
-         <!-- Build resources if the component has a 
-              resource node -->
-         <resource depends="build.resources"/>
-         
-         <!-- JTREE-JAVACC source generation  -->
-         <generatedsource when="@{jtree-javacc}">
-
-            <dirname file="/@{jtree-javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-            <jjtree
-               target="src/@{srcdir}/@{jtree-javacc}"
-               outputdirectory="${@{id}.output.path}"
-               javacchome="${sun.javacc.lib}"/>
-
-            <basename file="@{jtree-javacc}" 
-               property="@{id}.basename"
-               suffix="jjt"/>
-
-            <javacc
-               target="${@{id}.output.path}/${@{id}.basename}.jj"
-               javacchome="${sun.javacc.lib}"/>
-
-         </generatedsource>
-
-         <!-- JAVACC source generation -->
-         <generatedsource when="@{javacc}">
-
-            <dirname file="/@{javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <javacc
-               target="src/@{srcdir}/@{javacc}"
-               javacchome="${sun.javacc.lib}"
-               static="@{static}"
-               outputdirectory="${@{id}.output.path}"/>
-
-         </generatedsource>
-
-         <!-- IDL compilation -->         
-         <generatedsource when="@{idl}">
-
-            <!-- Task to compile idl files required by jacorb -->
-            <taskdef name="jacidl"
-               classname="org.jacorb.idl.JacIDL"
-               classpathref="jacorb.idl.classpath"
-            />             
-            
-            <property name="@{id}.output.path" value="@{output}/@{id}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <jacidl
-               srcdir ="src/@{idl}"
-               destdir="${@{id}.output.path}"
-               includes="*.idl"
-               includepath="${jacorb.root}/resources/"
-             />
-         
-         </generatedsource> 
-         
- 
-         <!-- Compile the source
-              Runs depend on the source output then compiles the source
-         -->
-         <source if="@{compileable}">
-             
-            <mkdir dir="@{output}"/>
-            <depend srcdir="@{sourcePath}"
-                    destdir="@{output}"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-            </depend>
-            <javac srcdir="@{sourcePath}" 
-                   destdir="@{output}"
-                   debug="true"
-                   deprecation="true"
-                   excludes="@{excludes}"
-                   target="@{jvmTarget}"
-                   source="@{jvmSource}"
-                   fork="true"
-                   memoryMaximumSize="512M"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               <src path="@{sourcePath}"/>
-               <!-- allow multiple sources to be compiled at once to handle circular references -->
-               <srcelements/>
-            </javac>
-
-           <copy toDir="@{output}">
-               <fileset dir="@{sourcePath}">
-                <include name="**/*.properties"/>
-              </fileset>
-           </copy>
-         </source>
-         
-        <source when="@{stubversion}">
-	    <property name="jb.stubversion" value="@{stubversion}"/>
-        </source>         
-         
-
-         <!-- Remote method call compilation.   -->
-         <source when="@{rmic}">
-            <rmic-helper
-                  base="@{output}"
-                  includes="@{rmic}"
-                  verify="true"
-                  debug="false"
-                  iiop="@{iiop}"
-                  idl="false"
-                  external="@{external}"
-                  stubversion="${jb.stubversion}"
-                  
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               </rmic-helper>
-         </source>
-
-         <!-- Create a jar archive
-              Jars the inputs of the jar artifact
-         -->
-         <jar null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </jar>
-
-         <!-- Create an aop archive
-              Jars the inputs of the aop artifact
-         -->
-         <aop  if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-                <filesets/>
-            </jar>
-         </aop>         
-
-         <jar when="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}"
-                 manifest="@{component.output}/etc/manifest/@{manifest}">
-               <filesets/>
-            </jar>
-         </jar>
-         
-         
-
-         <!-- Create a sar archive
-              Jars the inputs of the sar artifact
-         -->
-         <sar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </sar>
-
-
-         <!-- Create a rar archive
-              Jars the inputs of the rar artifact
-         -->
-         <rar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </rar>
-
-         <!-- Create a war archive
-              Jars the inputs of the war artifact
-         -->
-         <war null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </war>
-         
-         <!-- Create a deployer archive
-              Jars the inputs of the war artifact
-         -->
-         <deployer null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by" value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title" value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version" value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor" value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title" value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL" value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version" value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor" value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path" value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </deployer>       
-         
-         <!-- Create a md5 checksumarchive  -->
-         <md5 null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <checksum>
-              <filesets/>
-            </checksum>
-         </md5>         
-         
-         <!-- create a directory and copy into it all of the filesets or zipfilesets -->
-         <dir if="@{buildable}">
-            <mkdir dir="@{output}"/>
-            <copy-zfs todir="@{output}">
-               <filesets/>
-            </copy-zfs>
-         </dir>
-         
-         
-         <!-- this is a hack.  jbbuild will not allow artifacts with same id
-            varia requires a dir to be created called kernel, but cannot be created
-            because kernel already exists as a component.  Only option is to create the dir
-            and rename it to kernel -->
-         <dir if="@{buildable}" when="@{rename}">
-            <mkdir dir="@{parentDir}/@{rename}"/>
-            <copy-zfs todir="@{parentDir}/@{rename}">
-               <filesets/>
-            </copy-zfs>
-         </dir>     
-      
-         <!-- copying of artifacts to new name -->         
-         <artifactdef when="@{toname}">
-            <mkdir dir="@{parentDir}"/>
-            <copy toFile="@{parentDir}/@{toname}">
-               <filesets/>
-            </copy>
-         </artifactdef>
-         
-         <sh depends="build.bin"/>
-         <bat depends="build.bin"/>
-      </targetdef>
-
-      <!-- Copy the etc -->
-      <targetdef target="build.etc">
-
-         <component>
-              
-            <mkdir dir="@{output}/etc"/>
-            <mkdir dir="@{component.dir}/src/etc/"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-               <filterset>
-                  <filter token="java.vm.version"           value="@{component.VMVersion}"/>
-                  <filter token="java.vm.vendor"            value="@{component.VMVendor}"/>
-                  <filter token="specification.title"       value="@{component.specTitle}"/>
-                  <filter token="specification.version"     value="@{component.specVersion}"/>
-                  <filter token="specification.vendor"      value="@{component.specVendor}"/>
-                  <filter token="implementation.title"      value="@{component.implTitle}"/>
-                  <filter token="implementation.url"        value="@{component.implURL}"/>
-                  <filter token="implementation.version"    value="@{component.implVersion}"/>
-                  <filter token="implementation.vendor"     value="@{component.implVendor}"/>
-                  <filter token="implementation.vendor.id"  value="@{component.implURL}"/>
-               </filterset>
-            </copy>
-         </component>
-
-      </targetdef>
-
-      <targetdef target="build.resources">
-     
-         <component>
-            <mkdir dir="@{output}/resources"/>
-            <copy todir="@{output}" filtering="yes">
-               <fileset dir="@{component.dir}/src" includes="resources/**"/>
-            </copy>
-         </component>
-      </targetdef>
-      
-
-
-      <targetdef target="build.bin">
-         <component>
-            <mkdir dir="@{output}/bin"/>
-            <copy todir="@{output}/bin" filtering="yes">
-              <fileset dir="@{component.dir}/src/bin">
-                <include name="**/*"/>
-              </fileset>
-            </copy>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="lf" eof="remove"
-              includes="**/*.sh"/>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="crlf" eof="remove"
-              includes="**/*.bat, **/*.cmd"/>
-
-            <chmod perm="+x">
-              <fileset dir="@{output}/bin">
-                <include name="**/*.sh"/>
-              </fileset>
-            </chmod>
-
-         </component>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Release                                                      -->
-      <!-- Create the release by copying all artifacts that have a      -->
-      <!-- release tag to that specified location.                      -->
-      <!-- ============================================================ -->
-
-      <targetdef target="release">
-      
-
-          <!-- Copy the artifact into the release -->
-         <artifact when="@{tofile}">
-             <copy-release release="@{release}" tofile="@{tofile}" requiredJDK="@{requiredJDK}"
-             exploded="@{exploded}" overwrite="@{overwrite}">
-                <output/>
-             </copy-release>
-         </artifact>
-         
-       <artifact null="@{tofile}" when="@{release}" >
-            <copy-release release="@{release}"
-              exploded="@{exploded}"
-              requiredJDK="@{requiredJDK}"
-              overwrite="@{overwrite}"
-              >
-               <output/>
-            </copy-release>
-         </artifact>         
-
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Publish                                                      -->
-      <!-- Copy an artifact to the location specified by                -->
-      <!-- ${jbossbuild.repository.root}                                -->
-      <!-- Used by the continous build to publish to the repository.    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="publish" if="@{local}">
-
-         <!-- copy the component-info.xml into the repository -->
-         <componentmain if="@{local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy failonerror="false" file="@{dir}/${jbossbuild.component.info}"
-                  todir="${repository.root}/@{relativePath}"
-            />
-
-         </componentmain>
-
-         <!-- Copy the artifact into the release -->
-         <artifact if="@{component.local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy todir="${repository.root}/@{relativePath}">
-               <output/>
-            </copy>
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Archives                                                     -->
-      <!-- Builds the release archive(s)                                -->
-      <!-- ============================================================ -->
-
-      <!-- Build the release archives -->
-      <targetdef target="archives" description="Build the release archives">
-
-         <!-- Make the archives -->
-         <main>
-         
-            <!-- Create the zip file -->
-            <zip destfile="@{output}/@{releaseName}.zip"
-                 basedir="@{releaseDir}"
-            />
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Doc                                                          -->
-      <!-- Creates the documentation.                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="doc" description="Documentation">
-
-         <!-- Generate the documentation -->
-         <component depends="api"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- API                                                          -->
-      <!-- Creates the javadoc                                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="api" description="Javadoc">
-
-         <!-- Generate the javadoc -->
-         <component/>
-         <api>
-            <mkdir dir="@{output}"/>
-            <javadoc packagenames="*"
-                     destdir="@{output}"
-            >
-               <doctitle>
-                  <![CDATA[<h1>@{description} API Documentation</h1>]]>
-               </doctitle>
-               <bottom>
-                  <![CDATA[
-                     <i>
-                        <div align="center">
-                           <font size="-1">
-                              Copyright &#169; 2005 JBoss Inc. All Rights Reservered.
-                           </font>
-                        </div>
-                     </i>
-                  ]]>
-               </bottom>
-               <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
-               <sourcepath>
-                  <sourcepaths/>
-               </sourcepath>
-               <classpath>
-                  <sourcepathelements/>
-               </classpath>
-            </javadoc>
-         </api>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clean                                                        -->
-      <!-- Deletes the output folder                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clean" description="Clean">
-         <common>
-            <delete dir="@{output}" failonerror="false"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clobber                                                      -->
-      <!-- Deletes the output folder and removes thirdparty             -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clobber" description="Clobber">
-         <main depends="clean">
-            <delete dir="@{thirdparty}"/>
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize                                                  -->
-      <!-- Resynchronizes the project with cvs                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="synchronize" description="Synchronize">
-
-         <!-- Update the main build folder and tools from cvs
-              then do the same for the components before running
-              the after synchronization processing
-              NOTE: Does not automatically invoke component builds
-              as the list of components maybe out-of-date at this point
-              and we need to conditionally do cvs co/update
-         -->
-         <main components="none">
-            <!-- cvs command="update -dP" failonerror="true"/-->
-            <!--invoke target="synchronize" dir="../tools"/-->
-            <execute-target target="synchronize.components" />
-            <!-- execant target="synchronize.after.main"/-->
-         </main>
-
-         <componentmain unless="@{local}">
-            <mkdir dir="thirdparty"/>
-            <get src="@{location}/${jbossbuild.component.info}"
-                 dest="@{thirdpartyDir}/${jbossbuild.component.info}"
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </componentmain>
-
-         <!-- If the component exists we just do a cvs update -->
-         <componentmain if="@{exists}">
-           <cvs dest="@{dir}" command="update"/>
-            <!-- NOTE: unable to delegate to component until JBBUILD-62 is resolved -->
-            <!--invoke target="synchronize" dir="@{dir}"/--> 
-            <!--execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- If the component doesn't exist and we want to
-              get the source build check it out from cvs
-         -->
-         <componentmain unless="@{exists}" if="@{local}">
-            <cvs dest="@{dir.parent}">
-               <commandline>
-                  <argument value="-d"/>
-                  <argument value="@{build.cvsroot}"/>
-                  <argument value="co"/>
-                  <argument value="-d"/>
-                  <argument value="@{id}"/>
-                  <argument value="@{module}"/>
-               </commandline>
-            </cvs>
-            <!-- execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- The component already exists do a cvs update
-              and run the after synchronization
-         -->
-         <component nomain="true">
-            <cvs command="update -dP" failonerror="true"/>
-            <!--execant target="synchronize.after"/-->
-         </component>
-
-         <!-- If we are not doing a source checkout of this
-              component, download the artifacts to thirdparty
-         -->
-         <artifact unless="@{component.local}">
-            <mkdir dir="@{parentDir}"/>
-            <get src="@{location}" 
-                 dest="@{output}" 
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Commit                                                       -->
-      <!-- Commits the changes to cvs                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="commit" description="Commit">
-         <!-- Commit the main build and tools -->
-         <main>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-            <invoke target="commit" dir="../tools"/>
-         </main>
-         <!-- Commit the component -->
-         <component>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-         </component>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Test                                                         -->
-      <!-- Builds and runs the tests                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="test" description="Build and run the tests">
-         <component depends="build, runtest"/>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RunTest                                                      -->
-      <!-- Runs the tests for sources marked with a test attribute      -->
-      <!-- ============================================================ -->
-      
-      <!-- Run the Test -->
-      <targetdef target="runtest" description="Run tests">
-         <component/>
-         <source when="@{test}">
-            <mkdir dir="@{testDir}"/>
-            <delete file="@{testDir}/test.log"/>
-            <junit fork="true"
-                   printSummary="true">
-               <sysproperty key="org.jboss.test.logfile" value="@{testDir}/test.log"/>
-               <formatter type="plain"/>
-               <classpath>
-                  <pathElements/>
-               </classpath>
-               <batchtest todir="@{testDir}">
-                  <fileset dir="@{sourceDir}" includes="@{test}"/>
-               </batchtest>
-            </junit>
-         </source>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Rebuild                                                      -->
-      <!-- Synchronizes then builds                                     -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild -->
-      <targetdef target="rebuild" description="Synchronize then build">
-         <common depends="synchronize">
-            <execant target="build"/>
-         </common>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RebuildAll                                                   -->
-      <!-- Synchronizes then builds all                                 -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild all -->
-      <targetdef target="rebuildall" description="Synchronize then build all">
-         <common depends="synchronize">
-            <execant target="all"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize.After                                            -->
-      <!-- After synchronization processing                             -->
-      <!-- ============================================================ -->
-
-      <!-- After synchronization processing -->
-      <targetdef target="synchronize.after" description="After synchronization processing">
-              <main>
-                 <idemain/>
-              </main>
-              <component>
-                 <idecomponent/>
-              </component>
-      </targetdef>
-      
-
-      
- </targets>   
-
-<!-- ================================================================== -->
-<!-- Macro Definitions                                                  -->
-<!-- ================================================================== -->
-
-   <condition property="execant-executable" value="cmd.exe">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-executable" value="ant"/>
-   <condition property="execant-prefix" value="/c ant">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-prefix" value=""/>
-   <!-- Set the execant.args to empty unless it already exists -->
-   <condition property="execant.args" value="">
-      <not><isset property="execant.args"/></not>
-   </condition>
-
-   <!-- The execant macro -->
-   <macrodef name="execant">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <attribute name="filename"
-                 default="jbossbuild.xml"
-                 description="The ant file to execute"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <exec dir="@{dir}" 
-               executable="${execant-executable}"
-         >
-            <arg line="${execant-prefix} ${execant.args} -f @{filename} @{target}"/>
-         </exec>
-      </sequential>
-   </macrodef>
-
-   <!-- The invoke macro -->
-   <macrodef name="invoke">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <ant antfile="jbossbuild.xml" dir="@{dir}" target="@{target}"/>
-      </sequential>
-   </macrodef>
-
-<!-- ================================================================== -->
-<!-- Targets                                                            -->
-<!-- ================================================================== -->
-
-   <target name="help-fragment">
-      <fail message="Do not execute this build fragment directly!"/>
-   </target>
-   
-</project>
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/etc/jbossbuild/tasks.xml (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/etc/jbossbuild/tasks.xml)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/README
===================================================================
--- branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/README	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/README	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,14 +0,0 @@
-Please refer to the Ant manual under Installing Ant / Library
-Dependencies for a list of the jar requirements for various optional
-tasks and features.
-
-This directory contains xercesImpl.jar from the 2.6.1 release of
-Apache Xerces.  For more information or newer releases see
-<http://xml.apache.org/xerces2-j/>.  See the file LICENSE.xerces for
-the terms of distribution.
-
-It also contains xml-apis.jar from the 2.6.1 release of Apache Xerces.
-For more information or newer releases see
-<http://xml.apache.org/commons/>.  See the files LICENSE.dom and
-LICENSE.sax for the terms of distribution.
-

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/README (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/README)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-javamail.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-javamail.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/ant-javamail.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-junit.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/ant-junit.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-launcher.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-launcher.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/ant-launcher.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-nodeps.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-nodeps.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/ant-nodeps.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-trax.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-trax.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/ant-trax.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-xslp.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant-xslp.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/ant-xslp.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/ant.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/ant.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/bsf.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/bsf.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/bsf.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/buildmagic-tasks.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/buildmagic-tasks.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/buildmagic-tasks.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/jbossbuild.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/jbossbuild.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/jbossbuild.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/jdtCompilerAdapter.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/jdtCompilerAdapter.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/jdtCompilerAdapter.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/junit.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/junit.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/pretty.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/pretty.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/pretty.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/resolver.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/resolver.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/resolver.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xalan.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xalan.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/xalan.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xercesImpl.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xercesImpl.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/xercesImpl.jar)

Deleted: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xml-apis.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-log4j/trunk/tools/lib/xml-apis.jar (from rev 1956, branches/logging_refactoring/common-logging-log4j/trunk/tools/lib/xml-apis.jar)

Copied: branches/refactor-test-branch/common-logging-spi (from rev 1956, branches/logging_refactoring/common-logging-spi)

Copied: branches/refactor-test-branch/common-logging-spi/trunk (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/build-compile.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/build-compile.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/build-compile.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">   
-]>
-
-<project default="main" name="JBoss/Build">
-
-  &buildmagic;
-  &libraries;
-  &targets;
-   <!-- The combined library classpath -->
-      <path id="library.classpath">
-      </path>
-
-        <!-- The combined dependent module classpath -->
-        <path id="dependentmodule.classpath">
-    </path>
-  
-  <target name="compile-classes"
-    depends="_default:compile-classes"/>
-
-</project>

Copied: branches/refactor-test-branch/common-logging-spi/trunk/build-compile.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/build-compile.xml)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/build-thirdparty.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/build-thirdparty.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/build-thirdparty.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<!-- $Id: build-thirdparty.xml,v 1.113 2006/05/23 23:19:24 jgreene Exp $ -->
-<project name="main.build"
-          default="synchronize"
-          basedir=".">
-
-   <!-- Property File definitions -->
-   <property file="local.properties"/>
-   <property file="synchronize.properties"/>
-   <property environment="env"/>
-
-   <!-- Property Definitions -->
-   <property name="generatedLibrariesFiles" value="thirdparty/libraries.ent"/>
-
-   <!-- Allow jbossbuild.repository to be set from (in order or priority)
-      + Command line -Djbossbuild.repository=...
-      + synchronize.properties jbossbuild.repository setting
-      + JBOSS_REPOSITORY environment variable
-   -->
-   <condition property="jbossbuild.repository" value="${env.JBOSS_REPOSITORY}">
-      <isset property="env.JBOSS_REPOSITORY"/>
-   </condition>
-   <!-- Fall back to default -->
-   <property name="jbossbuild.repository" value="http://repository.jboss.com"/>
-
-   <!-- File Imports -->
-   <import file="tools/etc/jbossbuild/tasks.xml"/>
-
-
-   <!-- Main Definition of dependencies -->
-   <build id="jbossas-thirdparty"
-          impltitle="JBossAS"
-          implversion="jboss-head"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.org"
-          description="JBoss Application Server"
-          cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
-          thirdpartypath="thirdparty/"
-          location="${jbossbuild.repository}"
-          targetdefs="targets">
-
-      <!--
-        The repository is in CVS under the module repository.jboss.com whose contents
-        are pushed to the http://repository.jboss.com site.
-      -->
-
-
-   </build>
-
-   <synchronizeinfo/>
-
-   <!-- Generate the targets -->
-   <generate generate="jbossas-thirdparty"/>
-
-
-   <target name="generate-lib-file"
-      description="generate libraries.ent and thirdparty license info"
-      depends="synchronize">
-         <gen-lib-file filename="${generatedLibrariesFiles}" path="tools/etc/buildmagic/" />
-      <visit-componentref-graph
-         componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor" />
-   </target>
-
-</project>

Copied: branches/refactor-test-branch/common-logging-spi/trunk/build-thirdparty.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/build-thirdparty.xml)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/build.bat
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/build.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/build.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,89 +0,0 @@
- at echo off
-REM  ======================================================================
-REM
-REM  This is the main entry point for the build system.
-REM
-REM  Users should be sure to execute this file rather than 'ant' to ensure
-REM  the correct version is being used with the correct configuration.
-REM
-REM  ======================================================================
-REM
-REM $Id$
-REM
-REM Authors:
-REM     Jason Dillon <jason at planet57.com>
-REM     Sacha Labourey <sacha.labourey at cogito-info.ch>
-REM
-
-REM ******************************************************
-REM Ignore the ANT_HOME variable: we want to use *our*
-REM ANT version and associated JARs.
-REM ******************************************************
-REM Ignore the users classpath, cause it might mess
-REM things up
-REM ******************************************************
-
-SETLOCAL
-
-set CLASSPATH=
-set ANT_HOME=
-set ANT_OPTS=-Djava.protocol.handler.pkgs=org.jboss.net.protocol -Dbuild.script=build.bat
-
-REM ******************************************************
-REM - "for" loops have been unrolled for compatibility
-REM   with some WIN32 systems.
-REM ******************************************************
-
-set NAMES=tools;tools\ant;tools\apache\ant
-set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
-
-REM ******************************************************
-REM ******************************************************
-
-SET EXECUTED=FALSE
-for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
-
-goto :EOF
-
-
-REM ******************************************************
-REM ********* Search for names in the subfolders *********
-REM ******************************************************
-
-:subLoop
-for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %2 %3 %4 %5 %6 %7
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************ Test if ANT Batch file exists ***********
-REM ******************************************************
-
-:testIfExists
-if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************** Batch file has been found *************
-REM ******************************************************
-
-:BatchFound
-if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
-set EXECUTED=TRUE
-
-goto :EOF
-
-REM ******************************************************
-REM ************* Execute Batch file only once ***********
-REM ******************************************************
-
-:ExecuteBatch
-echo Calling %1 %2 %3 %4 %5 %6 %7 %8
-call %1 %2 %3 %4 %5 %6 %7 %8
-
-:end
-
-if "%NOPAUSE%" == "" pause

Copied: branches/refactor-test-branch/common-logging-spi/trunk/build.bat (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/build.bat)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/build.sh
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/build.sh	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/build.sh	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,173 +0,0 @@
-#!/bin/sh
-### ====================================================================== ###
-##                                                                          ##
-##  This is the main entry point for the build system.                      ##
-##                                                                          ##
-##  Users should be sure to execute this file rather than 'ant' to ensure   ##
-##  the correct version is being used with the correct configuration.       ##
-##                                                                          ##
-### ====================================================================== ###
-#
-
-# $Id$
-
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-GREP="grep"
-ROOT="/"
-
-# Ignore user's ANT_HOME if it is set
-ANT_HOME=""
-
-# the default search path for ant
-ANT_SEARCH_PATH="\
-    tools
-    tools/ant \
-    tools/apache/ant \
-    ant"
-
-# the default build file name
-ANT_BUILD_FILE="build.xml"
-
-# the default arguments
-ANT_OPTIONS="-find $ANT_BUILD_FILE"
-
-# Use the maximum available, or set MAX_FD != -1 to use that
-MAX_FD="maximum"
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-darwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-
-    Darwin*)
-        darwin=true
-        ;;
-esac
-
-#
-# Helper to complain.
-#
-die() {
-    echo "${PROGNAME}: $*"
-    exit 1
-}
-
-#
-# Helper to complain.
-#
-warn() {
-    echo "${PROGNAME}: $*"
-}
-
-#
-# Helper to source a file if it exists.
-#
-maybe_source() {
-    for file in $*; do
-	if [ -f "$file" ]; then
-	    . $file
-	fi
-    done
-}
-
-search() {
-    search="$*"
-    for d in $search; do
-	ANT_HOME="`pwd`/$d"
-	ANT="$ANT_HOME/bin/ant"
-	if [ -x "$ANT" ]; then
-	    # found one
-	    echo $ANT_HOME
-	    break
-	fi
-    done
-}
-
-#
-# Main function.
-#
-main() {
-    # if there is a build config file. then source it
-    maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
-
-    # Increase the maximum file descriptors if we can
-    if [ $cygwin = "false" ]; then
-	MAX_FD_LIMIT=`ulimit -H -n`
-	if [ $? -eq 0 ]; then
-	    if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
-		# use the system max
-		MAX_FD="$MAX_FD_LIMIT"
-	    fi
-
-	    ulimit -n $MAX_FD
-	    if [ $? -ne 0 ]; then
-		warn "Could not set maximum file descriptor limit: $MAX_FD"
-	    fi
-	else
-	    warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-	fi
-    fi
-
-    # try the search path
-    ANT_HOME=`search $ANT_SEARCH_PATH`
-
-    # try looking up to root
-    if [ "x$ANT_HOME" = "x" ]; then
-	target="build"
-	_cwd=`pwd`
-
-	while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
-	    cd ..
-	    cwd=`pwd`
-	    ANT_HOME=`search $ANT_SEARCH_PATH`
-	done
-
-	# make sure we get back
-	cd $_cwd
-
-	if [ "$cwd" != "$ROOT" ]; then
-	    found="true"
-	fi
-
-	# complain if we did not find anything
-	if [ "$found" != "true" ]; then
-	    die "Could not locate Ant; check \$ANT or \$ANT_HOME."
-	fi
-    fi
-
-    # make sure we have one
-    ANT=$ANT_HOME/bin/ant
-    if [ ! -x "$ANT" ]; then
-	die "Ant file is not executable: $ANT"
-    fi
-
-    # need to specify planet57/buildmagic protocol handler package
-    ANT_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
-
-    # setup some build properties
-    ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"
-
-    # change to the directory where the script lives so users are not forced
-    # to be in the same directory as build.xml
-    cd $DIRNAME
-
-    # export some stuff for ant
-    export ANT ANT_HOME ANT_OPTS
-
-    # execute in debug mode, or simply execute
-    if [ "x$ANT_DEBUG" != "x" ]; then
-	/bin/sh -x $ANT $ANT_OPTIONS "$@"
-    else
-	exec $ANT $ANT_OPTIONS "$@"
-    fi
-}
-
-##
-## Bootstrap
-##
-
-main "$@"

Copied: branches/refactor-test-branch/common-logging-spi/trunk/build.sh (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/build.sh)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/build.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/build.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/build.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,179 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">
-]>
-
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-
-<project default="build" name="JBoss/Common">
-
-  <!-- ================================================================== -->
-  <!-- Setup                                                              -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Include the common Buildmagic elements.
-     |
-     | This defines several different targets, properties and paths.
-     | It also sets up the basic extention tasks amoung other things.
-   -->
-
-  &buildmagic;
-
-  <!--
-     | Include the normal targets.
-   -->
-  &targets;
-
-  <!-- ================================================================== -->
-  <!-- Configuration                                                      -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Configure the build system.  
-     |
-     | This target is invoked by the Buildmagic initialization logic and 
-     | should contain module specific configuration elements.
-   -->
-
-  <target name="configure" unless="configure.disable">
-
-    <!-- =================== -->
-    <!-- Basic Configuration -->
-    <!-- =================== -->
-
-    <!-- Module name(s) & version -->
-    <property name="module.name" value="common"/>
-    <property name="module.Name" value="JBoss/Common"/>
-    <property name="module.version" value="DEV"/>
-
-    
-
-    <!-- The combined dependent module classpath -->
-    <path id="dependentmodule.classpath">
-    </path>
-
-    <!-- ===== -->
-    <!-- Tasks -->
-    <!-- ===== -->
-
-    <call target="_default:task-init"/>
-    
-    <!-- Set project specific properties -->
-    <property name="jboss.home" value="../build/output/jboss-${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="server" value="default"/>
-    
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Compile                                                            -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each 
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-  <target name="compile" depends="_default:compile-etc"
-    description="Compile all source files.">
-    <ant antfile="build-compile.xml" target="compile-classes"/>
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="module-jars">
-
-    <!-- Build jboss-common.jar -->
-    <jar jarfile="${build.lib}/common-logging-spi.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"/>
-    </jar>
-  </target>
-  
-  <target name="build" depends="createthirdparty, main"/>
-  
-   <!-- create the thirdparty folder from items in the repository -->
-   <!-- then generate a new libraries.ent file and include it in  -->
-   <!-- the build                                                 -->
-   <target name="createthirdparty" unless="inhibit.downloads"
-      depends="check.inhibit.downloads, set.proxy">
-      
-      <ant antfile="build-thirdparty.xml" target="generate-lib-file"/>
-   </target>
-
-   <!-- check if thirdparty libraries are to be downloaded -->
-   <target name="check.inhibit.downloads">
-      <condition property="inhibit.downloads">
-         <or>
-            <uptodate property="dependencies.current"
- 	      srcfile="build-thirdparty.xml"
-               targetfile="thirdparty/libraries.ent"/>
-            <istrue value="${nodownload}"/>
-         </or>
-      </condition>
-  </target>
-
-  <!-- check if the the user has specied proxy settings -->
-  <target name="check.proxy">
-    <condition property="hasproxy">
-        <and>
-            <isset property="proxy.host"/>
-            <isset property="proxy.port"/>
-            <not>
-                <equals arg1="" arg2="${proxy.host}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.port}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  </target>
-
-  <!-- set proxy settings -->
-  <condition property="hasproxyauth">
-        <and>
-            <isset property="hasproxy"/>
-            <isset property="proxy.username"/>
-            <isset property="proxy.password"/>
-            <not>
-                <equals arg1="" arg2="${proxy.username}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.password}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
-
-  <!-- set proxy settings without auth -->
-  <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
-    <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
-  </target>
-
-  <!-- set proxy settings using auth -->
-  <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
-    <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
-  </target>  
-  
-</project>

Copied: branches/refactor-test-branch/common-logging-spi/trunk/build.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/build.xml)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/pom.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/pom.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/pom.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,95 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>jboss.logging</groupId>
-  <artifactId>jboss-logging-spi</artifactId>
-  <packaging>jar</packaging>
-  <version>1.0.1.TEST</version>
-  <name>JBoss Logging Programming Interface</name>
-  <url>http://www.jboss.org</url>
-  <description>The JBoss Logging Framework Programming Interface</description>
-  <licenses>
-   <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-   </license>
-  </licenses>
-  <organization>
-    <name>JBoss Inc.</name>
-    <url>http://www.jboss.org</url>
-  </organization>
-
-  <repositories>
-    <repository>
-      <id>jboss</id>
-      <name>JBoss Inc. Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.com/maven2/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <pluginRepositories>
-     <pluginRepository>
-        <id>jbosspluginrepo</id>
-        <name>jboss plugin repository</name>
-        <url>http://repository.jboss.com/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-      <pluginRepository>
-        <id>central</id>
-        <name>LSU maven2 mirror</name>
-        <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-  </pluginRepositories>
-
-  
-  <build>
-     <sourceDirectory>src/main/java</sourceDirectory>
-  <plugins>
-  
-
-    
-      <!-- define how we want compilation to take place
-           here, we accept most of the defaults but say that we want the
-           optimization flag set, and define the source and target to be 1.4,
-           these setting will be inherited by child projects -->
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0</version>
-          <configuration>
-              <optimize>true</optimize>
-              <source>1.4</source>
-              <target>1.4</target>
-          </configuration>
-      </plugin>  
-
-      <!-- define that we wish to create src jars -->
-      <plugin>
-        <artifactId>maven-source-plugin</artifactId>
-        <inherited>true</inherited>
-       <executions>
-        <execution>
-          <goals>
-            <goal>jar</goal>
-          </goals>
-        </execution>
-      </executions>
-      </plugin>     
-    
-    </plugins>
-  </build>
-
-</project>
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/pom.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/pom.xml)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/etc (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/etc)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/src/etc/default.mf
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/src/etc/default.mf	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/src/etc/default.mf	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Created-By: @java.vm.version@ (@java.vm.vendor@)
-Specification-Title: @specification.title@
-Specification-Version: @specification.version@
-Specification-Vendor: @specification.vendor@
-Implementation-Title: @implementation.title@
-Implementation-URL: @implementation.url@
-Implementation-Version: @implementation.version@
-Implementation-Vendor: @implementation.vendor@
-Implementation-Vendor-Id: @implementation.vendor.id@

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/etc/default.mf (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/etc/default.mf)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main/java)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,254 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging;
-
-/**
- * An extension of the JBoss Logger that adds a log()
- * primitive that maps to a dynamically defined log level.
- * 
- * TODO - Make sure serialization works correctly
- * 
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @version <tt>$Revision$</tt>
- * 
- * @since 4.0.3
- */
-public class DynamicLogger extends Logger
-{
-   private static final long serialVersionUID = -5963699806863917370L;
-   
-   /** The available log levels */
-   public static final int LOG_LEVEL_NONE  = 0;
-   public static final int LOG_LEVEL_FATAL = 1;
-   public static final int LOG_LEVEL_ERROR = 2;
-   public static final int LOG_LEVEL_WARN  = 3;
-   public static final int LOG_LEVEL_INFO  = 4;
-   public static final int LOG_LEVEL_DEBUG = 5;
-   public static final int LOG_LEVEL_TRACE = 6;
-   
-   /** The available log level strings */
-   public final static String[] LOG_LEVEL_STRINGS =
-      { "NONE", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" }; 
-    
-   /** The log level to use for the "log" primitive */
-   private int logLevel = LOG_LEVEL_DEBUG;
-   
-   /**
-    * Protected CTOR
-    */
-   protected DynamicLogger(final String name)
-   {
-      super(name);
-   }
-   
-   /////////////////////////////////////////////////////////////////////////
-   //                            Factory Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Create a DynamicLogger instance given the logger name.
-    *
-    * @param name     the logger name
-    */
-   public static DynamicLogger getDynamicLogger(String name)
-   {
-      return new DynamicLogger(name);
-   }
-
-   /**
-    * Create a DynamicLogger instance given the logger name with the given suffix.
-    *
-    * <p>This will include a logger seperator between classname and suffix
-    *
-    * @param name     The logger name
-    * @param suffix   A suffix to append to the classname.
-    */
-   public static DynamicLogger getDynamicLogger(String name, String suffix)
-   {
-      return new DynamicLogger(name + "." + suffix);
-   }
-
-   /**
-    * Create a DynamicLogger instance given the logger class. This simply
-    * calls create(clazz.getName()).
-    *
-    * @param clazz    the Class whose name will be used as the logger name
-    */
-   public static DynamicLogger getDynamicLogger(Class clazz)
-   {
-      return new DynamicLogger(clazz.getName());
-   }
-
-   /**
-    * Create a DynamicLogger instance given the logger class with the given suffix.
-    *
-    * <p>This will include a logger seperator between classname and suffix
-    *
-    * @param clazz    The Class whose name will be used as the logger name.
-    * @param suffix   A suffix to append to the classname.
-    */
-   public static DynamicLogger getDynamicLogger(Class clazz, String suffix)
-   {
-      return new DynamicLogger(clazz.getName() + "." + suffix);
-   }
-   
-   /////////////////////////////////////////////////////////////////////////
-   //                         Extensions to Logger                        //
-   /////////////////////////////////////////////////////////////////////////
-   
-   /**
-    * Sets the logLevel for the log() primitive
-    * 
-    * @param logLevel between LOG_LEVEL_NONE and LOG_LEVEL_TRACE
-    */
-   public void setLogLevel(int logLevel)
-   {
-      if (logLevel >= LOG_LEVEL_NONE && logLevel <= LOG_LEVEL_TRACE)
-      {
-         this.logLevel = logLevel;
-      }
-   }
-   
-   /**
-    * Gets the logLevel of the log() primitive
-    * 
-    * @return the logLevel of the log() primitive
-    */
-   public int getLogLevel()
-   {
-      return logLevel;
-   }
-   
-   /**
-    * Sets the logLevel of the log() primitive
-    * 
-    * @param logLevelString the log level in String form
-    */
-   public void setLogLevelAsString(String logLevelString)
-   {
-      if (logLevelString != null)
-      {
-         logLevelString = logLevelString.toUpperCase().trim();
-         
-         for (int i = 0; i <= LOG_LEVEL_TRACE; i++)
-         {
-            if (logLevelString.equals(LOG_LEVEL_STRINGS[i]))
-            {
-               // match
-               this.logLevel = i;
-               break;
-            }
-         }
-      }
-   }
-   
-   /**
-    * Gets the logLevel of the log() primitive in String form
-    *
-    * @return the logLevel of the log() primitive in String form
-    */
-   public String getLogLevelAsString()
-   {
-      return LOG_LEVEL_STRINGS[logLevel];
-   }
-   
-   /**
-    * Logs a message using dynamic log level
-    * 
-    * @param message the message to log
-    */
-   public void log(Object message)
-   {
-      switch (logLevel)
-      {
-         case LOG_LEVEL_TRACE:
-            super.trace(message);
-            break;
-            
-         case LOG_LEVEL_DEBUG:
-            super.debug(message);
-            break;
-            
-         case LOG_LEVEL_INFO:
-            super.info(message);
-            break;
-            
-         case LOG_LEVEL_WARN:
-            super.warn(message);
-            break;
-            
-         case LOG_LEVEL_ERROR:
-            super.error(message);
-            break;
-            
-         case LOG_LEVEL_FATAL:
-            super.fatal(message);
-            break;
-            
-         case LOG_LEVEL_NONE:
-         default:
-            // do nothing
-            break;
-      }
-   }
-   
-   /**
-    * Logs a message and a throwable using dynamic log level
-    * @param message the message to log
-    * @param t       the throwable to log
-    */
-   public void log(Object message, Throwable t)
-   {
-      switch (logLevel)
-      {
-         case LOG_LEVEL_TRACE:
-            super.trace(message, t);
-            break;
-            
-         case LOG_LEVEL_DEBUG:
-            super.debug(message, t);
-            break;
-            
-         case LOG_LEVEL_INFO:
-            super.info(message, t);
-            break;
-            
-         case LOG_LEVEL_WARN:
-            super.warn(message, t);
-            break;
-            
-         case LOG_LEVEL_ERROR:
-            super.error(message, t);
-            break;
-            
-         case LOG_LEVEL_FATAL:
-            super.fatal(message, t);
-            break;
-            
-         case LOG_LEVEL_NONE:
-         default:
-            // do nothing
-            break;
-      }      
-   }
-   
-}

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,390 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging;
-
-import java.io.Serializable;
-
-/**
- * Logger wrapper that tries to dynamically load a log4j class to
- * determine if log4j is available in the VM. If it is the case,
- * a log4j delegate is built and used. In the contrary, a null
- * logger is used. This class cannot directly reference log4j
- * classes otherwise the JVM will try to load it and make it fail.
- * To set
- *
- * <p>Only exposes the relevent factory and logging methods.
- * 
- * <p>For JBoss the logging should be done as follows:
- * <ul>
- * <li>FATAL - JBoss is likely to/will crash
- * <li>ERROR - A definite problem
- * <li>WARN - Likely to be a problem, or it could be JBoss
- *            detected a problem it can recover from
- * <li>INFO - Lifecycle low volume, e.g. "Bound x into jndi",
- *            things that are of interest to a user
- * <li>DEBUG - Lifecycle low volume but necessarily of interest 
- *             to the user, e.g. "Starting listener thread"
- * <li>TRACE - High volume detailed logging
- * </ul>
- *
- * @see #isTraceEnabled
- * @see #trace(Object)
- * @see #trace(Object,Throwable)
- *
- * @version <tt>$Revision$</tt>
- * @author  Scott.Stark at jboss.org
- * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>
- */
-public class Logger implements Serializable
-{
-   /** Serialization */
-   private static final long serialVersionUID = 4232175575988879434L;
-   /** The system property to look for an externalized LoggerPlugin implementation class */
-   protected static String PLUGIN_CLASS_PROP = "org.jboss.logging.Logger.pluginClass";
-   /** The default LoggerPlugin implementation is log4j */
-   protected static final String LOG4J_PLUGIN_CLASS_NAME = "org.jboss.logging.Log4jLoggerPlugin";
-   /** The LoggerPlugin implementation class to use */
-   protected static Class pluginClass = null;
-   /** The class name of the LoggerPlugin implementation class to use */
-   protected static String pluginClassName = null;
-
-   static
-   {
-      init();
-   }
-
-   /** The logger name. */
-   private final String name;
-
-   protected transient LoggerPlugin loggerDelegate = null;
-
-   /** The LoggerPlugin implementation class name in use
-    * @return LoggerPlugin implementation class name
-    */
-   public static String getPluginClassName()
-   {
-      return Logger.pluginClassName;
-   }
-   /** Set the LoggerPlugin implementation class name in use
-    * @param pluginClassName the LoggerPlugin implementation class name
-    */
-   public static void setPluginClassName(String pluginClassName)
-   {
-      if( pluginClassName.equals(Logger.pluginClassName) == false )
-      {
-         Logger.pluginClassName = pluginClassName;
-         init();
-      }
-   }
-
-   /**
-    * Creates new Logger the given logger name.
-    *
-    * @param name the logger name.
-    */
-   protected Logger(final String name)
-   {
-      this.name = name;
-      this.loggerDelegate = getDelegatePlugin(name);
-   }
-
-   /**
-    * Return the name of this logger.
-    *
-    * @return The name of this logger.
-    */
-   public String getName()
-   {
-      return name;
-   }
-
-   public LoggerPlugin getLoggerPlugin()
-   {
-      return this.loggerDelegate;
-   }
-
-   /**
-    * Check to see if the TRACE level is enabled for this logger.
-    *
-    * @return true if a {@link #trace(Object)} method invocation would pass
-    *         the msg to the configured appenders, false otherwise.
-    */
-   public boolean isTraceEnabled()
-   {
-      return loggerDelegate.isTraceEnabled();
-   }
-
-   /**
-    * Issue a log msg with a level of TRACE.
-    * Invokes log.log(XLevel.TRACE, message);
-    */
-   public void trace(Object message)
-   {
-      loggerDelegate.trace(message);
-   }
-
-   /**
-    * Issue a log msg and throwable with a level of TRACE.
-    * Invokes log.log(XLevel.TRACE, message, t);
-    */
-   public void trace(Object message, Throwable t)
-   {
-      loggerDelegate.trace(message, t);
-   }
-
-   /**
-    * Check to see if the DEBUG level is enabled for this logger.
-    *
-    * @deprecated DEBUG is for low volume logging, you don't need this
-    * @return true if a {@link #trace(Object)} method invocation would pass
-    * the msg to the configured appenders, false otherwise.
-    */
-   public boolean isDebugEnabled()
-   {
-      return loggerDelegate.isDebugEnabled();
-   }
-
-   /**
-    * Issue a log msg with a level of DEBUG.
-    * Invokes log.log(Level.DEBUG, message);
-    */
-   public void debug(Object message)
-   {
-      loggerDelegate.debug(message);
-   }
-
-   /**
-    * Issue a log msg and throwable with a level of DEBUG.
-    * Invokes log.log(Level.DEBUG, message, t);
-    */
-   public void debug(Object message, Throwable t)
-   {
-      loggerDelegate.debug(message, t);
-   }
-
-   /**
-    * Check to see if the INFO level is enabled for this logger.
-    *
-    * @deprecated INFO is for low volume information, you don't need this
-    * @return true if a {@link #info(Object)} method invocation would pass
-    * the msg to the configured appenders, false otherwise.
-    */
-   public boolean isInfoEnabled()
-   {
-      return loggerDelegate.isInfoEnabled();
-   }
-
-   /**
-    * Issue a log msg with a level of INFO.
-    * Invokes log.log(Level.INFO, message);
-    */
-   public void info(Object message)
-   {
-      loggerDelegate.info(message);
-   }
-
-   /**
-    * Issue a log msg and throwable with a level of INFO.
-    * Invokes log.log(Level.INFO, message, t);
-    */
-   public void info(Object message, Throwable t)
-   {
-      loggerDelegate.info(message, t);
-   }
-
-   /**
-    * Issue a log msg with a level of WARN.
-    * Invokes log.log(Level.WARN, message);
-    */
-   public void warn(Object message)
-   {
-      loggerDelegate.warn(message);
-   }
-
-   /**
-    * Issue a log msg and throwable with a level of WARN.
-    * Invokes log.log(Level.WARN, message, t);
-    */
-   public void warn(Object message, Throwable t)
-   {
-      loggerDelegate.warn(message, t);
-   }
-
-   /**
-    * Issue a log msg with a level of ERROR.
-    * Invokes log.log(Level.ERROR, message);
-    */
-   public void error(Object message)
-   {
-      loggerDelegate.error(message);
-   }
-
-   /**
-    * Issue a log msg and throwable with a level of ERROR.
-    * Invokes log.log(Level.ERROR, message, t);
-    */
-   public void error(Object message, Throwable t)
-   {
-      loggerDelegate.error(message, t);
-   }
-
-   /**
-    * Issue a log msg with a level of FATAL.
-    * Invokes log.log(Level.FATAL, message);
-    */
-   public void fatal(Object message)
-   {
-      loggerDelegate.fatal(message);
-   }
-
-   /**
-    * Issue a log msg and throwable with a level of FATAL.
-    * Invokes log.log(Level.FATAL, message, t);
-    */
-   public void fatal(Object message, Throwable t)
-   {
-      loggerDelegate.fatal(message, t);
-   }
-
-   /////////////////////////////////////////////////////////////////////////
-   //                         Custom Serialization                        //
-   /////////////////////////////////////////////////////////////////////////
-
-   private void readObject(java.io.ObjectInputStream stream)
-         throws java.io.IOException, ClassNotFoundException
-   {
-      // restore non-transient fields (aka name)
-      stream.defaultReadObject();
-
-      // Restore logging
-      if (pluginClass == null)
-      {
-         init();
-      }
-      this.loggerDelegate = getDelegatePlugin(name);
-   }
-
-
-   /////////////////////////////////////////////////////////////////////////
-   //                            Factory Methods                          //
-   /////////////////////////////////////////////////////////////////////////
-
-   /**
-    * Create a Logger instance given the logger name.
-    *
-    * @param name    the logger name
-    */
-   public static Logger getLogger(String name)
-   {
-      return new Logger(name);
-   }
-
-   /**
-    * Create a Logger instance given the logger name with the given suffix.
-    *
-    * <p>This will include a logger seperator between classname and suffix
-    *
-    * @param name     The logger name
-    * @param suffix   A suffix to append to the classname.
-    */
-   public static Logger getLogger(String name, String suffix)
-   {
-      return new Logger(name + "." + suffix);
-   }
-
-   /**
-    * Create a Logger instance given the logger class. This simply
-    * calls create(clazz.getName()).
-    *
-    * @param clazz    the Class whose name will be used as the logger name
-    */
-   public static Logger getLogger(Class clazz)
-   {
-      return new Logger(clazz.getName());
-   }
-
-   /**
-    * Create a Logger instance given the logger class with the given suffix.
-    *
-    * <p>This will include a logger seperator between classname and suffix
-    *
-    * @param clazz    The Class whose name will be used as the logger name.
-    * @param suffix   A suffix to append to the classname.
-    */
-   public static Logger getLogger(Class clazz, String suffix)
-   {
-      return new Logger(clazz.getName() + "." + suffix);
-   }
-
-   protected static LoggerPlugin getDelegatePlugin(String name)
-   {
-      LoggerPlugin plugin = null;
-      try
-      {
-         plugin = (LoggerPlugin) pluginClass.newInstance();
-      }
-      catch (Throwable e)
-      {
-         plugin = new NullLoggerPlugin();
-      }
-      try
-      {
-         plugin.init(name);
-      }
-      catch(Throwable e)
-      {
-         System.err.println("Failed to initalize plugin: "+plugin);
-         plugin = new NullLoggerPlugin();
-      }
-
-      return plugin;
-   }
-
-   /** Initialize the LoggerPlugin class to use as the delegate to the
-    * logging system. This first checks to see if a pluginClassName has
-    * been specified via the {@link #setPluginClassName(String)} method,
-    * then the PLUGIN_CLASS_PROP system property and finally the
-    * LOG4J_PLUGIN_CLASS_NAME default. If the LoggerPlugin implementation
-    * class cannot be loaded the default NullLoggerPlugin will be used.
-    */
-   protected static void init()
-   {
-      try
-      {
-         // See if there is a PLUGIN_CLASS_PROP specified
-         if( pluginClassName == null )
-         {
-            pluginClassName = System.getProperty(PLUGIN_CLASS_PROP, LOG4J_PLUGIN_CLASS_NAME);
-         }
-
-         // Try to load the plugin via the TCL
-         ClassLoader cl = Thread.currentThread().getContextClassLoader();
-         pluginClass = cl.loadClass(pluginClassName);
-      }
-      catch (Throwable e)
-      {
-         // The plugin could not be setup, default to a null logger
-         pluginClass = org.jboss.logging.NullLoggerPlugin.class;
-      }
-   }
-}

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,70 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging;
-
-/**
- * Defines a "pluggable" login module. In fact, this is only used to split between 
- * log4j and /dev/null. Choice is made in org.jboss.logging.Logger
- *
- * @see org.jboss.logging.Logger
- * @see org.jboss.logging.Log4jLoggerPlugin
- * @see org.jboss.logging.NullLoggerPlugin
- *
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @version $Revision$
- *
- * <p><b>Revisions:</b>
- *
- * <p><b>30 mai 2002 Sacha Labourey:</b>
- * <ul>
- * <li> First implementation </li>
- * </ul>
- */
-
-public interface LoggerPlugin
-{
-   // must be called first
-   //
-   public void init (String name);
-   
-   public boolean isTraceEnabled();
-   public void trace(Object message);
-   public void trace(Object message, Throwable t);
-
-   public boolean isDebugEnabled();
-   public void debug(Object message);
-   public void debug(Object message, Throwable t);
-
-   public boolean isInfoEnabled();
-   public void info(Object message);
-   public void info(Object message, Throwable t);
-
-   public void warn(Object message);
-   public void warn(Object message, Throwable t);
-
-   public void error(Object message);
-   public void error(Object message, Throwable t);
-
-   public void fatal(Object message);
-   public void fatal(Object message, Throwable t);
-   
-}

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,93 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.logging;
-
-/**
- * LoggerPlugin implementation producing no output at all. Used for client
- * side logging when no log4j.jar is available on the classpath.
- *
- * @see org.jboss.logging.Logger
- * @see org.jboss.logging.LoggerPlugin
- *
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @version $Revision$
- *
- * <p><b>Revisions:</b>
- *
- * <p><b>30 mai 2002 Sacha Labourey:</b>
- * <ul>
- * <li> First implementation </li>
- * </ul>
- */
-
-public class NullLoggerPlugin implements LoggerPlugin
-{
-   
-   // Constants -----------------------------------------------------
-   
-   // Attributes ----------------------------------------------------
-   
-   // Static --------------------------------------------------------
-   
-   // Constructors --------------------------------------------------
-   
-   public NullLoggerPlugin () { }
-   
-   public void init (String name)
-   { /* don't care */ }
-   
-   // Public --------------------------------------------------------
-   
-   public boolean isTraceEnabled () { return false; }
-   public void trace (Object message) { }   
-   public void trace (Object message, Throwable t) { }
-   
-   public boolean isDebugEnabled () { return false; }
-   public void debug (Object message) { }   
-   public void debug (Object message, Throwable t) { }
-   
-   public boolean isInfoEnabled () { return false; }
-   public void info (Object message) { }   
-   public void info (Object message, Throwable t) { }
-   
-   public void error (Object message) { }   
-   public void error (Object message, Throwable t) { }
-   
-   public void fatal (Object message) { }   
-   public void fatal (Object message, Throwable t) { }
-   
-   public void warn (Object message) { }   
-   public void warn (Object message, Throwable t) { }
-   
-   // Z implementation ----------------------------------------------
-   
-   // Y overrides ---------------------------------------------------
-   
-   // Package protected ---------------------------------------------
-   
-   // Protected -----------------------------------------------------
-   
-   // Private -------------------------------------------------------
-   
-   // Inner classes -------------------------------------------------
-   
-}

Copied: branches/refactor-test-branch/common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/.project
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/.project	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/.project	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>tools</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/.project (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/.project)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/bin)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/bin/ant	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,299 +0,0 @@
-#! /bin/sh
-
-#   Copyright 2001-2005 The Apache Software Foundation
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-# Extract launch and ant arguments, (see details below).
-ant_exec_args=
-no_config=false
-use_jikes_default=false
-ant_exec_debug=false
-show_help=false
-for arg in "$@" ; do
-  if [ "$arg" = "--noconfig" ] ; then
-    no_config=true
-  elif [ "$arg" = "--usejikes" ] ; then
-    use_jikes_default=true
-  elif [ "$arg" = "--execdebug" ] ; then
-    ant_exec_debug=true
-  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
-    show_help=true
-    ant_exec_args="$ant_exec_args -h"
-  else
-    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
-      show_help=true
-    fi
-    ant_exec_args="$ant_exec_args \"$arg\""
-  fi
-done
-
-# Source/default ant configuration
-if $no_config ; then
-  rpm_mode=false
-  usejikes=$use_jikes_default
-else
-  # load system-wide ant configuration
-  if [ -f "/etc/ant.conf" ] ; then
-    . /etc/ant.conf
-  fi
-
-  # load user ant configuration
-  if [ -f "$HOME/.ant/ant.conf" ] ; then
-    . $HOME/.ant/ant.conf
-  fi
-  if [ -f "$HOME/.antrc" ] ; then
-    . "$HOME/.antrc"
-  fi
-
-  # provide default configuration values
-  if [ -z "$rpm_mode" ] ; then
-    rpm_mode=false
-  fi
-  if [ -z "$usejikes" ] ; then
-    usejikes=$use_jikes_default
-  fi
-fi
-
-# Setup Java environment in rpm mode
-if $rpm_mode ; then
-  if [ -f /usr/share/java-utils/java-functions ] ; then
-    . /usr/share/java-utils/java-functions
-    set_jvm
-    set_javacmd
-  fi
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
-  ## resolve links - $0 may be a link to ant's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ANT_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ANT_HOME" ] &&
-    ANT_HOME=`cygpath --unix "$ANT_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# Build local classpath using just the launcher in non-rpm mode or
-# use the Jpackage helper in rpm mode with basic and default jars
-# specified in the ant.conf configuration. Because the launcher is
-# used, libraries linked in ANT_HOME will also be include, but this
-# is discouraged as it is not java-version safe. A user should
-# request optional jars and their dependencies via the OPT_JAR_LIST
-# variable
-if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
-  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
-  # If the user requested to try to add some other jars to the classpath
-  if [ -n "$OPT_JAR_LIST" ] ; then
-    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
-    if [ -n "$_OPTCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
-    fi
-  fi
-
-  # Explicitly add javac path to classpath, assume JAVA_HOME set
-  # properly in rpm mode
-  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
-  fi
-  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
-  fi
-
-  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-  # user CLASSPATH first and ant-found jars after.
-  # In that case, the user CLASSPATH will override ant-found jars
-  #
-  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-  # with ant-found jars first and user CLASSPATH after
-  if [ -n "$CLASSPATH" ] ; then
-    # merge local and specified classpath 
-    if [ -z "$LOCALCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$CLASSPATH"
-    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-    else
-      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-    fi
-
-    # remove class path from launcher -cp option
-    CLASSPATH=""
-  fi
-else
-  # not using rpm_mode; use launcher to determine classpaths
-  if [ -z "$LOCALCLASSPATH" ] ; then
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
-  else
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
-  fi
-fi
-
-if [ -n "$JAVA_HOME" ] ; then
-  # OSX hack to make Ant work with jikes
-  if $darwin ; then
-    OSXHACK="${JAVA_HOME}/../Classes"
-    if [ -d "${OSXHACK}" ] ; then
-      for i in "${OSXHACK}"/*.jar
-      do
-        JIKESPATH="$JIKESPATH:$i"
-      done
-    fi
-  fi
-fi
-
-# Allow Jikes support (off by default)
-if $usejikes; then
-  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  ANT_HOME=`cygpath --$format "$ANT_HOME"`
-  ANT_LIB=`cygpath --$format "$ANT_LIB"`
-  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# Show script help if requested
-if $show_help ; then
-  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
-  echo 'Script Options:'
-  echo '  --help, --h            print this message and ant help'
-  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
-  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
-  echo '                         configuration files'
-  echo '  --usejikes             enable use of jikes by default, unless'
-  echo '                         set explicitly in configuration files'
-  echo '  --execdebug            print ant exec line generated by this'
-  echo '                         launch script'
-  echo '  '
-fi
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$ANT_HOME" in
-    *\\ )
-    ANT_HOME="$ANT_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$JIKESPATH" in
-    *\\ )
-    JIKESPATH="$JIKESPATH\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-# Execute ant using eval/exec to preserve spaces in paths,
-# java options, and ant args
-ant_sys_opts=
-if [ -n "$CYGHOME" ]; then
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
-  else
-    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
-  fi
-else
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
-  fi
-fi
-ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
-if $ant_exec_debug ; then
-    echo $ant_exec_command
-fi
-eval $ant_exec_command

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/bin/ant)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant.bat
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/bin/ant.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,126 +0,0 @@
- at echo off
-
-REM  Copyright 2001,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-
-if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ANT_HOME=%~dp0..
-
-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
-
-set _USE_CLASSPATH=yes
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of arguments (up to the command line limit, anyway).
-set ANT_CMD_LINE_ARGS=%1
-if ""%1""=="""" goto doneStart
-shift
-:setupArgs
-if ""%1""=="""" goto doneStart
-if ""%1""==""-noclasspath"" goto clearclasspath
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
-shift
-goto setupArgs
-
-rem here is there is a -noclasspath in the options
-:clearclasspath
-set _USE_CLASSPATH=no
-shift
-goto setupArgs
-
-rem This label provides a place for the argument list loop to break out
-rem and for NT handling to skip to.
-
-:doneStart
-rem find ANT_HOME if it does not exist due to either an invalid value passed
-rem by the user or the %0 problem on Windows 9x
-if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
-
-rem check for ant in Program Files
-if not exist "%ProgramFiles%\ant" goto checkSystemDrive
-set ANT_HOME=%ProgramFiles%\ant
-goto checkJava
-
-:checkSystemDrive
-rem check for ant in root directory of system drive
-if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
-set ANT_HOME=%SystemDrive%\ant
-goto checkJava
-
-:checkCDrive
-rem check for ant in C:\ant for Win9X users
-if not exist C:\ant\lib\ant.jar goto noAntHome
-set ANT_HOME=C:\ant
-goto checkJava
-
-:noAntHome
-echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
-goto end
-
-:checkJava
-set _JAVACMD=%JAVACMD%
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
-goto checkJikes
-
-:noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=java.exe
-
-:checkJikes
-if not "%JIKESPATH%"=="" goto runAntWithJikes
-
-:runAnt
-if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikes
-if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
-
-:runAntWithJikesNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikesAndClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:end
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-
-:mainEnd
-if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/ant.bat (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/bin/ant.bat)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/bin/antRun	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#
-#  Copyright  2001-2002,2004 The Apache Software Foundation
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#       http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# 
-#
-
-# Args: DIR command
-cd "$1"
-CMD="$2"
-shift
-shift
-
-exec "$CMD" "$@"

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/bin/antRun)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun.bat
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/bin/antRun.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
- at echo off
-
-REM
-REM Copyright  2001-2002,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-if ""%1""=="""" goto runCommand
-
-rem Change drive and directory to %1
-if "%OS%"=="Windows_NT" cd /d ""%1""
-if not "%OS%"=="Windows_NT" cd ""%1""
-shift
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of agruments (up to the command line limit, anyway).
-set ANT_RUN_CMD=%1
-if ""%1""=="""" goto runCommand
-shift
-:loop
-if ""%1""=="""" goto runCommand
-set ANT_RUN_CMD=%ANT_RUN_CMD% %1
-shift
-goto loop
-
-:runCommand
-rem echo %ANT_RUN_CMD%
-%ANT_RUN_CMD%
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antRun.bat (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/bin/antRun.bat)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antx.bat
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/bin/antx.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antx.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,6 +0,0 @@
- at echo off
- at setlocal
-set CLASSPATH=%~dp0..\lib\ant.jar;%CLASSPATH%
-java org.apache.tools.ant.Launcher %*
-rem java -jar %ANT_HOME%\lib\ant.jar org.apache.tools.ant.Launcher
- at endlocal

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/antx.bat (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/bin/antx.bat)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/lcp.bat
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/bin/lcp.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/lcp.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,30 +0,0 @@
-REM
-REM Copyright  2001-2004 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-set _CLASSPATHCOMPONENT=%1
-if ""%1""=="""" goto gotAllArgs
-shift
-
-:argCheck
-if ""%1""=="""" goto gotAllArgs
-set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
-shift
-goto argCheck
-
-:gotAllArgs
-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/bin/lcp.bat (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/bin/lcp.bat)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildfragments (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildfragments)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/aliases.ent
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,97 +0,0 @@
-<!-- list of aliases used to bridge gap between buildmagic defs and jbossbuild -->
-
-
-<path id="apache.commons.classpath">
-  <pathelement path="${apache.collections.lib}/commons-collections.jar"/>
-  <pathelement path="${apache.logging.lib}/commons-logging.jar"/>
-  <pathelement path="${apache.httpclient.lib}/commons-httpclient.jar"/>
-  <pathelement path="${apache.pool.lib}/commons-pool.jar"/>
-  <pathelement path="${apache.discovery.lib}/commons-discovery.jar"/>
-  <pathelement path="${apache.fileupload.lib}/commons-fileupload.jar"/>
-  <pathelement path="${apache.lang.lib}/commons-lang-2.0.jar"/>  
-</path>
-
-<path id="sax.classpath">
-  <pathelement path="${xml-sax.classpath}"/>
-</path>
- 
-<property name="xdoclet-xdoclet.lib" value="${xdoclet.xdoclet.lib}"/>
-<path id="xdoclet.task.classpath">
-  <path refid="xdoclet.xdoclet.classpath"/>
-</path>
-   
-<property name="gjt.jpl-util.lib" value="${gjt.jpl.util.lib}"/>   
-<path id="gjt.jpl-util.classpath">
-   <path refid="gjt.jpl.util.classpath"/>
-</path>   
-
-<property name="opennms.joesnmp.lib" value="${joesnmp.joesnmp.lib}"/>   
-<path id="opennms.joesnmp.classpath">
-   <path refid="joesnmp.joesnmp.classpath"/>
-</path>   
-
-<path id="jacorb.idl.classpath">
-   <path refid="apache.avalon.logkit.classpath"/>
-   <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-</path>
-
-<property name="jacorb.idl.include" value="${jacorb.jacorb.resources}"/>
-<property name="jacorb.jacorb.properties" value="${jacorb.jacorb.resources}"/>
-  
-<property name="sleepycat.lib" value="${sleepycat.sleepycat.lib}"/>
-<path id="sleepycat.classpath">
-   <path refid="sleepycat.sleepycat.classpath"/>
-</path>
-  
-<property name="apache.tomcat55.root" value="${apache.tomcat.root}"/>
-<property name="apache.tomcat55.lib" value="${apache.tomcat.lib}"/>
-<path id="apache.tomcat55.classpath">
-   <path refid="apache.tomcat.classpath"/>
-</path>
-  
-<property name="trove.lib" value="${trove.trove.lib}"/>  
-<path id="trove.classpath">
-   <path refid="trove.trove.classpath"/>
-</path>
-  
-<path id="qdox.classpath">
-   <path refid="qdox.qdox.classpath"/>
-</path>
-  
-<property name="javassist.lib" value="${javassist.javassist.lib}"/>
-<path id="javassist.classpath">
-  <path refid="javassist.javassist.classpath"/>
-</path>
-  
-<property name="hibernate.lib" value="${hibernate.hibernate.lib}"/>  
-<path id="hibernate3.classpath">
-  <path refid="hibernate.hibernate.classpath"/>
-</path>
-
-<property name="odmg.lib" value="${odmg.odmg.lib}"/>
-<path id="odmg.classpath">
-  <path refid="odmg.odmg.classpath"/>
-</path>
-
-<property name="cglib.lib" value="${cglib.cglib.lib}"/>
-<path id="cglib.classpath">
-  <path refid="cglib.cglib.classpath"/>  
-</path>
-
-<path id="ejb3-persistence.classpath">
-   <path refid="hibernate.annotations.classpath"/>
-   <path refid="hibernate.entitymanager.classpath"/>
-</path>
-
-<property name="spring.lib" value="${spring.spring.lib}"/>
-<path id="spring.classpath">
-  <path refid="spring.spring.classpath"/>  
-</path>
-
-<!-- Ant -->
-<property name="apache.ant.root" value="${project.tools}"/>
-<property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-<path id="apache.ant.classpath">
-  <pathelement path="${apache.ant.lib}/ant.jar"/>
-</path>
-  
\ No newline at end of file

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/aliases.ent (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/aliases.ent)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/autoload.properties
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  BuildMagic tasks which will be autoloaded.                              ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: autoload.properties,v 1.8 2004/11/24 02:07:35 starksm Exp $ ###
-
-### Stuff that glues things together  ###
-
-resolveproperties=org.jboss.tools.buildmagic.task.ResolveProperties
-resolver=org.jboss.tools.buildmagic.task.ResolveProperties
-propertyfilter=org.jboss.tools.buildmagic.task.PropertyFilter
-require=org.jboss.tools.buildmagic.task.Require
-call=org.jboss.tools.buildmagic.task.CallTarget
-Ant=org.jboss.tools.buildmagic.task.Ant
-
-### Project/Module tasks ###
-
-execmodules=org.jboss.tools.buildmagic.task.module.ExecuteModules
-projectinfo=org.jboss.tools.buildmagic.task.module.ProjectInfo
-moduleinfo=org.jboss.tools.buildmagic.task.module.ModuleInfo
-moduleconfig=org.jboss.tools.buildmagic.task.module.ModuleConfig
-moduleinit=org.jboss.tools.buildmagic.task.module.ModuleInit
-
-### Configuration Helpers ###
-library=org.jboss.tools.buildmagic.task.config.Library
-modulelibrary=org.jboss.tools.buildmagic.task.config.ModuleLibrary
-libraryset=org.jboss.tools.buildmagic.task.config.LibrarySet
-
-### Misc ###
-
-projecthelp=org.jboss.tools.buildmagic.task.ProjectHelp
-_puke=org.jboss.tools.buildmagic.task.util.Puke
-_dump=org.jboss.tools.buildmagic.task.util.Dump
-
-### Unused ??? ###
-
-#set=org.jboss.tools.buildmagic.task.Set
-#unset=org.jboss.tools.buildmagic.task.Unset
-#appendpath=org.jboss.tools.buildmagic.task.AppendPath
-#findroot=org.jboss.tools.buildmagic.task.FindRoot

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/autoload.properties (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/autoload.properties)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/build-common.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,905 +0,0 @@
-<project name="common tasks">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}" 
-	        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-  Unsupported Ant version:
-    ${ant.version}
-  Please install a version which is compatible with Ant ${buildmagic.ant16.baseversion}.
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Define the environment varaible. This needs to be first. -->
-  <property environment="env"/>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-  <property name="project.build" value="${project.root}/build"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-
-  <!-- Include user and project property overrides. -->
-  <import file="version-info.xml" />
-  <property file="${project.build}/local.properties"/>
-
-    <available file="${module.root}/etc/local.properties-example"
-	       property="init.have-local-properties"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" unless="build-bypass.disabled">
-
-   <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="**/*"/>
-      <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-      <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-      <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-      <srcfiles dir="${project.tools}" includes="**/*"/>
-   </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-   <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-   </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean">
-   <available file="${module.output}" property="module.output.present"/>  
-   <antcall target="_buildmagic:clean-internal"/>
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal" if="module.output.present">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes/**"/>
-      </fileset>
-    </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-	zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-    <!-- Where source files live -->
-    <property name="source.java" value="${module.source}/main"/>
-    <property name="source.etc" value="${module.source}/etc"/>
-    <property name="source.bin" value="${module.source}/bin"/>
-    <property name="source.docs" value="${module.source}/docs"/>
-    <property name="source.resources" value="${module.source}/resources"/>
-    <property name="source.examples" value="${module.source}/examples"/>
-
-    <!-- Where build generated files will go -->
-    <property name="build.classes" value="${module.output}/classes"/>
-    <property name="build.lib" value="${module.output}/lib"/>
-    <property name="build.api" value="${module.output}/api"/>
-    <property name="build.etc" value="${module.output}/etc"/>
-    <property name="build.bin" value="${module.output}/bin"/>
-    <property name="build.docs" value="${module.output}/docs"/>
-    <property name="build.parsers" value="${module.output}/gen-parsers"/>
-    <property name="build.resources" value="${module.output}/resources"/>
-    <property name="build.examples" value="${module.output}/examples"/>
-    <property name="build.reports" value="${module.output}/reports"/>
-    <property name="build.gen" value="${module.output}/gen"/>
-    <property name="build.gen-src" value="${module.output}/gen-src"/>
-    <property name="build.todo" value="${module.output}/todo"/>
-
-    <!-- Install/Release structure -->
-    <property name="install.id" value="${module.name}-${module.version}"/>
-    <property name="release.id" value="${install.id}"/>
-    <property name="install.root" value="${module.output}/${install.id}"/>
-
-    <!-- The combined thirdparty classpath -->
-    <path id="thirdparty.classpath">
-      <path refid="library.classpath"/>
-      <path refid="dependentmodule.classpath"/>
-    </path>
-
-    <!-- This module is based on Java 1.4 -->
-    <property name="javac.target" value="1.4"/>
-    <property name="javac.source" value="1.4"/>
-
-    <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-    <property name="rmic.stubVersion" value="1.2"/>
-
-    <!-- classpath and local.classpath must have a value using with a path -->
-    <property name="classpath" value=""/>
-    <property name="local.classpath" value=""/>
-
-    <!-- The classpath required to build classes. -->
-    <path id="javac.classpath">
-      <pathelement path="${classpath}"/>
-      <pathelement path="${local.classpath}"/>
-      <path refid="thirdparty.classpath"/>
-    </path>
-
-    <!-- The classpath required to build javadocs. -->
-    <path id="javadoc.classpath">
-      <path refid="javac.classpath"/>
-    </path>
-
-    <!-- The default prefix -->
-    <property name="jar.prefix" value="jboss-${module.name}"/>
-
-    <!-- The default server and client jar name -->
-    <property name="jar.server.name" value="${jar.prefix}.jar"/>
-    <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-    <!-- Packages to include when generating api documentation -->
-    <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <javac destdir="${build.classes}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-         depend="${javac.depend}"
-         verbose="${javac.verbose}"
-         deprecation="${javac.deprecation}"
-         includeAntRuntime="${javac.include.ant.runtime}"
-         includeJavaRuntime="${javac.include.java.runtime}"
-         failonerror="${javac.fail.onerror}">
-     <src path="${source.java}:${build.gen-src}"/>
-     <classpath refid="javac.classpath"/>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" unless="mbean-bypass.disabled">
-
-   <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="${mbean.includes}"/>
-   </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-        depends="_buildmagic:mbean-bypass-checker" 
-        unless="mbean-bypass.on">
-
-    <taskdef name="jmxdoclet"
-             classname="xdoclet.modules.jmx.JMXDocletTask"
-             classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.gen-src}"/>
-    
-    <jmxdoclet destdir="${build.gen-src}"
-               excludedtags="@version, at author">
-      <fileset dir="${source.java}" 
-               includes="${mbean.includes}"/>
-      <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    </jmxdoclet>
-    
-    <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <javac destdir="${build.test}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    failonerror="${javac.fail.onerror}">
-     <src path="${source.test}:${build.gen.test}"/>
-     <classpath>
-       <path refid="javac.classpath"/>
-       <pathelement location="${build.classes}"/>
-     </classpath>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-       <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-
-</target>
-
-<target name="_default:fix-bin">
-  <fixcrlf srcdir="${build.bin}"
-        eol="lf" eof="remove"
-        includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}" 
-        eol="crlf" eof="remove"
-        includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-       <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" unless="compile.disable">
-  <rmic base="${build.classes}"
-        verify="${rmic.verify}"
-   iiop="${rmic.iiop}"
-   iiopopts="${rmic.iiopops}"
-   idl="${rmic.idl}"
-   idlopts="${rmic.idlops}"
-   debug="${rmic.debug}"
-        stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-    <!-- Build the server jar -->
-    <jar jarfile="${build.lib}/${jar.server.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.server.includes}"/>
-    </jar>
-
-    <!-- Build jbossmq-client.jar -->
-    <jar jarfile="${build.lib}/${jar.client.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.client.includes}"/>
-    </jar>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-   depends="docs-api, docs-todo"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-
-<target name="docs-javadocs-check">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-         targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-  <!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs" 
-     depends="docs-javadocs-check" 
-     unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="${javadoc.packages}"
-             sourcepath="${source.java}:${module.output}/gen-src"
-             destdir="${build.api}"
-             classpathref="javadoc.classpath"
-             windowtitle="${javadoc.windowtitle}"
-        splitindex="${javadoc.splitindex}"
-             author="${javadoc.author}"
-             version="${javadoc.version}"
-             public="${javadoc.public}"
-             package="${javadoc.package}"
-             protected="${javadoc.protected}"
-             private="${javadoc.private}"
-             use="${javadoc.use}"
-        verbose="${javadoc.verbose}"> 
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2002 JBoss Group, LLC. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-    
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-      
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false" />
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false" />
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false" />
-    <tag name="ejb.pk" description="ejb" enabled="false" />
-    <tag name="ejb.bean" description="ejb" enabled="false" />
-    <tag name="ejb.transaction" description="ejb" enabled="false" />
-    <tag name="ejb.finder" description="ejb" enabled="false" />
-    <tag name="ejb.relation" description="ejb" enabled="false" />
-    <tag name="ejb.create-method" description="ejb" enabled="false" />
-    
-    <tag name="jboss.query" description="jboss" enabled="false" />
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false" />
-    <tag name="jboss.load-group" description="jboss" enabled="false" />
-    <tag name="jboss.persistence" description="jboss" enabled="false" />
-    <tag name="jboss.entity-command" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false" />
-    <tag name="jboss.relation-table" description="jboss" enabled="false" />
-    <tag name="jboss.table-attribute" description="jboss" enabled="false" />
-    
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false" />
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false" />
-    <tag name="jboss.method-attributes" description="jboss" enabled="false" />
-    
-  </javadoc>
-</target>
-
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-<target name="xdoclet-task-classpath-check" unless="xdoclet.task.classpath">
-    <path id="xdoclet.task.classpath">
-      <path refid="xdoclet.base.classpath"/>
-      <path refid="apache.commons.classpath"/>
-      <path refid="javac.classpath" />
-    </path>
-    <property name="xdoclet.task.classpath" 
-	      refid="xdoclet.task.classpath"/>
-</target>
-
-<target name="docs-todo-check">
-      <!-- if index.html is newer than the sources we are up to date -->
-      <uptodate property="docs-todo.disable"
-         targetfile="${build.todo}/index.html">
-         <srcfiles dir="${source.java}" includes="**/*.java"/>
-      </uptodate>
-  </target>
-
-  <!-- Generate TODO list from @todo tags -->
-  <target name="docs-todo" 
-     depends="docs-todo-check" 
-     unless="docs-todo.disable">
-
-  <taskdef name="todo"
-               classname="xdoclet.modules.doc.DocumentDocletTask"
-               classpath="${xdoclet.task.classpath}"/>
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-
-    <info/>
-  </todo>
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-  <target name="jmx-docs">
-    <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.jmx-doc}"/>
-    <jmxdoclet
-        destdir="${build.jmx-doc}"
-             force="false"
-        excludedtags="@version, at author">
-      <fileset dir="${source.java}">
-        <include name="**/*.java"/>
-      </fileset>
-      <jbossXmlDoc/>
-    </jmxdoclet>
-
-  </target>
-
-  <!-- Generate the plain HTML jmx docs -->
-  <target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-    <!-- Force the use of SAXON XSLT -->
-    <property system="true" 
-         name="javax.xml.transform.TransformerFactory"
-         value="com.icl.saxon.TransformerFactoryImpl"/>
-
-    <mkdir dir="${build.jmx-api}"/>
-    <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-      processor="trax"
-      extension=".html"
-      basedir="${build.jmx-doc}"
-      destdir="${build.jmx-api}">
-       <include name="**/*.xml"/>
-       <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-       <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-    </style>
-
-  </target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean" 
-     depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber" 
-     depends="_buildmagic:clobber, clean">
-</target>
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-  <!-- ================================================================== -->
-  <!-- Project (build module) Targets                                     -->
-  <!-- ================================================================== -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-    <!-- Skip any missing modules and issue a warning -->
-    <property name="executemodules.skipmissing" value="true"/>
-
-    <!-- The header and footer displayed during each module execution -->
-    <property name="executemodules.header"><![CDATA[
- ============================================================== 
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-    <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-    ]]></property>
-
-    <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag, 
-       version.name, 
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-    </property>
-
-    <!-- Show the module configuration -->
-    <echo>groups:  ${groups}</echo>
-    <echo>modules: ${modules}</echo>
-
-    <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean">
-  <execmodules target="clean" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-</project>
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/build-common.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/build-common.xml)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1137 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-  <property name="javac.debug" value="true"/>  
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-  
-  
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <echo message="calling maoini"/>
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent~
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1137 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-
-   <echo message="hereiam"/>
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="off"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent~ (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/buildmagic.ent~)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.properties
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Copyright (c) 1998-2000 by Jason Dillon <jason at planet57.com>            ##
-##                                                                          ##
-##  This file is part of BuildMagic; an extension to Ant.                   ##
-##                                                                          ##
-##  This library is free software; you can redistribute it and/or modify    ##
-##  it under the terms of the GNU Lesser General Public License as          ##
-##  published by the Free Software Foundation; either version 2 of the      ##
-##  License, or (at your option) any later version.                         ##
-##                                                                          ##
-##  This library is distributed in the hope that it will be useful, but     ##
-##  WITHOUT ANY WARRANTY; without even the implied warranty of              ##
-##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       ##
-##  Lesser General Public License for more details.                         ##
-##                                                                          ##
-### ====================================================================== ###
-##                                                                          ##
-##  Common Properties                                                       ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: common.properties,v 1.4 2004/11/24 02:07:36 starksm Exp $ ###
-
-buildmagic.resolveproperties.force=false
-buildmagic.propertyfilter.all=true
-
-### Jython Support ###
-
-true=1
-false=0
-
-### Misc ###
-
-/=${file.separator}
-sun.boot.classpath=${sun.boot.class.path}

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.properties (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/common.properties)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,324 +0,0 @@
-<!-- $Id: common.xml,v 1.7 2004/11/24 02:07:36 starksm Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Load Buildmagic extention tasks. -->
-<taskdef resource="org/jboss/tools/buildmagic/task/autoload.properties"/>
-<taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"/>
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init">
-  <!-- fail unless we have been started from the build script -->
-  <require property="build.script">
-
-    The build system MUST be executed with one of the provided build scripts.
-
-  </require>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.Void" property="HAVE_JDK_1.1"/>
-  <available classname="java.lang.ThreadLocal" property="HAVE_JDK_1.2"/>
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <!-- Setup the basic project roots. -->
-  <property name="_project.root" value=".."/>
-  <path id="project.root"><pathelement location="${_project.root}"/></path>
-  <property name="project.root" refid="project.root"/> 
-  <property name="project.build" value="${project.root}/build"/>
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the project environment. -->
-  <property file="${project.build}/local.properties"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-
-  <available file="${module.root}/etc/local.properties-example"
-        property="init.have-local-properties"/>
-  <call target="_buildmagic:init:local-properties" if="init.have-local-properties"/>
-
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property resource="org/jboss/tools/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property resource="org/jboss/tools/buildmagic/task.properties"/>
-
-  <!-- Late bind properties & install filters -->
-  <resolver force="${buildmagic.resolveproperties.force}"/>
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-        tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <record name="${basedir}/build.log" append="no"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-  <delete dir="${module.output}"/>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-
-  <!-- 
-     | Try to stop the build log before we delete the file.
-   -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-   zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/common.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/common.xml)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/libraries.ent
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,633 +0,0 @@
-<!-- $Id: libraries.ent,v 1.79 2005/11/04 15:36:44 alesj Exp $ -->
-
-  <!-- Spring -->
-  <property name="spring.root" value="${project.thirdparty}/spring"/>
-  <property name="spring.lib" value="${spring.root}/lib"/>
-  <path id="spring.classpath">
-     <pathelement path="${spring.lib}/spring-beans.jar"/>
-     <pathelement path="${spring.lib}/spring-core.jar"/>
-     <pathelement path="${spring.lib}/spring-context.jar"/>
-  </path>
-  <path id="spring-example.classpath">
-     <pathelement path="${spring.lib}/spring-aop.jar"/>
-     <pathelement path="${spring.lib}/spring-web.jar"/>
-     <pathelement path="${spring.lib}/spring-webmvc.jar"/>
-   </path>
-
-  <!-- Dom4j -->
-  <property name="dom4j.dom4j.root" value="${project.thirdparty}/dom4j-dom4j"/>
-  <property name="dom4j.dom4j.lib" value="${dom4j.dom4j.root}/lib"/>
-  <path id="dom4j.dom4j.classpath">
-    <pathelement path="${dom4j.dom4j.lib}/dom4j.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="jaxen.jaxen.lib" value="${dom4j.dom4j.root}/lib"/>  
-
-  <!-- Javassist -->
-  <property name="javassist.root" value="${project.thirdparty}/javassist"/>
-  <property name="javassist.lib" value="${javassist.root}/lib"/>
-  <path id="javassist.classpath">
-    <pathelement path="${javassist.lib}/javassist.jar"/>
-  </path>
-
-  <!-- qdox -->
-  <property name="qdox.root" value="${project.thirdparty}/qdox"/>
-  <property name="qdox.lib" value="${qdox.root}/lib"/>
-  <path id="qdox.classpath">
-    <pathelement path="${qdox.lib}/qdox.jar"/>
-  </path>
-
-  <!-- hibernate3 -->
-  <property name="hibernate.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.lib" value="${hibernate.root}/lib"/>
-  <path id="hibernate3.classpath">
-    <pathelement path="${hibernate.lib}/hibernate3.jar"/>
-    <pathelement path="${hibernate.lib}/asm.jar"/>
-    <pathelement path="${hibernate.lib}/asm-attrs.jar"/>
-    <pathelement path="${hibernate.lib}/antlr*.jar"/>
-  </path>
-  
-  <!-- hibernate entity manager -->
-  <property name="hibernate.entitymanager.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.entitymanager.lib" value="${hibernate.entitymanager.root}/lib"/>
-  <path id="hibernate.entitymanager.classpath">
-    <pathelement path="${hibernate.entitymanager.lib}/ejb3-persistence.jar"/>
-    <pathelement path="${hibernate.entitymanager.lib}/hibernate-entitymanager.jar"/>
-  </path>
-  
-  <!-- hibernate annotations manager -->
-  <property name="hibernate.annotations.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.annotations.lib" value="${hibernate.annotations.root}/lib"/>
-  <path id="hibernate.annotations.classpath">
-    <pathelement path="${hibernate.annotations.lib}/hibernate-annotations.jar"/>
-  </path>  
-  
-  <!-- asm alias used for bridging to thirdparty build-->
-  <property name="asm.asm.root" value="${project.thirdparty}/hibernate"/>
-  <property name="asm.asm.lib" value="${asm.asm.root}/lib/"/>
-  <property name="asm.asm.resources" value="${asm.asm.root}/resources/"/>
-  <path id="asm.asm.classpath">
-     <pathelement path="${asm.asm.lib}/asm.jar"/>
-     <pathelement path="${asm.asm.lib}/asm-attrs.jar"/>
-  </path>
-  
-
-  <!-- ejb3-persistence -->
-  <path id="ejb3-persistence.classpath">
-    <pathelement path="${hibernate.lib}/hibernate-annotations.jar"/>
-    <pathelement path="${hibernate.lib}/hibernate-entitymanager.jar"/>
-    <pathelement path="${hibernate.lib}/ejb3-persistence.jar"/>
-  </path>
-
-  <!-- ODMG (needed for Hibernate) -->
-  <property name="odmg.root" value="${project.thirdparty}/odmg"/>
-  <property name="odmg.lib" value="${odmg.root}/lib"/>
-  <path id="odmg.classpath">
-    <pathelement path="${odmg.lib}/odmg-3.0.jar"/>
-  </path>
-
-  <!-- CGLIB (needed for Hibernate) -->
-  <property name="cglib.root" value="${project.thirdparty}/cglib"/>
-  <property name="cglib.lib" value="${cglib.root}/lib"/>
-  <path id="cglib.classpath">
-    <pathelement path="${cglib.lib}/cglib-2.1.1.jar"/>
-  </path>
-
-
-  <!-- Trove -->
-  <property name="trove.root" value="${project.thirdparty}/trove"/>
-  <property name="trove.lib" value="${trove.root}/lib"/>
-  <path id="trove.classpath">
-    <pathelement path="${trove.lib}/trove.jar"/>
-  </path>
-
-  <!-- Ant -->
-  <property name="apache.ant.root" value="${project.tools}"/>
-  <property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-  <path id="apache.ant.classpath">
-    <pathelement path="${apache.ant.lib}/ant.jar"/>
-  </path>
-
-  <!-- Apache Avalon -->
-  <property name="apache.avalon.root" value="${project.thirdparty}/apache-avalon"/>
-  <property name="apache.avalon.lib" value="${apache.avalon.root}/lib"/>
-  <path id="apache.avalon.classpath">
-    <pathelement path="${apache.avalon.lib}/avalon-framework.jar"/>
-  </path>
-  <property name="apache.avalon.logkit.lib" value="${apache.avalon.lib}"/>  
-  <path id="apache.avalon.logkit.classpath">
-    <pathelement path="${apache.avalon.logkit.lib}/logkit.jar"/>
-  </path>
-
-  <!-- Apache BCEL -->
-  <property name="apache.bcel.root" value="${project.thirdparty}/apache-bcel"/>
-  <property name="apache.bcel.lib" value="${apache.bcel.root}/lib"/>
-  <path id="apache.bcel.classpath">
-    <pathelement path="${apache.bcel.lib}/bcel.jar"/>
-  </path>
-
-  <!-- Apache Commons -->
-  <property name="apache.commons.root" value="${project.thirdparty}/apache-commons"/>
-  <property name="apache.commons.lib" value="${apache.commons.root}/lib"/>
-  <path id="apache.commons.classpath">
-    <pathelement path="${apache.commons.lib}/commons-collections.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-pool.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-discovery.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-fileupload.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-lang-2.0.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-vfs.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="apache.collections.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.codec.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.beanutils.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.digester.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.httpclient.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.logging.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.pool.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.fileupload.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.lang.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.vfs.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.discovery.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.validator.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.logging.api.lib" value="${apache.commons.root}/lib"/>
-  
-  <path id="apache.httpclient.classpath">
-     <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <path id="apache.logging.classpath">
-     <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-  </path>
-  
-  <path id="apache.beanutils.classpath">
-     <pathelement path="${apache.commons.lib}/commons-beanutils.jar"/>
-  </path>
-  
-  <path id="apache.validator.classpath">
-       <pathelement path="${apache.commons.lib}/commons-validator-1.1.3.jar"/>
-  </path>
-
-  <!-- Apache Log4j -->
-  <property name="apache.log4j.root" value="${project.thirdparty}/apache-log4j"/>
-  <property name="apache.log4j.lib" value="${apache.log4j.root}/lib"/>
-  <path id="apache.log4j.classpath">
-    <pathelement path="${apache.log4j.lib}/log4j.jar"/>
-  </path>
-
-  <!-- Apache Lucene -->
-  <property name="apache.lucene.root"
-    value="${project.thirdparty}/apache-lucene"/>
-  <property name="apache.lucene.lib" value="${apache.lucene.root}/lib"/>
-  <path id="apache.lucene.classpath">
-    <pathelement path="${apache.lucene.lib}/lucene.jar"/>
-  </path>
-
-   <!-- Apache Myfaces -->
-   <property name="apache.myfaces.root"
-     value="${project.thirdparty}/apache-myfaces"/>
-   <property name="apache.myfaces.lib" value="${apache.myfaces.root}/lib"/>
-
-  <!-- Apache Tomcat 5.5.x -->
-  <property name="apache.tomcat55.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.tomcat55.lib" value="${apache.tomcat55.root}"/>  
-  <path id="apache.tomcat55.classpath">
-    <fileset dir="${apache.tomcat55.root}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-  
-  <!-- Apache commons-el -->
-  <property name="commons.el.root" value="${apache.tomcat55.root}"/>
-  <property name="commons.el.lib" value="${apache.tomcat55.root}"/>
-  <path id="commons.el.classpath">
-     <pathelement path="${commons.el.lib}/commons-el.jar"/>
-  </path> 
-  
-  <!-- Apache Modeler -->
-  <property name="apache.modeler.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.modeler.lib" value="${apache.modeler.root}"/>
-  <path id="apache.modeler.classpath">
-    <fileset dir="${apache.modeler.root}">
-      <include name="commons-modeler.jar" />
-    </fileset>
-  </path>
-
-  <!-- Apache Velocity -->
-  <property name="apache.velocity.root" value="${project.thirdparty}/apache-velocity"/>
-  <property name="apache.velocity.lib" value="${apache.velocity.root}/lib"/>
-  <path id="apache.velocity.classpath">
-    <pathelement path="${apache.velocity.lib}/velocity.jar"/>
-  </path>
-
-  <!-- Apache Xerces -->
-  <property name="apache.xerces.root" value="${project.thirdparty}/apache-xerces"/>
-  <property name="apache.xerces.lib" value="${apache.xerces.root}/lib"/>
-  <path id="apache.xerces.classpath">
-    <pathelement path="${apache.xerces.lib}/xml-apis.jar"/>
-    <pathelement path="${apache.xerces.lib}/xercesImpl.jar"/>
-    <pathelement path="${apache.xerces.lib}/resolver.jar"/>
-  </path>
-
-  <!-- Apache Xalan -->
-  <property name="apache.xalan.root" value="${project.thirdparty}/apache-xalan"/>
-  <property name="apache.xalan.lib" value="${apache.xalan.root}/lib"/>
-  <path id="apache.xalan.classpath">
-    <pathelement path="${apache.xalan.lib}/xalan.jar"/>
-    <path refid="apache.xerces.classpath"/>
-  </path>
-
-   <!-- Apache Scout -->
-    <property name="apache.scout.root" value="${project.thirdparty}/apache-scout"/>
-    <property name="apache.scout.lib" value="${apache.scout.root}/lib"/>
-    <path id="apache.scout.classpath">
-      <pathelement path="${apache.scout.lib}/scout.jar"/>
-    </path>
-
-  <!-- Apache Slide -->
-  <property name="apache.slide.root" value="${project.thirdparty}/apache-slide"/>
-  <property name="apache.slide.lib" value="${apache.slide.root}/client/lib"/>
-  <path id="apache.slide.classpath">
-    <pathelement path="${apache.slide.lib}/webdavlib.jar"/>
-    <pathelement path="${apache.slide.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <!-- Apache JaxMe2 -->
-  <property name="apache.jaxme.root" value="${project.thirdparty}/apache-jaxme"/>
-  <property name="apache.jaxme.lib" value="${apache.jaxme.root}/lib"/>
-  <path id="apache.jaxme.classpath">
-    <pathelement path="${apache.jaxme.lib}/jaxmexs.jar"/>
-  </path>
-
-  <!-- Apache WSS4J -->
-  <property name="apache.wss4j.root" value="${project.thirdparty}/apache-wss4j"/>
-  <property name="apache.wss4j.lib" value="${apache.wss4j.root}/lib"/>
-  <path id="apache.wss4j.classpath">
-    <pathelement path="${apache.wss4j.lib}/wss4j.jar"/>
-  </path>
-
-  <!-- Apache XMLSec -->
-  <property name="apache.xmlsec.root" value="${project.thirdparty}/apache-xmlsec"/>
-  <property name="apache.xmlsec.lib" value="${apache.xmlsec.root}/lib"/>
-  <path id="apache.xmlsec.classpath">
-    <pathelement path="${apache.xmlsec.lib}/xmlsec.jar"/>
-  </path>
-
-  <!-- Bouncy Castle JCE Provider -->
-  <property name="bouncycastle.root" value="${project.thirdparty}/bouncycastle"/>
-  <property name="bouncycastle.lib" value="${bouncycastle.root}/lib"/>
-  <path id="bouncycastle.classpath">
-    <pathelement path="${bouncycastle.lib}/bcprov-jdk14-122.jar"/>
-  </path>
-
-  <!-- OpenSAML -->
-  <property name="opensaml.root" value="${project.thirdparty}/opensaml"/>
-  <property name="opensaml.lib" value="${opensaml.root}/lib"/>
-  <path id="opensaml.classpath">
-    <pathelement path="${opensaml.lib}/opensaml.jar"/>
-  </path>
-
-  <!-- GNU Regex -->
-  <property name="gnu.regexp.root" value="${project.thirdparty}/gnu-regexp"/>
-  <property name="gnu.regexp.lib" value="${gnu.regexp.root}/lib"/>
-  <path id="gnu.regexp.classpath">
-    <pathelement path="${gnu.regexp.lib}/gnu-regexp.jar"/>
-  </path>
-
-  <!-- GNU Getopt -->
-  <property name="gnu.getopt.root" value="${project.thirdparty}/gnu-getopt"/>
-  <property name="gnu.getopt.lib" value="${gnu.getopt.root}/lib"/>
-  <path id="gnu.getopt.classpath">
-    <pathelement path="${gnu.getopt.lib}/getopt.jar"/>
-  </path>
-
-  <!-- org.jdom -->
-  <property name="jdom.root" value="${project.thirdparty}/jdom-beta-7"/>
-  <property name="jdom.lib" value="${jdom.root}/lib"/>
-  <path id="jdom.classpath">
-    <pathelement path="${jdom.lib}/jdom.jar"/>
-  </path>
-
-  <!-- JBoss -->
-  <property name="jboss.external.root" value="${project.thirdparty}/jboss"/>
-  <property name="jboss.remoting.root" value="${jboss.external.root}/remoting"/>
-  <property name="jboss.remoting.lib" value="${jboss.remoting.root}/lib"/>
-  <path id="jboss.remoting.classpath">
-    <pathelement path="${jboss.remoting.lib}/jboss-remoting.jar"/>
-  </path>
-  <property name="jboss.serialization.root" value="${jboss.external.root}/serialization"/>
-  <property name="jboss.serialization.lib" value="${jboss.serialization.root}/lib"/>
-  <path id="jboss.serialization.classpath">
-    <pathelement path="${jboss.serialization.lib}/jboss-serialization.jar"/>
-  </path>
-  <property name="jboss.axis.root" value="${jboss.external.root}/axis"/>
-  <property name="jboss.axis.lib" value="${jboss.axis.root}/lib"/>
-  <path id="jboss.axis.classpath">
-    <pathelement path="${jboss.axis.lib}/axis-ws4ee.jar"/>
-  </path>
-
-  <!-- JUnit -->
-  <property name="junit.junit.root" value="${project.thirdparty}/junit-junit"/>
-  <property name="junit.junit.lib" value="${junit.junit.root}/lib"/>
-  <path id="junit.junit.classpath">
-    <pathelement path="${junit.junit.lib}/junit.jar"/>
-  </path>
-
-  <!-- EDU.oswego.cs.dl.util.concurrent -->
-  <property name="oswego.concurrent.root" value="${project.thirdparty}/oswego-concurrent"/>
-  <property name="oswego.concurrent.lib" value="${oswego.concurrent.root}/lib"/>
-  <path id="oswego.concurrent.classpath">
-    <pathelement path="${oswego.concurrent.lib}/concurrent.jar"/>
-  </path>
-
-  <!-- org.xml.sax (SAX2 & SAX2 Extensions) -->
-  <property name="sax.root" value="${project.thirdparty}/xml-sax"/>
-  <property name="sax.lib" value="${sax.root}/lib"/>
-  <path id="sax.classpath">
-    <pathelement path="${sax.lib}/sax2.jar"/>
-    <pathelement path="${sax.lib}/sax2-ext.jar"/>
-  </path>
-
-  <!-- IBM WSDL4j -->
-  <property name="ibm.wsdl4j.root" value="${project.thirdparty}/ibm-wsdl4j"/>
-  <property name="ibm.wsdl4j.lib" value="${ibm.wsdl4j.root}/lib"/>
-  <path id="ibm.wsdl4j.classpath">
-    <pathelement path="${ibm.wsdl4j.lib}/wsdl4j.jar"/>
-  </path>
-
-  <!-- GJT JPL-Util -->
-  <property name="gjt.jpl-util.root" value="${project.thirdparty}/gjt-jpl-util"/>
-  <property name="gjt.jpl-util.lib" value="${gjt.jpl-util.root}/lib"/>
-  <path id="gjt.jpl-util.classpath">
-    <pathelement path="${gjt.jpl-util.lib}/jpl-util.jar"/>
-    <pathelement path="${gjt.jpl-util.lib}/jpl-pattern.jar"/>
-  </path>
-
-  <!-- Hypersonic SQL -->
-  <property name="hsqldb.hsqldb.root" value="${project.thirdparty}/hsqldb-hsqldb"/>
-  <property name="hsqldb.hsqldb.lib" value="${hsqldb.hsqldb.root}/lib"/>
-  <path id="hsqldb.hsqldb.classpath">
-    <pathelement path="${hsqldb.hsqldb.lib}/hsqldb.jar"/>
-  </path>
-
-  <!-- JacORB -->
-  <property name="jacorb.jacorb.root" value="${project.thirdparty}/jacorb-jacorb"/>
-  <property name="jacorb.jacorb.lib" value="${jacorb.jacorb.root}/lib"/>
-  <path id="jacorb.jacorb.classpath">
-    <pathelement path="${jacorb.jacorb.lib}/jacorb.jar"/>
-  </path>
-  <path id="jacorb.idl.classpath">
-    <path refid="apache.avalon.logkit.classpath"/>
-    <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-  </path>
-  <property name="jacorb.idl.include" value="${jacorb.jacorb.root}/idl"/>
-  <property name="jacorb.jacorb.resources" value="${jacorb.jacorb.root}/conf/default"/>
-
-  <!-- JGroups -->
-  <property name="jgroups.jgroups.root" value="${project.thirdparty}/javagroups-javagroups"/>
-  <property name="jgroups.jgroups.lib" value="${jgroups.jgroups.root}/lib"/>
-  <path id="jgroups.jgroups.classpath">
-    <pathelement path="${jgroups.jgroups.lib}/jgroups.jar"/>
-  </path>
-
-  <!-- Sleepycat -->
-  <property name="sleepycat.root" value="${project.thirdparty}/sleepycat"/>
-  <property name="sleepycat.lib" value="${sleepycat.root}/lib"/>
-  <path id="sleepycat.classpath">
-     <pathelement path="${sleepycat.lib}/je.jar"/>
-  </path>
-
-
-  <!-- jUDDI -->
-  <property name="juddi.juddi.root" value="${project.thirdparty}/juddi-juddi"/>
-  <property name="juddi.juddi.lib" value="${juddi.juddi.root}/lib"/>
-  <path id="juddi.juddi.classpath">
-    <pathelement path="${juddi.juddi.lib}/juddi.jar"/>
-  </path>
-
-  <!-- JUnitEJB -->
-  <property name="junitejb.junitejb.root" value="${project.thirdparty}/junitejb/junitejb"/>
-  <property name="junitejb.junitejb.lib" value="${junitejb.junitejb.root}/lib"/>
-  <path id="junitejb.junitejb.classpath">
-    <pathelement path="${junitejb.junitejb.lib}/junitejb.jar"/>
-  </path>
-
-  <!-- Sun JavaBeans Activation Framework (JAF) -->
-  <property name="sun.jaf.root" value="${project.thirdparty}/sun-jaf"/>
-  <property name="sun.jaf.lib" value="${sun.jaf.root}/lib"/>
-  <path id="sun.jaf.classpath">
-    <pathelement path="${sun.jaf.lib}/activation.jar"/>
-  </path>
-
-   <!-- Sun JavaMail -->
-   <property name="sun.javamail.root" value="${project.thirdparty}/sun-javamail"/>
-   <property name="sun.javamail.lib" value="${sun.javamail.root}/lib"/>
-   <path id="sun.javamail.classpath">
-     <pathelement path="${sun.javamail.lib}/mail.jar"/>
-   </path>
-
-  <!-- Sun Java XML Parser (JAXP) -->
-  <property name="sun.jaxp.root" value="${project.thirdparty}/sun-jaxp"/>
-  <property name="sun.jaxp.lib" value="${sun.jaxp.root}/lib"/>
-  <path id="sun.jaxp.classpath">
-    <pathelement path="${sun.jaxp.lib}/jaxp.jar"/>
-    <pathelement path="${sun.jaxp.lib}/crimson.jar"/>
-    <pathelement path="${sun.jaxp.lib}/xalan.jar"/>
-  </path>
-
-  <!-- Sun Java Media Framework (JMF) -->
-  <property name="sun.jmf.root" value="${project.thirdparty}/sun-jmf"/>
-  <property name="sun.jmf.lib" value="${sun.jmf.root}/lib"/>
-  <path id="sun.jmf.classpath">
-    <pathelement path="${sun.jmf.lib}/jmf.jar"/>
-  </path>
-
-  <!-- Sun Java Management Extensions (JMX) -->
-  <property name="sun.jmx.root" value="${project.thirdparty}/sun-jmx"/>
-  <property name="sun.jmx.lib" value="${sun.jmx.root}/lib"/>
-  <path id="sun.jmx.classpath">
-    <pathelement path="${sun.jmx.lib}/jmxri.jar"/>
-    <pathelement path="${sun.jmx.lib}/jmxtools.jar"/>
-  </path>
-
-  <!-- Sun Java Servlet Technology  -->
-  <property name="sun.servlet.root" value="${project.thirdparty}/sun-servlet"/>
-  <property name="sun.servlet.lib" value="${sun.servlet.root}/lib"/>
-  <path id="sun.servlet.classpath">
-    <pathelement path="${sun.servlet.lib}/servlet-api.jar"/>
-    <pathelement path="${sun.servlet.lib}/jsp-api.jar"/>
-  </path>
-
-  <!-- JavaCC -->
-  <property name="sun.javacc.root" value="${project.thirdparty}/sun-javacc"/>
-  <property name="sun.javacc.lib" value="${sun.javacc.root}/lib"/>
-
-  <!-- BeanShell -->
-  <property name="beanshell.beanshell.root" value="${project.thirdparty}/beanshell-beanshell"/>
-  <property name="beanshell.beanshell.lib" value="${beanshell.beanshell.root}/lib"/>
-  <path id="beanshell.beanshell.classpath">
-    <fileset dir="${beanshell.beanshell.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
-  <!-- Joe SNMP lib -->
-  <property name="opennms.joesnmp.root" value="${project.thirdparty}/opennms/joesnmp"/>
-  <property name="opennms.joesnmp.lib" value="${opennms.joesnmp.root}/lib"/>
-  <path id="opennms.joesnmp.classpath">
-    <pathelement path="${opennms.joesnmp.lib}/joesnmp.jar"/>
-  </path>
-
-  <!-- XDoclet -->
-
-  <!--
-     | xdoclet has appended a version string to all their jars.
-     | I'm using jb4 so we don't have to track them so carefully
-   -->
-  <property name="xdoclet.version" value="jb4"/>
-
-  <!--
-
-  jason: it seems like this hack is better defaulting to the default in thirdparty, if you
-         want to build from CVS then change this to the value below in build/local.properties.
-
-  <!- - this may be overridden by the build/local.properties file to use version from cvs- ->
-  <property name="xdoclet.xdoclet.root" value="${project.root}/xdoclet/output"/>
-
-  -->
-  <property name="xdoclet.xdoclet.root" value="${project.thirdparty}/xdoclet-xdoclet"/>
-
-  <property name="xdoclet.xdoclet.lib" value="${xdoclet.xdoclet.root}/lib"/>
-  <path id="xdoclet.xdoclet.classpath">
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xjavadoc-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-bea-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-ejb-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-java-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jboss-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jdo-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jmx-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-web-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xdoclet-module-${xdoclet.version}.jar"/>
-    <path refid="apache.commons.classpath"/>
-    <path refid="sun.servlet.classpath"/>
-  </path>
-  <path id="xdoclet.task.classpath">
-    <path refid="xdoclet.xdoclet.classpath"/>
-  </path>
-
-  <!-- Informa RSS -->
-  <property name="informa.rss.root" value="${project.thirdparty}/informa-rss"/>
-  <property name="informa.rss.lib" value="${informa.rss.root}/lib"/>
-  <path id="informa.rss.classpath">
-    <pathelement path="${informa.rss.lib}/informa.jar"/>
-  </path>
-
-  <!-- JRegex -->
-  <property name="jregex.jregex.root" value="${project.thirdparty}/jregex-jregex"/>
-  <property name="jregex.jregex.lib" value="${jregex.jregex.root}/lib"/>
-  <path id="jregex.jregex.classpath">
-    <pathelement path="${jregex.jregex.lib}/jregex.jar"/>
-  </path>
-
-  <!-- DNSJava -->
-  <property name="sourceforge.dnsjava.root" value="${project.thirdparty}/sourceforge-dnsjava"/>
-  <property name="sourceforge.dnsjava.lib" value="${sourceforge.dnsjava.root}/lib"/>
-  <path id="sourceforge.dnsjava.classpath">
-    <pathelement path="${sourceforge.dnsjava.lib}/dnsjava-1.4.3.jar"/>
-  </path>
-
-  <!-- M.Wutka's DTD parser -->
-  <property name="wutka.dtdparser.root" value="${project.thirdparty}/wutka-dtdparser"/>
-  <property name="wutka.dtdparser.lib" value="${wutka.dtdparser.root}/lib"/>
-  <path id="wutka.dtdparser.classpath">
-    <pathelement path="${wutka.dtdparser.lib}/dtdparser121.jar"/>
-  </path>
-
-  <!-- JFreeChart -->
-  <property name="jfreechart.jfreechart.root" value="${project.thirdparty}/jfreechart"/>
-  <property name="jfreechart.jfreechart.lib" value="${jfreechart.jfreechart.root}/lib"/>
-  <path id="jfreechart.jfreechart.classpath">
-    <fileset dir="${jfreechart.jfreechart.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
- <!-- ebxmlrr -->
-  <property name="ebxmlrr.ebxmlrr.root" value="${project.thirdparty}/sun-ebxmlrr"/>
-  <property name="ebxmlrr.ebxmlrr.lib" value="${ebxmlrr.ebxmlrr.root}/lib"/>
-  <path id="ebxmlrr.ebxmlrr.classpath">
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/ebxmlrr.jar"/>
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/jaxr-client.jar"/>
-  </path>
-
-  <!-- ANTLR -->
-  <property name="antlr.antlr.root" value="${project.thirdparty}/antlr"/>
-  <property name="antlr.antlr.lib" value="${antlr.antlr.root}/lib"/>
-  <path id="antlr.antlr.classpath">
-    <pathelement path="${antlr.antlr.lib}/antlr-2.7.5H3.jar"/>
-  </path>
-
-  <!-- Apache Taglibs -->
-  <property name="apache.taglibs.root" value="${project.thirdparty}/apache-taglibs"/>
-  <property name="apache.taglibs.lib" value="${apache.taglibs.root}/lib"/>
-  <path id="apache.taglibs.classpath">
-    <pathelement path="${apache.taglibs.lib}/jstl-1.1.2.jar"/>
-    <pathelement path="${apache.taglibs.lib}/standard-1.1.2.jar"/>
-  </path>
-
-  <!-- Apache ORO -->
-  <property name="apache.oro.root" value="${project.thirdparty}/apache-oro"/>
-  <property name="apache.oro.lib" value="${apache.oro.root}/lib"/>
-  <path id="apache.oro.classpath">
-    <pathelement path="${apache.oro.lib}/jakarta-oro-2.0.8.jar"/>
-  </path>
-
-  <!-- Apache Struts -->
-  <property name="apache.struts.root" value="${project.thirdparty}/apache-struts"/>
-  <property name="apache.struts.lib" value="${apache.struts.root}/lib"/>
-  <path id="apache.struts.classpath">
-    <pathelement path="${apache.struts.lib}/struts-1.2.6.jar"/>
-  </path>
-
-  <!-- StAX -->
-  <property name="codehaus.stax.root" value="${project.thirdparty}/codehaus-stax"/>
-  <property name="codehaus.stax.lib" value="${codehaus.stax.root}/lib"/>
-  <path id="codehaus.stax.classpath">
-    <pathelement path="${codehaus.stax.lib}/stax-1.1.1.jar"/>
-  </path>
-
-  <!-- XMLUnit -->
-  <property name="xmlunit.xmlunit.root" value="${project.thirdparty}/xmlunit-xmlunit"/>
-  <property name="xmlunit.xmlunit.lib" value="${xmlunit.xmlunit.root}/lib"/>
-  <path id="xmlunit.xmlunit.classpath">
-    <pathelement path="${xmlunit.xmlunit.lib}/xmlunit1.0.jar"/>
-  </path>
-  
-  <!-- easymock -->
-  <property name="easymock.easymock.root" value="${project.thirdparty}/easymock"/>
-  <property name="easymock.easymock.lib" value="${easymock.easymock.root}/lib/"/>
-  <property name="easymock.easymock.resources" value="${easymock.easymock.root}/resources/"/>
-  <path id="easymock.easymock.classpath">
-     <pathelement path="${easymock.easymock.lib}/easymockclassextension.jar"/>
-     <pathelement path="${easymock.easymock.lib}/easymock-1.1.jar"/>
-  </path>
-  
-  <!-- struts-test-case -->
-  <property name="struts.test.case.root" value="${project.thirdparty}/struts-test-case"/>
-  <property name="struts.test.case.lib" value="${struts.test.case.root}/lib/"/>
-  <property name="struts.test.case.resources" value="${struts.test.case.root}/resources/"/>
-  <path id="struts.test.case.classpath">
-     <pathelement path="${struts.test.case.lib}/strutstest-2.1.3.jar"/>
-  </path>  
-  
-  <!-- cache -->
-  <property name="jboss.cache.root" value="${project.thirdparty}/jboss/cache"/>
-  <property name="jboss.cache.lib" value="${jboss.cache.root}/lib"/>
-  <path id="jboss.cache.classpath">
-    <pathelement path="${jboss.cache.lib}/jboss-cache.jar"/>
-  </path>  

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/libraries.ent (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/libraries.ent)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/modules.ent
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,305 +0,0 @@
-<!-- $Id: modules.ent,v 1.56 2006/05/23 20:20:41 asaldhana Exp $ -->
-
-<!-- AOP -->
-<property name="jboss.aop.root" value="${project.root}/aop/output"/>
-<property name="jboss.aop.lib" value="${jboss.aop.root}/lib"/>
-<path id="jboss.aop.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop.jar"/>
-</path>
-<path id="jboss.aop50.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop-jdk50.jar"/>
-</path>
-
-<property name="jboss.aspects.root" value="${project.root}/aspects/output"/>
-<property name="jboss.aspects.lib" value="${jboss.aspects.root}/lib"/>
-<path id="jboss.aspects.classpath">
-  <pathelement path="${jboss.aspects.lib}/jboss-aspect-library.jar"/>
-</path>
-
-<!-- tomcat -->
-<property name="jboss.tomcat.root" value="${project.root}/tomcat/output"/>
-  <property name="jboss.tomcat.lib" value="${jboss.tomcat.root}/lib"/>
-<path id="jboss.tomcat.classpath">
-  <pathelement path="${jboss.tomcat.lib}/tc5-cluster.aop"/>
-  <pathelement path="${jboss.tomcat.root}/resource"/>
-</path>
-
-<!-- Cluster -->
-<property name="jboss.cluster.root" value="${project.root}/cluster/output"/>
-<property name="jboss.cluster.lib" value="${jboss.cluster.root}/lib"/>
-<path id="jboss.cluster.classpath">
-  <pathelement path="${jboss.cluster.lib}/jbossha.jar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-httpsession.sar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-singleton.jar"/>
-</path>
-
-<!-- Common -->
-<property name="jboss.common.root" value="${project.root}/common/output"/>
-<property name="jboss.common.lib" value="${jboss.common.root}/lib"/>
-<path id="jboss.common.classpath">
-  <pathelement path="${jboss.common.lib}/jboss-common.jar"/>
-  <pathelement path="${jboss.common.lib}/jboss-xml-binding.jar"/>
-  <pathelement path="${jboss.common.lib}/namespace.jar"/>
-</path>
-
-<!-- Compatibility -->
-<property name="jboss.compatibility.root" value="${project.root}/compatibility/output"/>
-<property name="jboss.compatibility.lib" value="${jboss.compatibility.root}/lib"/>
-<path id="jboss.compatibility.classpath">
-</path>
-
-<!-- Iiop -->
-<property name="jboss.iiop.root" value="${project.root}/iiop/output"/>
-<property name="jboss.iiop.lib" value="${jboss.iiop.root}/lib"/>
-<path id="jboss.iiop.classpath">
-  <pathelement path="${jboss.iiop.lib}/jboss-iiop.jar"/>
-</path>
-
-<!-- J2EE -->
-<property name="jboss.j2ee.root" value="${project.root}/j2ee/output"/>
-<property name="jboss.j2ee.lib" value="${jboss.j2ee.root}/lib"/>
-<path id="jboss.j2ee.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-jaxrpc.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-saaj.jar"/>
-</path>
-
-<!-- J2EE Extensions-->
-<path id="jboss.j2ee.ext.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-auth.jar"/>
-</path>
-
-<!-- J2SE -->
-<property name="jboss.j2se.root" value="${project.root}/j2se/output"/>
-<property name="jboss.j2se.lib" value="${jboss.j2se.root}/lib"/>
-<path id="jboss.j2se.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-j2se.jar"/>
-</path>
-<path id="jboss.jmxcompliance.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-jmx-compliance.jar"/>
-</path>
-
-<!-- Deployment -->
-<property name="jboss.deployment.root" value="${project.root}/deployment/output"/>
-<property name="jboss.deployment.lib" value="${jboss.deployment.root}/lib"/>
-<path id="jboss.deployment.classpath">
-  <pathelement path="${jboss.deployment.lib}/jboss-deployment.jar"/>
-</path>
-
-<!-- EJB3 -->
-<property name="jboss.ejb3.root" value="${project.root}/ejb3/output"/>
-<property name="jboss.ejb3.lib" value="${jboss.ejb3.root}/lib"/>
-<path id="jboss.ejb3.classpath">
-  <pathelement path="${jboss.ejb3.lib}/jboss-ejb3.jar"/>
-  <pathelement path="${jboss.ejb3.lib}/jboss-annotations-ejb3.jar"/>
-</path>
-
-<!-- EJB3X -->
-<property name="jboss.ejb3x.root" value="${project.root}/ejb3x/output"/>
-<property name="jboss.ejb3x.lib" value="${jboss.ejb3x.root}/lib"/>
-<path id="jboss.ejb3x.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x.jar"/>
-</path>
-<path id="jboss.ejb3x.jdk14.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x-jdk14.jar"/>
-</path>
-
-<!-- JCA -->
-<property name="jboss.jca.root" value="${project.root}/connector/output"/>
-<property name="jboss.jca.lib" value="${jboss.jca.root}/lib"/>
-<path id="jboss.jca.classpath">
-  <pathelement path="${jboss.jca.lib}/jboss-jca.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-local-jdbc.jar"/>
-    <pathelement path="${jboss.jca.lib}/jboss-ha-local-jdbc.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-common-jdbc-wrapper.jar"/>
-</path>
-
-<!-- JMX -->
-<property name="jboss.jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.jmx.lib" value="${jboss.jmx.root}/lib"/>
-<path id="jboss.jmx.classpath">
-  <pathelement path="${jboss.jmx.lib}/jboss-jmx.jar"/>
-</path>
-
-<!-- JMX Remoting -->
-<property name="jboss.jmx-remoting.root" value="${project.root}/jmx-remoting/output"/>
-<property name="jboss.jmx-remoting.lib" value="${jboss.jmx-remoting.root}/lib"/>
-<path id="jboss.jmx-remoting.classpath">
-  <pathelement path="${jboss.jmx-remoting.lib}/jboss-jmx-remoting.jar"/>
-</path>
-
-<!-- Management -->
-<property name="jboss.management.root" value="${project.root}/management/output"/>
-<property name="jboss.management.lib" value="${jboss.management.root}/lib"/>
-<path id="jboss.management.classpath">
-  <pathelement path="${jboss.management.lib}/jboss-jsr77-client.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-jsr77.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-management.jar"/>
-</path>
-
-<!-- MBeans -->
-<property name="jboss.mbeans.root" value="${project.root}/mbeans/output"/>
-<property name="jboss.mbeans.lib" value="${jboss.mbeans.root}/lib"/>
-<path id="jboss.mbeans.classpath">
-  <pathelement path="${jboss.mbeans.lib}/jboss-mbeans.jar"/>
-</path>
-
-<!-- Messaging -->
-<property name="jboss.messaging.root" value="${project.root}/messaging/output"/>
-<property name="jboss.messaging.lib" value="${jboss.messaging.root}/lib"/>
-<path id="jboss.messaging.classpath">
-  <pathelement path="${jboss.messaging.lib}/jbossmq.jar"/>
-</path>
-
-<!-- Messaging 5 -->
-<property name="jboss.jms.root" value="${project.root}/jms/output"/>
-<property name="jboss.jms.lib" value="${jboss.jms.root}/lib"/>
-<path id="jboss.jms.classpath">
-  <pathelement path="${jboss.jms.lib}/jboss-messaging.jar"/>
-</path>
-
-<!-- Naming -->
-<property name="jboss.naming.root" value="${project.root}/naming/output"/>
-<property name="jboss.naming.lib" value="${jboss.naming.root}/lib"/>
-<path id="jboss.naming.classpath">
-  <pathelement path="${jboss.naming.lib}/jnpserver.jar"/>
-</path>
-
-<!-- Security -->
-<property name="jboss.security.root" value="${project.root}/security/output"/>
-<property name="jboss.security.lib" value="${jboss.security.root}/lib"/>
-<path id="jboss.security.classpath">
-  <pathelement path="${jboss.security.lib}/jbosssx.jar"/>
-</path>
-
-<!-- Server -->
-<property name="jboss.server.root" value="${project.root}/server/output"/>
-<property name="jboss.server.lib" value="${jboss.server.root}/lib"/>
-<path id="jboss.server.classpath">
-  <pathelement path="${jboss.server.lib}/jboss.jar"/>
-  <pathelement path="${jboss.server.lib}/jmx-adaptor-plugin.jar"/>
-</path>
-
-<!-- Spring -->
-<property name="jboss.spring.root" value="${project.root}/spring-int/output"/>
-<property name="jboss.spring.lib" value="${jboss.spring.root}/lib"/>
-
-<!-- System -->
-<property name="jboss.system.root" value="${project.root}/system/output"/>
-<property name="jboss.system.lib" value="${jboss.system.root}/lib"/>
-<path id="jboss.system.classpath">
-  <pathelement path="${jboss.system.lib}/jboss-system.jar"/>
-</path>
-<property name="jboss.system.xdocletpath"
-  value="${project.root}/system/src/main"/>
-
-<!-- Test -->
-<property name="jboss.test.root" value="${project.root}/test/output"/>
-<property name="jboss.test.lib" value="${jboss.test.root}/lib"/>
-<path id="jboss.test.classpath">
-  <pathelement path="${jboss.test.lib}/jboss-test.jar"/>
-</path>
-
-<!-- Transaction -->
-<property name="jboss.transaction.root" value="${project.root}/transaction/output"/>
-<property name="jboss.transaction.lib" value="${jboss.transaction.root}/lib"/>
-<path id="jboss.transaction.classpath">
-  <pathelement path="${jboss.transaction.lib}/jboss-transaction.jar"/>
-</path>
-
-<!-- Varia -->
-<property name="jboss.varia.root" value="${project.root}/varia/output"/>
-<property name="jboss.varia.lib" value="${jboss.varia.root}/lib"/>
-<path id="jboss.varia.classpath">
-  <pathelement path="${jboss.varia.root}/classes"/>
-</path>
-
-<!-- Hibernate2 integration module -->
-<property name="jboss.hibernate.root" value="${project.root}/hibernate-int/output"/>
-<property name="jboss.hibernate.lib" value="${jboss.hibernate.root}/lib"/>
-<path id="jboss.hibernate.classpath">
-  <pathelement path="${jboss.hibernate.lib}/jboss-hibernate.jar"/>
-</path>
-
-
-<!-- below this line starts the kingdom of nukes ***************************************************************** -->
-
-<!-- Nukes on JBoss -->
-<property name="jboss.nukes.root" value="${project.root}/nukes/output"/>
-<property name="jboss.nukes.lib" value="${jboss.nukes.root}/lib"/>
-<path id="jboss.nukes.classpath">
-  <pathelement path="${jboss.nukes.lib}/nukes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss adminmessages -->
-<property name="jboss.nukes-adminmessages.root" value="${project.root}/adminmessages/output"/>
-<property name="jboss.nukes-adminmessages.lib" value="${jboss.nukes-adminmessages.root}/lib"/>
-<path id="jboss.nukes-adminmessages.classpath">
-  <pathelement path="${jboss.nukes-adminmessages.lib}/nukes-adminmessages-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss faq -->
-<property name="jboss.nukes-faq.root" value="${project.root}/faq/output"/>
-<property name="jboss.nukes-faq.lib" value="${jboss.nukes-faq.root}/lib"/>
-<path id="jboss.nukes-faq.classpath">
-  <pathelement path="${jboss.nukes-faq.lib}/nukes-faq-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss jmx -->
-<property name="jboss.nukes-jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.nukes-jmx.lib" value="${jboss.nukes-jmx.root}/lib"/>
-<path id="jboss.nukes-jmx.classpath">
-  <pathelement path="${jboss.nukes-jmx.lib}/nukes-jmx-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss journal -->
-<property name="jboss.nukes-journal.root" value="${project.root}/journal/output"/>
-<property name="jboss.nukes-journal.lib" value="${jboss.nukes-journal.root}/lib"/>
-<path id="jboss.nukes-journal.classpath">
-  <pathelement path="${jboss.nukes-journal.lib}/nukes-journal-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss mp3player -->
-<property name="jboss.nukes-mp3player.root" value="${project.root}/mp3player/output"/>
-<property name="jboss.nukes-mp3player.lib" value="${jboss.nukes-mp3player.root}/lib"/>
-<path id="jboss.nukes-mp3player.classpath">
-  <pathelement path="${jboss.nukes-mp3player.lib}/nukes-mp3player-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss news -->
-<property name="jboss.nukes-news.root" value="${project.root}/news/output"/>
-<property name="jboss.nukes-news.lib" value="${jboss.nukes-news.root}/lib"/>
-<path id="jboss.nukes-news.classpath">
-  <pathelement path="${jboss.nukes-news.lib}/nukes-news-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss quotes -->
-<property name="jboss.nukes-quotes.root" value="${project.root}/quotes/output"/>
-<property name="jboss.nukes-quotes.lib" value="${jboss.nukes-quotes.root}/lib"/>
-<path id="jboss.nukes-quotes.classpath">
-  <pathelement path="${jboss.nukes-quotes.lib}/nukes-quotes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss list -->
-<property name="jboss.nukes-list.root" value="${project.root}/list/output"/>
-<property name="jboss.nukes-list.lib" value="${jboss.nukes-list.root}/lib"/>
-<path id="jboss.nukes-list.classpath">
-  <pathelement path="${jboss.nukes-list.lib}/nukes-list-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss script -->
-<property name="jboss.nukes-script.root" value="${project.root}/script/output"/>
-<property name="jboss.nukes-script.lib" value="${jboss.nukes-script.root}/lib"/>
-<path id="jboss.nukes-script.classpath">
-  <pathelement path="${jboss.nukes-script.lib}/nukes-script-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss sections -->
-<property name="jboss.nukes-sections.root" value="${project.root}/sections/output"/>
-<property name="jboss.nukes-sections.lib" value="${jboss.nukes-sections.root}/lib"/>
-<path id="jboss.nukes-sections.classpath">
-  <pathelement path="${jboss.nukes-sections.lib}/nukes-sections-lib.jar"/>
-</path>
-
-
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/modules.ent (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/modules.ent)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/targets.ent
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,116 +0,0 @@
-<!-- $Id: targets.ent,v 1.5 2004/11/24 02:07:36 starksm Exp $ -->
-<!--
-   $Log: targets.ent,v $
-   Revision 1.5  2004/11/24 02:07:36  starksm
-   Restore the tools module content after the errant removal
-
-   Revision 1.3  2004/03/29 19:49:17  ejort
-   Bring build into line with jboss-3.2
-
-   Revision 1.1.2.2  2003/12/07 22:12:53  ejort
-   Make a start on simplifying the build,
-   including incremental xdoclet MBean generation
-
-   Revision 1.1.2.1  2003/05/18 06:24:13  starksm
-   
-   Standard targets
--->
-
-  <!-- ================================================================== -->
-  <!-- Initialization                                                     -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Initialize the build system.  Must depend on '_buildmagic:init'.  
-     | Other targets should depend on 'init' or things will mysteriously fail.
-   -->
-
-  <target name="init" unless="init.disable" depends="_buildmagic:init">
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="jars" 
-	  description="Builds all jar files."
-     depends="_buildmagic:build-bypass-check"
-	  unless="build-bypass.on">
-
-    <call target="compile"/>
-
-    <mkdir dir="${build.lib}"/>
-
-    <call target="module-jars"/>
-
-    <!-- Update the build marker to allow bypassing -->
-    <touch file="${build-bypass.marker}"/>
-
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Install & Release                                                  -->
-  <!-- ================================================================== -->
-
-  <target name="install" 
-	  description="Install the structure for a release."
-	  depends="all, _buildmagic:install:default"/>
-
-  <target name="release" depends="install"/>
-
-  <target name="release-zip" 
-	  description="Builds a ZIP distribution."
-	  depends="release, _buildmagic:release:zip"/>
-
-  <target name="release-tar" 
-	  description="Builds a TAR distribution."
-	  depends="release, _buildmagic:release:tar"/>
-
-  <target name="release-tgz" 
-	  description="Builds a TAR-GZ distribution."
-	  depends="release, _buildmagic:release:tgz"/>
-
-  <target name="release-all"
-	  description="Builds a distribution for each archive type."
-	  depends="release-zip, release-tgz"/>
-
-
-  <!-- ================================================================== -->
-  <!-- Cleaning                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- Clean up all build output -->
-  <target name="clean" 
-	  description="Cleans up most generated files."
-	  depends="_buildmagic:clean">
-  </target>
-
-  <!-- Clean up all generated files -->
-  <target name="clobber" 
-	  description="Cleans up all generated files."
-	  depends="_buildmagic:clobber, clean">
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Misc.                                                              -->
-  <!-- ================================================================== -->
-
-  <target name="main"
-	  description="Executes the default target (most)."
-	  depends="most"/>
-    
-  <target name="all"
-	  description="Builds everything."
-	  depends="jars, docs"/>
-
-  <target name="most" 
-	  description="Builds almost everything."
-	  depends="jars"/>
-
-  <target name="help" 
-          description="Show this help message."
-	  depends="_buildmagic:help:standard"/>

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/targets.ent (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/targets.ent)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/task.properties
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,91 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Default Task Properties                                                 ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: task.properties,v 1.8 2005/10/05 18:45:32 rloehr Exp $ ###
-
-### Javac Defaults ###
-
-javac.includes=**/*.java
-javac.excludes=
-javac.defaultexcludes=yes
-
-javac.boot.classpath=${sun.boot.classpath}
-javac.classpath=${classpath}
-
-javac.debug=off
-javac.optimize=on
-javac.deprecation=on
-javac.target=1.4
-javac.verbose=off
-javac.depend=off
-javac.source=1.4
-
-javac.include.ant.runtime=no
-javac.include.java.runtime=no
-javac.fail.onerror=true
-
-classpath=
-classpath.local=
-classpath.thirdparty=
-
-### Javadoc Defaults ###
-
-javadoc.classpath=${javac.classpath}
-javadoc.sourcepath=
-javadoc.source.path=
-javadoc.source.files=
-
-javadoc.public=false
-javadoc.package=false
-javadoc.protected=true
-javadoc.private=false
-javadoc.version=true
-javadoc.author=true
-javadoc.use=true
-javadoc.verbose=false
-
-javadoc.windowtitle=${module.Name} API
-javadoc.doctitle=${module.Name}
-javadoc.splitindex=no
-
-### MBean Defaults ###
-mbean.includes=
-mbean.excludes=
-
-### Jar Defaults ###
-jar.server.includes=
-jar.client.includes=
-
-### RMIC Defaults ###
-
-rmic.base=${build.classes}
-rmic.stubVersion=${javac.target}
-rmic.verify=true
-rmic.sourcebase=
-rmic.debug=false
-rmic.iiop=false
-rmic.iiopopts=
-rmic.idl=false
-rmic.idlopts=
-rmic.includes=
-rmic.excludes=
-
-### JUnit Defaults ###
-
-junit.printsummary=true
-junit.haltonerror=false
-junit.haltonfailure=false
-junit.fork=true
-junit.timeout=300000
-junit.jvm=java
-junit.jvm.options=-Dnone
-
-junit.formatter.type=xml
-junit.formatter.usefile=true
-
-junit.batchtest.fork=${junit.fork}
-junit.batchtest.haltonerror=${junit.haltonerror}
-junit.batchtest.haltonfailure=${junit.haltonfailure}

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/task.properties (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/task.properties)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/version-info.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,56 +0,0 @@
-<!-- $Id: version-info.xml,v 1.8 2006/02/23 15:07:21 dimitris Exp $ -->
-
-<project name="Common Build Defs">
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-    <!-- Version identifiers for the server. -->
-    <property name="version.major" value="5"/>
-    <property name="version.minor" value="0"/>
-    <property name="version.revision" value="0"/>
-    <property name="version.tag" value="Alpha"/>
-    <property name="version.name" value="Morpheus"/>
-    <!-- This must be set to the CVS tag for any release -->
-    <property name="version.cvstag" value="HEAD"/>
-
-    <!-- Manifest version info -->
-    <property name="specification.title" value="JBoss"/>
-    <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-    <property name="implementation.title" value="JBoss [${version.name}]"/>
-    <property name="implementation.url" value="http://www.jboss.org/"/>
-    <property name="implementation.version" 
-         value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-    <property name="implementation.vendor" value="JBoss Inc."/>
-    <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-    <target name="print-version-info">
-      <echo>
-    version.major=${version.major}
-    version.minor=${version.minor}
-    version.revision=${version.revision}
-    version.tag=${version.tag}
-    version.name=${version.name}
-    version.cvstag=${version.cvstag}
-    specification.title=${specification.title}
-    specification.version=${specification.version}
-    specification.vendor=${specification.vendor}
-    implementation.title=${implementation.title}
-    implementation.url=${implementation.url}
-    implementation.version=${implementation.version} 
-    implementation.vendor=${implementation.vendor}
-    implementation.vendor.id=${implementation.vendor.id}
-      </echo>
-    </target>
-</project>
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/buildmagic/version-info.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/buildmagic/version-info.xml)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/jbossbuild)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/jbossbuild.properties
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-
-# The location of the thirdparty (prebuilt artifacts) directory relative to the project root
-jbossbuild.thirdparty.dir=thirdparty
-
-# The name of the component info file
-jbossbuild.component.info=component-info.xml
-
-# The targetdefs to use
-jbossbuild.targetdefs.refid=targets
-
-external.project=true;
\ No newline at end of file

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/jbossbuild.properties (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/jbossbuild/jbossbuild.properties)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/release.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,152 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-
-<!-- ================================================================== -->
-<!-- JBoss AOP release build definition                                 -->
-<!-- ================================================================== -->
-
-<project name="main.build"
-         default="build" 
-         basedir="."
->
-   <!-- Import the types -->
-   <import file="../tools/etc/jbossbuild/tasks.xml"/>
-
-   <!-- =============================================================== -->
-   <!-- The Main project definition                                     -->
-   <!-- =============================================================== -->
-
-   <build id="jboss-aop"
-          impltitle="JBoss AOP"
-          implversion="1.0.0-FINAL"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.com/products/aop"
-          description="JBoss Aspect Oriented Programming Framewoork"
-          cvsroot="cvs.sourceforge.net:/cvsroot/jboss"
-          thirdpartypath="../thirdparty/"
-          location="http://cruisecontrol.jboss.com/repository/"
-          targetdefs="targets">
-
-      <!-- ============================================================ -->
-      <!-- Common utilities                                             -->
-      <!-- ============================================================ -->
-
-      <component id="common"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-common.jar" release="lib"/>
-         <artifact id="jboss-common-client.jar"/>
-         <artifact id="namespace.jar"/>
-      </component>
-
-      <includes id="common-project">
-         <include input="jboss-common.jar"/>
-         <include input="namespace.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Container                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="container"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-container.jar"/>
-      </component>
-
-      <includes id="container-project">
-         <include input="jboss-container.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- AOP                                                          -->
-      <!-- ============================================================ -->
-
-      <component id="aop"
-                 module="jboss-aop"
-                 version="1.0.0-FINAL"
-      >
-         <artifact id="jboss-aop.jar" release="lib"/>
-      </component>
-
-      <includes id="aop-project">
-         <include input="jboss-aop.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- QDox                                                         -->
-      <!-- ============================================================ -->
-
-      <component id="qdox"
-                 version="1.4">
-         <artifact id="qdox.jar" release="lib"/>
-      </component>
-
-      <includes id="qdox-lib">
-         <include input="qdox.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Javassist                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="javassist"
-                 version="3.0beta">
-         <artifact id="javassist.jar" release="lib"/>
-      </component>
-
-      <includes id="javassist-lib">
-         <include input="javassist.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Trove                                                        -->
-      <!-- ============================================================ -->
-      
-      <component id="trove"
-                 version="2.1.1">
-         <artifact id="trove.jar" release="lib"/>
-      </component>
-
-      <includes id="trove-lib">
-         <include input="trove.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Oswego Concurrent Library                                    -->
-      <!-- ============================================================ -->
-
-      <component id="oswego-concurrent"
-                 version="1.0">
-         <artifact id="concurrent.jar" release="lib"/>
-      </component>
-
-      <includes id="concurrent">
-         <include input="concurrent.jar"/>
-      </includes>
-
-
-      <!-- ============================================================ -->
-      <!-- JUnit                                                        -->
-      <!-- ============================================================ -->
-
-      <component id="junit-junit"
-                 version="3.8.1">
-         <artifact id="junit.jar" release="lib"/>
-      </component>
-
-      <includes id="junit">
-         <include input="junit.jar"/>
-      </includes>
-   </build>
-
-   <!-- Generate the targets -->
-   <generate generate="jboss-aop"/>
-   
-</project>

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/release.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/jbossbuild/release.xml)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/tasks.xml
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1023 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-<project name="jboss.ant.tasks"
-         default="help-fragment"
->
-<!-- ================================================================== -->
-<!-- Properties                                                         -->
-<!-- ================================================================== -->
-
-   <!-- because this file may be imported from various locations
-     locations must be referenced in an absolute fashion   -->
-   <dirname property="imported.basedir" file="${ant.file.jboss.ant.tasks}"/>
-
-
-   <property file="${imported.basedir}/jbossbuild.properties"/>
-
-   <property name="jboss.tasks.path" 
-      value="${imported.basedir}/../../../tools/lib/jbossbuild.jar"   />
-
-   <!-- items required for javcc task --> 
-   <property name="sun.javacc.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/sun-javacc/lib/"/>
-             
-   <property name="jacorb.root"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/jacorb"/> 
-
-   <property name="apache.logkit.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/apache-avalon-logkit/lib"/>              
-
-      
-    <path id="jacorb.idl.classpath">
-       <pathelement path="${jacorb.root}/lib/idl.jar"/>
-       <pathelement path="${apache.logkit.lib}/logkit.jar"/>
-    </path>
-
-
-<!-- ================================================================== -->
-<!-- Type Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- The generate type -->
-   <typedef name="generate"
-            classname="org.jboss.ant.types.Generate" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build type -->
-   <typedef name="build"
-            classname="org.jboss.ant.types.build.Build" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The artifact type definition type -->
-   <typedef name="artifacttype"
-            classname="org.jboss.ant.types.build.ArtifactType" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component definition type -->
-   <typedef name="componentdef"
-            classname="org.jboss.ant.types.component.ComponentDefinition" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component type -->
-   <typedef name="component"
-            classname="org.jboss.ant.types.build.Component" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The includes type -->
-   <typedef name="includes"
-            classname="org.jboss.ant.types.Includes" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build targets type -->
-   <typedef name="targets"
-            classname="org.jboss.ant.types.target.TargetDefinitions" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-<!-- ================================================================== -->
-<!-- Task Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- Update ide info for the main build -->
-   <taskdef name="idemain"
-            classname="org.jboss.ant.tasks.build.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- Update ide info for the component -->
-   <taskdef name="idecomponent"
-            classname="org.jboss.ant.tasks.component.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- Generate a componentref graph and resolve the dependencies -->
-   <taskdef name="synchronizeinfo"
-            classname="org.jboss.ant.tasks.build.SynchronizeComponentsTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- A task which allows a visitor to visit the graph -->
-   <taskdef name="visit-componentref-graph"
-            classname="org.jboss.ant.tasks.build.VisitComponentRefGraphTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />   
-   
-   <!-- Generate libraries.ent with version number in paths -->
-   <taskdef name="gen-lib-file"
-            classname="org.jboss.ant.tasks.build.GenerateLibrariesFile"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-     
-   <!-- RMIC compilation logic -->
-   <taskdef name="rmic-helper"
-            classname="org.jboss.ant.tasks.build.RMICHelper"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />     
-
-   <!-- Executes a given target without reparsing the project file -->
-   <taskdef name="execute-target"
-            classname="org.jboss.ant.tasks.build.TargetExecutor"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-  
-   <!-- Copy with support for zipfile sets -->
-   <taskdef name="copy-zfs"
-            classname="org.jboss.ant.tasks.build.CopyWithZipFileSetSupport"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-   
-   <!-- File release task -->
-   <taskdef name="copy-release"
-            classname="org.jboss.ant.tasks.build.CopyRelease"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-   
-  
-   
-
-   
-
-<!-- ================================================================== -->
-<!-- Artifact Definitions                                               -->
-<!-- ================================================================== -->
-
-   <artifacttype type="jar" outputtype="lib"/>
-   <artifacttype type="zip" outputtype="lib"/>
-   <artifacttype type="sar" outputtype="lib"/>
-   <artifacttype type="rar" outputtype="lib"/>
-   <artifacttype type="war" outputtype="lib"/>
-   <artifacttype type="deployer" outputtype="lib"/>   
-   <artifacttype type="api" outputtype="api"/>
-   <artifacttype type="xml" outputtype="resource"/>
-   <artifacttype type="policy" outputtype="resource"/>
-   <artifacttype type="properties" outputtype="resource"/>
-   <artifacttype type="sh" outputtype="bin"/>
-   <artifacttype type="bat" outputtype="bin"/>
-   <artifacttype type="conf" outputtype="bin"/>
-   <artifacttype type="dtd" outputtype="dtd"/>
-   <artifacttype type="xsd" outputtype="schema"/>
-   <artifacttype type="aop" outputtype="resource"/>
-   <artifacttype type="idl" outputtype="resource"/>   
-   <artifacttype type="md5" outputtype="bin"/>      
-   <artifacttype type="dir" outputtype="lib"/>
-   <artifacttype type="ddl" outputtype="resource"/>
-   
-<!-- ================================================================== -->
-<!-- Target Definitions                                                 -->
-<!-- ================================================================== -->
-
-   <targets id="targets">
-
-      <!-- ============================================================ -->
-      <!-- Build All                                                    -->
-      <!-- Builds everything (build, docs, tests and release archives)  -->
-      <!-- ============================================================ -->
-
-      <targetdef target="all" description="Build All">
-         <main depends="build, doc, test, archives" components="none"/>
-         <component depends="build, doc, test"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!--  Init                                                        -->
-      <!--  Basic initilization tasks and property setup                -->
-      <!-- ============================================================ -->      
-      <targetdef target="build.init" description="initilization tasks and property setup">
-
-         <!-- for each componentdef in jbossbuild file, setup properties 
-              in case a use wishes to access them    
-         -->
-         <component>
-            <property name="build.module" value="@{parentDir}"/>
-            <property name="build.module.src" value="${build.module}/src"/>
-            <property name="build.module.resources" value="${build.module}/src/resources"/>
-            <property name="build.module.etc" value="${build.module}/src/etc"/>
-            <property name="build.module.output" value="@{output}"/>
-            <property name="build.module.output.gen-src" value="${build.module.output}/gen-src"/>            
-            <property name="build.module.dir" value="@{output}"/>
-            <property name="build.module.output.resources" value="${build.module.output}/resources"/>                        
-            <property name="build.module.output.lib" value="${build.module.output}/lib"/>                                    
-            <property name="build.module.output.classes" value="${build.module.output}/classes"/> 
-         </component>
-      </targetdef>      
-
-      <!-- ============================================================ -->
-      <!-- Build                                                        -->
-      <!-- Builds the artifacts and compiles all source                 -->
-      <!-- ============================================================ -->
-
-      <targetdef target="build" description="Build" >
-
-         <!-- Build the main release
-              Creates the main release directory and copies artifacts
-              to the specified location
-         -->
-         <main>
-            <mkdir dir="@{releaseDir}"/>
-            <antCall target="release"/>
-         </main>
-
-
-         <!-- 
-         Build the component
-              Just makes the output folder
-         -->         
-         <component depends="build.init, build.etc">
-            <mkdir dir="@{output}/etc"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-            </copy>
-         </component>
-
-         <!-- Build resources if the component has a 
-              resource node -->
-         <resource depends="build.resources"/>
-         
-         <!-- JTREE-JAVACC source generation  -->
-         <generatedsource when="@{jtree-javacc}">
-
-            <dirname file="/@{jtree-javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-            <jjtree
-               target="src/@{srcdir}/@{jtree-javacc}"
-               outputdirectory="${@{id}.output.path}"
-               javacchome="${sun.javacc.lib}"/>
-
-            <basename file="@{jtree-javacc}" 
-               property="@{id}.basename"
-               suffix="jjt"/>
-
-            <javacc
-               target="${@{id}.output.path}/${@{id}.basename}.jj"
-               javacchome="${sun.javacc.lib}"/>
-
-         </generatedsource>
-
-         <!-- JAVACC source generation -->
-         <generatedsource when="@{javacc}">
-
-            <dirname file="/@{javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <javacc
-               target="src/@{srcdir}/@{javacc}"
-               javacchome="${sun.javacc.lib}"
-               static="@{static}"
-               outputdirectory="${@{id}.output.path}"/>
-
-         </generatedsource>
-
-         <!-- IDL compilation -->         
-         <generatedsource when="@{idl}">
-
-            <!-- Task to compile idl files required by jacorb -->
-            <taskdef name="jacidl"
-               classname="org.jacorb.idl.JacIDL"
-               classpathref="jacorb.idl.classpath"
-            />             
-            
-            <property name="@{id}.output.path" value="@{output}/@{id}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <jacidl
-               srcdir ="src/@{idl}"
-               destdir="${@{id}.output.path}"
-               includes="*.idl"
-               includepath="${jacorb.root}/resources/"
-             />
-         
-         </generatedsource> 
-         
- 
-         <!-- Compile the source
-              Runs depend on the source output then compiles the source
-         -->
-         <source if="@{compileable}">
-             
-            <mkdir dir="@{output}"/>
-            <depend srcdir="@{sourcePath}"
-                    destdir="@{output}"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-            </depend>
-            <javac srcdir="@{sourcePath}" 
-                   destdir="@{output}"
-                   debug="true"
-                   deprecation="true"
-                   excludes="@{excludes}"
-                   target="@{jvmTarget}"
-                   source="@{jvmSource}"
-                   fork="true"
-                   memoryMaximumSize="512M"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               <src path="@{sourcePath}"/>
-               <!-- allow multiple sources to be compiled at once to handle circular references -->
-               <srcelements/>
-            </javac>
-
-           <copy toDir="@{output}">
-               <fileset dir="@{sourcePath}">
-                <include name="**/*.properties"/>
-              </fileset>
-           </copy>
-         </source>
-         
-        <source when="@{stubversion}">
-	    <property name="jb.stubversion" value="@{stubversion}"/>
-        </source>         
-         
-
-         <!-- Remote method call compilation.   -->
-         <source when="@{rmic}">
-            <rmic-helper
-                  base="@{output}"
-                  includes="@{rmic}"
-                  verify="true"
-                  debug="false"
-                  iiop="@{iiop}"
-                  idl="false"
-                  external="@{external}"
-                  stubversion="${jb.stubversion}"
-                  
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               </rmic-helper>
-         </source>
-
-         <!-- Create a jar archive
-              Jars the inputs of the jar artifact
-         -->
-         <jar null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </jar>
-
-         <!-- Create an aop archive
-              Jars the inputs of the aop artifact
-         -->
-         <aop  if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-                <filesets/>
-            </jar>
-         </aop>         
-
-         <jar when="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}"
-                 manifest="@{component.output}/etc/manifest/@{manifest}">
-               <filesets/>
-            </jar>
-         </jar>
-         
-         
-
-         <!-- Create a sar archive
-              Jars the inputs of the sar artifact
-         -->
-         <sar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </sar>
-
-
-         <!-- Create a rar archive
-              Jars the inputs of the rar artifact
-         -->
-         <rar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </rar>
-
-         <!-- Create a war archive
-              Jars the inputs of the war artifact
-         -->
-         <war null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </war>
-         
-         <!-- Create a deployer archive
-              Jars the inputs of the war artifact
-         -->
-         <deployer null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by" value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title" value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version" value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor" value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title" value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL" value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version" value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor" value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path" value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </deployer>       
-         
-         <!-- Create a md5 checksumarchive  -->
-         <md5 null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <checksum>
-              <filesets/>
-            </checksum>
-         </md5>         
-         
-         <!-- create a directory and copy into it all of the filesets or zipfilesets -->
-         <dir if="@{buildable}">
-            <mkdir dir="@{output}"/>
-            <copy-zfs todir="@{output}">
-               <filesets/>
-            </copy-zfs>
-         </dir>
-         
-         
-         <!-- this is a hack.  jbbuild will not allow artifacts with same id
-            varia requires a dir to be created called kernel, but cannot be created
-            because kernel already exists as a component.  Only option is to create the dir
-            and rename it to kernel -->
-         <dir if="@{buildable}" when="@{rename}">
-            <mkdir dir="@{parentDir}/@{rename}"/>
-            <copy-zfs todir="@{parentDir}/@{rename}">
-               <filesets/>
-            </copy-zfs>
-         </dir>     
-      
-         <!-- copying of artifacts to new name -->         
-         <artifactdef when="@{toname}">
-            <mkdir dir="@{parentDir}"/>
-            <copy toFile="@{parentDir}/@{toname}">
-               <filesets/>
-            </copy>
-         </artifactdef>
-         
-         <sh depends="build.bin"/>
-         <bat depends="build.bin"/>
-      </targetdef>
-
-      <!-- Copy the etc -->
-      <targetdef target="build.etc">
-
-         <component>
-              
-            <mkdir dir="@{output}/etc"/>
-            <mkdir dir="@{component.dir}/src/etc/"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-               <filterset>
-                  <filter token="java.vm.version"           value="@{component.VMVersion}"/>
-                  <filter token="java.vm.vendor"            value="@{component.VMVendor}"/>
-                  <filter token="specification.title"       value="@{component.specTitle}"/>
-                  <filter token="specification.version"     value="@{component.specVersion}"/>
-                  <filter token="specification.vendor"      value="@{component.specVendor}"/>
-                  <filter token="implementation.title"      value="@{component.implTitle}"/>
-                  <filter token="implementation.url"        value="@{component.implURL}"/>
-                  <filter token="implementation.version"    value="@{component.implVersion}"/>
-                  <filter token="implementation.vendor"     value="@{component.implVendor}"/>
-                  <filter token="implementation.vendor.id"  value="@{component.implURL}"/>
-               </filterset>
-            </copy>
-         </component>
-
-      </targetdef>
-
-      <targetdef target="build.resources">
-     
-         <component>
-            <mkdir dir="@{output}/resources"/>
-            <copy todir="@{output}" filtering="yes">
-               <fileset dir="@{component.dir}/src" includes="resources/**"/>
-            </copy>
-         </component>
-      </targetdef>
-      
-
-
-      <targetdef target="build.bin">
-         <component>
-            <mkdir dir="@{output}/bin"/>
-            <copy todir="@{output}/bin" filtering="yes">
-              <fileset dir="@{component.dir}/src/bin">
-                <include name="**/*"/>
-              </fileset>
-            </copy>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="lf" eof="remove"
-              includes="**/*.sh"/>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="crlf" eof="remove"
-              includes="**/*.bat, **/*.cmd"/>
-
-            <chmod perm="+x">
-              <fileset dir="@{output}/bin">
-                <include name="**/*.sh"/>
-              </fileset>
-            </chmod>
-
-         </component>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Release                                                      -->
-      <!-- Create the release by copying all artifacts that have a      -->
-      <!-- release tag to that specified location.                      -->
-      <!-- ============================================================ -->
-
-      <targetdef target="release">
-      
-
-          <!-- Copy the artifact into the release -->
-         <artifact when="@{tofile}">
-             <copy-release release="@{release}" tofile="@{tofile}" requiredJDK="@{requiredJDK}"
-             exploded="@{exploded}" overwrite="@{overwrite}">
-                <output/>
-             </copy-release>
-         </artifact>
-         
-       <artifact null="@{tofile}" when="@{release}" >
-            <copy-release release="@{release}"
-              exploded="@{exploded}"
-              requiredJDK="@{requiredJDK}"
-              overwrite="@{overwrite}"
-              >
-               <output/>
-            </copy-release>
-         </artifact>         
-
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Publish                                                      -->
-      <!-- Copy an artifact to the location specified by                -->
-      <!-- ${jbossbuild.repository.root}                                -->
-      <!-- Used by the continous build to publish to the repository.    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="publish" if="@{local}">
-
-         <!-- copy the component-info.xml into the repository -->
-         <componentmain if="@{local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy failonerror="false" file="@{dir}/${jbossbuild.component.info}"
-                  todir="${repository.root}/@{relativePath}"
-            />
-
-         </componentmain>
-
-         <!-- Copy the artifact into the release -->
-         <artifact if="@{component.local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy todir="${repository.root}/@{relativePath}">
-               <output/>
-            </copy>
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Archives                                                     -->
-      <!-- Builds the release archive(s)                                -->
-      <!-- ============================================================ -->
-
-      <!-- Build the release archives -->
-      <targetdef target="archives" description="Build the release archives">
-
-         <!-- Make the archives -->
-         <main>
-         
-            <!-- Create the zip file -->
-            <zip destfile="@{output}/@{releaseName}.zip"
-                 basedir="@{releaseDir}"
-            />
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Doc                                                          -->
-      <!-- Creates the documentation.                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="doc" description="Documentation">
-
-         <!-- Generate the documentation -->
-         <component depends="api"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- API                                                          -->
-      <!-- Creates the javadoc                                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="api" description="Javadoc">
-
-         <!-- Generate the javadoc -->
-         <component/>
-         <api>
-            <mkdir dir="@{output}"/>
-            <javadoc packagenames="*"
-                     destdir="@{output}"
-            >
-               <doctitle>
-                  <![CDATA[<h1>@{description} API Documentation</h1>]]>
-               </doctitle>
-               <bottom>
-                  <![CDATA[
-                     <i>
-                        <div align="center">
-                           <font size="-1">
-                              Copyright &#169; 2005 JBoss Inc. All Rights Reservered.
-                           </font>
-                        </div>
-                     </i>
-                  ]]>
-               </bottom>
-               <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
-               <sourcepath>
-                  <sourcepaths/>
-               </sourcepath>
-               <classpath>
-                  <sourcepathelements/>
-               </classpath>
-            </javadoc>
-         </api>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clean                                                        -->
-      <!-- Deletes the output folder                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clean" description="Clean">
-         <common>
-            <delete dir="@{output}" failonerror="false"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clobber                                                      -->
-      <!-- Deletes the output folder and removes thirdparty             -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clobber" description="Clobber">
-         <main depends="clean">
-            <delete dir="@{thirdparty}"/>
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize                                                  -->
-      <!-- Resynchronizes the project with cvs                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="synchronize" description="Synchronize">
-
-         <!-- Update the main build folder and tools from cvs
-              then do the same for the components before running
-              the after synchronization processing
-              NOTE: Does not automatically invoke component builds
-              as the list of components maybe out-of-date at this point
-              and we need to conditionally do cvs co/update
-         -->
-         <main components="none">
-            <!-- cvs command="update -dP" failonerror="true"/-->
-            <!--invoke target="synchronize" dir="../tools"/-->
-            <execute-target target="synchronize.components" />
-            <!-- execant target="synchronize.after.main"/-->
-         </main>
-
-         <componentmain unless="@{local}">
-            <mkdir dir="thirdparty"/>
-            <get src="@{location}/${jbossbuild.component.info}"
-                 dest="@{thirdpartyDir}/${jbossbuild.component.info}"
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </componentmain>
-
-         <!-- If the component exists we just do a cvs update -->
-         <componentmain if="@{exists}">
-           <cvs dest="@{dir}" command="update"/>
-            <!-- NOTE: unable to delegate to component until JBBUILD-62 is resolved -->
-            <!--invoke target="synchronize" dir="@{dir}"/--> 
-            <!--execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- If the component doesn't exist and we want to
-              get the source build check it out from cvs
-         -->
-         <componentmain unless="@{exists}" if="@{local}">
-            <cvs dest="@{dir.parent}">
-               <commandline>
-                  <argument value="-d"/>
-                  <argument value="@{build.cvsroot}"/>
-                  <argument value="co"/>
-                  <argument value="-d"/>
-                  <argument value="@{id}"/>
-                  <argument value="@{module}"/>
-               </commandline>
-            </cvs>
-            <!-- execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- The component already exists do a cvs update
-              and run the after synchronization
-         -->
-         <component nomain="true">
-            <cvs command="update -dP" failonerror="true"/>
-            <!--execant target="synchronize.after"/-->
-         </component>
-
-         <!-- If we are not doing a source checkout of this
-              component, download the artifacts to thirdparty
-         -->
-         <artifact unless="@{component.local}">
-            <mkdir dir="@{parentDir}"/>
-            <get src="@{location}" 
-                 dest="@{output}" 
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Commit                                                       -->
-      <!-- Commits the changes to cvs                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="commit" description="Commit">
-         <!-- Commit the main build and tools -->
-         <main>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-            <invoke target="commit" dir="../tools"/>
-         </main>
-         <!-- Commit the component -->
-         <component>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-         </component>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Test                                                         -->
-      <!-- Builds and runs the tests                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="test" description="Build and run the tests">
-         <component depends="build, runtest"/>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RunTest                                                      -->
-      <!-- Runs the tests for sources marked with a test attribute      -->
-      <!-- ============================================================ -->
-      
-      <!-- Run the Test -->
-      <targetdef target="runtest" description="Run tests">
-         <component/>
-         <source when="@{test}">
-            <mkdir dir="@{testDir}"/>
-            <delete file="@{testDir}/test.log"/>
-            <junit fork="true"
-                   printSummary="true">
-               <sysproperty key="org.jboss.test.logfile" value="@{testDir}/test.log"/>
-               <formatter type="plain"/>
-               <classpath>
-                  <pathElements/>
-               </classpath>
-               <batchtest todir="@{testDir}">
-                  <fileset dir="@{sourceDir}" includes="@{test}"/>
-               </batchtest>
-            </junit>
-         </source>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Rebuild                                                      -->
-      <!-- Synchronizes then builds                                     -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild -->
-      <targetdef target="rebuild" description="Synchronize then build">
-         <common depends="synchronize">
-            <execant target="build"/>
-         </common>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RebuildAll                                                   -->
-      <!-- Synchronizes then builds all                                 -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild all -->
-      <targetdef target="rebuildall" description="Synchronize then build all">
-         <common depends="synchronize">
-            <execant target="all"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize.After                                            -->
-      <!-- After synchronization processing                             -->
-      <!-- ============================================================ -->
-
-      <!-- After synchronization processing -->
-      <targetdef target="synchronize.after" description="After synchronization processing">
-              <main>
-                 <idemain/>
-              </main>
-              <component>
-                 <idecomponent/>
-              </component>
-      </targetdef>
-      
-
-      
- </targets>   
-
-<!-- ================================================================== -->
-<!-- Macro Definitions                                                  -->
-<!-- ================================================================== -->
-
-   <condition property="execant-executable" value="cmd.exe">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-executable" value="ant"/>
-   <condition property="execant-prefix" value="/c ant">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-prefix" value=""/>
-   <!-- Set the execant.args to empty unless it already exists -->
-   <condition property="execant.args" value="">
-      <not><isset property="execant.args"/></not>
-   </condition>
-
-   <!-- The execant macro -->
-   <macrodef name="execant">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <attribute name="filename"
-                 default="jbossbuild.xml"
-                 description="The ant file to execute"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <exec dir="@{dir}" 
-               executable="${execant-executable}"
-         >
-            <arg line="${execant-prefix} ${execant.args} -f @{filename} @{target}"/>
-         </exec>
-      </sequential>
-   </macrodef>
-
-   <!-- The invoke macro -->
-   <macrodef name="invoke">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <ant antfile="jbossbuild.xml" dir="@{dir}" target="@{target}"/>
-      </sequential>
-   </macrodef>
-
-<!-- ================================================================== -->
-<!-- Targets                                                            -->
-<!-- ================================================================== -->
-
-   <target name="help-fragment">
-      <fail message="Do not execute this build fragment directly!"/>
-   </target>
-   
-</project>
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/etc/jbossbuild/tasks.xml (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/etc/jbossbuild/tasks.xml)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/README
===================================================================
--- branches/logging_refactoring/common-logging-spi/trunk/tools/lib/README	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/README	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,14 +0,0 @@
-Please refer to the Ant manual under Installing Ant / Library
-Dependencies for a list of the jar requirements for various optional
-tasks and features.
-
-This directory contains xercesImpl.jar from the 2.6.1 release of
-Apache Xerces.  For more information or newer releases see
-<http://xml.apache.org/xerces2-j/>.  See the file LICENSE.xerces for
-the terms of distribution.
-
-It also contains xml-apis.jar from the 2.6.1 release of Apache Xerces.
-For more information or newer releases see
-<http://xml.apache.org/commons/>.  See the files LICENSE.dom and
-LICENSE.sax for the terms of distribution.
-

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/README (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/README)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-javamail.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-javamail.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/ant-javamail.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-junit.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/ant-junit.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-launcher.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-launcher.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/ant-launcher.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-nodeps.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-nodeps.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/ant-nodeps.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-trax.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-trax.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/ant-trax.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-xslp.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant-xslp.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/ant-xslp.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/ant.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/ant.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/bsf.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/bsf.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/bsf.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/buildmagic-tasks.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/buildmagic-tasks.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/buildmagic-tasks.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/jbossbuild.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/jbossbuild.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/jbossbuild.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/jdtCompilerAdapter.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/jdtCompilerAdapter.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/jdtCompilerAdapter.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/junit.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/junit.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/pretty.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/pretty.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/pretty.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/resolver.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/resolver.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/resolver.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xalan.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xalan.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/xalan.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xercesImpl.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xercesImpl.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/xercesImpl.jar)

Deleted: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xml-apis.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/common-logging-spi/trunk/tools/lib/xml-apis.jar (from rev 1956, branches/logging_refactoring/common-logging-spi/trunk/tools/lib/xml-apis.jar)

Deleted: branches/refactor-test-branch/component-info.xml
===================================================================
--- branches/refactor-test-branch/component-info.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/component-info.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,17 +0,0 @@
-<project name="common-component-info">
-   <component id="common"
-              module="jboss-common"
-              version="5.0-SNAPSHOT"
-   >
-      <artifact id="jboss-common.jar"/>
-      <artifact id="jboss-common-client.jar"/>
-      <artifact id="namespace.jar"/>
-      <artifact id="jboss-archive-browsing.jar"/>
-      <artifact id="testsuite-support.jar"/>
-      <export>
-         <include input="jboss-common.jar"/>
-         <include input="namespace.jar"/>
-         <include input="jboss-common-client.jar"/>
-      </export>
-   </component>
-</project>
\ No newline at end of file

Deleted: branches/refactor-test-branch/jbossbuild.xml
===================================================================
--- branches/refactor-test-branch/jbossbuild.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossbuild.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,105 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-
-<!-- ================================================================== -->
-<!-- Common component definition                                        -->
-<!-- ================================================================== -->
-
-<project name="project" 
-         default="build" 
-         basedir="."
->
-   <!-- The main build -->
-   <import file="../tools/etc/jbossbuild/tasks.xml"/>
-   <import file="component-info.xml"/>
-
-   <!-- =============================================================== -->
-   <!-- The component definition                                        -->
-   <!-- =============================================================== -->
-
-   <componentdef component="common" 
-                 description="JBoss Common">
-
-      <!-- ============================================================ -->
-      <!-- The main source                                              -->
-      <!-- ============================================================ -->
-
-      <source id="main">
-         <include component="oswego-concurrent"/>
-         <include component="dom4j"/>
-         <include component="apache-jaxme"/>
-         <include component="apache-log4j"/>
-         <include component="gnu-regexp"/>
-         <include component="apache-slide"/>
-         <include component="wutka-dtdparser"/>
-         <include component="apache-xerces"/>
-         <include component="apache-httpclient"/>         
-      </source>
-
-      <!-- ============================================================ -->
-      <!-- jboss-common.jar                                             -->
-      <!-- ============================================================ -->
-
-      <artifactdef artifact="jboss-common.jar">
-         <include input="main">
-            <include pattern="org/jboss/**"/>
-            <include pattern="org/apache/xerces/**"/>
-         </include>
-      </artifactdef>
-
-      <!-- ============================================================ -->
-      <!-- jboss-common-client.jar                                      -->
-      <!-- ============================================================ -->
-
-      <artifactdef artifact="jboss-common-client.jar">
-         <include input="main">
-            <include pattern="org/jboss/**"/>
-            <include pattern="org/apache/xerces/**"/>
-            <exclude pattern="org/jboss/deployment/**"/>
-         </include>
-      </artifactdef>
-
-      <!-- ============================================================ -->
-      <!-- namespace.jar                                                -->
-      <!-- ============================================================ -->
-
-      <artifactdef artifact="namespace.jar">
-         <include input="main">
-            <include pattern="javax/xml/namespace/*"/>
-         </include>
-      </artifactdef>
-      
-      
-      <!-- ============================================================ -->
-      <!-- jboss-archiving-browsing.jar                                 -->
-      <!-- ============================================================ -->
-
-      <artifactdef artifact="jboss-archive-browsing.jar">
-         <include input="main">
-            <include pattern="org/jboss/util/file/*"/>
-         </include>
-      </artifactdef>
-
-      <!-- ============================================================ -->
-      <!-- testsuite-support.jar                                        -->
-      <!-- ============================================================ -->
-
-      <artifactdef artifact="testsuite-support.jar">
-         <include input="main">
-           <include pattern="org/jboss/logging/**"/>
-         </include>
-      </artifactdef>
-      
-
-   </componentdef>
-
-   <!-- Generate the targets -->   
-   <generate generate="common"/>
-
-</project>

Copied: branches/refactor-test-branch/jbossxb (from rev 1956, branches/logging_refactoring/jbossxb)

Copied: branches/refactor-test-branch/jbossxb/trunk (from rev 1956, branches/logging_refactoring/jbossxb/trunk)

Deleted: branches/refactor-test-branch/jbossxb/trunk/build-compile.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/build-compile.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/build-compile.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">   
-]>
-
-<project default="main" name="JBoss/Build">
-
-  &buildmagic;
-  &libraries;
-  &targets;
-   <!-- The combined library classpath -->
-      <path id="library.classpath">
-         <path refid="jboss/common.logging.spi.classpath"/>
-         <path refid="wutka.dtdparser.classpath"/> 
-         <path refid="apache.slide.classpath"/>
-         <path refid="sun.jaf.classpath"/>
-         <path refid="apache.xerces.classpath"/>
-         <path refid="jboss/common.core.classpath"/>
-         <path refid="oswego.concurrent.classpath"/>
-      </path>
-
-        <!-- The combined dependent module classpath -->
-        <path id="dependentmodule.classpath">
-    </path>
-  
-  <target name="compile-classes"
-    depends="_default:compile-classes"/>
-
-</project>

Copied: branches/refactor-test-branch/jbossxb/trunk/build-compile.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/build-compile.xml)

Deleted: branches/refactor-test-branch/jbossxb/trunk/build-thirdparty.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/build-thirdparty.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/build-thirdparty.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,69 +0,0 @@
-<?xml version="1.0"?>
-<!-- $Id: build-thirdparty.xml,v 1.113 2006/05/23 23:19:24 jgreene Exp $ -->
-<project name="main.build"
-          default="synchronize"
-          basedir=".">
-
-   <!-- Property File definitions -->
-   <property file="local.properties"/>
-   <property file="synchronize.properties"/>
-   <property environment="env"/>
-
-   <!-- Property Definitions -->
-   <property name="generatedLibrariesFiles" value="thirdparty/libraries.ent"/>
-
-   <!-- Allow jbossbuild.repository to be set from (in order or priority)
-      + Command line -Djbossbuild.repository=...
-      + synchronize.properties jbossbuild.repository setting
-      + JBOSS_REPOSITORY environment variable
-   -->
-   <condition property="jbossbuild.repository" value="${env.JBOSS_REPOSITORY}">
-      <isset property="env.JBOSS_REPOSITORY"/>
-   </condition>
-   <!-- Fall back to default -->
-   <property name="jbossbuild.repository" value="http://repository.jboss.com"/>
-
-   <!-- File Imports -->
-   <import file="tools/etc/jbossbuild/tasks.xml"/>
-
-
-   <!-- Main Definition of dependencies -->
-   <build id="jbossas-thirdparty"
-          impltitle="JBossAS"
-          implversion="jboss-head"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.org"
-          description="JBoss Application Server"
-          cvsroot="${cvs.prefix}@cvs.forge.jboss.com:/cvsroot/jboss"
-          thirdpartypath="thirdparty/"
-          location="${jbossbuild.repository}"
-          targetdefs="targets">
-
-      <!--
-        The repository is in CVS under the module repository.jboss.com whose contents
-        are pushed to the http://repository.jboss.com site.
-      -->
-      <componentref name="apache-slide" version="2.0"/> 
-      <componentref name="wutka-dtdparser" version="1.2.1"/>
-      <componentref name="sun-jaf" version="1.0.2"/>
-      <componentref name="apache-xerces" version="2.7.1"/>
-      <componentref name="oswego-concurrent" version="1.3.4"/>  
-      <componentref name="jboss/common-core" version="1.0.1.TEST"/>
-      <componentref name="jboss/common-logging-spi" version="1.0.1.TEST"/>
-   </build>
-
-   <synchronizeinfo/>
-
-   <!-- Generate the targets -->
-   <generate generate="jbossas-thirdparty"/>
-
-
-   <target name="generate-lib-file"
-      description="generate libraries.ent and thirdparty license info"
-      depends="synchronize">
-         <gen-lib-file filename="${generatedLibrariesFiles}" path="tools/etc/buildmagic/" />
-      <visit-componentref-graph
-         componentVisitor="org.jboss.ant.util.graph.ComponentRefGraphLicenseVisitor" />
-   </target>
-
-</project>

Copied: branches/refactor-test-branch/jbossxb/trunk/build-thirdparty.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/build-thirdparty.xml)

Deleted: branches/refactor-test-branch/jbossxb/trunk/build.bat
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/build.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/build.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,89 +0,0 @@
- at echo off
-REM  ======================================================================
-REM
-REM  This is the main entry point for the build system.
-REM
-REM  Users should be sure to execute this file rather than 'ant' to ensure
-REM  the correct version is being used with the correct configuration.
-REM
-REM  ======================================================================
-REM
-REM $Id$
-REM
-REM Authors:
-REM     Jason Dillon <jason at planet57.com>
-REM     Sacha Labourey <sacha.labourey at cogito-info.ch>
-REM
-
-REM ******************************************************
-REM Ignore the ANT_HOME variable: we want to use *our*
-REM ANT version and associated JARs.
-REM ******************************************************
-REM Ignore the users classpath, cause it might mess
-REM things up
-REM ******************************************************
-
-SETLOCAL
-
-set CLASSPATH=
-set ANT_HOME=
-set ANT_OPTS=-Djava.protocol.handler.pkgs=org.jboss.net.protocol -Dbuild.script=build.bat
-
-REM ******************************************************
-REM - "for" loops have been unrolled for compatibility
-REM   with some WIN32 systems.
-REM ******************************************************
-
-set NAMES=tools;tools\ant;tools\apache\ant
-set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
-
-REM ******************************************************
-REM ******************************************************
-
-SET EXECUTED=FALSE
-for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
-
-goto :EOF
-
-
-REM ******************************************************
-REM ********* Search for names in the subfolders *********
-REM ******************************************************
-
-:subLoop
-for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %2 %3 %4 %5 %6 %7
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************ Test if ANT Batch file exists ***********
-REM ******************************************************
-
-:testIfExists
-if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
-
-goto :EOF
-
-
-REM ******************************************************
-REM ************** Batch file has been found *************
-REM ******************************************************
-
-:BatchFound
-if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
-set EXECUTED=TRUE
-
-goto :EOF
-
-REM ******************************************************
-REM ************* Execute Batch file only once ***********
-REM ******************************************************
-
-:ExecuteBatch
-echo Calling %1 %2 %3 %4 %5 %6 %7 %8
-call %1 %2 %3 %4 %5 %6 %7 %8
-
-:end
-
-if "%NOPAUSE%" == "" pause

Copied: branches/refactor-test-branch/jbossxb/trunk/build.bat (from rev 1956, branches/logging_refactoring/jbossxb/trunk/build.bat)

Deleted: branches/refactor-test-branch/jbossxb/trunk/build.sh
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/build.sh	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/build.sh	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,173 +0,0 @@
-#!/bin/sh
-### ====================================================================== ###
-##                                                                          ##
-##  This is the main entry point for the build system.                      ##
-##                                                                          ##
-##  Users should be sure to execute this file rather than 'ant' to ensure   ##
-##  the correct version is being used with the correct configuration.       ##
-##                                                                          ##
-### ====================================================================== ###
-#
-
-# $Id$
-
-PROGNAME=`basename $0`
-DIRNAME=`dirname $0`
-GREP="grep"
-ROOT="/"
-
-# Ignore user's ANT_HOME if it is set
-ANT_HOME=""
-
-# the default search path for ant
-ANT_SEARCH_PATH="\
-    tools
-    tools/ant \
-    tools/apache/ant \
-    ant"
-
-# the default build file name
-ANT_BUILD_FILE="build.xml"
-
-# the default arguments
-ANT_OPTIONS="-find $ANT_BUILD_FILE"
-
-# Use the maximum available, or set MAX_FD != -1 to use that
-MAX_FD="maximum"
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-darwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-
-    Darwin*)
-        darwin=true
-        ;;
-esac
-
-#
-# Helper to complain.
-#
-die() {
-    echo "${PROGNAME}: $*"
-    exit 1
-}
-
-#
-# Helper to complain.
-#
-warn() {
-    echo "${PROGNAME}: $*"
-}
-
-#
-# Helper to source a file if it exists.
-#
-maybe_source() {
-    for file in $*; do
-	if [ -f "$file" ]; then
-	    . $file
-	fi
-    done
-}
-
-search() {
-    search="$*"
-    for d in $search; do
-	ANT_HOME="`pwd`/$d"
-	ANT="$ANT_HOME/bin/ant"
-	if [ -x "$ANT" ]; then
-	    # found one
-	    echo $ANT_HOME
-	    break
-	fi
-    done
-}
-
-#
-# Main function.
-#
-main() {
-    # if there is a build config file. then source it
-    maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
-
-    # Increase the maximum file descriptors if we can
-    if [ $cygwin = "false" ]; then
-	MAX_FD_LIMIT=`ulimit -H -n`
-	if [ $? -eq 0 ]; then
-	    if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
-		# use the system max
-		MAX_FD="$MAX_FD_LIMIT"
-	    fi
-
-	    ulimit -n $MAX_FD
-	    if [ $? -ne 0 ]; then
-		warn "Could not set maximum file descriptor limit: $MAX_FD"
-	    fi
-	else
-	    warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-	fi
-    fi
-
-    # try the search path
-    ANT_HOME=`search $ANT_SEARCH_PATH`
-
-    # try looking up to root
-    if [ "x$ANT_HOME" = "x" ]; then
-	target="build"
-	_cwd=`pwd`
-
-	while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
-	    cd ..
-	    cwd=`pwd`
-	    ANT_HOME=`search $ANT_SEARCH_PATH`
-	done
-
-	# make sure we get back
-	cd $_cwd
-
-	if [ "$cwd" != "$ROOT" ]; then
-	    found="true"
-	fi
-
-	# complain if we did not find anything
-	if [ "$found" != "true" ]; then
-	    die "Could not locate Ant; check \$ANT or \$ANT_HOME."
-	fi
-    fi
-
-    # make sure we have one
-    ANT=$ANT_HOME/bin/ant
-    if [ ! -x "$ANT" ]; then
-	die "Ant file is not executable: $ANT"
-    fi
-
-    # need to specify planet57/buildmagic protocol handler package
-    ANT_OPTS="-Djava.protocol.handler.pkgs=org.jboss.net.protocol"
-
-    # setup some build properties
-    ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"
-
-    # change to the directory where the script lives so users are not forced
-    # to be in the same directory as build.xml
-    cd $DIRNAME
-
-    # export some stuff for ant
-    export ANT ANT_HOME ANT_OPTS
-
-    # execute in debug mode, or simply execute
-    if [ "x$ANT_DEBUG" != "x" ]; then
-	/bin/sh -x $ANT $ANT_OPTIONS "$@"
-    else
-	exec $ANT $ANT_OPTIONS "$@"
-    fi
-}
-
-##
-## Bootstrap
-##
-
-main "$@"

Copied: branches/refactor-test-branch/jbossxb/trunk/build.sh (from rev 1956, branches/logging_refactoring/jbossxb/trunk/build.sh)

Deleted: branches/refactor-test-branch/jbossxb/trunk/build.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/build.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/build.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,181 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">
-]>
-
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-
-<project default="build" name="JBoss/Common">
-
-  <!-- ================================================================== -->
-  <!-- Setup                                                              -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Include the common Buildmagic elements.
-     |
-     | This defines several different targets, properties and paths.
-     | It also sets up the basic extention tasks amoung other things.
-   -->
-
-  &buildmagic;
-
-  <!--
-     | Include the normal targets.
-   -->
-  &targets;
-
-  <!-- ================================================================== -->
-  <!-- Configuration                                                      -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Configure the build system.  
-     |
-     | This target is invoked by the Buildmagic initialization logic and 
-     | should contain module specific configuration elements.
-   -->
-
-  <target name="configure" unless="configure.disable">
-
-    <!-- =================== -->
-    <!-- Basic Configuration -->
-    <!-- =================== -->
-
-    <!-- Module name(s) & version -->
-    <property name="module.name" value="common"/>
-    <property name="module.Name" value="JBoss/Common"/>
-    <property name="module.version" value="DEV"/>
-
-    
-
-    <!-- The combined dependent module classpath -->
-    <path id="dependentmodule.classpath">
-    </path>
-
-    <!-- ===== -->
-    <!-- Tasks -->
-    <!-- ===== -->
-
-    <call target="_default:task-init"/>
-    
-    <!-- Set project specific properties -->
-    <property name="jboss.home" value="../build/output/jboss-${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="server" value="default"/>
-    
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Compile                                                            -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each 
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-  <target name="compile" depends="_default:compile-etc"
-    description="Compile all source files.">
-    <ant antfile="build-compile.xml" target="compile-classes"/>
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="module-jars">
-
-    <!-- Build jboss-common.jar -->
-    <jar jarfile="${build.lib}/jbossxb.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"/>
-
-    </jar>
-  </target>
-  
-  
-  <target name="build" depends="createthirdparty, main"/>
-  
-   <!-- create the thirdparty folder from items in the repository -->
-   <!-- then generate a new libraries.ent file and include it in  -->
-   <!-- the build                                                 -->
-   <target name="createthirdparty" unless="inhibit.downloads"
-      depends="check.inhibit.downloads, set.proxy">
-      
-      <ant antfile="build-thirdparty.xml" target="generate-lib-file"/>
-   </target>
-
-   <!-- check if thirdparty libraries are to be downloaded -->
-   <target name="check.inhibit.downloads">
-      <condition property="inhibit.downloads">
-         <or>
-            <uptodate property="dependencies.current"
- 	      srcfile="build-thirdparty.xml"
-               targetfile="thirdparty/libraries.ent"/>
-            <istrue value="${nodownload}"/>
-         </or>
-      </condition>
-  </target>
-
-  <!-- check if the the user has specied proxy settings -->
-  <target name="check.proxy">
-    <condition property="hasproxy">
-        <and>
-            <isset property="proxy.host"/>
-            <isset property="proxy.port"/>
-            <not>
-                <equals arg1="" arg2="${proxy.host}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.port}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  </target>
-
-  <!-- set proxy settings -->
-  <condition property="hasproxyauth">
-        <and>
-            <isset property="hasproxy"/>
-            <isset property="proxy.username"/>
-            <isset property="proxy.password"/>
-            <not>
-                <equals arg1="" arg2="${proxy.username}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.password}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
-
-  <!-- set proxy settings without auth -->
-  <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
-    <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
-  </target>
-
-  <!-- set proxy settings using auth -->
-  <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
-    <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
-  </target>  
-  
-</project>

Copied: branches/refactor-test-branch/jbossxb/trunk/build.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/build.xml)

Deleted: branches/refactor-test-branch/jbossxb/trunk/pom.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/pom.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/pom.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,136 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>jboss.jbossxb</groupId>
-  <artifactId>jbossxb</artifactId>
-  <packaging>jar</packaging>
-  <version>1.0.1.TEST</version>
-  <name>JBoss XML Binding</name>
-  <url>http://www.jboss.org</url>
-  <description>JBoss XML Binding</description>
-  <licenses>
-   <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-   </license>
-  </licenses>
-  <organization>
-    <name>JBoss Inc.</name>
-    <url>http://www.jboss.org</url>
-  </organization>
- 
-  <repositories>
-    <repository>
-      <id>jboss</id>
-      <name>JBoss Inc. Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.com/maven2/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <pluginRepositories>
-     <pluginRepository>
-        <id>jbosspluginrepo</id>
-        <name>jboss plugin repository</name>
-        <url>http://repository.jboss.com/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-      <pluginRepository>
-        <id>central</id>
-        <name>LSU maven2 mirror</name>
-        <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
-        <layout>default</layout>
-        <snapshots>
-           <enabled>false</enabled>
-           <updatePolicy>never</updatePolicy>
-        </snapshots>
-     </pluginRepository>
-  </pluginRepositories>
-
-  
-  <build>
-     <sourceDirectory>src/main/java</sourceDirectory>
-  <plugins>
-  
-      <!-- define how we want compilation to take place
-           here, we accept most of the defaults but say that we want the
-           optimization flag set, and define the source and target to be 1.4,
-           these setting will be inherited by child projects -->
-      <plugin>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0</version>
-          <configuration>
-              <optimize>true</optimize>
-              <source>1.4</source>
-              <target>1.4</target>
-          </configuration>
-      </plugin>  
-
-      <!-- define that we wish to create src jars -->
-      <plugin>
-        <artifactId>maven-source-plugin</artifactId>
-        <inherited>true</inherited>
-       <executions>
-        <execution>
-          <goals>
-            <goal>jar</goal>
-          </goals>
-        </execution>
-      </executions>
-      </plugin>     
-    
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-      <version>1.0.1.TEST</version>
-    </dependency>
-    <dependency>
-      <groupId>jboss.common.core</groupId>
-      <artifactId>jboss-common-core</artifactId>
-      <version>1.0.1.TEST</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>oswego-concurrent</groupId>
-      <artifactId>concurrent</artifactId>
-      <version>1.3.4</version>
-      <scope>compile</scope>
-    </dependency> 
-    <dependency>
-      <groupId>apache-slide</groupId>
-      <artifactId>webdavlib</artifactId>
-      <version>2.0</version>
-      <scope>compile</scope>
-    </dependency> 
-    <dependency>
-      <groupId>sun-jaf</groupId>
-      <artifactId>activation</artifactId>
-      <version>1.0.2</version>
-      <scope>compile</scope>
-    </dependency> 
-    <dependency>
-      <groupId>apache-xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
-      <version>2.7.1</version>
-      <scope>compile</scope>
-    </dependency>     
-    <dependency>
-      <groupId>wutka-dtdparser</groupId>
-      <artifactId>dtdparser121</artifactId>
-      <version>1.2.1</version>
-      <scope>compile</scope>
-    </dependency>         
-  </dependencies>  
-
-</project>
-

Copied: branches/refactor-test-branch/jbossxb/trunk/pom.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/pom.xml)

Copied: branches/refactor-test-branch/jbossxb/trunk/src (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/etc (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/etc)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/etc/default.mf
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/etc/default.mf	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/etc/default.mf	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Created-By: @java.vm.version@ (@java.vm.vendor@)
-Specification-Title: @specification.title@
-Specification-Version: @specification.version@
-Specification-Vendor: @specification.vendor@
-Implementation-Title: @implementation.title@
-Implementation-URL: @implementation.url@
-Implementation-Version: @implementation.version@
-Implementation-Vendor: @implementation.vendor@
-Implementation-Vendor-Id: @implementation.vendor.id@

Copied: branches/refactor-test-branch/jbossxb/trunk/src/etc/default.mf (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/etc/default.mf)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/QNameBuilder.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/QNameBuilder.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/QNameBuilder.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,101 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb;
-
-import org.jboss.logging.Logger;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-import javax.xml.namespace.QName;
-
-/**
- * A QName builder that discovers the namespaceURI for a given prefix by walking
- * up the document tree.
- *
- * The combined name is of the form [prefix:]localPart
- *
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public final class QNameBuilder
-{
-   private static Logger log = Logger.getLogger(QNameBuilder.class);
-
-   /**
-    * Build a QName from a combined name
-    * @param element The current element
-    * @param combinedName A name of form prefix:localPart
-    * @return A QName, or null
-    */
-   public static QName buildQName(Element element, String combinedName)
-   {
-      if (combinedName == null)
-         return null;
-
-      int colonIndex = combinedName.indexOf(":");
-      if (colonIndex < 0)
-         return new QName(combinedName);
-
-      String prefix = combinedName.substring(0, colonIndex);
-      String localPart = combinedName.substring(colonIndex + 1);
-
-      Node currNode = element;
-      String namespaceURI = getNamespaceURI(currNode, prefix);
-      while (namespaceURI == null && currNode != null)
-      {
-         Node parentNode = currNode.getParentNode();
-         if (parentNode != null && parentNode != currNode)
-            namespaceURI = getNamespaceURI(parentNode, prefix);
-
-         if (parentNode == currNode)
-            break;
-
-         currNode = parentNode;
-      }
-
-      if (namespaceURI != null)
-         return new QName(namespaceURI, localPart, prefix);
-
-      log.warn("Cannot find namespaceURI for name: " + combinedName);
-      return new QName(localPart);
-   }
-
-   /**
-    * Get the namespaceURI from a given prefix from the current node.
-    */
-   private static String getNamespaceURI(Node node, String prefix)
-   {
-      String namespaceURI = null;
-      NamedNodeMap attrs = node.getAttributes();
-      if (attrs != null)
-      {
-         for (int i = 0; namespaceURI == null && i < attrs.getLength(); i++)
-         {
-            Node attr = attrs.item(i);
-            if (("xmlns:" + prefix).equals(attr.getNodeName()))
-               namespaceURI = attr.getNodeValue();
-         }
-      }
-      return namespaceURI;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/QNameBuilder.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/QNameBuilder.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AbstractMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AbstractMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AbstractMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,549 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Iterator;
-import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.introspection.FieldInfo;
-import org.xml.sax.SAXException;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public abstract class AbstractMarshaller
-   implements Marshaller
-{
-   protected final Logger log = Logger.getLogger(getClass());
-
-   protected String version = VERSION;
-   protected String encoding = ENCODING;
-   protected List rootQNames = new ArrayList();
-
-   protected NamespaceRegistry nsRegistry = new NamespaceRegistry();
-
-   private Map classMappings = Collections.EMPTY_MAP;
-   protected Map field2WildcardMap = Collections.EMPTY_MAP;
-   protected Map cls2TypeMap = Collections.EMPTY_MAP;
-
-   /**
-    * Content the result is written to
-    */
-   protected Content content = new Content();
-
-   private Properties props;
-
-   // Marshaller implementation
-
-   public void mapClassToGlobalElement(Class cls,
-                                       String localName,
-                                       String namespaceUri,
-                                       String schemaUrl,
-                                       ObjectModelProvider provider)
-   {
-      GenericObjectModelProvider delProv = null;
-      if(provider != null)
-      {
-         delProv = provider instanceof GenericObjectModelProvider ?
-         (GenericObjectModelProvider)provider :
-         new DelegatingObjectModelProvider(provider);
-      }
-
-      ClassMapping mapping = new ClassMapping(cls,
-         localName,
-         null,
-         namespaceUri,
-         schemaUrl,
-         delProv
-      );
-
-      addClassMapping(mapping);
-   }
-
-   public void mapClassToGlobalType(Class cls,
-                                    String localName,
-                                    String nsUri,
-                                    String schemaUrl,
-                                    ObjectModelProvider provider)
-   {
-      ClassMapping mapping = new ClassMapping(cls,
-         null,
-         localName,
-         nsUri,
-         schemaUrl,
-         provider instanceof GenericObjectModelProvider ?
-         (GenericObjectModelProvider)provider :
-         new DelegatingObjectModelProvider(provider)
-      );
-
-      addClassMapping(mapping);
-   }
-
-   public void mapFieldToWildcard(Class cls, String field, ObjectLocalMarshaller marshaller)
-   {
-      FieldToWildcardMapping mapping = new FieldToWildcardMapping(cls, field, marshaller);
-      switch(field2WildcardMap.size())
-      {
-         case 0:
-            field2WildcardMap = Collections.singletonMap(cls, mapping);
-            break;
-         case 1:
-            field2WildcardMap = new HashMap(field2WildcardMap);
-         default:
-            field2WildcardMap.put(cls, mapping);
-      }
-   }
-
-   public void mapClassToXsiType(Class cls, String typeNs, String typeLocalPart)
-   {
-      QName typeQName = new QName(typeNs, typeLocalPart);
-      switch(cls2TypeMap.size())
-      {
-         case 0:
-            cls2TypeMap = Collections.singletonMap(cls, typeQName);
-            break;
-         case 1:
-            cls2TypeMap = new HashMap(cls2TypeMap);
-         default:
-            cls2TypeMap.put(cls, typeQName);
-      }
-
-      if(log.isTraceEnabled())
-      {
-         log.trace("mapped " + cls + " to xsi:type " + typeQName);
-      }
-   }
-
-   public void setVersion(String version)
-   {
-      this.version = version;
-   }
-
-   public void setEncoding(String encoding)
-   {
-      this.encoding = encoding;
-   }
-
-   public void mapPublicIdToSystemId(String publicId, String systemId)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public void addRootElement(String namespaceUri, String prefix, String name)
-   {
-      addRootElement(new QName(namespaceUri, name, prefix));
-   }
-
-   public void addRootElement(QName qName)
-   {
-      rootQNames.add(qName);
-   }
-
-   public void setProperty(String name, String value)
-   {
-      if(props == null)
-      {
-         props = new Properties();
-      }
-      props.setProperty(name, value);
-   }
-
-   public String getProperty(String name)
-   {
-      return props == null ? null : props.getProperty(name);
-   }
-
-   /**
-    * Defines a namespace. The namespace declaration will appear in the root element.
-    * <p>If <code>prefix</code> argument is <code>null</code> or is an empty string then
-    * the passed in URI will be used for the default namespace, i.e. <code>xmlns</code>.
-    * Otherwise, the declaration will follow the format <code>xmlns:prefix=uri</code>.
-    * <p>If the namespace with the given prefix was already declared, its value is overwritten.
-    *
-    * @param prefix the prefix for the namespace to declare (can be null or empty string)
-    * @param uri    the URI of the namespace.
-    */
-   public void declareNamespace(String prefix, String uri)
-   {
-      if(prefix == null)
-      {
-         return;
-      }
-
-      nsRegistry.addPrefixMapping(prefix, uri);
-   }
-
-   public void removePrefixMapping(String prefix)
-   {
-      nsRegistry.removePrefixMapping(prefix);
-   }
-
-   public String getPrefix(String ns)
-   {
-      String prefix = nsRegistry.getPrefix(ns);
-      if(prefix == null && Constants.NS_XML_NAMESPACE.equals(ns))
-      {
-         prefix = "xml";
-      }
-      return prefix;
-   }
-
-   protected void declareNs(AttributesImpl attrs)
-   {
-      for(Iterator i = nsRegistry.getRegisteredURIs(); i.hasNext();)
-      {
-         String uri = (String)i.next();
-         String prefix = nsRegistry.getPrefix(uri);
-         declareNs(attrs, prefix, uri);
-      }
-   }
-
-   protected static void declareNs(AttributesImpl attrs, String prefix, String ns)
-   {
-      attrs.add(null, prefix, prefix.length() == 0 ? "xmlns" : "xmlns:" + prefix, "CDATA", ns);
-   }
-
-   /**
-    * Adds xsi:type attribute and optionally declares namespaces for xsi and type's namespace.
-    *
-    * @param typeQName the type to declare xsi:type attribute for
-    * @param attrs     the attributes to add xsi:type attribute to
-    * @return prefix for the type's ns if it was generated
-    */
-   protected String declareXsiType(QName typeQName, AttributesImpl attrs)
-   {
-      String result = null;
-      String xsiPrefix = nsRegistry.getPrefix(Constants.NS_XML_SCHEMA_INSTANCE);
-      if(xsiPrefix == null)
-      {
-         declareNs(attrs, "xsi", Constants.NS_XML_SCHEMA_INSTANCE);
-         xsiPrefix = "xsi";
-      }
-
-      String pref = getPrefix(typeQName.getNamespaceURI());
-      if(pref == null)
-      {
-         // the ns is not declared
-         result = pref = typeQName.getLocalPart() + "_ns";
-      }
-
-      String qName = prefixLocalName(pref, typeQName.getLocalPart());
-      attrs.add(Constants.NS_XML_SCHEMA_INSTANCE, "type", xsiPrefix + ":type", "CDATA", qName);
-      return result;
-   }
-
-   protected static String prefixLocalName(String prefix, String local)
-   {
-      return prefix == null || prefix.length() == 0 ? local : prefix + ':' + local;
-   }
-
-   public abstract void addAttribute(String prefix, String localName, String type, String value);
-
-   // Protected
-
-   protected boolean propertyIsTrueOrNotSet(String name)
-   {
-      String value = getProperty(name);
-      return value == null || "true".equalsIgnoreCase(value);
-   }
-
-   protected void writeXmlVersion(Writer writer) throws IOException
-   {
-      String xmlVersion = getProperty(Marshaller.PROP_OUTPUT_XML_VERSION);
-      if(xmlVersion == null || "true".equalsIgnoreCase(xmlVersion))
-      {
-         writer.write("<?xml version=\"");
-         writer.write(version);
-         writer.write("\" encoding=\"");
-         writer.write(encoding);
-         writer.write("\"?>\n");
-      }
-   }
-
-   protected ClassMapping getClassMapping(Class cls)
-   {
-      return (ClassMapping)classMappings.get(cls);
-   }
-
-   private void addClassMapping(ClassMapping mapping)
-   {
-      if(classMappings == Collections.EMPTY_MAP)
-      {
-         classMappings = new HashMap();
-      }
-      classMappings.put(mapping.cls, mapping);
-   }
-
-   // Inner
-
-   protected class ClassMapping
-   {
-      public final Class cls;
-      public final QName elementName;
-      public final QName typeName;
-      public final String schemaUrl;
-      public final GenericObjectModelProvider provider;
-
-      public ClassMapping(Class cls,
-                          String elementName,
-                          String typeName,
-                          String nsUri,
-                          String schemaUrl,
-                          GenericObjectModelProvider provider)
-      {
-         this.cls = cls;
-         if(elementName != null)
-         {
-            this.elementName = nsUri == null ? new QName(elementName) : new QName(nsUri, elementName);
-            this.typeName = null;
-         }
-         else if(typeName != null)
-         {
-            this.elementName = null;
-            this.typeName = nsUri == null ? new QName(typeName) : new QName(nsUri, typeName);
-         }
-         else
-         {
-            throw new JBossXBRuntimeException("Element or type name must not null for " + cls);
-         }
-
-         this.schemaUrl = schemaUrl;
-         this.provider = provider;
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(o == null || getClass() != o.getClass())
-         {
-            return false;
-         }
-
-         final ClassMapping that = (ClassMapping)o;
-
-         if(cls != null ? !cls.equals(that.cls) : that.cls != null)
-         {
-            return false;
-         }
-         if(elementName != null ? !elementName.equals(that.elementName) : that.elementName != null)
-         {
-            return false;
-         }
-         if(provider != null ? !provider.equals(that.provider) : that.provider != null)
-         {
-            return false;
-         }
-         if(schemaUrl != null ? !schemaUrl.equals(that.schemaUrl) : that.schemaUrl != null)
-         {
-            return false;
-         }
-         if(typeName != null ? !typeName.equals(that.typeName) : that.typeName != null)
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         int result;
-         result = (cls != null ? cls.hashCode() : 0);
-         result = 29 * result + (elementName != null ? elementName.hashCode() : 0);
-         result = 29 * result + (typeName != null ? typeName.hashCode() : 0);
-         result = 29 * result + (schemaUrl != null ? schemaUrl.hashCode() : 0);
-         result = 29 * result + (provider != null ? provider.hashCode() : 0);
-         return result;
-      }
-   }
-
-   protected class FieldToWildcardMapping
-   {
-      public final Class cls;
-      public final ObjectLocalMarshaller marshaller;
-      public final FieldInfo fieldInfo;
-
-      public FieldToWildcardMapping(Class cls, String field, ObjectLocalMarshaller marshaller)
-      {
-         if(log.isTraceEnabled())
-         {
-            log.trace("new FieldToWildcardMapping: [cls=" +
-               cls.getName() +
-               ",field=" +
-               field +
-               "]"
-            );
-         }
-
-         this.cls = cls;
-         this.marshaller = marshaller;
-         this.fieldInfo = FieldInfo.getFieldInfo(cls, field, true);
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(!(o instanceof FieldToWildcardMapping))
-         {
-            return false;
-         }
-
-         final FieldToWildcardMapping fieldToWildcardMapping = (FieldToWildcardMapping)o;
-
-         if(!cls.equals(fieldToWildcardMapping.cls))
-         {
-            return false;
-         }
-         if(!fieldInfo.getName().equals(fieldToWildcardMapping.fieldInfo.getName()))
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         int result;
-         result = cls.hashCode();
-         result = 29 * result + fieldInfo.getName().hashCode();
-         return result;
-      }
-   }
-
-   protected static interface Stack
-   {
-      void clear();
-
-      void push(Object o);
-
-      Object pop();
-
-      Object peek();
-
-      boolean isEmpty();
-   }
-
-   public static class StackImpl
-      implements Stack
-   {
-      private List list = new ArrayList();
-
-      public void clear()
-      {
-         list.clear();
-      }
-
-      public void push(Object o)
-      {
-         list.add(o);
-      }
-
-      public Object pop()
-      {
-         return list.remove(list.size() - 1);
-      }
-
-      public Object peek()
-      {
-         return list.get(list.size() - 1);
-      }
-
-      public boolean isEmpty()
-      {
-         return list.isEmpty();
-      }
-   }
-
-   public class ContentHandlerAdaptor
-      implements ContentHandler
-   {
-      public void setDocumentLocator(Locator locator)
-      {
-      }
-
-      public void startDocument() throws SAXException
-      {
-         // this is used to marshal a fragment of a document so we don't delegate startDocument
-      }
-
-      public void endDocument() throws SAXException
-      {
-         // this is used to marshal a fragment of a document so we don't delegate endDocument
-      }
-
-      public void startPrefixMapping(String prefix, String uri) throws SAXException
-      {
-         content.startPrefixMapping(prefix, uri);
-      }
-
-      public void endPrefixMapping(String prefix) throws SAXException
-      {
-         content.endPrefixMapping(prefix);
-      }
-
-      public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
-      {
-         content.startElement(uri, localName, qName, atts);
-      }
-
-      public void endElement(String uri, String localName, String qName) throws SAXException
-      {
-         content.endElement(uri, localName, qName);
-      }
-
-      public void characters(char ch[], int start, int length) throws SAXException
-      {
-         content.characters(ch, start, length);
-      }
-
-      public void ignorableWhitespace(char ch[], int start, int length) throws SAXException
-      {
-      }
-
-      public void processingInstruction(String target, String data) throws SAXException
-      {
-      }
-
-      public void skippedEntity(String name) throws SAXException
-      {
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AbstractMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AbstractMarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AttributesImpl.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AttributesImpl.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AttributesImpl.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,307 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.xml.sax.Attributes;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * org.xml.sax.Attributes implementation.
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- */
-public class AttributesImpl
-   implements Attributes
-{
-   private final List attrList;
-
-   public AttributesImpl(Attributes attrs)
-   {
-      this(attrs == null ? 0 : attrs.getLength());
-
-      if(attrs != null)
-      {
-         for(int i = 0; i < attrs.getLength(); ++i)
-         {
-            add(
-               attrs.getURI(i),
-               attrs.getLocalName(i),
-               attrs.getQName(i),
-               attrs.getType(i),
-               attrs.getValue(i)
-            );
-         }
-      }
-   }
-
-   public AttributesImpl(int size)
-   {
-      this.attrList = new ArrayList(size);
-   }
-
-   public void add(String namespaceUri, String localName, String qName, String type, String value)
-   {
-      attrList.add(new AttributeImpl(namespaceUri, localName, qName, type, value));
-   }
-
-   public void addAll(Attributes attrs)
-   {
-      for(int i = 0; i < attrs.getLength(); ++i)
-      {
-         add(attrs.getURI(i), attrs.getLocalName(i), attrs.getQName(i), attrs.getType(i), attrs.getValue(i));
-      }
-   }
-
-   // Attributes implementation
-
-   public int getLength()
-   {
-      return attrList.size();
-   }
-
-   public String getURI(int index)
-   {
-      return getAttribute(index).namespaceUri;
-   }
-
-   public String getLocalName(int index)
-   {
-      return getAttribute(index).localName;
-   }
-
-   public String getQName(int index)
-   {
-      return getAttribute(index).qName;
-   }
-
-   public String getType(int index)
-   {
-      return getAttribute(index).type;
-   }
-
-   public String getValue(int index)
-   {
-      return getAttribute(index).value;
-   }
-
-   public int getIndex(String uri, String localName)
-   {
-      int i = 0;
-      while(i < attrList.size())
-      {
-         final AttributeImpl attr = getAttribute(i++);
-         if(
-            (attr.namespaceUri == null ? uri == null : attr.namespaceUri.equals(uri)) &&
-            (attr.localName == null ? localName == null : attr.localName.equals(localName))
-         )
-         {
-            break;
-         }
-      }
-
-      if (i == attrList.size())
-         return -1;
-
-      return i;
-   }
-
-   public int getIndex(String qName)
-   {
-      int i = 0;
-      while(i < attrList.size())
-      {
-         final AttributeImpl attr = getAttribute(i++);
-         if(attr.qName.equals(qName))
-         {
-            break;
-         }
-      }
-
-      if (i == attrList.size())
-         return -1;
-
-      return i;
-   }
-
-   public String getType(String uri, String localName)
-   {
-      AttributeImpl attr = null;
-      int i = 0;
-      while(i < attrList.size())
-      {
-         attr = getAttribute(i++);
-         if(
-            (attr.namespaceUri == null ? uri == null : attr.namespaceUri.equals(uri)) &&
-            (attr.localName == null ? localName == null : attr.localName.equals(localName))
-         )
-         {
-            break;
-         }
-      }
-
-      if (attr == null)
-         return null;
-
-      return attr.type;
-   }
-
-   public String getType(String qName)
-   {
-      AttributeImpl attr = null;
-      int i = 0;
-      while(i < attrList.size())
-      {
-         attr = getAttribute(i++);
-         if(attr.qName.equals(qName))
-         {
-            break;
-         }
-      }
-
-      if (attr == null)
-         return null;
-
-      return attr.type;
-   }
-
-   public String getValue(String uri, String localName)
-   {
-      AttributeImpl attr = null;
-      int i = 0;
-      while(i < attrList.size())
-      {
-         attr = getAttribute(i++);
-         if(
-            (attr.namespaceUri == null ? uri == null : attr.namespaceUri.equals(uri)) &&
-            (attr.localName == null ? localName == null : attr.localName.equals(localName))
-         )
-         {
-            break;
-         }
-      }
-
-      if (attr == null)
-         return null;
-
-      return attr.value;
-   }
-
-   public String getValue(String qName)
-   {
-      AttributeImpl attr = null;
-      int i = 0;
-      while(i < attrList.size())
-      {
-         attr = getAttribute(i++);
-         if(attr.qName.equals(qName))
-         {
-            break;
-         }
-      }
-
-      if (attr == null)
-         return null;
-
-      return attr.value;
-   }
-
-   // Public
-
-   public String toString()
-   {
-      String result;
-      if(this.attrList.isEmpty())
-      {
-         result = "[]";
-      }
-      else
-      {
-         StringBuffer sb = new StringBuffer();
-         sb.append('[');
-         sb.append(getQName(0)).append('=').append(getValue(0));
-         for(int i = 1; i < attrList.size(); ++i)
-         {
-            sb.append(", ").append(getQName(i)).append('=').append(getValue(i));
-         }
-         sb.append(']');
-         result = sb.toString();
-      }
-      return result;
-   }
-
-   // Private
-
-   private AttributeImpl getAttribute(int index)
-   {
-      return (AttributeImpl)attrList.get(index);
-   }
-
-   // Inner
-
-   private static final class AttributeImpl
-   {
-      public final String namespaceUri;
-      public final String localName;
-      public final String qName;
-      public final String type;
-      public final String value;
-
-      public AttributeImpl(String namespaceUri, String localName, String qName, String type, String value)
-      {
-         this.namespaceUri = namespaceUri;
-         this.localName = localName;
-         this.qName = qName;
-         this.type = type;
-         this.value = value;
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o) return true;
-         if(!(o instanceof AttributeImpl)) return false;
-
-         final AttributeImpl attribute = (AttributeImpl)o;
-
-         if(localName != null ? !localName.equals(attribute.localName) : attribute.localName != null) return false;
-         if(namespaceUri != null ? !namespaceUri.equals(attribute.namespaceUri) : attribute.namespaceUri != null) return false;
-         if(qName != null ? !qName.equals(attribute.qName) : attribute.qName != null) return false;
-         if(type != null ? !type.equals(attribute.type) : attribute.type != null) return false;
-         if(value != null ? !value.equals(attribute.value) : attribute.value != null) return false;
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         int result;
-         result = (namespaceUri != null ? namespaceUri.hashCode() : 0);
-         result = 29 * result + (localName != null ? localName.hashCode() : 0);
-         result = 29 * result + (qName != null ? qName.hashCode() : 0);
-         result = 29 * result + (type != null ? type.hashCode() : 0);
-         result = 29 * result + (value != null ? value.hashCode() : 0);
-         return result;
-      }
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AttributesImpl.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/AttributesImpl.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Constants.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Constants.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Constants.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,100 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface Constants
-{
-   String NS_XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace";
-   String NS_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
-   String NS_XML_SCHEMA_INSTANCE = "http://www.w3.org/2001/XMLSchema-instance";
-   String NS_XML_XMLNS = "http://www.w3.org/2000/xmlns/";
-   String NS_XML_MIME = "http://www.w3.org/2005/05/xmlmime";
-   String NS_XOP_INCLUDE = "http://www.w3.org/2004/08/xop/include";
-   
-   String NS_JAXB = "http://java.sun.com/xml/ns/jaxb";
-   String NS_JBXB = "http://www.jboss.org/xml/ns/jbxb";
-
-   //
-   // XML schema type names
-   //
-
-   QName QNAME_ANYSIMPLETYPE = new QName(NS_XML_SCHEMA, "anySimpleType");
-   QName QNAME_ANYTYPE = new QName(NS_XML_SCHEMA, "anyType");
-
-   // primitive datatypes
-   QName QNAME_STRING = new QName(NS_XML_SCHEMA, "string");
-   QName QNAME_BOOLEAN = new QName(NS_XML_SCHEMA, "boolean");
-   QName QNAME_DECIMAL = new QName(NS_XML_SCHEMA, "decimal");
-   QName QNAME_FLOAT = new QName(NS_XML_SCHEMA, "float");
-   QName QNAME_DOUBLE = new QName(NS_XML_SCHEMA, "double");
-   QName QNAME_DURATION = new QName(NS_XML_SCHEMA, "duration");
-   QName QNAME_DATETIME = new QName(NS_XML_SCHEMA, "dateTime");
-   QName QNAME_TIME = new QName(NS_XML_SCHEMA, "time");
-   QName QNAME_DATE = new QName(NS_XML_SCHEMA, "date");
-   QName QNAME_GYEARMONTH = new QName(NS_XML_SCHEMA, "gYearMonth");
-   QName QNAME_GYEAR = new QName(NS_XML_SCHEMA, "gYear");
-   QName QNAME_GMONTHDAY = new QName(NS_XML_SCHEMA, "gMonthDay");
-   QName QNAME_GDAY = new QName(NS_XML_SCHEMA, "gDay");
-   QName QNAME_GMONTH = new QName(NS_XML_SCHEMA, "gMonth");
-   QName QNAME_HEXBINARY = new QName(NS_XML_SCHEMA, "hexBinary");
-   QName QNAME_BASE64BINARY = new QName(NS_XML_SCHEMA, "base64Binary");
-   QName QNAME_ANYURI = new QName(NS_XML_SCHEMA, "anyURI");
-   QName QNAME_QNAME = new QName(NS_XML_SCHEMA, "QName");
-   QName QNAME_NOTATION = new QName(NS_XML_SCHEMA, "NOTATION");
-
-   // derived datatypes
-   QName QNAME_NORMALIZEDSTRING = new QName(NS_XML_SCHEMA, "normalizedString");
-   QName QNAME_TOKEN = new QName(NS_XML_SCHEMA, "token");
-   QName QNAME_LANGUAGE = new QName(NS_XML_SCHEMA, "language");
-   QName QNAME_NMTOKEN = new QName(NS_XML_SCHEMA, "NMTOKEN");
-   QName QNAME_NMTOKENS = new QName(NS_XML_SCHEMA, "NMTOKENS");
-   QName QNAME_NAME = new QName(NS_XML_SCHEMA, "Name");
-   QName QNAME_NCNAME = new QName(NS_XML_SCHEMA, "NCName");
-   QName QNAME_ID = new QName(NS_XML_SCHEMA, "ID");
-   QName QNAME_IDREF = new QName(NS_XML_SCHEMA, "IDREF");
-   QName QNAME_IDREFS = new QName(NS_XML_SCHEMA, "IDREFS");
-   QName QNAME_ENTITY = new QName(NS_XML_SCHEMA, "ENTITY");
-   QName QNAME_ENTITIES = new QName(NS_XML_SCHEMA, "ENTITIES");
-   QName QNAME_INTEGER = new QName(NS_XML_SCHEMA, "integer");
-   QName QNAME_NONPOSITIVEINTEGER = new QName(NS_XML_SCHEMA, "nonPositiveInteger");
-   QName QNAME_NEGATIVEINTEGER = new QName(NS_XML_SCHEMA, "negativeInteger");
-   QName QNAME_LONG = new QName(NS_XML_SCHEMA, "long");
-   QName QNAME_INT = new QName(NS_XML_SCHEMA, "int");
-   QName QNAME_SHORT = new QName(NS_XML_SCHEMA, "short");
-   QName QNAME_BYTE = new QName(NS_XML_SCHEMA, "byte");
-   QName QNAME_NONNEGATIVEINTEGER = new QName(NS_XML_SCHEMA, "nonNegativeInteger");
-   QName QNAME_UNSIGNEDLONG = new QName(NS_XML_SCHEMA, "unsignedLong");
-   QName QNAME_UNSIGNEDINT = new QName(NS_XML_SCHEMA, "unsignedInt");
-   QName QNAME_UNSIGNEDSHORT = new QName(NS_XML_SCHEMA, "unsignedShort");
-   QName QNAME_UNSIGNEDBYTE = new QName(NS_XML_SCHEMA, "unsignedByte");
-   QName QNAME_POSITIVEINTEGER = new QName(NS_XML_SCHEMA, "positiveInteger");
-
-   QName QNAME_XMIME_BASE64BINARY = new QName(NS_XML_MIME, "base64Binary");
-   QName QNAME_XMIME_CONTENTTYPE = new QName(NS_XML_MIME, "contentType");
-   QName QNAME_XOP_INCLUDE = new QName(Constants.NS_XOP_INCLUDE, "Include");
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Constants.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Constants.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Content.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Content.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Content.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,393 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.io.StringWriter;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-import org.jboss.logging.Logger;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * An instance of this class represents XML content.
- * It is populated on unmarshalling with org.jboss.xb.binding.ContentPopulator and used
- * to implement content navigation in object model factories.
- * And on marshalling, first, an instance of this class is created and then it
- * is serialized into XML content with org.jboss.xb.binding.ContentWriter.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class Content
-{
-   private static Logger log = Logger.getLogger(Content.class);
-
-   private List content = new ArrayList();
-   private final boolean trace = log.isTraceEnabled();
-
-   // Public
-
-   public String getChildContent(String namespaceURI, String qName)
-   {
-      StartElement current = ((StartElement)content.get(index));
-
-      boolean lookingForStart = true;
-      StartElement start = null;
-      boolean childFound = false;
-      StringBuffer value = new StringBuffer();
-
-      int i = index + 1;
-      Object next = content.get(i++);
-      while(!current.isMyEnd(next))
-      {
-         if(lookingForStart)
-         {
-            if(next instanceof StartElement)
-            {
-               start = (StartElement)next;
-               lookingForStart = false;
-
-               if(qName.equals(start.qName) &&
-                  (namespaceURI == null ? start.namespaceURI == null : namespaceURI.equals(start.namespaceURI)))
-               {
-                  childFound = true;
-               }
-            }
-         }
-         else if(next instanceof EndElement)
-         {
-            if(start.isMyEnd(next))
-            {
-               if(childFound)
-               {
-                  break;
-               }
-               else
-               {
-                  lookingForStart = true;
-               }
-            }
-         }
-         else if(childFound && next instanceof Characters)
-         {
-            Characters chars = (Characters)next;
-            value.append(chars.ch, chars.start, chars.length);
-         }
-         next = content.get(i++);
-      }
-      return value.toString().trim();
-   }
-
-   public void handleContent(ContentHandler handler) throws SAXException
-   {
-      handler.startDocument();
-
-      for(Iterator i = content.iterator(); i.hasNext();)
-      {
-         Object item = i.next();
-         if(item instanceof StartElement)
-         {
-            StartElement start = (StartElement)item;
-            handler.startElement(start.namespaceURI, start.localName, start.qName, start.attrs);
-         }
-         else if(item instanceof EndElement)
-         {
-            EndElement end = (EndElement)item;
-            handler.endElement(end.namespaceURI, end.localName, end.qName);
-         }
-         else if(item instanceof Characters)
-         {
-            Characters ch = (Characters)item;
-            handler.characters(ch.ch, ch.start, ch.length);
-         }
-         else if(item instanceof StartPrefixMapping)
-         {
-/*
-            if(trace)
-            {
-               StartPrefixMapping startPrefix = (StartPrefixMapping)item;
-               log.trace("start prefix mapping: " + startPrefix.prefix + "=" + startPrefix.uri);
-            }
-*/
-         }
-         else if(item instanceof EndPrefixMapping)
-         {
-/*
-            if(trace)
-            {
-               EndPrefixMapping endPrefix = (EndPrefixMapping)item;
-               log.trace("end prefix mapping: " + endPrefix.prefix);
-            }
-*/
-         }
-         else
-         {
-            throw new IllegalStateException("Unexpected element type: " + item);
-         }
-      }
-
-      handler.endDocument();
-   }
-
-   public String toString()
-   {
-      StringWriter writer = new StringWriter();
-      try
-      {
-         ContentWriter contentWriter = new ContentWriter(writer, true);
-         handleContent(contentWriter);
-      }
-      catch(SAXException e)
-      {
-         writer.write(e.getMessage());
-      }
-      return writer.getBuffer().toString();
-   }
-
-   // Methods that populate the content
-
-   public void startDocument()
-   {
-      content.clear();
-   }
-
-   public void endDocument()
-   {
-   }
-
-   public void startPrefixMapping(String prefix, String uri)
-   {
-      StartPrefixMapping node = new StartPrefixMapping(prefix, uri);
-      content.add(node);
-   }
-
-   public void endPrefixMapping(String prefix)
-   {
-      EndPrefixMapping node = new EndPrefixMapping(prefix);
-      content.add(node);
-   }
-
-   public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
-   {
-      StartElement startElement = new StartElement(namespaceURI, localName, qName, atts);
-      content.add(startElement);
-
-      if(trace)
-      {
-         log.trace("startElement> uri=" + namespaceURI + ", local=" + localName + ", qn=" + qName + ", attrs=" + atts);
-      }
-   }
-
-   public void endElement(String namespaceURI, String localName, String qName)
-   {
-      EndElement endElement = new EndElement(namespaceURI, localName, qName);
-      content.add(endElement);
-
-      if(trace)
-      {
-         log.trace("endElement> uri=" + namespaceURI + ", local=" + localName + ", qn=" + qName);
-      }
-   }
-
-   public void characters(char[] ch, int start, int length)
-   {
-      Characters characters = new Characters(ch, start, length);
-      // ignore whitespace-only characters
-      if(characters.toString().trim().length() > 0)
-      {
-         content.add(characters);
-
-         if(trace)
-         {
-            log.trace("characters> " + characters);
-         }
-      }
-   }
-
-   // Methods that navigate through the content
-
-   private int index;
-
-   public void append(Content content)
-   {
-      for(Iterator i = content.content.iterator(); i.hasNext();)
-      {
-         this.content.add(i.next());
-      }
-   }
-
-   // Inner
-
-   private static interface Node
-   {
-   }
-
-   public static class Characters
-      implements Node
-   {
-      private final char[] ch;
-      private final int start;
-      private final int length;
-
-      public Characters(char[] ch, int start, int length)
-      {
-         /*
-         this.ch = ch;
-         this.start = start;
-         this.length = length;
-         */
-         this.ch = new char[length];
-         System.arraycopy(ch, start, this.ch, 0, length);
-         this.start = 0;
-         this.length = length;
-      }
-
-      public String toString()
-      {
-         return String.valueOf(ch, start, length);
-      }
-   }
-
-   public static class EndElement
-      implements Node
-   {
-      private final String namespaceURI;
-      private final String localName;
-      private final String qName;
-
-      public EndElement(String namespaceURI, String localName, String qName)
-      {
-         this.namespaceURI = namespaceURI;
-         this.localName = localName;
-         this.qName = qName;
-      }
-
-      public String toString()
-      {
-         return '[' + namespaceURI + ',' + localName + ',' + qName + ']';
-      }
-   }
-
-   public static class StartElement
-      implements Node
-   {
-      private final String namespaceURI;
-      private final String localName;
-      private final String qName;
-      private final Attributes attrs;
-
-      public StartElement(String namespaceURI, String localName, String qName, Attributes attrs)
-      {
-         this.namespaceURI = namespaceURI;
-         this.localName = localName;
-         this.qName = qName;
-         this.attrs = new AttributesImpl(attrs);
-      }
-
-      public boolean isMyEnd(Object element)
-      {
-         boolean itis = false;
-         if(element instanceof EndElement)
-         {
-            EndElement end = (EndElement)element;
-            itis = (namespaceURI == null ? end.namespaceURI == null : namespaceURI.equals(end.namespaceURI))
-               && qName.equals(end.qName);
-         }
-         return itis;
-      }
-
-      public String toString()
-      {
-         return '[' + namespaceURI + ',' + localName + ',' + qName + ']';
-      }
-   }
-
-   public static class StartPrefixMapping
-      implements Node
-   {
-      public final String prefix;
-      public final String uri;
-
-      public StartPrefixMapping(String prefix, String uri)
-      {
-         this.prefix = prefix;
-         this.uri = uri;
-      }
-
-      public void read(ObjectModelBuilder builder)
-      {
-         builder.startPrefixMapping(prefix, uri);
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(!(o instanceof StartPrefixMapping))
-         {
-            return false;
-         }
-
-         final StartPrefixMapping startPrefixMapping = (StartPrefixMapping)o;
-
-         if(prefix != null ? !prefix.equals(startPrefixMapping.prefix) : startPrefixMapping.prefix != null)
-         {
-            return false;
-         }
-         if(uri != null ? !uri.equals(startPrefixMapping.uri) : startPrefixMapping.uri != null)
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         int result;
-         result = (prefix != null ? prefix.hashCode() : 0);
-         result = 29 * result + (uri != null ? uri.hashCode() : 0);
-         return result;
-      }
-   }
-
-   public static class EndPrefixMapping
-      implements Node
-   {
-      public final String prefix;
-
-      public EndPrefixMapping(String prefix)
-      {
-         this.prefix = prefix;
-      }
-
-      public void read(ObjectModelBuilder builder)
-      {
-         builder.endPrefixMapping(prefix);
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Content.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Content.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentPopulator.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentPopulator.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentPopulator.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,109 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.Attributes;
-
-/**
- * org.xml.sax.ContentHandler implementation that poplulates an instance of org.jboss.xb.binding.Content.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ContentPopulator
-   implements ContentHandler
-{
-   private Content content = new Content();
-
-   // Public
-
-   public Content getContent()
-   {
-      return content;
-   }
-
-   // ContentHandler implementation
-
-   public void setDocumentLocator(Locator locator)
-   {
-   }
-
-   public void startDocument()
-      throws SAXException
-   {
-      content.startDocument();
-   }
-
-   public void endDocument()
-      throws SAXException
-   {
-      content.endDocument();
-   }
-
-   public void startPrefixMapping(String prefix, String uri)
-      throws SAXException
-   {
-      content.startPrefixMapping(prefix, uri);
-   }
-
-   public void endPrefixMapping(String prefix)
-      throws SAXException
-   {
-      content.endPrefixMapping(prefix);
-   }
-
-   public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
-      throws SAXException
-   {
-      content.startElement(namespaceURI, localName, qName, atts);
-   }
-
-   public void endElement(String namespaceURI, String localName, String qName)
-      throws SAXException
-   {
-      content.endElement(namespaceURI, localName, qName);
-   }
-
-   public void characters(char ch[], int start, int length)
-      throws SAXException
-   {
-      content.characters(ch, start, length);
-   }
-
-   public void ignorableWhitespace(char ch[], int start, int length)
-      throws SAXException
-   {
-   }
-
-   public void processingInstruction(String target, String data)
-      throws SAXException
-   {
-   }
-
-   public void skippedEntity(String name)
-      throws SAXException
-   {
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentPopulator.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentPopulator.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentWriter.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentWriter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentWriter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,286 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.io.IOException;
-import java.io.Writer;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * org.xml.sax.ContentHandler implementation that serializes an instance of org.jboss.xb.binding.Content
- * to a java.io.Writer.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ContentWriter
-   implements ContentHandler
-{
-   final boolean useIndent;
-   private String indent = "   ";
-   private int depth = 0;
-   private boolean started = false;
-
-   private final Writer writer;
-
-   public ContentWriter(Writer writer, boolean indent)
-   {
-      this.writer = writer;
-      this.useIndent = indent;
-   }
-
-   public void setDocumentLocator(Locator locator)
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public void startDocument()
-      throws SAXException
-   {
-   }
-
-   public void endDocument()
-      throws SAXException
-   {
-   }
-
-   public void startPrefixMapping(String prefix, String uri)
-      throws SAXException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public void endPrefixMapping(String prefix)
-      throws SAXException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
-      throws SAXException
-   {
-      if(useIndent)
-      {
-         write(writer, '\n');
-         for(int j = 0; j < depth; ++j)
-         {
-            write(writer, indent);
-         }
-      }
-
-      if(!started)
-      {
-         started = true;
-      }
-
-      ++depth;
-
-      write(writer, '<');
-      write(writer, qName);
-
-      if(atts != null && atts.getLength() > 0)
-      {
-         for(int i = 0; i < atts.getLength(); ++i)
-         {
-            write(writer, ' ');
-            write(writer, atts.getQName(i));
-            write(writer, "=\"");
-            writeNormalized(writer, atts.getValue(i));
-            write(writer, '\"');
-         }
-      }
-
-      /*if(namespaceURI != null && namespaceURI.length() > 1)
-      {
-         int colon = qName.indexOf(':');
-         / *
-         if(colon < 0)
-         {
-            throw new IllegalStateException(
-               "Namespace URI specified (" + namespaceURI + ") but no qName found in qualified name '" + qName
-            );
-         }
-         * /
-
-         if(colon >= 0)
-         {
-            String prefix = qName.substring(0, colon);
-            if(useIndent)
-            {
-               write(writer, '\n');
-               for(int i = 0; i < depth + 1; ++i)
-               {
-                  write(writer, indent);
-               }
-            }
-            else
-            {
-               write(writer, ' ');
-            }
-
-            write(writer, "xmlns:");
-            write(writer, prefix);
-            write(writer, "=\"");
-            write(writer, namespaceURI);
-            write(writer, "\"");
-         }
-      }*/
-
-      write(writer, '>');
-   }
-
-   public void endElement(String namespaceURI, String localName,
-                          String qName)
-      throws SAXException
-   {
-      --depth;
-      if(!started)
-      {
-         if(useIndent)
-         {
-            write(writer, '\n');
-            for(int j = 0; j < depth; ++j)
-            {
-               write(writer, indent);
-            }
-         }
-      }
-      else
-      {
-         started = false;
-      }
-
-      write(writer, "</");
-      write(writer, qName);
-      write(writer, '>');
-   }
-
-   public void characters(char ch[], int start, int length)
-      throws SAXException
-   {
-      writeNormalized(writer, ch, start, length);
-   }
-
-   public void ignorableWhitespace(char ch[], int start, int length)
-      throws SAXException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public void processingInstruction(String target, String data)
-      throws SAXException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   public void skippedEntity(String name)
-      throws SAXException
-   {
-      throw new UnsupportedOperationException();
-   }
-
-   // Private
-
-   private static void write(Writer writer, String str) throws SAXException
-   {
-      try
-      {
-         writer.write(str);
-      }
-      catch(IOException e)
-      {
-         throw new SAXException("Writting failed: " + e.getMessage(), e);
-      }
-   }
-
-   private static void writeNormalized(Writer writer, String str) throws SAXException
-   {
-      writeNormalized(writer, str.toCharArray(), 0, str.length());
-   }
-
-   private static void write(Writer writer, int ch) throws SAXException
-   {
-      try
-      {
-         writer.write(ch);
-      }
-      catch(IOException e)
-      {
-         throw new SAXException("Writting failed: " + e.getMessage(), e);
-      }
-   }
-
-   private static void writeNormalized(Writer writer, char[] ch, int start, int length) throws SAXException
-   {
-      try
-      {
-         int left = start;
-         int i = start;
-         while(i < start + length)
-         {
-            char c = ch[i++];
-            if(c == '<')
-            {
-               writer.write(ch, left, i - left - 1);
-               writer.write("&lt;");
-               left = i;
-            }
-            else if(c == '>')
-            {
-               writer.write(ch, left, i - left - 1);
-               writer.write("&gt;");
-               left = i;
-            }
-            else if(c == '&')
-            {
-               writer.write(ch, left, i - left - 1);
-               writer.write("&amp;");
-               left = i;
-            }
-            else if(c == '\'')
-            {
-               writer.write(ch, left, i - left - 1);
-               writer.write("&apos;");
-               left = i;
-            }
-            else if(c == '\"')
-            {
-               writer.write(ch, left, i - left - 1);
-               writer.write("&quot;");
-               left = i;
-            }
-         }
-
-         if(left < i)
-         {
-            writer.write(ch, left, i - left);
-         }
-      }
-      catch(IOException e)
-      {
-         throw new SAXException("Writting failed: " + e.getMessage(), e);
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentWriter.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ContentWriter.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelFactory.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,236 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.xml.sax.Attributes;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * todo come up with a nicer class name
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class DelegatingObjectModelFactory
-   implements GenericObjectModelFactory
-{
-   private final ObjectModelFactory typedFactory;
-   private final Map addMethodsByParent = new HashMap();
-
-   public DelegatingObjectModelFactory(ObjectModelFactory typedFactory)
-   {
-      this.typedFactory = typedFactory;
-
-      Method[] methods = typedFactory.getClass().getMethods();
-      for(int i = 0; i < methods.length; ++i)
-      {
-         Method method = methods[i];
-         if("addChild".equals(method.getName()))
-         {
-            Class parent = method.getParameterTypes()[0];
-            AddMethods addMethods = (AddMethods)addMethodsByParent.get(parent);
-            if(addMethods == null)
-            {
-               addMethods = new AddMethods(parent);
-               addMethodsByParent.put(parent, addMethods);
-            }
-            addMethods.addMethod(method);
-         }
-      }
-   }
-
-   public Object newRoot(Object root,
-                         UnmarshallingContext navigator,
-                         String namespaceURI,
-                         String localName,
-                         Attributes attrs)
-   {
-      return typedFactory.newRoot(root, navigator, namespaceURI, localName, attrs);
-   }
-
-   public Object newChild(Object parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
-   {
-      // Get the newChild method
-      Class objClass = parent.getClass();
-      Class[] classes = new Class[] { objClass, UnmarshallingContext.class, String.class, String.class, Attributes.class };
-      Method method = ObjectModelBuilder.getMethodForElement(typedFactory, "newChild", classes);
-
-      // If null, try to get the newChild method from the super class
-      while (method == null && objClass.getSuperclass() != Object.class)
-      {
-         objClass = objClass.getSuperclass();
-         classes = new Class[] { objClass, UnmarshallingContext.class, String.class, String.class, Attributes.class };
-         method = ObjectModelBuilder.getMethodForElement(typedFactory, "newChild", classes);
-      }
-
-      // invoke the setValue method
-      Object child = null;
-      if (method != null)
-      {
-         Object[] objects = new Object[] { parent, navigator, namespaceURI, localName, attrs };
-         child = ObjectModelBuilder.invokeFactory(typedFactory, method, objects);
-      }
-      return child;
-   }
-
-   public void addChild(Object parent,
-                        Object child,
-                        UnmarshallingContext navigator,
-                        String namespaceURI,
-                        String localName)
-   {
-      /*
-      Method method = ObjectModelBuilder.getMethodForElement(typedFactory,
-         "addChild",
-         new Class[]{
-            parent.getClass(),
-            child.getClass(),
-            ContentNavigator.class,
-            String.class,
-            String.class
-         });
-         */
-      AddMethods addMethods = (AddMethods)addMethodsByParent.get(parent.getClass());
-      if(addMethods != null)
-      {
-         Method method = addMethods.getMethodForChild(child.getClass());
-         if(method != null)
-         {
-            ObjectModelBuilder.invokeFactory(typedFactory,
-               method,
-               new Object[]{
-                  parent,
-                  child,
-                  navigator,
-                  namespaceURI,
-                  localName
-               }
-            );
-         }
-      }
-   }
-
-   public void setValue(Object o, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
-   {
-      // Get the setValue method
-      Class objClass = o.getClass();
-      Class[] classes = new Class[] { objClass, UnmarshallingContext.class, String.class, String.class, String.class };
-      Method method = ObjectModelBuilder.getMethodForElement(typedFactory, "setValue", classes);
-      
-      // If null, try to get the setValue method from the super class
-      while (method == null && objClass.getSuperclass() != Object.class)
-      {
-         objClass = objClass.getSuperclass();
-         classes = new Class[] { objClass, UnmarshallingContext.class, String.class, String.class, String.class };
-         method = ObjectModelBuilder.getMethodForElement(typedFactory, "setValue", classes);
-      }
-
-      // invoke the setValue method
-      if (method != null)
-      {
-         Object[] objects = new Object[] { o, navigator, namespaceURI, localName, value };
-         ObjectModelBuilder.invokeFactory(typedFactory, method, objects);
-      }
-   }
-
-   public Object completeRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      return root;
-   }
-
-   // Inner
-
-   private static class AddMethods
-   {
-      private static final int DEFAULT_METHODS_SIZE = 10;
-
-      public final Class parent;
-      private Method[] methods = new Method[DEFAULT_METHODS_SIZE];
-      private int totalMethods;
-
-      public AddMethods(Class parent)
-      {
-         this.parent = parent;
-      }
-
-      public void addMethod(Method m)
-      {
-         if(totalMethods == methods.length)
-         {
-            Method[] tmp = methods;
-            methods = new Method[methods.length + DEFAULT_METHODS_SIZE];
-            System.arraycopy(tmp, 0, methods, 0, tmp.length);
-         }
-         methods[totalMethods++] = m;
-      }
-
-      public Method getMethodForChild(Class child)
-      {
-         Class closestParam = null;
-         Method closestMethod = null;
-         for(int i = 0; i < totalMethods; ++i)
-         {
-            Method method = methods[i];
-            Class param = method.getParameterTypes()[1];
-            if(param == child)
-            {
-               return method;
-            }
-            else if(param.isAssignableFrom(child) && (closestParam == null || closestParam.isAssignableFrom(param)))
-            {
-               closestParam = param;
-               closestMethod = method;
-            }
-         }
-         return closestMethod;
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(!(o instanceof AddMethods))
-         {
-            return false;
-         }
-
-         final AddMethods addMethods = (AddMethods)o;
-
-         if(!parent.equals(addMethods.parent))
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         return parent.hashCode();
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelFactory.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelFactory.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelProvider.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelProvider.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelProvider.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,178 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.lang.reflect.Method;
-import org.jboss.logging.Logger;
-
-/**
- * todo come up with a nicer class name
- * 
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class DelegatingObjectModelProvider
-   implements GenericObjectModelProvider
-{
-   private static final Logger log = Logger.getLogger(DelegatingObjectModelProvider.class);
-
-   private final ObjectModelProvider provider;
-   private final boolean trace = log.isTraceEnabled();
-
-   public DelegatingObjectModelProvider(ObjectModelProvider provider)
-   {
-      this.provider = provider;
-   }
-
-   public Object getChildren(Object o, MarshallingContext ctx, String namespaceURI, String localName)
-   {
-      return provideChildren(provider, o, namespaceURI, localName);
-   }
-
-   public Object getElementValue(Object o, MarshallingContext ctx, String namespaceURI, String localName)
-   {
-      return provideValue(provider, o, namespaceURI, localName);
-   }
-
-   public Object getAttributeValue(Object o, MarshallingContext ctx, String namespaceURI, String localName)
-   {
-      return provideAttributeValue(provider, o, namespaceURI, localName);
-   }
-
-   public Object getRoot(Object o, MarshallingContext ctx, String namespaceURI, String localName)
-   {
-      return provider.getRoot(o, null, namespaceURI, localName);
-   }
-
-   // private
-
-   Object provideChildren(ObjectModelProvider provider,
-                          Object parent,
-                          String namespaceUri,
-                          String name)
-   {
-      Class providerClass = provider.getClass();
-      Class parentClass = parent.getClass();
-      String methodName = "getChildren";
-
-      Object container = null;
-      Method method = getProviderMethod(providerClass,
-         methodName,
-         new Class[]{parentClass, String.class, String.class}
-      );
-      if(method != null)
-      {
-         try
-         {
-            container = method.invoke(provider, new Object[]{parent, namespaceUri, name});
-         }
-         catch(Exception e)
-         {
-            log.error("Failed to invoke method " + methodName, e);
-            throw new IllegalStateException("Failed to invoke method " + methodName);
-         }
-      }
-      else if(trace)
-      {
-         log.trace("No " + methodName + " for " + name);
-      }
-      return container;
-   }
-
-   Object provideValue(ObjectModelProvider provider,
-                       Object parent,
-                       String namespaceUri,
-                       String name)
-   {
-      Class providerClass = provider.getClass();
-      Class parentClass = parent.getClass();
-      String methodName = "getElementValue";
-
-      Object value = null;
-      Method method = getProviderMethod(providerClass,
-         methodName,
-         new Class[]{parentClass, String.class, String.class}
-      );
-      if(method != null)
-      {
-         try
-         {
-            value = method.invoke(provider, new Object[]{parent, namespaceUri, name});
-         }
-         catch(Exception e)
-         {
-            throw new IllegalStateException("Failed to invoke method " + methodName);
-         }
-      }
-      else if(trace)
-      {
-         log.trace("No " + methodName + " for " + name);
-      }
-      return value;
-   }
-
-   Object provideAttributeValue(ObjectModelProvider provider,
-                                Object object,
-                                String namespaceUri,
-                                String name)
-   {
-      Class providerClass = provider.getClass();
-      Class objectClass = object.getClass();
-      String methodName = "getAttributeValue";
-
-      Object value = null;
-      Method method = getProviderMethod(providerClass,
-         methodName,
-         new Class[]{objectClass, String.class, String.class}
-      );
-      if(method != null)
-      {
-         try
-         {
-            value = method.invoke(provider, new Object[]{object, namespaceUri, name});
-         }
-         catch(Exception e)
-         {
-            throw new IllegalStateException("Failed to invoke method " + methodName);
-         }
-      }
-      else if(trace)
-      {
-         log.trace("No " + methodName + " for " + name);
-      }
-      return value;
-   }
-
-   private static Method getProviderMethod(Class providerClass, String methodName, Class[] args)
-   {
-      Method method = null;
-      try
-      {
-         method = providerClass.getMethod(methodName, args);
-      }
-      catch(NoSuchMethodException e)
-      {
-         // no method
-      }
-      return method;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelProvider.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DelegatingObjectModelProvider.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DtdMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DtdMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DtdMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,508 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import com.wutka.dtd.DTD;
-import com.wutka.dtd.DTDAttribute;
-import com.wutka.dtd.DTDContainer;
-import com.wutka.dtd.DTDElement;
-import com.wutka.dtd.DTDEmpty;
-import com.wutka.dtd.DTDItem;
-import com.wutka.dtd.DTDMixed;
-import com.wutka.dtd.DTDName;
-import com.wutka.dtd.DTDPCData;
-import com.wutka.dtd.DTDParser;
-import com.wutka.dtd.DTDCardinal;
-import org.jboss.logging.Logger;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-import java.net.URL;
-import java.net.MalformedURLException;
-import javax.xml.parsers.ParserConfigurationException;
-
-
-/**
- * A DTD based org.jboss.xb.binding.Marshaller implementation.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class DtdMarshaller
-   extends AbstractMarshaller
-{
-   private static final Logger log = Logger.getLogger(DtdMarshaller.class);
-
-   private String publicId;
-   private String systemId;
-
-   private final Stack stack = new StackImpl();
-   private DTD dtd;
-   private GenericObjectModelProvider provider;
-   private Content content = new Content();
-
-   private final List elementStack = new ArrayList();
-
-   private final Map simpleTypeBindings = new HashMap();
-
-   public void addBinding(String elementName, TypeBinding binding)
-   {
-      simpleTypeBindings.put(elementName, binding);
-   }
-
-   public void mapPublicIdToSystemId(String publicId, String systemId)
-   {
-      this.publicId = publicId;
-      this.systemId = systemId;
-   }
-
-   public void declareNamespace(String prefix, String uri)
-   {
-      throw new UnsupportedOperationException("declareNamespace is not implemented.");
-   }
-
-   public void addAttribute(String prefix, String localName, String type, String value)
-   {
-      throw new UnsupportedOperationException("addAttribute is not implemented.");
-   }
-
-   public void marshal(String schemaUri, ObjectModelProvider provider, Object root, Writer writer) throws IOException,
-         ParserConfigurationException,
-      SAXException
-   {
-      URL url;
-      try
-      {
-         url = new URL(schemaUri);
-      }
-      catch(MalformedURLException e)
-      {
-         throw new IllegalArgumentException("Malformed schema URI " + schemaUri + ": " + e.getMessage());
-      }
-
-      InputStream is;
-      try
-      {
-         is = url.openStream();
-      }
-      catch(IOException e)
-      {
-         throw new IllegalStateException("Failed to open input stream for schema " + schemaUri + ": " + e.getMessage());
-      }
-
-      try
-      {
-         InputStreamReader reader = new InputStreamReader(is);
-         marshal(reader, provider, root, writer);
-      }
-      finally
-      {
-         is.close();
-      }
-   }
-
-   public void marshal(Reader dtdReader, ObjectModelProvider provider, Object document, Writer writer)
-      throws IOException, SAXException
-   {
-      DTDParser parser = new DTDParser(dtdReader);
-      dtd = parser.parse(true);
-
-      this.provider = provider instanceof GenericObjectModelProvider ?
-         (GenericObjectModelProvider)provider : new DelegatingObjectModelProvider(provider);
-      //stack.push(document);
-
-      DTDElement[] roots = null;
-      if(dtd.rootElement != null)
-      {
-         handleRootElement(document, dtd.rootElement);
-      }
-      else
-      {
-         roots = getRootList(dtd);
-         for(int i = 0; i < roots.length; ++i)
-         {
-            handleRootElement(document, roots[i]);
-         }
-      }
-
-      //stack.pop();
-
-      // version & encoding
-      writeXmlVersion(writer);
-
-      // DOCTYPE
-      writer.write("<!DOCTYPE ");
-
-      if(dtd.rootElement != null)
-      {
-         writer.write(dtd.rootElement.getName());
-      }
-      else
-      {
-         for(int i = 0; i < roots.length; ++i)
-         {
-            writer.write(", ");
-            writer.write(roots[i].getName());
-         }
-      }
-
-      writer.write(" PUBLIC \"");
-      writer.write(publicId);
-      writer.write("\" \"");
-      writer.write(systemId);
-      writer.write("\">\n");
-
-      ContentWriter contentWriter = new ContentWriter(writer, propertyIsTrueOrNotSet(Marshaller.PROP_OUTPUT_INDENTATION));
-      content.handleContent(contentWriter);
-   }
-
-   private void handleRootElement(Object o, final DTDElement dtdRoot)
-   {
-      Element el = new Element(dtdRoot, true);
-      elementStack.add(el);
-      content.startDocument();
-
-      Object root = provider.getRoot(o, null, systemId, dtdRoot.getName());
-      if(root == null)
-      {
-         return;
-      }
-      stack.push(root);
-
-      Attributes attrs = provideAttributes(dtdRoot, root);
-      content.startElement("", dtdRoot.getName(), dtdRoot.getName(), attrs);
-      handleElement(dtd, dtdRoot, attrs);
-      content.endElement("", dtdRoot.getName(), dtdRoot.getName());
-
-      stack.pop();
-      content.endDocument();
-      elementStack.remove(elementStack.size() - 1);
-   }
-
-   private final void handleElement(DTD dtd, DTDElement element, Attributes attrs)
-   {
-      DTDItem item = element.content;
-      if(item instanceof DTDMixed)
-      {
-         handleMixedElement((DTDMixed)item, element.getName(), attrs);
-      }
-      else if(item instanceof DTDEmpty)
-      {
-         final Object value = provider.getElementValue(stack.peek(), null, systemId, element.getName());
-         if(Boolean.TRUE.equals(value))
-         {
-            writeSkippedElements();
-            content.startElement("", element.getName(), element.getName(), attrs);
-            content.endElement("", element.getName(), element.getName());
-         }
-      }
-      else if(item instanceof DTDContainer)
-      {
-         processContainer(dtd, (DTDContainer)item);
-      }
-      else
-      {
-         throw new IllegalStateException("Unexpected element: " + element.getName());
-      }
-   }
-
-   private final void handleMixedElement(DTDMixed mixed, String elementName, Attributes attrs)
-   {
-      Object parent = stack.peek();
-      DTDItem[] items = mixed.getItems();
-      for(int i = 0; i < items.length; ++i)
-      {
-         DTDItem item = items[i];
-         if(item instanceof DTDPCData)
-         {
-            Object value = provider.getElementValue(parent, null, systemId, elementName);
-            if(value != null)
-            {
-               writeSkippedElements();
-
-               String marshalled;
-               TypeBinding binding = (TypeBinding)simpleTypeBindings.get(elementName);
-               if(binding != null)
-               {
-                  marshalled = binding.marshal(value);
-               }
-               else
-               {
-                  marshalled = value.toString();
-               }
-
-               char[] ch = marshalled.toCharArray();
-               content.startElement("", elementName, elementName, attrs);
-               content.characters(ch, 0, ch.length);
-               content.endElement("", elementName, elementName);
-            }
-         }
-      }
-   }
-
-   private final void handleChildren(DTD dtd, DTDElement element, DTDCardinal elementCardinal)
-   {
-      Object parent = stack.peek();
-      Object children = provider.getChildren(parent, null, systemId, element.getName());
-
-      if(children != null)
-      {
-         Iterator iter;
-         if(children instanceof Iterator)
-         {
-            iter = (Iterator)children;
-         }
-         else if(children instanceof Collection)
-         {
-            iter = ((Collection)children).iterator();
-         }
-         else
-         {
-            iter = Collections.singletonList(children).iterator();
-         }
-
-         writeSkippedElements();
-
-         Element el = new Element(element, true);
-         elementStack.add(el);
-
-         final boolean singleValued = elementCardinal == DTDCardinal.NONE || elementCardinal == DTDCardinal.OPTIONAL;
-         if(singleValued)
-         {
-            // todo attributes!
-            content.startElement("", element.getName(), element.getName(), null);
-         }
-
-         while(iter.hasNext())
-         {
-            Object child = iter.next();
-            stack.push(child);
-
-            AttributesImpl attrs = (element.attributes.isEmpty() ? null : provideAttributes(element, child));
-            if(!singleValued)
-            {
-               content.startElement("", element.getName(), element.getName(), null);
-            }
-
-            handleElement(dtd, element, attrs);
-
-            if(!singleValued)
-            {
-               content.endElement(systemId, element.getName(), element.getName());
-            }
-
-            stack.pop();
-         }
-
-         if(singleValued)
-         {
-            content.endElement(systemId, element.getName(), element.getName());
-         }
-
-         elementStack.remove(elementStack.size() - 1);
-      }
-      else
-      {
-         boolean removeLast = false;
-         if(!(element.getContent() instanceof DTDMixed || element.getContent() instanceof DTDEmpty))
-         {
-            Element el = new Element(element);
-            elementStack.add(el);
-            removeLast = true;
-         }
-
-         AttributesImpl attrs = (element.attributes.isEmpty() ? null : provideAttributes(element, parent));
-         handleElement(dtd, element, attrs);
-
-         if(removeLast)
-         {
-            Element el = (Element)elementStack.remove(elementStack.size() - 1);
-            if(el.started)
-            {
-               DTDElement started = el.element;
-               content.endElement("", started.getName(), started.getName());
-            }
-         }
-      }
-   }
-
-   private final void processContainer(DTD dtd, DTDContainer container)
-   {
-      DTDItem[] items = container.getItems();
-      for(int i = 0; i < items.length; ++i)
-      {
-         DTDItem item = items[i];
-         if(item instanceof DTDContainer)
-         {
-            processContainer(dtd, (DTDContainer)item);
-         }
-         else if(item instanceof DTDName)
-         {
-            DTDName name = (DTDName)item;
-            DTDElement element = (DTDElement)dtd.elements.get(name.value);
-            handleChildren(dtd, element, name.getCardinal());
-         }
-      }
-   }
-
-   private void writeSkippedElements()
-   {
-      Element el = (Element)elementStack.get(elementStack.size() - 1);
-      if(!el.started)
-      {
-         int firstNotStarted = elementStack.size() - 1;
-         do
-         {
-            el = (Element)elementStack.get(--firstNotStarted);
-         }
-         while(!el.started);
-
-         ++firstNotStarted;
-
-         while(firstNotStarted < elementStack.size())
-         {
-            el = (Element)elementStack.get(firstNotStarted++);
-            DTDElement notStarted = el.element;
-
-            if(log.isTraceEnabled())
-            {
-               log.trace("starting skipped> " + notStarted.getName());
-            }
-
-            content.startElement("", notStarted.getName(), notStarted.getName(), null);
-            el.started = true;
-         }
-      }
-   }
-
-   private AttributesImpl provideAttributes(DTDElement element, Object container)
-   {
-      final Hashtable attributes = element.attributes;
-      AttributesImpl attrs = new AttributesImpl(attributes.size());
-
-      for(Iterator attrIter = attributes.values().iterator(); attrIter.hasNext();)
-      {
-         DTDAttribute attr = (DTDAttribute)attrIter.next();
-         final Object attrValue = provider.getAttributeValue(container, null, systemId, attr.getName());
-
-         if(attrValue != null)
-         {
-            attrs.add(systemId,
-               attr.getName(),
-               attr.getName(),
-               attr.getType().toString(),
-               attrValue.toString()
-            );
-         }
-      }
-
-      return attrs;
-   }
-
-   /**
-    * @param dtd the DTD object model
-    * @return root element names
-    */
-   protected static DTDElement[] getRootList(DTD dtd)
-   {
-      Hashtable roots = new Hashtable();
-      Enumeration e = dtd.elements.elements();
-      while(e.hasMoreElements())
-      {
-         DTDElement element = (DTDElement)e.nextElement();
-         roots.put(element.name, element);
-      }
-
-      e = dtd.elements.elements();
-      while(e.hasMoreElements())
-      {
-         DTDElement element = (DTDElement)e.nextElement();
-         if(!(element.content instanceof DTDContainer))
-         {
-            continue;
-         }
-
-         Enumeration items = ((DTDContainer)element.content).getItemsVec().elements();
-         while(items.hasMoreElements())
-         {
-            removeElements(roots, dtd, (DTDItem)items.nextElement());
-         }
-      }
-
-      final Collection rootCol = roots.values();
-      return (DTDElement[])rootCol.toArray(new DTDElement[rootCol.size()]);
-   }
-
-   protected static void removeElements(Hashtable h, DTD dtd, DTDItem item)
-   {
-      if(item instanceof DTDName)
-      {
-         h.remove(((DTDName)item).value);
-      }
-      else if(item instanceof DTDContainer)
-      {
-         Enumeration e = ((DTDContainer)item).getItemsVec().elements();
-         while(e.hasMoreElements())
-         {
-            removeElements(h, dtd, (DTDItem)e.nextElement());
-         }
-      }
-   }
-
-   // Inner
-
-   private static final class Element
-   {
-      public final DTDElement element;
-      public boolean started;
-
-      public Element(DTDElement element, boolean started)
-      {
-         this.element = element;
-         this.started = started;
-      }
-
-      public Element(DTDElement element)
-      {
-         this.element = element;
-      }
-
-      public String toString()
-      {
-         return "[element=" + element.getName() + ", started=" + started + "]";
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DtdMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/DtdMarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelFactory.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,86 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.xml.sax.Attributes;
-
-/**
- * Direct implementations of <code>ObjectModelFactory</code> interface can be thought of as "typed" factories
- * in a sense that parameter types of <code>newChild</code>, <code>addChild</code> and <code>setValue</code> methods
- * (discovered by the framework at runtime with introspection) are supposed to be of specific Java classes
- * (other than <code>java.lang.Object</code>) from the target class hierarchy.
- * <p/>In this interface, <code>newChild</code>, <code>addChild</code> and <code>setValue</code> methods are defined
- * with arguments of type <code>java.lang.Object</code>.
- * <br/>The framework won't introspect an implementation of this interface for "typed" implementations of
- * <code>newChild</code>, <code>addChild</code> and <code>setValue</code> methods.
- * Instead it will call the declared generic methods and it's the responsibility of the implementation
- * of this interface to recognize the types and build the object graph appropriately.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface GenericObjectModelFactory
-   extends ObjectModelFactory
-{
-   /**
-    * This method is called when parsing of a new not top-level XML element started.
-    * The method should either return an object that represents this XML element in the Java object model or
-    * null if this XML element is not represented in the Java object model.
-    *
-    * @param parent       an object that represents the parent XML element in the object model
-    * @param ctx          unmarshalling context
-    * @param namespaceURI namespace URI of the XML element
-    * @param localName    local name of the XML element
-    * @param attrs        attributes of the XML element
-    * @return an object that represents the XML element in the Java object model or null
-    */
-   Object newChild(Object parent, UnmarshallingContext ctx, String namespaceURI, String localName, Attributes attrs);
-
-   /**
-    * This method is called when parsing of a not top-level XML element completed.
-    * The object that represents this XML element in the Java model should now be completely initialized.
-    * An implementation of this method could validate the object that represents the XML element
-    * in the Java object model and add it to the parent.
-    *
-    * @param parent       an object that represents the parent XML element in the object model
-    * @param child        an object that was returned by the <code>newChild</code> method that
-    *                     was called when parsing of this XML element started
-    * @param ctx          unmarshalling context
-    * @param namespaceURI namespace URI of the XML element
-    * @param localName    local name of the XML element
-    */
-   void addChild(Object parent, Object child, UnmarshallingContext ctx, String namespaceURI, String localName);
-
-   /**
-    * This method is called when a new not top-level simple XML element (with text content) was parsed.
-    * Such elements are usually mapped to fields in Java classes. So, usually, an implementation of this method
-    * will set the field the XML element is bound to in the parent object to the parsed value possibly applying
-    * some unmarshalling rule for it.
-    *
-    * @param o            an object that represents the parent XML element in the Java object model
-    * @param ctx          unmarshalling context
-    * @param namespaceURI namespace URI of the XML element
-    * @param localName    local name of the XML element
-    * @param value        value of the XML element as it appears in the XML content
-    */
-   void setValue(Object o, UnmarshallingContext ctx, String namespaceURI, String localName, String value);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelFactory.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelFactory.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelProvider.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelProvider.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelProvider.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,45 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-
-/**
- * Direct implementations of ObjectModelProvider interface can be thought of as "typed" providers in a sense that
- * arguments of <code>getChildren</code>, <code>getElementValue</code> and <code>getAttributeValue</code> methods
- * are supposed to be of concrete Java types (other than <code>java.lang.Object</code>) from the target class hierarchy.
- * Contrary, in GenericObjectModelFactory these arguments are of type <code>java.lang.Object</code>.
- * The framework won't introspect an implementation of GenericObjectModelProvider to find "typed" implementations of
- * <code>getChildren</code>, <code>getElementValue</code> and <code>getAttributeValue</code>.
- * Instead it will call the generic methods.
- * 
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface GenericObjectModelProvider
-   extends ObjectModelProvider
-{
-   Object getChildren(Object o, MarshallingContext ctx, String namespaceURI, String localName);
-
-   Object getElementValue(Object o, MarshallingContext ctx, String namespaceURI, String localName);
-
-   Object getAttributeValue(Object o, MarshallingContext ctx, String namespaceURI, String localName);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelProvider.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericObjectModelProvider.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericValueContainer.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericValueContainer.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericValueContainer.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,145 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtUtil;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface GenericValueContainer
-{
-   class FACTORY
-   {
-      public static GenericValueContainer array(final Class itemClass)
-      {
-         return array(null, null, itemClass);
-      }
-
-      public static GenericValueContainer array(final Class wrapperClass,
-                                                final String itemProperty,
-                                                final Class itemClass)
-      {
-         return new GenericValueContainer()
-         {
-            private final Class wrapperType = wrapperClass;
-            private final String itemProp = itemProperty;
-            private final Class itemType = itemClass;
-            private final List items = new ArrayList();
-
-            public void addChild(QName name, Object value)
-            {
-               items.add(value);
-            }
-
-            public Object instantiate()
-            {
-               Object arr = Array.newInstance(itemType, items.size());
-               for(int i = 0; i < items.size(); ++i)
-               {
-                  try
-                  {
-                     Array.set(arr, i, items.get(i));
-                  }
-                  catch(IllegalArgumentException e)
-                  {
-                     throw new JBossXBRuntimeException("Failed to set " +
-                        items.get(i) +
-                        " as an item of array " + arr
-                     );
-                  }
-               }
-
-               Object result = arr;
-               // wrap
-               if(wrapperType != null)
-               {
-                  Constructor ctor = null;
-                  try
-                  {
-                     try
-                     {
-                        ctor = wrapperType.getConstructor(null);
-                        result = ctor.newInstance(null);
-                        RtUtil.set(result, arr, itemProp, null, false, null);
-                     }
-                     catch(NoSuchMethodException e)
-                     {
-                        Constructor[] ctors = wrapperType.getConstructors();
-                        for(int i = 0; i < ctors.length; ++i)
-                        {
-                           Class[] types = ctors[i].getParameterTypes();
-                           if(types.length == 1 && types[0].isAssignableFrom(arr.getClass()))
-                           {
-                              ctor = ctors[i];
-                              break;
-                           }
-                        }
-
-                        if(ctor == null)
-                        {
-                           throw new JBossXBRuntimeException("Failed to find an appropriate ctor in " +
-                              wrapperType +
-                              " to wrap " + arr
-                           );
-                        }
-
-                        result = ctor.newInstance(new Object[]{arr});
-                     }
-                  }
-                  catch(JBossXBRuntimeException e)
-                  {
-                     throw e;
-                  }
-                  catch(Exception e)
-                  {
-                     throw new JBossXBRuntimeException(
-                        "Failed to initialize array wrapper " + wrapperType + " for " + arr, e
-                     );
-                  }
-               }
-
-               return result;
-            }
-
-            public Class getTargetClass()
-            {
-               // this method should only be called for multidimansional arrays
-               // todo: what's the best way to get a class for array having the item class?
-               return Array.newInstance(itemType, 0).getClass();
-            }
-         };
-      }
-   }
-
-   void addChild(QName name, Object value);
-
-   Object instantiate();
-
-   Class getTargetClass();
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericValueContainer.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/GenericValueContainer.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Immutable.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Immutable.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Immutable.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,138 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.jboss.logging.Logger;
-
-import java.util.List;
-import java.lang.reflect.Constructor;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class Immutable
-{
-   private static final Logger log = Logger.getLogger(Immutable.class);
-
-   public final Class cls;
-
-   final List names = new java.util.ArrayList();
-
-   final List values = new java.util.ArrayList();
-
-   public Immutable(Class cls)
-   {
-      this.cls = cls;
-      if(log.isTraceEnabled())
-      {
-         log.trace("created immutable container for " + cls);
-      }
-   }
-
-   public void addChild(String localName, Object child)
-   {
-      if(!names.isEmpty() && names.get(names.size() - 1).equals(localName))
-      {
-         throw new IllegalStateException("Attempt to add duplicate element " +
-            localName +
-            ": prev value=" +
-            values.get(values.size() - 1) +
-            ", new value=" +
-            child
-         );
-      }
-      names.add(localName);
-      values.add(child);
-
-      if(log.isTraceEnabled())
-      {
-         log.trace("added child " + localName + " for " + cls + ": " + child);
-      }
-   }
-
-   public Object getChild(String localName)
-   {
-      return names.isEmpty() ?
-         null :
-         (names.get(names.size() - 1).equals(localName) ? values.get(values.size() - 1) : null);
-   }
-
-   public Object newInstance()
-   {
-      Constructor ctor = null;
-      Constructor[] ctors = cls.getConstructors();
-
-      if(ctors == null || ctors.length == 0)
-      {
-         throw new JBossXBRuntimeException("The class has no declared constructors: " + cls);
-      }
-
-      for(int i = 0; i < ctors.length; ++i)
-      {
-         Class[] types = ctors[i].getParameterTypes();
-
-         if(types == null || types.length == 0)
-         {
-            throw new IllegalStateException("Found no-arg constructor for immutable " + cls);
-         }
-
-         if(types.length == values.size())
-         {
-            ctor = ctors[i];
-
-            int typeInd = 0;
-            while(typeInd < types.length)
-            {
-               if(!types[typeInd].isAssignableFrom(values.get(typeInd++).getClass()))
-               {
-                  ctor = null;
-                  break;
-               }
-            }
-
-            if(ctor != null)
-            {
-               break;
-            }
-         }
-      }
-
-      if(ctor == null)
-      {
-         throw new IllegalStateException("No constructor in " + cls + " that would take arguments " + values);
-      }
-
-      try
-      {
-         return ctor.newInstance(values.toArray());
-      }
-      catch(Exception e)
-      {
-         throw new IllegalStateException("Failed to create immutable instance of " +
-            cls +
-            " using arguments: "
-            + values + ": " + e.getMessage()
-         );
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Immutable.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Immutable.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBException.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,51 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class JBossXBException
-   extends Exception
-{  
-   static final long serialVersionUID = 8229078720076583113L;
-
-   public JBossXBException()
-   {
-   }
-
-   public JBossXBException(String message)
-   {
-      super(message);
-   }
-
-   public JBossXBException(Throwable cause)
-   {
-      super(cause);
-   }
-
-   public JBossXBException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBException.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBException.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBRuntimeException.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBRuntimeException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBRuntimeException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,51 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class JBossXBRuntimeException
-   extends RuntimeException
-{  
-   static final long serialVersionUID = -33504134223704483L;
-
-   public JBossXBRuntimeException()
-   {
-   }
-
-   public JBossXBRuntimeException(String message)
-   {
-      super(message);
-   }
-
-   public JBossXBRuntimeException(Throwable cause)
-   {
-      super(cause);
-   }
-
-   public JBossXBRuntimeException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBRuntimeException.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBRuntimeException.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBValueFormatException.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBValueFormatException.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBValueFormatException.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,51 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class JBossXBValueFormatException
-   extends JBossXBRuntimeException
-{
-   static final long serialVersionUID = -3196504305414545949L;
-
-   public JBossXBValueFormatException()
-   {
-   }
-
-   public JBossXBValueFormatException(String message)
-   {
-      super(message);
-   }
-
-   public JBossXBValueFormatException(Throwable cause)
-   {
-      super(cause);
-   }
-
-   public JBossXBValueFormatException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBValueFormatException.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/JBossXBValueFormatException.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelFactory.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,806 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.xb.binding.introspection.FieldInfo;
-import org.xml.sax.Attributes;
-import org.apache.xerces.xs.XSTypeDefinition;
-
-import java.lang.reflect.Constructor;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Collection;
-import java.util.ArrayList;
-
-/**
- * An ObjectModelFactory that uses mappings
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
- * @version <tt>$Revision$</tt>
- */
-public class MappingObjectModelFactory
-   implements GenericObjectModelFactory
-{
-   private final static Logger log = Logger.getLogger(MappingObjectModelFactory.class);
-
-   /**
-    * The class mappings
-    */
-   private final Map elementToClassMapping = new HashMap();
-
-   /**
-    * The field mappings
-    */
-   private final Map elementToFieldMapping = new HashMap();
-
-   // Public
-
-   /**
-    * Map an element to a class
-    *
-    * @param element the element name
-    * @param cls     the class
-    */
-   public void mapElementToClass(String element, Class cls)
-   {
-      ElementToClassMapping mapping = new ElementToClassMapping(element, cls);
-      addElementToClassMapping(mapping);
-      if(log.isTraceEnabled())
-      {
-         log.trace(mapping);
-      }
-   }
-
-   /**
-    * Map an element to a field
-    *
-    * @param element   the element name
-    * @param cls       the class
-    * @param field     the field name
-    * @param converter the type convertor
-    */
-   public void mapElementToField(String element, Class cls, String field, TypeBinding converter)
-   {
-      ElementToFieldMapping mapping = new ElementToFieldMapping(element, cls, field, converter);
-      addElementToFieldMapping(mapping);
-      if(log.isTraceEnabled())
-      {
-         log.trace(mapping);
-      }
-   }
-
-   // ObjectModelFactory implementation
-
-   public Object newRoot(Object root,
-                         UnmarshallingContext ctx,
-                         String namespaceURI,
-                         String localName,
-                         Attributes attrs)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("newRoot root=" +
-            root +
-            " namespaceURI=" +
-            namespaceURI +
-            " localName=" +
-            localName +
-            " attributes=" +
-            attrs
-         );
-      }
-
-      if(root == null)
-      {
-         ElementToClassMapping mapping = (ElementToClassMapping)elementToClassMapping.get(localName);
-         if(mapping != null)
-         {
-            if(log.isTraceEnabled())
-            {
-               log.trace("creating root using " + mapping);
-            }
-            root = newInstance(mapping.cls);
-         }
-         else
-         {
-            root = create(namespaceURI, localName, ctx.getType());
-         }
-
-         if(root == null)
-         {
-            throw new IllegalStateException(
-               "Failed to resolve Java type binding for root element: ns=" + namespaceURI + ", local=" + localName
-            );
-         }
-      }
-
-      if(attrs != null)
-      {
-         for(int i = 0; i < attrs.getLength(); ++i)
-         {
-            try
-            {
-               if(attrs.getLocalName(i).length() > 0)
-               {
-                  if(!attrs.getQName(i).startsWith("xsi:")) //todo horrible
-                  {
-                     setAttribute(root, attrs.getLocalName(i), attrs.getValue(i), ctx);
-                  }
-               }
-            }
-            catch(Exception e)
-            {
-               String msg = "Failed to set attribute " + attrs.getQName(i) + "=" + attrs.getValue(i);
-               log.error(msg, e);
-               throw new IllegalStateException(msg + ": " + e.getMessage());
-            }
-         }
-      }
-
-      return root;
-   }
-
-   // GenericObjectModelFactory implementation
-
-   public Object newChild(Object o,
-                          UnmarshallingContext ctx,
-                          String namespaceURI,
-                          String localName,
-                          Attributes attrs)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("newChild object=" +
-            o +
-            " namespaceURI=" +
-            namespaceURI +
-            " localName=" +
-            localName +
-            " attributes=" +
-            attrs
-         );
-      }
-
-      if(o == null)
-      {
-         throw new RuntimeException("Attempt to add a new child to a null parent localName=" + localName);
-      }
-
-      Object child = null;
-
-      ElementToClassMapping mapping = (ElementToClassMapping)elementToClassMapping.get(localName);
-      XSTypeDefinition type = ctx.getType();
-      if(mapping != null)
-      {
-         if(log.isTraceEnabled())
-         {
-            log.trace("newChild using mapping " + mapping);
-         }
-
-         try
-         {
-            if(!(o instanceof Collection))
-            {
-               ElementToFieldMapping fieldMapping = (ElementToFieldMapping)elementToFieldMapping.get(
-                  new ElementToFieldMappingKey(localName, o.getClass())
-               );
-
-               FieldInfo fieldInfo;
-               if(fieldMapping != null)
-               {
-                  fieldInfo = fieldMapping.fieldInfo;
-               }
-               else
-               {
-                  String fieldName = Util.xmlNameToFieldName(localName, true);
-                  fieldInfo = FieldInfo.getFieldInfo(o.getClass(), fieldName, true);
-               }
-
-               child = get(o, localName, fieldInfo);
-            }
-
-            if(child == null)
-            {
-               child = newInstance(mapping.cls);
-            }
-
-            if(attrs != null)
-            {
-               for(int i = 0; i < attrs.getLength(); ++i)
-               {
-                  if(attrs.getLocalName(i).length() > 0)
-                  {
-                     if(!attrs.getQName(i).startsWith("xsi:")) //todo horrible
-                     {
-                        setAttribute(child, attrs.getLocalName(i), attrs.getValue(i), ctx);
-                     }
-                  }
-               }
-            }
-         }
-         catch(RuntimeException e)
-         {
-            throw e;
-         }
-         catch(Exception e)
-         {
-            throw new NestedRuntimeException("newChild failed for o=" +
-               o +
-               ", uri=" +
-               namespaceURI +
-               ", local="
-               + localName + ", attrs=" + attrs, e
-            );
-         }
-      }
-      else
-      {
-         if(o instanceof Collection)
-         {
-            child = create(namespaceURI, localName, type);
-         }
-         else
-         {
-            Class oCls;
-            if(o instanceof Immutable)
-            {
-               oCls = ((Immutable)o).cls;
-            }
-            else
-            {
-               oCls = o.getClass();
-            }
-
-            String fieldName = Util.xmlNameToFieldName(localName, true);
-            FieldInfo fieldInfo = FieldInfo.getFieldInfo(oCls, fieldName, true);
-            if(Collection.class.isAssignableFrom(fieldInfo.getType()))
-            {
-               child = get(o, localName, fieldInfo);
-
-               // now does this element really represent a Java collection or is it an element that can appear more than once?
-               // try to load the class and create an instance
-               Object item = null;
-               if(type == null || type != null && type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
-               {
-                  item = create(namespaceURI, localName, type);
-               }
-
-               if(item != null)
-               {
-                  if(child == null)
-                  {
-                     setChild(new ArrayList(), o, localName);
-                  }
-                  child = item;
-               }
-               else
-               {
-                  if(child == null)
-                  {
-                     child = new ArrayList();
-                  }
-               }
-            }
-            else if(!Util.isAttributeType(fieldInfo.getType()))
-            {
-               // id there is no field mapping
-               ElementToFieldMapping fieldMapping = (ElementToFieldMapping)elementToFieldMapping.get(
-                  new ElementToFieldMappingKey(localName, o.getClass())
-               );
-               TypeBinding converter = fieldMapping == null ? null : fieldMapping.converter;
-
-               // if converter != null it will be used in setValue
-               if(converter == null)
-               {
-                  child = newInstance(fieldInfo.getType());
-               }
-            }
-         }
-      }
-
-      return child;
-   }
-
-   public void addChild(Object parent,
-                        Object child,
-                        UnmarshallingContext ctx,
-                        String namespaceURI,
-                        String localName)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("addChild parent=" +
-            parent +
-            " child=" +
-            child +
-            " namespaceURI=" +
-            namespaceURI +
-            " localName=" +
-            localName
-         );
-      }
-
-      if(child instanceof Immutable)
-      {
-         child = ((Immutable)child).newInstance();
-      }
-      setChild(child, parent, localName);
-   }
-
-   public void setValue(Object o, UnmarshallingContext ctx, String namespaceURI, String localName, String value)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("setValue object=" +
-            o +
-            " ctx=" +
-            ctx +
-            " namespaceURI=" +
-            namespaceURI +
-            " localName=" +
-            localName +
-            " value=" +
-            value
-         );
-      }
-
-      setAttribute(o, localName, value, ctx);
-   }
-
-   public Object completeRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("completeRoot root=" +
-            root +
-            " navigator=" +
-            navigator +
-            " namespaceURI=" +
-            namespaceURI +
-            " localName=" +
-            localName
-         );
-      }
-
-      if(root instanceof Immutable)
-      {
-         root = ((Immutable)root).newInstance();
-      }
-      return root;
-   }
-
-   // Private
-
-   private void addElementToClassMapping(ElementToClassMapping mapping)
-   {
-      elementToClassMapping.put(mapping.element, mapping);
-   }
-
-   private void addElementToFieldMapping(ElementToFieldMapping mapping)
-   {
-      elementToFieldMapping.put(mapping.key, mapping);
-   }
-
-   private void setChild(Object child, Object parent, String localName)
-   {
-      boolean trace = log.isTraceEnabled();
-      Object value = child;
-      if(parent instanceof Collection)
-      {
-         if(trace)
-         {
-            log.trace("Add " + value + " to collection " + parent);
-         }
-         ((Collection)parent).add(value);
-      }
-      else
-      {
-         final ElementToFieldMapping fieldMapping = (ElementToFieldMapping)elementToFieldMapping.get(
-            new ElementToFieldMappingKey(localName, parent.getClass())
-         );
-         if(fieldMapping != null)
-         {
-            if(trace)
-            {
-               log.trace("Add " + value + " to " + parent + " using field mapping " + fieldMapping);
-            }
-            set(parent, value, localName, fieldMapping.fieldInfo);
-         }
-         else
-         {
-            Class parentCls = parent instanceof Immutable ?
-               ((Immutable)parent).cls :
-               parent.getClass();
-
-            String fieldName = Util.xmlNameToFieldName(localName, true);
-            FieldInfo fieldInfo = FieldInfo.getFieldInfo(parentCls, fieldName, false);
-            if(trace)
-            {
-               log.trace("Add " + value + " to property " + fieldName + " of " + parentCls);
-            }
-
-            if(fieldInfo != null)
-            {
-               if(!(child instanceof Collection) && Collection.class.isAssignableFrom(fieldInfo.getType()))
-               {
-                  Object o = get(parent, localName, fieldInfo);
-                  Collection col = (Collection)o;
-                  if(trace)
-                  {
-                     log.trace("Add " + value + " to collection " + col + " retrieved from " + fieldName);
-                  }
-                  col.add(child);
-               }
-               else
-               {
-                  set(parent, value, localName, fieldInfo);
-               }
-            }
-         }
-      }
-   }
-
-   private void setAttribute(Object o, String localName, String value, UnmarshallingContext ctx)
-   {
-      if(o instanceof Collection)
-      {
-         XSTypeDefinition type = ctx.getType();
-         if(type == null)
-         {
-            log.warn("Type is not available for collection item " + localName + "=" + value + " -> adding as string.");
-            ((Collection)o).add(value);
-         }
-         else
-         {
-            if(type.getName() == null)
-            {
-               throw new IllegalStateException("Name is null for simple type?!");
-            }
-
-            Object trgValue = SimpleTypeBindings.unmarshal(type.getName(), value, ctx.getNamespaceContext());
-            ((Collection)o).add(trgValue);
-         }
-      }
-      else
-      {
-         Object fieldValue = null;
-         final ElementToFieldMapping fieldMapping = (ElementToFieldMapping)elementToFieldMapping.get(
-            new ElementToFieldMappingKey(localName, o.getClass())
-         );
-
-         if(fieldMapping != null)
-         {
-            fieldValue = fieldMapping.converter.unmarshal(value);
-            set(o, fieldValue, localName, fieldMapping.fieldInfo);
-         }
-         else
-         {
-            Class oCls;
-            if(o instanceof Immutable)
-            {
-               oCls = ((Immutable)o).cls;
-            }
-            else
-            {
-               oCls = o.getClass();
-            }
-
-            final String fieldName = Util.xmlNameToFieldName(localName, true);
-            FieldInfo fieldInfo = FieldInfo.getFieldInfo(oCls, fieldName, true);
-
-            fieldValue = SimpleTypeBindings.unmarshal(value, fieldInfo.getType());
-            set(o, fieldValue, localName, fieldInfo);
-         }
-      }
-   }
-
-   /**
-    * Converts namspace URI and local name into a class name, tries to load the class,
-    * create an instance and return it.
-    *
-    * @param namespaceURI element's namespace URI
-    * @param localName    element's local name
-    * @return null if the class could not be loaded, otherwise an instance of the loaded class
-    */
-   private static Object create(String namespaceURI, String localName, XSTypeDefinition type)
-   {
-      Object o = null;
-
-      String clsName = type != null && type.getName() != null ?
-         Util.xmlNameToClassName(namespaceURI, type.getName(), true) :
-         Util.xmlNameToClassName(namespaceURI, localName, true);
-
-      Class cls = null;
-      try
-      {
-         cls = Thread.currentThread().getContextClassLoader().loadClass(clsName);
-      }
-      catch(ClassNotFoundException e)
-      {
-         if(log.isTraceEnabled())
-         {
-            log.trace("create: failed to load class " + clsName);
-         }
-      }
-
-      if(cls != null)
-      {
-         o = newInstance(cls);
-      }
-
-      return o;
-   }
-
-   private static Object get(Object o, String localName, FieldInfo fieldInfo)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("get object=" + o + " localName=" + localName);
-      }
-
-      Object value;
-      if(o instanceof Immutable)
-      {
-         Immutable con = ((Immutable)o);
-         value = con.getChild(localName);
-      }
-      else
-      {
-         value = fieldInfo.getValue(o);
-      }
-      return value;
-   }
-
-   private static void set(Object parent, Object child, String localName, FieldInfo fieldInfo)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("set parent=" + parent + " child=" + child + " localName=" + localName);
-      }
-
-      if(fieldInfo.isWritable())
-      {
-         fieldInfo.setValue(parent, child);
-      }
-      else if(parent instanceof Immutable)
-      {
-         ((Immutable)parent).addChild(localName, child);
-      }
-      else
-      {
-         throw new IllegalStateException("Neither write method nor field were found for " + fieldInfo.getName() +
-            " and the parent object is not an immutable container: parent=" +
-            parent.getClass() +
-            ", localName=" + localName + ", parent=" + parent + ", child=" + child
-         );
-      }
-   }
-
-   private static Object newInstance(Class cls)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("new " + cls.getName());
-      }
-
-      Object instance;
-      try
-      {
-         Constructor ctor = cls.getConstructor(null);
-         instance = ctor.newInstance(null);
-      }
-      catch(NoSuchMethodException e)
-      {
-         log.warn("No no-arg constructor in " + cls);
-         instance = new Immutable(cls);
-      }
-      catch(Exception e)
-      {
-         throw new IllegalStateException("Failed to create an instance of " +
-            cls +
-            " with the no-arg constructor: "
-            + e.getMessage()
-         );
-      }
-      return instance;
-   }
-
-   // Inner classes
-
-   private class ElementToClassMapping
-   {
-      public final String element;
-
-      public final Class cls;
-
-      public ElementToClassMapping(String element, Class cls)
-      {
-         this.element = element;
-         this.cls = cls;
-      }
-
-      public String toString()
-      {
-         StringBuffer buffer = new StringBuffer();
-         buffer.append("ElementToClass@").append(System.identityHashCode(this));
-         buffer.append("{element=").append(element);
-         if(cls != null)
-         {
-            buffer.append(" class=").append(cls.getName());
-         }
-         buffer.append("}");
-         return buffer.toString();
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(!(o instanceof ElementToClassMapping))
-         {
-            return false;
-         }
-
-         final ElementToClassMapping classMapping = (ElementToClassMapping)o;
-
-         if(cls != null ? !cls.equals(classMapping.cls) : classMapping.cls != null)
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         return (cls != null ? cls.hashCode() : 0);
-      }
-   }
-
-   private class ElementToFieldMappingKey
-   {
-      public final String element;
-
-      public final Class cls;
-
-      public ElementToFieldMappingKey(String element, Class cls)
-      {
-         this.element = element;
-         this.cls = cls;
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(!(o instanceof ElementToFieldMappingKey))
-         {
-            return false;
-         }
-
-         final ElementToFieldMappingKey elementToFieldMappingKey = (ElementToFieldMappingKey)o;
-
-         if(cls != null ? !cls.equals(elementToFieldMappingKey.cls) : elementToFieldMappingKey.cls != null)
-         {
-            return false;
-         }
-         if(element != null ?
-            !element.equals(elementToFieldMappingKey.element) :
-            elementToFieldMappingKey.element != null)
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         int result;
-         result = (element != null ? element.hashCode() : 0);
-         result = 29 * result + (cls != null ? cls.hashCode() : 0);
-         return result;
-      }
-   }
-
-   private class ElementToFieldMapping
-   {
-      public final String element;
-      public final Class cls;
-      public final TypeBinding converter;
-      public final ElementToFieldMappingKey key;
-      public final FieldInfo fieldInfo;
-
-      public ElementToFieldMapping(String element, Class cls, String fieldName, TypeBinding converter)
-      {
-         this.element = element;
-         this.cls = cls;
-         this.converter = converter;
-         key = new ElementToFieldMappingKey(element, cls);
-         fieldInfo = FieldInfo.getFieldInfo(cls, fieldName, true);
-      }
-
-      public String toString()
-      {
-         StringBuffer buffer = new StringBuffer();
-         buffer.append("ElementToField@").append(System.identityHashCode(this));
-         buffer.append("{element=").append(element);
-         if(cls != null)
-         {
-            buffer.append(" class=").append(cls.getName());
-         }
-         buffer.append(" field=").append(fieldInfo.getName());
-         if(converter != null)
-         {
-            buffer.append(" convertor=").append(converter.getClass().getName());
-         }
-         buffer.append("}");
-         return buffer.toString();
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(!(o instanceof ElementToFieldMapping))
-         {
-            return false;
-         }
-
-         final ElementToFieldMapping elementToFieldMapping = (ElementToFieldMapping)o;
-
-         if(cls != null ? !cls.equals(elementToFieldMapping.cls) : elementToFieldMapping.cls != null)
-         {
-            return false;
-         }
-         if(element != null ? !element.equals(elementToFieldMapping.element) : elementToFieldMapping.element != null)
-         {
-            return false;
-         }
-
-         if(!fieldInfo.getName().equals(elementToFieldMapping.fieldInfo.getName()))
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         int result;
-         result = (element != null ? element.hashCode() : 0);
-         result = 29 * result + (cls != null ? cls.hashCode() : 0);
-         result = 29 * result + fieldInfo.getName().hashCode();
-         return result;
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelFactory.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelFactory.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelProvider.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelProvider.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelProvider.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,363 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-import org.jboss.util.Classes;
-import org.jboss.xb.binding.introspection.FieldInfo;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class MappingObjectModelProvider
-   implements GenericObjectModelProvider
-{
-   private static final Logger log = Logger.getLogger(MappingObjectModelProvider.class);
-
-   private final Map classMappings = new HashMap();
-   private final Map fieldMappings = new HashMap();
-   private boolean ignoreLowLine = true;
-   private boolean ignoreNotFoundField = true;
-
-   public boolean isIgnoreNotFoundField()
-   {
-      return ignoreNotFoundField;
-   }
-
-   public void setIgnoreNotFoundField(boolean ignoreNotFoundField)
-   {
-      this.ignoreNotFoundField = ignoreNotFoundField;
-   }
-
-   public void mapClassToElement(Class cls, String namespaceURI, String localName, ObjectModelProvider provider)
-   {
-      ClassToElementMapping mapping = new ClassToElementMapping(cls, namespaceURI, localName,
-         provider instanceof GenericObjectModelProvider ?
-         (GenericObjectModelProvider)provider : new DelegatingObjectModelProvider(provider)
-      );
-      classMappings.put(mapping.cls, mapping);
-   }
-
-   public void mapFieldToElement(Class cls,
-                                 String field,
-                                 String namespaceURI,
-                                 String localName,
-                                 TypeBinding converter)
-   {
-      FieldToElementMapping mapping = new FieldToElementMapping(cls, field, namespaceURI, localName, converter);
-      mapFieldToElement(mapping);
-   }
-
-   public boolean isIgnoreLowLine()
-   {
-      return ignoreLowLine;
-   }
-
-   public void setIgnoreLowLine(boolean ignoreLowLine)
-   {
-      this.ignoreLowLine = ignoreLowLine;
-   }
-
-   // GenericObjectModelProvider implementation
-
-   public Object getChildren(Object o, MarshallingContext ctx, String namespaceURI, String localName)
-   {
-      Object children = null;
-      if(!writeAsValue(o.getClass()))
-      {
-         children = getJavaValue(namespaceURI, localName, null, o, true, ignoreNotFoundField);
-      }
-      return children;
-   }
-
-   public Object getElementValue(Object o, MarshallingContext ctx, String namespaceURI, String localName)
-   {
-      Object value;
-      if(writeAsValue(o.getClass()))
-      {
-         value = o;
-      }
-      else
-      {
-         String fieldName = null;
-         if(ctx != null && ctx.isTypeComplex())
-         {
-            // this is how it should be
-            fieldName = ctx.getSimpleContentProperty();
-         }
-
-         // this is a hack for soap enc
-         try
-         {
-            value = getJavaValue(namespaceURI, localName, fieldName, o, false, false);
-         }
-         catch(JBossXBRuntimeException e)
-         {
-            value = getJavaValue(namespaceURI, localName, null, o, false, ignoreNotFoundField);
-         }
-      }
-      return value;
-   }
-
-   public Object getAttributeValue(Object o, MarshallingContext ctx, String namespaceURI, String localName)
-   {
-      boolean optional = ctx == null ? ignoreNotFoundField : !ctx.isAttributeRequired() || ignoreNotFoundField;
-      return getJavaValue(namespaceURI, localName, null, o, false, optional);
-   }
-
-   public Object getRoot(Object o, MarshallingContext ctx, String namespaceURI, String localName)
-   {
-      //String correspCls = Util.xmlNameToClassName(localName, true);
-      //String shortName = Classes.stripPackageName(o.getClass());
-      //return correspCls.equals(shortName) ? o : null;
-      return o;
-   }
-
-   // Private
-
-   private void mapFieldToElement(FieldToElementMapping mapping)
-   {
-      String mappingKey = mapping.cls.getName() + ":" + mapping.localName;
-      fieldMappings.put(mappingKey, mapping);
-   }
-
-   private Object getJavaValue(String namespaceURI, String localName, String fieldName, Object o, boolean forComplexType, boolean optional)
-   {
-      String mappingKey = o.getClass().getName() + ":" + localName;
-      FieldToElementMapping mapping = (FieldToElementMapping)fieldMappings.get(mappingKey);
-      if(mapping == null)
-      {
-         if(fieldName == null)
-         {
-            fieldName = Util.xmlNameToFieldName(localName, ignoreLowLine);
-         }
-
-         // cache the fieldmapping
-         try
-         {
-            mapping = new FieldToElementMapping(o.getClass(), fieldName, namespaceURI, localName, null);
-            mapFieldToElement(mapping);
-         }
-         catch(JBossXBRuntimeException e)
-         {
-            if(optional)
-            {
-               if(log.isTraceEnabled())
-               {
-                  log.trace(e.getMessage());
-               }
-            }
-            else
-            {
-               throw e;
-            }
-         }
-      }
-
-      FieldInfo fieldInfo = null;
-      if(mapping != null)
-      {
-         fieldInfo = mapping.fieldInfo;
-      }
-
-      Object value = null;
-      if(fieldInfo != null && (!forComplexType || forComplexType && !writeAsValue(fieldInfo.getType())))
-      {
-         value = fieldInfo.getValue(o);
-      }
-
-      if(value != null && mapping != null && mapping.converter != null)
-      {
-         value = mapping.converter.marshal(value);
-      }
-
-      return value;
-   }
-
-   private boolean writeAsValue(final Class type)
-   {
-      return Classes.isPrimitive(type) ||
-         type == String.class ||
-         type == java.util.Date.class ||
-         type == java.math.BigDecimal.class ||
-         type == java.math.BigInteger.class;
-   }
-
-   // Inner
-
-   private class ClassToElementMapping
-   {
-      public final Class cls;
-      public final String namespaceURI;
-      public final String localName;
-      public final GenericObjectModelProvider provider;
-
-      public ClassToElementMapping(Class cls,
-                                   String namespaceURI,
-                                   String localName,
-                                   GenericObjectModelProvider provider)
-      {
-         this.cls = cls;
-         this.namespaceURI = namespaceURI;
-         this.localName = localName;
-         this.provider = provider;
-
-         if(log.isTraceEnabled())
-         {
-            log.trace("new ClassToElementMapping: [cls=" +
-               cls.getName() +
-               ",qname=" +
-               new QName(namespaceURI, localName) +
-               "]"
-            );
-         }
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(!(o instanceof ClassToElementMapping))
-         {
-            return false;
-         }
-
-         final ClassToElementMapping classToElementMapping = (ClassToElementMapping)o;
-
-         if(cls != null ? !cls.equals(classToElementMapping.cls) : classToElementMapping.cls != null)
-         {
-            return false;
-         }
-         if(localName != null ?
-            !localName.equals(classToElementMapping.localName) :
-            classToElementMapping.localName != null)
-         {
-            return false;
-         }
-         if(namespaceURI != null ?
-            !namespaceURI.equals(classToElementMapping.namespaceURI) :
-            classToElementMapping.namespaceURI != null)
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         int result;
-         result = (cls != null ? cls.hashCode() : 0);
-         result = 29 * result + (namespaceURI != null ? namespaceURI.hashCode() : 0);
-         result = 29 * result + (localName != null ? localName.hashCode() : 0);
-         return result;
-      }
-   }
-
-   private class FieldToElementMapping
-   {
-      public final Class cls;
-      public final String namespaceURI;
-      public final String localName;
-      public final TypeBinding converter;
-      public final FieldInfo fieldInfo;
-
-      public FieldToElementMapping(Class cls,
-                                   String field,
-                                   String namespaceURI,
-                                   String localName,
-                                   TypeBinding converter)
-      {
-         this.cls = cls;
-         this.namespaceURI = namespaceURI;
-         this.localName = localName;
-         this.converter = converter;
-
-         if(log.isTraceEnabled())
-         {
-            log.trace("new FieldToElementMapping: [cls=" +
-               cls.getName() +
-               ",field=" +
-               field +
-               ",qname=" +
-               new QName(namespaceURI, localName) +
-               "]"
-            );
-         }
-
-         fieldInfo = FieldInfo.getFieldInfo(cls, field, true);
-      }
-
-      public boolean equals(Object o)
-      {
-         if(this == o)
-         {
-            return true;
-         }
-         if(!(o instanceof FieldToElementMapping))
-         {
-            return false;
-         }
-
-         final FieldToElementMapping fieldToElementMapping = (FieldToElementMapping)o;
-
-         if(cls != null ? !cls.equals(fieldToElementMapping.cls) : fieldToElementMapping.cls != null)
-         {
-            return false;
-         }
-         if(!fieldInfo.getName().equals(fieldToElementMapping.fieldInfo.getName()))
-         {
-            return false;
-         }
-         if(localName != null ?
-            !localName.equals(fieldToElementMapping.localName) :
-            fieldToElementMapping.localName != null)
-         {
-            return false;
-         }
-         if(namespaceURI != null ?
-            !namespaceURI.equals(fieldToElementMapping.namespaceURI) :
-            fieldToElementMapping.namespaceURI != null)
-         {
-            return false;
-         }
-
-         return true;
-      }
-
-      public int hashCode()
-      {
-         int result;
-         result = (cls != null ? cls.hashCode() : 0);
-         result = 29 * result + fieldInfo.getName().hashCode();
-         result = 29 * result + (namespaceURI != null ? namespaceURI.hashCode() : 0);
-         result = 29 * result + (localName != null ? localName.hashCode() : 0);
-         return result;
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelProvider.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MappingObjectModelProvider.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Marshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Marshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Marshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,112 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.Reader;
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * An interface for marshaller implementations, e.g. DTD and XML schema marshallers.
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- */
-public interface Marshaller
-{
-   /**
-    * Allowed values are true and false. If not set, true is assumed.
-    * If true, xml version and encoding will be included into the marshalled XML content.
-    */
-   String PROP_OUTPUT_XML_VERSION = "org.jboss.xml.binding.marshalling.version";
-
-   /**
-    * The value should be a fully qualified class name of the Marshaller implementation.
-    * Used by the FACTORY.getInstance().
-    */
-   String PROP_MARSHALLER = "org.jboss.xml.binding.Marshaller";
-
-   /**
-    * Allowed values are true and false. If not set, true is assumed.
-    * If true, XML content will be written with indentations, otherwise in one string.
-    */
-   String PROP_OUTPUT_INDENTATION = "org.jboss.xml.binding.marshalling.indent";
-
-   class FACTORY
-   {
-      public static Marshaller getInstance()
-      {
-         String impl = System.getProperty(PROP_MARSHALLER);
-         if(impl == null)
-         {
-            throw new IllegalStateException("Required system property is not set: " + PROP_MARSHALLER);
-         }
-
-         Class implCls;
-         try
-         {
-            implCls = Thread.currentThread().getContextClassLoader().loadClass(impl);
-         }
-         catch(ClassNotFoundException e)
-         {
-            throw new IllegalStateException("Failed to load marshaller implementation class: " + impl);
-         }
-
-         try
-         {
-            return (Marshaller)implCls.newInstance();
-         }
-         catch(Exception e)
-         {
-            throw new IllegalStateException("Failed to instantiate a marshaller: " + implCls);
-         }
-      }
-   }
-
-   String VERSION = "1.0";
-   String ENCODING = "UTF-8";
-
-   void setVersion(String version);
-   void setEncoding(String encoding);
-
-   void mapPublicIdToSystemId(String publicId, String systemId);
-
-   void mapClassToGlobalElement(Class cls, String localName, String nsUri, String schemaUrl, ObjectModelProvider provider);
-
-   void mapClassToGlobalType(Class cls, String localName, String nsUri, String schemaUrl, ObjectModelProvider provider);
-
-   void addRootElement(String namespaceUri, String prefix, String name);
-
-   void marshal(String schemaUri, ObjectModelProvider provider, Object root, Writer writer) throws IOException,
-      ParserConfigurationException,
-      SAXException;
-
-   void marshal(Reader schema, ObjectModelProvider provider, Object document, Writer writer)
-      throws IOException, SAXException, ParserConfigurationException;
-
-   void setProperty(String name, String value);
-
-   String getProperty(String name);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Marshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Marshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MarshallingContext.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MarshallingContext.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MarshallingContext.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,53 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.xml.sax.ContentHandler;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface MarshallingContext
-{
-   /**
-    * @return true if current attribute is required, false otherwise
-    */
-   boolean isAttributeRequired();
-
-   /**
-    * @return  true if the element being marshalled has a complex type
-    */
-   boolean isTypeComplex();
-
-   /**
-    * @return the name of the property a simple content of a complex type is bound to
-    */
-   String getSimpleContentProperty();
-
-   ContentHandler getContentHandler();
-
-   /**
-    * @return  the namespace context
-    */
-   NamespaceRegistry getNamespaceContext();
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MarshallingContext.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/MarshallingContext.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/NamespaceRegistry.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/NamespaceRegistry.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/NamespaceRegistry.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,396 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * A simple namespace registry.
- *
- * It assignes namespace prefixes of the form 'ns?' where ? is an incrementing integer.
- * {@see registerURI(String,String)}
- *
- * [TODO] cleanup the api
- *
- * @author Thomas.Diesler at jboss.org
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @author <a href="mailto:anil.saldhana at jboss.org">Anil Saldhana</a>
- * @since 08-June-2004
- */
-public class NamespaceRegistry implements NamespaceContext, Serializable
-{
-   private static final long serialVersionUID = 8435680858785550261L;
-
-   // The index of the last assigned prefix
-   private int namespaceIndex;
-
-   private final Map prefixByUri = new HashMap();
-   private final Map uriByPrefix = new HashMap();
-
-   public NamespaceRegistry()
-   {
-   }
-
-   /** Register a QName and return a QName that is guarantied to have a prefix
-    */
-   public QName registerQName(QName qname)
-   {
-      if (qname == null)
-         return null;
-
-      String nsURI = qname.getNamespaceURI();
-      String prefix = getPrefix(nsURI);
-      if (prefix == null)
-      {
-         prefix = qname.getPrefix();
-         if (prefix.length() == 0)
-            prefix = registerURI(nsURI, null);
-         else
-            prefix = registerURI(nsURI, prefix);
-      }
-
-      qname = new QName(nsURI, qname.getLocalPart(), prefix);
-      return qname;
-   }
-
-   /** Register the given nsURI/prefix combination.
-    * In case the prefix is null, it will be assigend.
-    *
-    * @param nsURI The nsURI
-    * @param prefix The corresponding prefix, maybe null
-    * @return A prefix, never null
-    */
-   public String registerURI(String nsURI, String prefix)
-   {
-      if (prefix == null)
-      {
-         prefix = "ns" + (++namespaceIndex);
-      }
-
-      addPrefixMapping(prefix, nsURI);
-      return prefix;
-   }
-
-   /**
-    * Adds prefix mapping.
-    *
-    * @param prefix  prefix to map
-    * @param nsURI  the URI to prefix to
-    */
-   public void addPrefixMapping(String prefix, String nsURI)
-   {
-      if (nsURI == null)
-         throw new IllegalArgumentException("Cannot add mapping for null namespace URI");
-
-      Object obj = uriByPrefix.get(prefix);
-      if (nsURI.equals(obj) == false)
-      {
-         if (obj == null)
-         {
-            uriByPrefix.put(prefix, nsURI);
-         }
-         else if (obj instanceof String)
-         {
-            List list = new ArrayList();
-            list.add(obj);
-            list.add(nsURI);
-            uriByPrefix.put(prefix, list);
-         }
-         else if (obj instanceof List)
-         {
-            ((List)obj).add(nsURI);
-         }
-         else
-         {
-            throwUnexpectedEntryException(obj);
-         }
-
-         obj = prefixByUri.get(nsURI);
-         if (obj == null)
-         {
-            prefixByUri.put(nsURI, prefix);
-         }
-         else if (obj instanceof String)
-         {
-            List list = new ArrayList();
-            list.add(obj);
-            list.add(prefix);
-            prefixByUri.put(nsURI, list);
-         }
-         else if (obj instanceof List)
-         {
-            ((List)obj).add(prefix);
-         }
-         else
-         {
-            throwUnexpectedEntryException(obj);
-         }
-      }
-   }
-
-   /**
-    * Removes the last mapping for the given prefix.
-    *
-    * @param prefix  the prefix to remove mapping for
-    */
-   public void removePrefixMapping(String prefix)
-   {
-      Object obj = uriByPrefix.get(prefix);
-      if (obj != null)
-      {
-         String uri = null;
-         if (obj instanceof String)
-         {
-            uri = (String)obj;
-            uriByPrefix.remove(prefix);
-         }
-         else if (obj instanceof List)
-         {
-            List list = (List)obj;
-            uri = (String)list.remove(list.size() - 1);
-            if (list.isEmpty())
-            {
-               uriByPrefix.remove(prefix);
-            }
-         }
-         else
-         {
-            throwUnexpectedEntryException(obj);
-         }
-
-         if (uri != null)
-         {
-            obj = prefixByUri.get(uri);
-            if (obj instanceof String)
-            {
-               if (!prefix.equals(obj))
-               {
-                  throw new IllegalStateException("Inconsistent mapping: prefix=" + prefix + ", found=" + obj);
-               }
-               prefixByUri.remove(uri);
-            }
-            else if (obj instanceof List)
-            {
-               List list = (ArrayList)obj;
-               list.remove(prefix);
-               if (list.isEmpty())
-               {
-                  prefixByUri.remove(uri);
-               }
-            }
-            else
-            {
-               throwUnexpectedEntryException(obj);
-            }
-         }
-      }
-   }
-
-   /**
-    * Unregisters all prefix mappings for the given URI, not just the last one added.
-    * todo what is this used for?
-    *
-    * @param nsURI the URI to unregister
-    */
-   public void unregisterURI(String nsURI)
-   {
-      Object obj = prefixByUri.get(nsURI);
-      if (obj != null)
-      {
-         String prefix = null;
-         if (obj instanceof String)
-         {
-            prefix = (String)obj;
-            prefixByUri.remove(nsURI);
-            removePrefixMappingOnly(prefix, nsURI);
-         }
-         else if (obj instanceof List)
-         {
-            List list = (List)obj;
-            for (int i = 0; i < list.size(); ++i)
-            {
-               removePrefixMappingOnly((String)list.get(i), nsURI);
-            }
-            prefixByUri.remove(nsURI);
-         }
-         else
-         {
-            throwUnexpectedEntryException(obj);
-         }
-      }
-   }
-
-   /** True if the given nsURI is registered.
-    */
-   public boolean isRegistered(String nsURI)
-   {
-      return prefixByUri.containsKey(nsURI);
-   }
-
-   /** Return an iterator over all registered nsURIs.
-    */
-   public Iterator getRegisteredURIs()
-   {
-      return prefixByUri.keySet().iterator();
-   }
-
-   /** Return an iterator over all registered nsURIs.
-    */
-   public Iterator getRegisteredPrefixes()
-   {
-      return uriByPrefix.keySet().iterator();
-   }
-
-   /**
-    * @return  the number of registered URIs
-    */
-   public int size()
-   {
-      return prefixByUri.size();
-   }
-
-   // NamespaceContext implementation
-
-   /**
-    * Returns the last mapping for the prefix or null if the prefix was not mapped.
-    */
-   public String getPrefix(String nsURI)
-   {
-      Object obj = prefixByUri.get(nsURI);
-
-      String prefix = null;
-      if (obj != null)
-      {
-         if (obj instanceof String)
-         {
-            prefix = (String)obj;
-         }
-         else if (obj instanceof List)
-         {
-            List list = (List)obj;
-            prefix = (String)list.get(list.size() - 1);
-         }
-         else
-         {
-            throwUnexpectedEntryException(obj);
-         }
-      }
-
-      return prefix;
-   }
-
-   /**
-    * Returns all prefixes for the given URI.
-    *
-    * @param namespaceURI  the URI to return prefixes for
-    * @return  prefixes mapped to the URI
-    */
-   public Iterator getPrefixes(String namespaceURI)
-   {
-      Object obj = prefixByUri.get(namespaceURI);
-
-      Iterator result = null;
-      if (obj == null)
-      {
-         result = Collections.EMPTY_LIST.iterator();
-      }
-      else if (obj instanceof String)
-      {
-         result = Collections.singletonList(obj).iterator();
-      }
-      else if (obj instanceof List)
-      {
-         result = ((List)obj).iterator();
-      }
-      else
-      {
-         throwUnexpectedEntryException(obj);
-      }
-
-      return result;
-   }
-
-   /** Get the nsURI for a given prefix, maybe null.
-    */
-   public String getNamespaceURI(String prefix)
-   {
-      Object obj = uriByPrefix.get(prefix);
-
-      String uri = null;
-      if (obj != null)
-      {
-         if (obj instanceof String)
-         {
-            uri = (String)obj;
-         }
-         else if (obj instanceof List)
-         {
-            List list = (List)obj;
-            uri = (String)list.get(list.size() - 1);
-         }
-         else
-         {
-            throwUnexpectedEntryException(obj);
-         }
-      }
-
-      return uri;
-   }
-
-   // Private
-
-   private void removePrefixMappingOnly(String prefix, String nsURI)
-   {
-      Object obj = uriByPrefix.get(prefix);
-      if (obj instanceof String)
-      {
-         if (!obj.equals(nsURI))
-         {
-            throw new IllegalStateException("Inconsistent mapping: uri=" + nsURI + ", found=" + obj);
-         }
-         uriByPrefix.remove(prefix);
-      }
-      else if (obj instanceof List)
-      {
-         List list = (List)obj;
-         list.remove(prefix);
-         if (list.isEmpty())
-         {
-            uriByPrefix.remove(prefix);
-         }
-      }
-   }
-
-   private void throwUnexpectedEntryException(Object entry)
-   {
-      throw new IllegalStateException("Unexpected entry type: expected java.lang.String or java.util.List but got " + entry.getClass());
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/NamespaceRegistry.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/NamespaceRegistry.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectLocalMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectLocalMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectLocalMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,32 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface ObjectLocalMarshaller
-{
-   void marshal(MarshallingContext ctx, Object o);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectLocalMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectLocalMarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelBuilder.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelBuilder.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelBuilder.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,557 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.xml.sax.Attributes;
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.parser.JBossXBParser;
-import org.apache.xerces.xs.XSTypeDefinition;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Collections;
-import java.util.StringTokenizer;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * An instance of this class translates SAX events into org.jboss.xml.binding.GenericObjectModelFactory calls
- * such as newChild, addChild and setValue.
- * WARN: this implementation is not thread-safe!
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ObjectModelBuilder
-   implements UnmarshallingContext, JBossXBParser.ContentHandler
-{
-   /**
-    * logger
-    */
-   private static final Logger log = Logger.getLogger(ObjectModelBuilder.class);
-
-   /**
-    * The object that represents an ignored by the object model factory XML element, i.e. the factory returned null
-    * from its newChild method
-    */
-   private static final Object IGNORED = new Object();
-
-   /**
-    * The root of the unmarshalled object graph
-    */
-   private Object root;
-
-   /**
-    * the stack of all the objects including IGNORED
-    */
-   private Stack all = new StackImpl();
-
-   /**
-    * the stack of only accepted objects (all - IGNORED)
-    */
-   private Stack accepted = new StackImpl();
-
-   private GenericObjectModelFactory curFactory;
-   private String curNameSwitchingFactory;
-   private String curNsSwitchingFactory;
-   private Stack nameSwitchingFactory;
-   private Stack nsSwitchingFactory;
-
-   /**
-    * default object model factory
-    */
-   private GenericObjectModelFactory defaultFactory;
-
-   /**
-    * factories mapped to namespace URIs
-    */
-   private Map factoriesToNs = Collections.EMPTY_MAP;
-
-   /**
-    * NamespaceContext implementation
-    */
-   private final NamespaceRegistry nsRegistry = new NamespaceRegistry();
-
-   private XSTypeDefinition currentType;
-
-   private boolean trace = log.isTraceEnabled();
-
-   // Public
-
-   public void mapFactoryToNamespace(ObjectModelFactory factory, String namespaceUri)
-   {
-      if(factoriesToNs == Collections.EMPTY_MAP)
-      {
-         factoriesToNs = new HashMap();
-      }
-      factoriesToNs.put(namespaceUri, getGenericObjectModelFactory(factory));
-   }
-
-   public void init(ObjectModelFactory defaultFactory, Object root)
-   {
-      this.defaultFactory = getGenericObjectModelFactory(defaultFactory);
-      all.clear();
-      accepted.clear();
-      this.root = root;
-   }
-
-   public void pushFactory(String namespaceURI, String localName, GenericObjectModelFactory factory)
-   {
-      if(curNsSwitchingFactory != null)
-      {
-         if(nsSwitchingFactory == null)
-         {
-            nsSwitchingFactory = new StackImpl();
-            nameSwitchingFactory = new StackImpl();
-         }
-         nsSwitchingFactory.push(curNsSwitchingFactory);
-         nameSwitchingFactory.push(curNameSwitchingFactory);
-      }
-      curNsSwitchingFactory = namespaceURI;
-      curNameSwitchingFactory = localName;
-      curFactory = factory;
-   }
-
-   public void popFactory()
-   {
-      if(nsSwitchingFactory == null || nsSwitchingFactory.isEmpty())
-      {
-         curNameSwitchingFactory = null;
-         curNsSwitchingFactory = null;
-      }
-      else
-      {
-         curNameSwitchingFactory = (String)nameSwitchingFactory.pop();
-         curNsSwitchingFactory = (String)nsSwitchingFactory.pop();
-      }
-
-      curFactory = getFactory(curNsSwitchingFactory);
-   }
-
-   // UnmarshallingContext implementation
-
-   public Iterator getNamespaceURIs()
-   {
-      return nsRegistry.getRegisteredURIs();
-   }
-
-   public NamespaceContext getNamespaceContext()
-   {
-      return nsRegistry;
-   }
-
-   /**
-    * Construct a QName from a value
-    *
-    * @param value A value that is of the form [prefix:]localpart
-    */
-   public QName resolveQName(String value)
-   {
-      StringTokenizer st = new StringTokenizer(value, ":");
-      if(st.countTokens() == 1)
-         return new QName(value);
-
-      if(st.countTokens() != 2)
-         throw new IllegalArgumentException("Illegal QName: " + value);
-
-      String prefix = st.nextToken();
-      String local = st.nextToken();
-      String nsURI = nsRegistry.getNamespaceURI(prefix);
-      if (nsURI == null)
-         throw new IllegalStateException("Cannot obtain namespace URI for prefix: " + prefix);
-
-      return new QName(nsURI, local, prefix);
-   }
-
-   public String getChildContent(String namespaceURI, String qName)
-   {
-      // todo reimplement later
-      throw new UnsupportedOperationException();
-      //return content.getChildContent(namespaceURI, qName);
-   }
-
-   public XSTypeDefinition getType()
-   {
-      return currentType;
-   }
-
-   // Public
-
-   public void startPrefixMapping(String prefix, String uri)
-   {
-      nsRegistry.addPrefixMapping(prefix, uri);
-   }
-
-   public void endPrefixMapping(String prefix)
-   {
-      nsRegistry.removePrefixMapping(prefix);
-   }
-
-   public void processingInstruction(String target, String data)
-   {
-      if(!"jbossxb".equals(target))
-      {
-         return;
-      }
-
-      int i = data.indexOf("factory=\"");
-      if(i != -1)
-      {
-         int end = data.indexOf('\"', i + 9);
-         if(end == -1)
-         {
-            throw new JBossXBRuntimeException(
-               "Property 'factory' is not terminated with '\"' in processing instruction: " + data
-            );
-         }
-
-         String factoryProp = data.substring(i + 9, end);
-         Class factoryCls;
-         try
-         {
-            factoryCls = Thread.currentThread().getContextClassLoader().loadClass(factoryProp);
-         }
-         catch(ClassNotFoundException e)
-         {
-            throw new JBossXBRuntimeException("Failed to load factory class : " + e.getMessage(), e);
-         }
-
-         ObjectModelFactory factory;
-         try
-         {
-            factory = (ObjectModelFactory)factoryCls.newInstance();
-         }
-         catch(Exception e)
-         {
-            throw new JBossXBRuntimeException("Failed to instantiate factory " + factoryProp + ": " + e.getMessage(),
-               e
-            );
-         }
-
-         i = data.indexOf("ns=\"");
-         if(i == -1)
-         {
-            throw new JBossXBRuntimeException(
-               "Property 'ns' not found in factory mapping processing instruction: " + data
-            );
-         }
-
-         end = data.indexOf("\"", i + 4);
-         if(end == -1)
-         {
-            throw new JBossXBRuntimeException(
-               "Property 'ns' is not terminated with '\"' in processing instruction: " + data
-            );
-         }
-
-         String nsProp = data.substring(i + 4, end);
-         mapFactoryToNamespace(factory, nsProp);
-      }
-      else
-      {
-         throw new JBossXBRuntimeException(
-            "Unexpected data in processing instruction: target=" + target + ", data=" + data
-         );
-      }
-   }
-
-   public Object getRoot()
-   {
-      if(!all.isEmpty())
-      {
-         popAll();
-         popAccepted();
-      }
-      return root;
-   }
-
-   public void startElement(String namespaceURI,
-                            String localName,
-                            String qName,
-                            Attributes atts,
-                            XSTypeDefinition type)
-   {
-      Object parent = accepted.isEmpty() ? root : peekAccepted();
-
-      // todo currentType assignment
-      currentType = type;
-
-      Object element;
-      if(!namespaceURI.equals(curNsSwitchingFactory))
-      {
-         GenericObjectModelFactory newFactory = getFactory(namespaceURI);
-         if(newFactory != curFactory)
-         {
-            element = newFactory.newRoot(parent, this, namespaceURI, localName, atts);
-         }
-         else
-         {
-            element = newFactory.newChild(parent, this, namespaceURI, localName, atts);
-         }
-
-         // still have to push since curNsSwitchingFactory needs to be updated to prevent
-         // newRoot calls for the children
-         pushFactory(namespaceURI, localName, newFactory);
-      }
-      else
-      {
-         element = curFactory.newChild(parent, this, namespaceURI, localName, atts);
-      }
-
-      if(element == null)
-      {
-         pushAll(IGNORED);
-
-         if(trace)
-         {
-            log.trace("ignored " + namespaceURI + ':' + qName);
-         }
-      }
-      else
-      {
-         pushAll(element);
-         pushAccepted(element);
-
-         if(trace)
-         {
-            log.trace("accepted " + namespaceURI + ':' + qName);
-         }
-      }
-   }
-
-   public void endElement(String namespaceURI, String localName, String qName)
-   {
-      AllElement element = popAll();
-
-      if(!accepted.isEmpty())
-      {
-         Object acceptedElement = peekAccepted();
-         if(element.characters != null && element.characters.length() > 0)
-         {
-            String characters = element.characters.toString().trim();
-            if(characters.length() > 0)
-            {
-               curFactory.setValue(acceptedElement, this, namespaceURI, localName, characters);
-            }
-         }
-      }
-
-      if(localName.equals(curNameSwitchingFactory) && namespaceURI.equals(curNsSwitchingFactory))
-      {
-         popFactory();
-      }
-
-      if(element.element != IGNORED)
-      {
-         popAccepted();
-         Object parent = (accepted.isEmpty() ? null : peekAccepted());
-
-         if(parent != null)
-         {
-            curFactory.addChild(parent, element.element, this, namespaceURI, localName);
-         }
-         else
-         {
-            root = curFactory.completeRoot(element.element, this, namespaceURI, localName);
-         }
-      }
-   }
-
-   public void characters(char[] ch, int start, int length)
-   {
-      if(!accepted.isEmpty())
-      {
-         String str = String.valueOf(ch, start, length);
-         AllElement allElement = peekAll();
-         if(allElement.characters == null)
-         {
-            allElement.characters = new StringBuffer(str);
-         }
-         else
-         {
-            allElement.characters.append(str);
-         }
-      }
-   }
-
-   // Private
-
-   private GenericObjectModelFactory getFactory(String namespaceUri)
-   {
-      GenericObjectModelFactory factory = (GenericObjectModelFactory)factoriesToNs.get(namespaceUri);
-      if(factory == null)
-      {
-         factory = defaultFactory;
-      }
-      return factory;
-   }
-
-   static Object invokeFactory(Object factory, Method method, Object[] args)
-   {
-      try
-      {
-         return method.invoke(factory, args);
-      }
-      catch(InvocationTargetException e)
-      {
-         Throwable te = e.getCause();
-         if(te instanceof RuntimeException)
-         {
-            throw (RuntimeException)te;
-         }
-
-         String msg = "Failed to invoke method " + method + ", factory=" + factory;
-         log.error(msg, e.getTargetException());
-
-         IllegalStateException ise = new IllegalStateException(msg);
-         ise.initCause(te);
-         throw ise;
-      }
-      catch(Exception e)
-      {
-         String msg = "Failed to invoke method " + method.getName() + ", factory=" + factory;
-         log.error(msg, e);
-         IllegalStateException ise = new IllegalStateException(msg);
-         ise.initCause(e);
-         throw ise;
-      }
-   }
-
-   static Method getMethodForElement(Object factory, String name, Class[] params)
-   {
-      Method method = null;
-      try
-      {
-         method = factory.getClass().getMethod(name, params);
-      }
-      catch(NoSuchMethodException e)
-      {
-      }
-      catch(SecurityException e)
-      {
-         throw e;
-      }
-
-      return method;
-   }
-
-   static final GenericObjectModelFactory getGenericObjectModelFactory(ObjectModelFactory factory)
-   {
-      if(!(factory instanceof GenericObjectModelFactory))
-      {
-         factory = new DelegatingObjectModelFactory(factory);
-      }
-      return factory instanceof GenericObjectModelFactory ?
-         (GenericObjectModelFactory)factory :
-         new DelegatingObjectModelFactory(factory);
-   }
-
-   private void pushAccepted(Object o)
-   {
-      accepted.push(o);
-   }
-
-   private Object popAccepted()
-   {
-      return accepted.pop();
-   }
-
-   private Object peekAccepted()
-   {
-      return accepted.peek();
-   }
-
-   private void pushAll(Object o)
-   {
-      all.push(new AllElement(o));
-   }
-
-   private AllElement popAll()
-   {
-      return (AllElement)all.pop();
-   }
-
-   private AllElement peekAll()
-   {
-      return (AllElement)all.peek();
-   }
-
-   private static final class AllElement
-   {
-      public final Object element;
-      public StringBuffer characters;
-
-      public AllElement(Object element)
-      {
-         this.element = element;
-      }
-   }
-
-   private static interface Stack
-   {
-      void clear();
-
-      void push(Object o);
-
-      Object pop();
-
-      Object peek();
-
-      boolean isEmpty();
-   }
-
-   private static class StackImpl
-      implements Stack
-   {
-      private List list = new ArrayList();
-
-      public void clear()
-      {
-         list.clear();
-      }
-
-      public void push(Object o)
-      {
-         list.add(o);
-      }
-
-      public Object pop()
-      {
-         return list.remove(list.size() - 1);
-      }
-
-      public Object peek()
-      {
-         return list.get(list.size() - 1);
-      }
-
-      public boolean isEmpty()
-      {
-         return list.isEmpty();
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelBuilder.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelBuilder.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelFactory.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,123 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.xml.sax.Attributes;
-
-/**
- * All object model factories must implement this interface. Object model factories are used on unmarshalling
- * to build an object graph that is a representation of the XML content unmarshalled.
- * <p/>Each object model factory must implement methods <code>newRoot</code> and <code>completeRoot</code>
- * defined in this interface, plus a set of <code>newChild</code>, <code>addChild</code> and <code>setValue</code>
- * methods that will be descovered by the framework at runtime with introspection.
- * <p/>The contract for methods discovered at runtime with introspection:
- * <ul>
- * <li><b><code>newChild</code> methods</b>
- * <br/>This method is called by the framework on the object model factory when parsing of a new XML element started.
- * Each <code>newChild</code> method must have five arguments:
- * <ol>
- * <li>parent object of a concrete Java type (not <code>java.lang.Object</code>) for this new child</li>
- * <li>instance of <code>org.jboss.xml.binding.UnmarshallingContext</code></li>
- * <li>namespace URI of the child XML element as <code>java.lang.String</code></li>
- * <li>local name of the child XML element as <code>java.lang.String</code></li>
- * <li>attributes of the child XML element as <code>org.xml.sax.Attributes</code></li>
- * </ol>
- * Each <code>newChild()</code> method returns either a new instance of
- * the child object that represents the XML element with the namespace URI and local name
- * (in this case, the child XML element is said to be accepted, i.e. should be represented in the object graph)
- * or <code>null</code> if this child XML element should be ignored, i.e. not be represented in the object graph.
- * </li>
- * <br/>
- * <li><b><code>addChild</code> methods</b>
- * <br/>This method is called on the object model factory by the framework when parsing
- * of a child XML element completed. The arguments of the <code>addChild()</code> method are:
- * <ol>
- * <li>parent object of a conrete Java type (not <code>java.lang.Object</code>) of the child</li>
- * <li>child object of a concrete Java type (returned earlier by the <code>newChild</code>
- * method that was called when parsing of this child XML element started)</li>
- * <li>instance of <code>org.jboss.xml.binding.UnmarshallingContext</code></li>
- * <li>namespace URI for the child XML element <code>as java.lang.String</code></li>
- * <li>local name for the child XML element as <code>java.lang.String</code></li>
- * </ol>
- * When <code>addChild</code> method is called, the child object is supposed to be populated with all the data from
- * the corresponding XML element. The child object now can be validated and added to the parent.
- * </li>
- * <br/>
- * <li><b><code>setValue</code> methods</b>
- * <br/>This method is called on the object model factory by the framework when a new XML element
- * with text content was parsed.
- * The method must have four arguments:
- * <ol>
- * <li>an object of a concrete Java type (not <code>java.lang.Object</code>) which was returned earlier
- * by the <code>newChild</code> method (that was called when parsing of the parent XML element started)
- * for which the value of an XML element was read</li>
- * <li>instance of <code>org.jboss.xml.binding.UnmarshallingContext</code></li>
- * <li>namespace URI of the child XML element as <code>java.lang.String</code></li>
- * <li>local name of the child XML element as <code>java.lang.String</code></li>
- * <li>the value of the child XML element as <code>java.lang.String</code></li>
- * </ol>
- * In <code>setValue</code> method the object model factory is supposed to set the value on the field which represents
- * the parsed XML element possibly converting the parsed XML element value to the field's Java type.
- * </li>
- * </ul>
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface ObjectModelFactory
-{
-   /**
-    * This method is called by the framework and returns the root of the object graph.
-    * <p/>If <code>root</code> argument is null, the factory is supposed to create and return a new one
-    * that is going to be the real root object of the graph or an object that will represent the root object
-    * during unmarshalling and which will be used to create the real root object when unmarshalling is complete
-    * in <code>completeRoot</code> if the real root object can't be created while its children are not available,
-    * e.g. no no-arg constructor or other reasons.
-    * <p/>If <code>root</code> argument is not null (i.e. a user provided the root object through the
-    * <code>org.jboss.xml.binding.Unmarshaller</code>) then the factory could just return it as is or
-    * extract the real root from the <code>root</code> argument based on the namespace URI and local name
-    * if <code>root</code> argument wraps/contains the real root.
-    *
-    * @param root         an object that is the root or which contains the root of the object graph
-    * @param ctx          unmarshalling context
-    * @param namespaceURI namespace URI of the root
-    * @param localName    local name of the root
-    * @param attrs        attributes of the root object
-    * @return the root of the object graph
-    */
-   Object newRoot(Object root, UnmarshallingContext ctx, String namespaceURI, String localName, Attributes attrs);
-
-   /**
-    * This method is called by the framework when unmarshalling of the object graph completed.
-    * The method returns the root object of the object graph.
-    * If at the beginning of unmarshalling <code>newRoot</code> returned not the real root object but an
-    * object that represented the root during unmarshalling, the real root object should be created
-    * and returned.
-    *
-    * @param root         the object returned by <code>newRoot</code> at the beginning of unmarshalling
-    * @param ctx          unmarshalling context
-    * @param namespaceURI namespace URI that corresponds to the root
-    * @param localName    local element name the root of the object graph is bound to
-    * @return the root of the object graph
-    */
-   Object completeRoot(Object root, UnmarshallingContext ctx, String namespaceURI, String localName);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelFactory.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelFactory.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelProvider.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelProvider.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelProvider.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,98 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-/**
- * The interface all object model providers must implement. Object model providers are used on marshalling
- * providing data for XML content based on the object model and XML schema or DTD.
- * <p/>
- * Each object model provider must implement one method <code>getRoot</code> defined in ObjectModelProvider interface
- * and a set of getChildren, getElementValue and getAttributeValue methods descovered by the framework at runtime
- * with introspection.
- * <p/>So, the following methods should be implemented:
- * <ul>
- * <li><code>getRoot</code> method
- * <pre>
- *    java.lang.Object getRoot(java.lang.Object o, java.lang.String namespaceURI, java.lang.String localName)
- * </pre>
- * This method is called on the object model provider by the framework when a root XML element is marshalled.
- * The method returns an object that represents the root of the XML content corresponding to the namespace URI and
- * local name.
- * </li>
- * <li>a set of <code>getChildren</code> methods
- * This method is called on the object model provider by the framework when marshalling of a new XML element started.
- * Each <code>getChildren</code> method must have three arguments:
- * <ol>
- * <li>parent object of a concrete Java type (not java.lang.Object) that is "asked" for its children</li>
- * <li>namespace URI of the child XML element as java.lang.String</li>
- * <li>local name of the child element as java.lang.String</li>
- * </ol>
- * A <code>getChildren</code> method returns children that represent the namespace URI and local name in XML content.
- * The method can return null if there are no children in this object graph corresponding to the namespace and local name.
- * The method can return a single object if there is only one child object corresponding to the namespace and local name.
- * If there are many children that match the namespace URI and local name, the method can return them as an array,
- * java.util.List, java.util.Collection or java.util.Iterator.
- * </li>
- * <li>a set of <code>getElementValue</code> methods
- * This method is called on the object model provider by the framework for objects that represent XML elements with
- * simple content, i.e. elements that don't contain nested XML elements.
- * The method must have three arguments:
- * <ol>
- * <li>an object of a concrete Java type (not java.lang.Object) that is "asked" to provide a value of the XML element
- * being marshalled</li>
- * <li>namespace URI as java.lang.String of the XML element being marshalled</li>
- * <li>local name as java.lang.String of the XML element being marshalled</li>
- * </ol>
- * The method returns either null if the object model does not have any value corresponding to the namespace URI
- * and local name (in this case the XML content will not contain this XML element) or the actual value of the XML element.
- * </li>
- * <li>a set of <code>getAttributeValue</code> methods
- * This method is called on the object model provider by the framework for objects that represent XML elements with
- * attributes.
- * The method must have three arguments:
- * <ol>
- * <li>an object of a concrete Java type (not java.lang.Object) that is "asked" to provide a value for the XML attribute
- * being marshalled</li>
- * <li>namespace URI of the XML attribute being marshalled</li>
- * <li>local name of the XML attribute being marshalled</li>
- * </ol>
- * The method returns either null if the object graph does not have any value corresponding to the namespace URI
- * and local name (in this case the XML content will not contain this attribute) or the actual value of the XML attribute.
- * </li>
- * </ol>
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface ObjectModelProvider
-{
-   /**
-    * Called by the framework when a root XML element is marshalled.
-    *
-    * @param o            the root of the object graph
-    * @param ctx
-    * @param namespaceURI namespace URI of the root XML element being marshalled
-    * @param localName    local name of the root XML element being marshalled
-    * @return an object that represents the root XML element corresponding to the namespace URI and local name
-    */
-   Object getRoot(Object o, MarshallingContext ctx, String namespaceURI, String localName);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelProvider.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/ObjectModelProvider.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,226 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.jboss.logging.Logger;
-import org.xml.sax.SAXException;
-
-import java.io.StringWriter;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-import java.lang.reflect.Method;
-import java.lang.reflect.Array;
-
-/**
- * Sandbox. Very testcase specific impl.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SchemalessMarshaller
-{
-   private static final Logger log = Logger.getLogger(SchemalessMarshaller.class);
-
-   public static final String PROPERTY_JAXB_SCHEMA_LOCATION = "jaxb.schemaLocation";
-
-   private final Properties props = new Properties();
-
-   private final Map gettersPerClass = new HashMap();
-
-   private final Content content = new Content();
-
-   public void setProperty(String name, String value)
-   {
-      props.setProperty(name, value);
-   }
-
-   public void marshal(Object root, StringWriter writer)
-   {
-      log.debug("marshal: root=" + root);
-
-      content.startDocument();
-
-      marshalObject(root, root.getClass().getName(), writer);
-
-      content.endDocument();
-
-      writer.write("<?xml version=\"");
-      writer.write("1.0");
-      writer.write("\" encoding=\"");
-      writer.write("UTF-8");
-      writer.write("\"?>\n");
-
-      ContentWriter contentWriter = new ContentWriter(writer, true);
-      try
-      {
-         content.handleContent(contentWriter);
-      }
-      catch(SAXException e)
-      {
-         log.error("Failed to write content.", e);
-         throw new IllegalStateException("Failed to write content: " + e.getMessage());
-      }
-   }
-
-   private void marshalObject(Object root, String localName, StringWriter writer)
-   {
-      List getters = getGetterList(root.getClass());
-      AttributesImpl attrs = null; //new AttributesImpl(5);
-      content.startElement(null, localName, localName, attrs);
-
-      for(int i = 0; i < getters.size(); ++i)
-      {
-         Method getter = (Method)getters.get(i);
-         Object child;
-         try
-         {
-            child = getter.invoke(root, null);
-         }
-         catch(Exception e)
-         {
-            log.error("Failed to invoke getter " + getter.getName() + " on " + root, e);
-            throw new IllegalStateException(
-               "Failed to invoke getter " + getter.getName() + " on " + root + ": " + e.getMessage()
-            );
-         }
-
-         if(child != null)
-         {
-            String childName = getter.getName().substring(3);
-            if(isAttributeType(child.getClass()))
-            {
-               marshalAttributeType(childName, child);
-
-               /*
-               attrs.add(null,
-                  getter.getName().substring(3),
-                  getter.getName().substring(3),
-                  getter.getClass().getName(),
-                  child.toString()
-               );
-               */
-            }
-            else if(child.getClass().isArray())
-            {
-               content.startElement(null, childName, childName, null);
-               for(int arrInd = 0; arrInd < Array.getLength(child); ++arrInd)
-               {
-                  Object o = Array.get(child, arrInd);
-                  marshalCollectionItem(o, o.getClass().getName(), o.getClass().getName(), writer);
-               }
-               content.endElement(null, childName, childName);
-            }
-            else if(Collection.class.isAssignableFrom(child.getClass()))
-            {
-               content.startElement(null, childName, childName, null);
-               Collection col = (Collection)child;
-               for(Iterator iter = col.iterator(); iter.hasNext();)
-               {
-                  Object o = iter.next();
-                  marshalCollectionItem(o, o.getClass().getName(), o.getClass().getName(), writer);
-               }
-               content.endElement(null, childName, childName);
-            }
-            else
-            {
-               marshalObject(child, childName, writer);
-            }
-         }
-      }
-
-      content.endElement(null, localName, localName);
-   }
-
-   private void marshalCollectionItem(Object o, String childName, String qName, StringWriter writer)
-   {
-      if(o != null)
-      {
-         if(isAttributeType(o.getClass()))
-         {
-            marshalAttributeType(childName, o);
-         }
-         else
-         {
-            marshalObject(o, qName, writer);
-         }
-      }
-   }
-
-   private void marshalAttributeType(String qName, Object child)
-   {
-      content.startElement(null, qName, qName, null);
-      String value = child.toString();
-      content.characters(value.toCharArray(), 0, value.length());
-      content.endElement(null, qName, qName);
-   }
-
-   private List getGetterList(Class aClass)
-   {
-      List getters = (List)gettersPerClass.get(aClass);
-      if(getters == null)
-      {
-         getters = new ArrayList();
-         Method[] methods = aClass.getMethods();
-         for(int i = 0; i < methods.length; ++i)
-         {
-            Method method = methods[i];
-            if(method.getDeclaringClass() != Object.class)
-            {
-               if((method.getName().startsWith("get") || method.getName().startsWith("is")) &&
-                  (method.getParameterTypes() == null || method.getParameterTypes().length == 0))
-               {
-                  getters.add(method);
-               }
-            }
-         }
-         gettersPerClass.put(aClass, getters);
-      }
-      return getters;
-   }
-
-   static boolean isAttributeType(Class cls)
-   {
-      if(cls.isPrimitive() ||
-         cls == Byte.class ||
-         cls == Short.class ||
-         cls == Integer.class ||
-         cls == Long.class ||
-         cls == Float.class ||
-         cls == Double.class ||
-         cls == Character.class ||
-         cls == Boolean.class ||
-         cls == String.class ||
-         cls == java.util.Date.class)
-      {
-         return true;
-      }
-      else
-      {
-         return false;
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessMarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessObjectModelFactory.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessObjectModelFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessObjectModelFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,198 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-
-import org.jboss.logging.Logger;
-import org.jboss.util.Classes;
-import org.xml.sax.Attributes;
-
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Locale;
-import java.text.SimpleDateFormat;
-
-/**
- * Sandbox. Very testcase specific impl.
- * 
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SchemalessObjectModelFactory
-   implements GenericObjectModelFactory
-{
-   private static final Logger log = Logger.getLogger(SchemalessObjectModelFactory.class);
-
-   public Object newChild(Object parent,
-                          UnmarshallingContext navigator,
-                          String namespaceURI,
-                          String localName,
-                          Attributes attrs)
-   {
-      Object child = null;
-      try
-      {
-         if(parent instanceof Collection)
-         {
-            if(!localName.equals(java.lang.String.class.getName()))
-            {
-               Class itemClass = Thread.currentThread().getContextClassLoader().loadClass(localName);
-               child = itemClass.newInstance();
-               ((Collection)parent).add(child);
-            }
-         }
-         else
-         {
-            Method getter = parent.getClass().getMethod("get" + localName, null);
-            if(!SchemalessMarshaller.isAttributeType(getter.getReturnType()))
-            {
-               if(List.class.isAssignableFrom(getter.getReturnType()))
-               {
-                  child = new ArrayList();
-               }
-               else if(Set.class.isAssignableFrom(getter.getReturnType()))
-               {
-                  child = new HashSet();
-               }
-               else if(Collection.class.isAssignableFrom(getter.getReturnType()))
-               {
-                  child = new ArrayList();
-               }
-               else
-               {
-                  child = getter.getReturnType().newInstance();
-               }
-            }
-
-            if(child != null)
-            {
-               Method setter = Classes.getAttributeSetter(parent.getClass(), localName, getter.getReturnType());
-               setter.invoke(parent, new Object[]{child});
-            }
-         }
-      }
-      catch(NoSuchMethodException e)
-      {
-         log.error("Failed to get getter/setter method for " + localName + " from " + parent.getClass(), e);
-         throw new IllegalStateException("Failed to get getter/setter method for " +
-            localName +
-            " from " +
-            parent.getClass() +
-            ": " +
-            e.getMessage()
-         );
-      }
-      catch(Exception e)
-      {
-         log.error("Failed to instantiate child", e);
-         throw new IllegalStateException("Failed to instantiate child: " + e.getMessage());
-      }
-      return child;
-   }
-
-   public void addChild(Object parent,
-                        Object child,
-                        UnmarshallingContext navigator,
-                        String namespaceURI,
-                        String localName)
-   {
-   }
-
-   public void setValue(Object o, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
-   {
-      try
-      {
-         if(o instanceof Collection)
-         {
-            if(localName.equals(java.lang.String.class.getName()))
-            {
-               ((Collection)o).add(value);
-            }
-         }
-         else
-         {
-            Method getter = Classes.getAttributeGetter(o.getClass(), localName);
-            Method setter = Classes.getAttributeSetter(o.getClass(), localName, getter.getReturnType());
-
-            Object fieldValue;
-            if(java.util.Date.class.isAssignableFrom(getter.getReturnType()))
-            {
-               SimpleDateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
-               fieldValue = formatter.parse(value);
-            }
-            else
-            {
-               fieldValue = value;
-            }
-
-            setter.invoke(o, new Object[]{fieldValue});
-         }
-      }
-      catch(NoSuchMethodException e)
-      {
-         throw new IllegalStateException("Failed to discover getter/setter for " + localName + " in " + o);
-      }
-      catch(Exception e)
-      {
-         throw new IllegalStateException("Failed to set value for " + localName + " in " + o);
-      }
-   }
-
-   public Object newRoot(Object root,
-                         UnmarshallingContext navigator,
-                         String namespaceURI,
-                         String localName,
-                         Attributes attrs)
-   {
-      Class rootClass;
-      try
-      {
-         rootClass = Thread.currentThread().getContextClassLoader().loadClass(localName);
-      }
-      catch(ClassNotFoundException e)
-      {
-         log.error("Faile to load root class " + localName, e);
-         throw new IllegalStateException("Failed to load root class: " + localName + ": " + e.getMessage());
-      }
-
-      try
-      {
-         root = rootClass.newInstance();
-      }
-      catch(Exception e)
-      {
-         log.error("Failed to create an instance of root " + localName, e);
-         throw new IllegalStateException("Failed to create an instance of root " + localName + ": " + e.getMessage());
-      }
-
-      return root;
-   }
-
-   public Object completeRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName)
-   {
-      return root;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessObjectModelFactory.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SchemalessObjectModelFactory.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SimpleTypeBindings.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SimpleTypeBindings.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SimpleTypeBindings.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,2253 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.Base64;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import java.io.ByteArrayOutputStream;
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.URISyntaxException;
-import java.text.DecimalFormat;
-import java.text.ParseException;
-import java.util.Calendar;
-import java.util.StringTokenizer;
-import java.util.TimeZone;
-import java.util.List;
-import java.util.ArrayList;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @author Thomas.Diesler at jboss.org
- * @version <tt>$Revision$</tt>
- */
-public final class SimpleTypeBindings
-   implements Serializable
-{
-   static final long serialVersionUID = 4372272109355825813L;
-
-   public static final String XS_ANYSIMPLETYPE_NAME = "anySimpleType";
-
-   //
-   // primitive datatypes
-   //
-   public static final String XS_STRING_NAME = "string";
-   public static final String XS_BOOLEAN_NAME = "boolean";
-   public static final String XS_DECIMAL_NAME = "decimal";
-   public static final String XS_FLOAT_NAME = "float";
-   public static final String XS_DOUBLE_NAME = "double";
-   public static final String XS_DURATION_NAME = "duration";
-   public static final String XS_DATETIME_NAME = "dateTime";
-   public static final String XS_TIME_NAME = "time";
-   public static final String XS_DATE_NAME = "date";
-   public static final String XS_GYEARMONTH_NAME = "gYearMonth";
-   public static final String XS_GYEAR_NAME = "gYear";
-   public static final String XS_GMONTHDAY_NAME = "gMonthDay";
-   public static final String XS_GDAY_NAME = "gDay";
-   public static final String XS_GMONTH_NAME = "gMonth";
-   public static final String XS_HEXBINARY_NAME = "hexBinary";
-   public static final String XS_BASE64BINARY_NAME = "base64Binary";
-   public static final String XS_ANYURI_NAME = "anyURI";
-   public static final String XS_QNAME_NAME = "QName";
-   public static final String XS_NOTATION_NAME = "NOTATION";
-
-   //
-   // derived datatypes
-   //
-
-   public static final String XS_NORMALIZEDSTRING_NAME = "normalizedString";
-   public static final String XS_TOKEN_NAME = "token";
-   public static final String XS_LANGUAGE_NAME = "language";
-   public static final String XS_NMTOKEN_NAME = "NMTOKEN";
-   public static final String XS_NMTOKENS_NAME = "NMTOKENS";
-   public static final String XS_NAME_NAME = "Name";
-   public static final String XS_NCNAME_NAME = "NCName";
-   public static final String XS_ID_NAME = "ID";
-   public static final String XS_IDREF_NAME = "IDREF";
-   public static final String XS_IDREFS_NAME = "IDREFS";
-   public static final String XS_ENTITY_NAME = "ENTITY";
-   public static final String XS_ENTITIES_NAME = "ENTITIES";
-   public static final String XS_INTEGER_NAME = "integer";
-   public static final String XS_NONPOSITIVEINTEGER_NAME = "nonPositiveInteger";
-   public static final String XS_NEGATIVEINTEGER_NAME = "negativeInteger";
-   public static final String XS_LONG_NAME = "long";
-   public static final String XS_INT_NAME = "int";
-   public static final String XS_SHORT_NAME = "short";
-   public static final String XS_BYTE_NAME = "byte";
-   public static final String XS_NONNEGATIVEINTEGER_NAME = "nonNegativeInteger";
-   public static final String XS_UNSIGNEDLONG_NAME = "unsignedLong";
-   public static final String XS_UNSIGNEDINT_NAME = "unsignedInt";
-   public static final String XS_UNSIGNEDSHORT_NAME = "unsignedShort";
-   public static final String XS_UNSIGNEDBYTE_NAME = "unsignedByte";
-   public static final String XS_POSITIVEINTEGER_NAME = "positiveInteger";
-
-   public static final int XS_INT = XS_INT_NAME.hashCode();
-   public static final int XS_LONG = XS_LONG_NAME.hashCode();
-   public static final int XS_SHORT = XS_SHORT_NAME.hashCode();
-   public static final int XS_FLOAT = XS_FLOAT_NAME.hashCode();
-   public static final int XS_DOUBLE = XS_DOUBLE_NAME.hashCode();
-   public static final int XS_BOOLEAN = XS_BOOLEAN_NAME.hashCode();
-   public static final int XS_BYTE = XS_BYTE_NAME.hashCode();
-   public static final int XS_STRING = XS_STRING_NAME.hashCode();
-   public static final int XS_INTEGER = XS_INTEGER_NAME.hashCode();
-   public static final int XS_DECIMAL = XS_DECIMAL_NAME.hashCode();
-   public static final int XS_DATETIME = XS_DATETIME_NAME.hashCode();
-   public static final int XS_QNAME = XS_QNAME_NAME.hashCode();
-   public static final int XS_ANYURI = XS_ANYURI_NAME.hashCode();
-   public static final int XS_UNSIGNEDLONG = XS_UNSIGNEDLONG_NAME.hashCode();
-   public static final int XS_UNSIGNEDINT = XS_UNSIGNEDINT_NAME.hashCode();
-   public static final int XS_UNSIGNEDSHORT = XS_UNSIGNEDSHORT_NAME.hashCode();
-   public static final int XS_UNSIGNEDBYTE = XS_UNSIGNEDBYTE_NAME.hashCode();
-   public static final int XS_DATE = XS_DATE_NAME.hashCode();
-   public static final int XS_TIME = XS_TIME_NAME.hashCode();
-   public static final int XS_BASE64BINARY = XS_BASE64BINARY_NAME.hashCode();
-   public static final int XS_HEXBINARY = XS_HEXBINARY_NAME.hashCode();
-   public static final int XS_ANYSIMPLETYPE = XS_ANYSIMPLETYPE_NAME.hashCode();
-   public static final int XS_DURATION = XS_DURATION_NAME.hashCode();
-   public static final int XS_GYEARMONTH = XS_GYEARMONTH_NAME.hashCode();
-   public static final int XS_GYEAR = XS_GYEAR_NAME.hashCode();
-   public static final int XS_GMONTHDAY = XS_GMONTHDAY_NAME.hashCode();
-   public static final int XS_GMONTH = XS_GMONTH_NAME.hashCode();
-   public static final int XS_GDAY = XS_GDAY_NAME.hashCode();
-   public static final int XS_NORMALIZEDSTRING = XS_NORMALIZEDSTRING_NAME.hashCode();
-   public static final int XS_TOKEN = XS_TOKEN_NAME.hashCode();
-   public static final int XS_LANGUAGE = XS_LANGUAGE_NAME.hashCode();
-   public static final int XS_NAME = XS_NAME_NAME.hashCode();
-   public static final int XS_NCNAME = XS_NCNAME_NAME.hashCode();
-   public static final int XS_ID = XS_ID_NAME.hashCode();
-   public static final int XS_NMTOKEN = XS_NMTOKEN_NAME.hashCode();
-   public static final int XS_NMTOKENS = XS_NMTOKENS_NAME.hashCode();
-   public static final int XS_NONPOSITIVEINTEGER = XS_NONPOSITIVEINTEGER_NAME.hashCode();
-   public static final int XS_NEGATIVEINTEGER = XS_NEGATIVEINTEGER_NAME.hashCode();
-   public static final int XS_NONNEGATIVEINTEGER = XS_NONNEGATIVEINTEGER_NAME.hashCode();
-   public static final int XS_POSITIVEINTEGER = XS_POSITIVEINTEGER_NAME.hashCode();
-   public static final int XS_NOTATION = XS_NOTATION_NAME.hashCode();
-   public static final int XS_IDREF = XS_IDREF_NAME.hashCode();
-   public static final int XS_IDREFS = XS_IDREFS_NAME.hashCode();
-   public static final int XS_ENTITY = XS_ENTITY_NAME.hashCode();
-   public static final int XS_ENTITIES = XS_ENTITIES_NAME.hashCode();
-
-   public static final TypeBinding STRING = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return value;
-      }
-
-      public String marshal(Object value)
-      {
-         return (String)value;
-      }
-   };
-
-   public static final TypeBinding INT = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return Integer.valueOf(value);
-      }
-
-      public String marshal(Object value)
-      {
-         return String.valueOf(value);
-      }
-   };
-
-   public static final TypeBinding LONG = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return Long.valueOf(value);
-      }
-
-      public String marshal(Object value)
-      {
-         return String.valueOf(value);
-      }
-   };
-
-   public static final TypeBinding DOUBLE = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return Double.valueOf(value);
-      }
-
-      public String marshal(Object value)
-      {
-         return String.valueOf(value);
-      }
-   };
-
-   public static final TypeBinding FLOAT = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return Float.valueOf(value);
-      }
-
-      public String marshal(Object value)
-      {
-         return String.valueOf(value);
-      }
-   };
-
-   public static final TypeBinding SHORT = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return Short.valueOf(value);
-      }
-
-      public String marshal(Object value)
-      {
-         return String.valueOf(value);
-      }
-   };
-
-   public static final TypeBinding BYTE = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return Byte.valueOf(value);
-      }
-
-      public String marshal(Object value)
-      {
-         return String.valueOf(value);
-      }
-   };
-
-   public static final TypeBinding CHAR = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return value == null ? null : new Character(value.charAt(0));
-      }
-
-      public String marshal(Object value)
-      {
-         return String.valueOf(value);
-      }
-   };
-
-   public static final TypeBinding JAVA_UTIL_DATE = new TypeBinding()
-   {
-      public Object unmarshal(String value)
-      {
-         return unmarshalDate(value).getTime();
-      }
-
-      public String marshal(Object value)
-      {
-         Calendar c = Calendar.getInstance();
-         c.setTime((java.util.Date)value);
-         return marshalDate(c);
-      }
-   };
-
-   // check for uniqueness of hashCode's
-   static
-   {
-      int[] codes = new int[45];
-      String[] names = new String[codes.length];
-      int i = 0;
-
-      names[i] = XS_INT_NAME;
-      codes[i++] = XS_INT;
-
-      names[i] = XS_LONG_NAME;
-      codes[i++] = XS_LONG;
-
-      names[i] = XS_SHORT_NAME;
-      codes[i++] = XS_SHORT;
-
-      names[i] = XS_FLOAT_NAME;
-      codes[i++] = XS_FLOAT;
-
-      names[i] = XS_DOUBLE_NAME;
-      codes[i++] = XS_DOUBLE;
-
-      names[i] = XS_BOOLEAN_NAME;
-      codes[i++] = XS_BOOLEAN;
-
-      names[i] = XS_BYTE_NAME;
-      codes[i++] = XS_BYTE;
-
-      names[i] = XS_STRING_NAME;
-      codes[i++] = XS_STRING;
-
-      names[i] = XS_INTEGER_NAME;
-      codes[i++] = XS_INTEGER;
-
-      names[i] = XS_DECIMAL_NAME;
-      codes[i++] = XS_DECIMAL;
-
-      names[i] = XS_DATETIME_NAME;
-      codes[i++] = XS_DATETIME;
-
-      names[i] = XS_QNAME_NAME;
-      codes[i++] = XS_QNAME;
-
-      names[i] = XS_ANYURI_NAME;
-      codes[i++] = XS_ANYURI;
-
-      names[i] = XS_UNSIGNEDINT_NAME;
-      codes[i++] = XS_UNSIGNEDINT;
-
-      names[i] = XS_UNSIGNEDSHORT_NAME;
-      codes[i++] = XS_UNSIGNEDSHORT;
-
-      names[i] = XS_UNSIGNEDBYTE_NAME;
-      codes[i++] = XS_UNSIGNEDBYTE;
-
-      names[i] = XS_DATE_NAME;
-      codes[i++] = XS_DATE;
-
-      names[i] = XS_TIME_NAME;
-      codes[i++] = XS_TIME;
-
-      names[i] = XS_BASE64BINARY_NAME;
-      codes[i++] = XS_BASE64BINARY;
-
-      names[i] = XS_HEXBINARY_NAME;
-      codes[i++] = XS_HEXBINARY;
-
-      names[i] = XS_ANYSIMPLETYPE_NAME;
-      codes[i++] = XS_ANYSIMPLETYPE;
-
-      names[i] = XS_DURATION_NAME;
-      codes[i++] = XS_DURATION;
-
-      names[i] = XS_GYEARMONTH_NAME;
-      codes[i++] = XS_GYEARMONTH;
-
-      names[i] = XS_GYEAR_NAME;
-      codes[i++] = XS_GYEAR;
-
-      names[i] = XS_GMONTHDAY_NAME;
-      codes[i++] = XS_GMONTHDAY;
-
-      names[i] = XS_GMONTH_NAME;
-      codes[i++] = XS_GMONTH;
-
-      names[i] = XS_GDAY_NAME;
-      codes[i++] = XS_GDAY;
-
-      names[i] = XS_NORMALIZEDSTRING_NAME;
-      codes[i++] = XS_NORMALIZEDSTRING;
-
-      names[i] = XS_TOKEN_NAME;
-      codes[i++] = XS_TOKEN;
-
-      names[i] = XS_LANGUAGE_NAME;
-      codes[i++] = XS_LANGUAGE;
-
-      names[i] = XS_NAME_NAME;
-      codes[i++] = XS_NAME;
-
-      names[i] = XS_NCNAME_NAME;
-      codes[i++] = XS_NCNAME;
-
-      names[i] = XS_ID_NAME;
-      codes[i++] = XS_ID;
-
-      names[i] = XS_NMTOKEN_NAME;
-      codes[i++] = XS_NMTOKEN;
-
-      names[i] = XS_NMTOKENS_NAME;
-      codes[i++] = XS_NMTOKENS;
-
-      names[i] = XS_NONPOSITIVEINTEGER_NAME;
-      codes[i++] = XS_NONPOSITIVEINTEGER;
-
-      names[i] = XS_NONNEGATIVEINTEGER_NAME;
-      codes[i++] = XS_NONNEGATIVEINTEGER;
-
-      names[i] = XS_POSITIVEINTEGER_NAME;
-      codes[i++] = XS_POSITIVEINTEGER;
-
-      names[i] = XS_NEGATIVEINTEGER_NAME;
-      codes[i++] = XS_NEGATIVEINTEGER;
-
-      names[i] = XS_UNSIGNEDLONG_NAME;
-      codes[i++] = XS_UNSIGNEDLONG;
-
-      names[i] = XS_NOTATION_NAME;
-      codes[i++] = XS_NOTATION;
-
-      names[i] = XS_IDREF_NAME;
-      codes[i++] = XS_IDREF;
-
-      names[i] = XS_IDREFS_NAME;
-      codes[i++] = XS_IDREFS;
-
-      names[i] = XS_ENTITY_NAME;
-      codes[i++] = XS_ENTITY;
-
-      names[i] = XS_ENTITIES_NAME;
-      codes[i++] = XS_ENTITIES;
-
-      Logger log = Logger.getLogger(SimpleTypeBindings.class);
-      boolean allAreUnique = true;
-      for(int outer = 0; outer < names.length; ++outer)
-      {
-         int outerCode = codes[outer];
-         String outerName = names[outer];
-
-         for(int inner = outer + 1; inner < names.length; ++inner)
-         {
-            int innerCode = codes[inner];
-            String innerName = names[inner];
-
-            if(outerCode == innerCode)
-            {
-               log.error("Types have the same hash code " + outerCode + ": " + outerName + " and " + innerName);
-               allAreUnique = false;
-            }
-         }
-      }
-
-      if(!allAreUnique)
-      {
-         throw new IllegalStateException("Not all the schema types have unique hash codes! See log for more details.");
-      }
-   }
-
-   public static Class classForType(String xsdType, boolean nillable)
-   {
-      Class result;
-      int typeCode = xsdType.hashCode();
-      if(typeCode == XS_INT)
-      {
-         result = nillable ? Integer.class : int.class;
-      }
-      else if(typeCode == XS_LONG)
-      {
-         result = nillable ? Long.class : long.class;
-      }
-      else if(typeCode == XS_SHORT)
-      {
-         result = nillable ? Short.class : short.class;
-      }
-      else if(typeCode == XS_BYTE)
-      {
-         result = nillable ? Byte.class : byte.class;
-      }
-      else if(typeCode == XS_FLOAT)
-      {
-         result = nillable ? Float.class : float.class;
-      }
-      else if(typeCode == XS_DOUBLE)
-      {
-         result = nillable ? Double.class : double.class;
-      }
-      else if(typeCode == XS_BOOLEAN)
-      {
-         result = nillable ? Boolean.class : boolean.class;
-      }
-      else if(typeCode == XS_STRING)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_INTEGER)
-      {
-         result = BigInteger.class;
-      }
-      else if(typeCode == XS_DECIMAL)
-      {
-         result = BigDecimal.class;
-      }
-      else if(typeCode == XS_DATETIME)
-      {
-         result = java.util.Calendar.class;
-      }
-      else if(typeCode == XS_QNAME)
-      {
-         result = QName.class;
-      }
-      else if(typeCode == XS_ANYURI)
-      {
-         // anyUri is by default bound to java.net.URI for now. The following is the warning from JAXB2.0:
-         //
-         // Design Note � xs:anyURI is not bound to java.net.URI by default since not all
-         // possible values of xs:anyURI can be passed to the java.net.URI constructor. Using
-         // a global JAXB customization described in Section 7.9, �<javaType>
-         // Declaration", a JAXB user can override the default mapping to map xs:anyURI to
-         // java.net.URI.
-         //
-         result = java.net.URI.class;
-      }
-      else if(typeCode == XS_UNSIGNEDLONG)
-      {
-         result = BigInteger.class;
-      }
-      else if(typeCode == XS_UNSIGNEDINT)
-      {
-         result = nillable ? Long.class : long.class;
-      }
-      else if(typeCode == XS_UNSIGNEDSHORT)
-      {
-         result = nillable ? Integer.class : int.class;
-      }
-      else if(typeCode == XS_UNSIGNEDBYTE)
-      {
-         result = nillable ? Short.class : short.class;
-      }
-      else if(typeCode == XS_DATE)
-      {
-         result = Calendar.class;
-      }
-      else if(typeCode == XS_TIME)
-      {
-         result = Calendar.class;
-      }
-      else if(typeCode == XS_BASE64BINARY)
-      {
-         result = byte[].class;
-      }
-      else if(typeCode == XS_HEXBINARY)
-      {
-         result = byte[].class;
-      }
-      else if(typeCode == XS_ANYSIMPLETYPE)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_DURATION)
-      {
-         // todo XS_DURATION
-         throw new IllegalStateException("Recognized but not supported xsdType: " + XS_DURATION_NAME);
-      }
-      else if(typeCode == XS_GYEARMONTH)
-      {
-         result = Calendar.class;
-      }
-      else if(typeCode == XS_GYEAR)
-      {
-         result = Calendar.class;
-      }
-      else if(typeCode == XS_GMONTHDAY)
-      {
-         result = Calendar.class;
-      }
-      else if(typeCode == XS_GMONTH)
-      {
-         result = Calendar.class;
-      }
-      else if(typeCode == XS_GDAY)
-      {
-         result = Calendar.class;
-      }
-      else if(typeCode == XS_NORMALIZEDSTRING)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_TOKEN)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_LANGUAGE)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_NAME)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_NCNAME)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_ID)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_NMTOKEN)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_NMTOKENS)
-      {
-         result = String[].class;
-      }
-      else if(typeCode == XS_NONPOSITIVEINTEGER)
-      {
-         result = BigInteger.class;
-      }
-      else if(typeCode == XS_NEGATIVEINTEGER)
-      {
-         result = BigInteger.class;
-      }
-      else if(typeCode == XS_NONNEGATIVEINTEGER)
-      {
-         result = BigInteger.class;
-      }
-      else if(typeCode == XS_POSITIVEINTEGER)
-      {
-         result = BigInteger.class;
-      }
-      else if(typeCode == XS_NOTATION)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_IDREF)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_IDREFS)
-      {
-         result = String[].class;
-      }
-      else if(typeCode == XS_ENTITY)
-      {
-         result = String.class;
-      }
-      else if(typeCode == XS_ENTITIES)
-      {
-         result = String[].class;
-      }
-      else
-      {
-         throw new IllegalStateException("Not supported xsdType: " + xsdType + ", hashCode=" + xsdType.hashCode());
-      }
-      return result;
-   }
-
-   public static Object unmarshal(String xsdType, String value, NamespaceContext nsCtx)
-   {
-      if (xsdType == null)
-         throw new IllegalArgumentException("Schema type cannot be null");
-      if (value == null)
-         throw new IllegalArgumentException("Value string cannot be null");
-
-      int typeCode = xsdType.hashCode();
-      Object result;
-      if(typeCode == XS_INT)
-      {
-         result = Integer.valueOf(value);
-      }
-      else if(typeCode == XS_LONG)
-      {
-         result = Long.valueOf(value);
-      }
-      else if(typeCode == XS_SHORT)
-      {
-         result = Short.valueOf(value);
-      }
-      else if(typeCode == XS_BYTE)
-      {
-         result = Byte.valueOf(value);
-      }
-      else if(typeCode == XS_FLOAT)
-      {
-         if("INF".equals(value))
-         {
-            result = new Float(Float.POSITIVE_INFINITY);
-         }
-         else if("-INF".equals(value))
-         {
-            result = new Float(Float.NEGATIVE_INFINITY);
-         }
-         else
-         {
-            result = Float.valueOf(value);
-         }
-      }
-      else if(typeCode == XS_DOUBLE)
-      {
-         if("INF".equals(value))
-         {
-            result = new Double(Double.POSITIVE_INFINITY);
-         }
-         else if("-INF".equals(value))
-         {
-            result = new Double(Double.NEGATIVE_INFINITY);
-         }
-         else
-         {
-            result = Double.valueOf(value);
-         }
-      }
-      else if(typeCode == XS_BOOLEAN)
-      {
-         if(value.length() == 1)
-         {
-            switch(value.charAt(0))
-            {
-               case '1':
-                  result = Boolean.TRUE;
-                  break;
-               case '0':
-                  result = Boolean.FALSE;
-                  break;
-               default:
-                  throw new JBossXBValueFormatException("An instance of a datatype that is defined as ?boolean? can have the following legal literals" +
-                     " {true, false, 1, 0}. But got: " + value
-                  );
-            }
-         }
-         else
-         {
-            result = Boolean.valueOf(value);
-         }
-      }
-      else if(typeCode == XS_STRING)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_INTEGER)
-      {
-         result = new BigInteger(value);
-      }
-      else if(typeCode == XS_DECIMAL)
-      {
-         result = new BigDecimal(value);
-      }
-      else if(typeCode == XS_DATETIME)
-      {
-         result = unmarshalDateTime(value);
-      }
-      else if(typeCode == XS_QNAME)
-      {
-         result = unmarshalQName(value, nsCtx);
-      }
-      else if(typeCode == XS_ANYURI)
-      {
-         // anyUri is by default bound to java.net.URI for now. The following is the warning from JAXB2.0:
-         //
-         // Design Note � xs:anyURI is not bound to java.net.URI by default since not all
-         // possible values of xs:anyURI can be passed to the java.net.URI constructor. Using
-         // a global JAXB customization described in Section 7.9, �<javaType>
-         // Declaration", a JAXB user can override the default mapping to map xs:anyURI to
-         // java.net.URI.
-         //
-         try
-         {
-            result = new java.net.URI(value);
-         }
-         catch(URISyntaxException e)
-         {
-            throw new JBossXBValueFormatException("Failed to unmarshal anyURI value " + value, e);
-         }
-      }
-      else if(typeCode == XS_UNSIGNEDLONG)
-      {
-         BigInteger d = new BigInteger(value);
-         if(d.doubleValue() < 0 || d.doubleValue() > 18446744073709551615D)
-         {
-            throw new JBossXBValueFormatException("Invalid unsignedLong value: " + value);
-         }
-         result = d;
-      }
-      else if(typeCode == XS_UNSIGNEDINT)
-      {
-         long l = Long.parseLong(value);
-         if(l < 0 || l > 4294967295L)
-         {
-            throw new JBossXBValueFormatException("Invalid unsignedInt value: " + value);
-         }
-         result = new Long(l);
-      }
-      else if(typeCode == XS_UNSIGNEDSHORT)
-      {
-         int i = Integer.parseInt(value);
-         if(i < 0 || i > 65535)
-         {
-            throw new JBossXBValueFormatException("Invalid unsignedShort value: " + value);
-         }
-         result = new Integer(i);
-      }
-      else if(typeCode == XS_UNSIGNEDBYTE)
-      {
-         short s = Short.parseShort(value);
-         if(s < 0 || s > 255)
-         {
-            throw new JBossXBValueFormatException("Invalid unsignedByte value: " + value);
-         }
-         result = new Short(s);
-      }
-      else if(typeCode == XS_DATE)
-      {
-         result = unmarshalDate(value);
-      }
-      else if(typeCode == XS_TIME)
-      {
-         result = unmarshalTime(value);
-      }
-      else if(typeCode == XS_BASE64BINARY)
-      {
-         result = unmarshalBase64(value);
-      }
-      else if(typeCode == XS_HEXBINARY)
-      {
-         result = unmarshalHexBinary(value);
-      }
-      else if(typeCode == XS_ANYSIMPLETYPE)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_DURATION)
-      {
-         // todo XS_DURATION
-         throw new IllegalStateException("Recognized but not supported xsdType: " + XS_DURATION_NAME);
-      }
-      else if(typeCode == XS_GYEARMONTH)
-      {
-         result = unmarshalGYearMonth(value);
-      }
-      else if(typeCode == XS_GYEAR)
-      {
-         result = unmarshalGYear(value);
-      }
-      else if(typeCode == XS_GMONTHDAY)
-      {
-         result = unmarshalGMonthDay(value);
-      }
-      else if(typeCode == XS_GMONTH)
-      {
-         return unmarshalGMonth(value);
-      }
-      else if(typeCode == XS_GDAY)
-      {
-         return unmarshalGDay(value);
-      }
-      else if(typeCode == XS_NORMALIZEDSTRING)
-      {
-         if(isNormalizedString(value))
-         {
-            result = value;
-         }
-         else
-         {
-            throw new JBossXBValueFormatException("Invalid normalizedString value: " + value);
-         }
-      }
-      else if(typeCode == XS_TOKEN)
-      {
-         if(isValidToken(value))
-         {
-            result = value;
-         }
-         else
-         {
-            throw new JBossXBValueFormatException("Invalid token value: " + value);
-         }
-      }
-      else if(typeCode == XS_LANGUAGE)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_NAME)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_NCNAME)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_ID)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_NMTOKEN)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_NMTOKENS)
-      {
-         result = unmarshalNMTokens(value);
-      }
-      else if(typeCode == XS_NONPOSITIVEINTEGER)
-      {
-         result = new BigInteger(value);
-         if(BigInteger.ZERO.compareTo((BigInteger)result) < 0)
-         {
-            throw new JBossXBValueFormatException("Invalid nonPositiveInteger value: " + value);
-         }
-      }
-      else if(typeCode == XS_NEGATIVEINTEGER)
-      {
-         result = new BigInteger(value);
-         if(BigInteger.ZERO.compareTo((BigInteger)result) <= 0)
-         {
-            throw new JBossXBValueFormatException("Invalid negativeInteger value: " + value);
-         }
-      }
-      else if(typeCode == XS_NONNEGATIVEINTEGER)
-      {
-         result = new BigInteger(value);
-         if(BigInteger.ZERO.compareTo((BigInteger)result) > 0)
-         {
-            throw new JBossXBValueFormatException("Invalid nonNegativeInteger value: " + value);
-         }
-      }
-      else if(typeCode == XS_POSITIVEINTEGER)
-      {
-         result = new BigInteger(value);
-         if(BigInteger.ZERO.compareTo((BigInteger)result) >= 0)
-         {
-            throw new JBossXBValueFormatException("Invalid positiveInteger value: " + value);
-         }
-      }
-      else if(typeCode == XS_NOTATION)
-      {
-         // todo NOTATION
-         result = value;
-      }
-      else if(typeCode == XS_IDREF)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_IDREFS)
-      {
-         result = unmarshalIdRefs(value);
-      }
-      else if(typeCode == XS_ENTITY)
-      {
-         result = value;
-      }
-      else if(typeCode == XS_ENTITIES)
-      {
-         result = unmarshalIdRefs(value);
-      }
-      else
-      {
-         throw new IllegalStateException("Not supported xsdType: " + xsdType + ", hashCode=" + xsdType.hashCode());
-      }
-      return result;
-   }
-
-   public static List unmarshalList(String itemType, String value, NamespaceContext nsCtx)
-   {
-      StringTokenizer tokenizer = new StringTokenizer(value);
-      int total = tokenizer.countTokens();
-      List list = new ArrayList(total);
-      for(int i = 0; i < total; ++i)
-      {
-         Object o = unmarshal(itemType, tokenizer.nextToken(), nsCtx);
-         list.add(o);
-      }
-      return list;
-   }
-
-   public static String marshalList(String itemType, List value, NamespaceContext nsCtx)
-   {
-      StringBuffer buf = new StringBuffer();
-      for(int i = 0; i < value.size(); ++i)
-      {
-         String item = marshal(itemType, value.get(i), nsCtx);
-         if(i > 0)
-         {
-            buf.append(' ');
-         }
-         buf.append(item);
-      }
-      return buf.toString();
-   }
-
-   public static Object unmarshal(String value, Class javaType)
-   {
-      Object result;
-      if(String.class == javaType)
-      {
-         result = value;
-      }
-      else if(int.class == javaType || Integer.class == javaType)
-      {
-         result = Integer.valueOf(value);
-      }
-      else if(long.class == javaType || Long.class == javaType)
-      {
-         result = Long.valueOf(value);
-      }
-      else if(double.class == javaType || Double.class == javaType)
-      {
-         result = Double.valueOf(value);
-      }
-      else if(float.class == javaType || Float.class == javaType)
-      {
-         result = Float.valueOf(value);
-      }
-      else if(short.class == javaType || Short.class == javaType)
-      {
-         result = Short.valueOf(value);
-      }
-      else if(byte.class == javaType || Byte.class == javaType)
-      {
-         result = Byte.valueOf(value);
-      }
-      else if(char.class == javaType || Character.class == javaType)
-      {
-         result = new Character(value.charAt(0));
-      }
-      else if(java.util.Date.class == javaType)
-      {
-         final String FORMAT = "yyyy-MM-dd";
-         try
-         {
-            result = new java.text.SimpleDateFormat(FORMAT).parse(value);
-         }
-         catch(ParseException e)
-         {
-            throw new JBossXBRuntimeException(
-               "Failed to parse date accroding to " + FORMAT + " format: " + value + ": " + e.getMessage()
-            );
-         }
-      }
-      else if(Object.class == javaType)
-      {
-         result = value;
-      }
-      else
-      {
-         throw new JBossXBRuntimeException("Unexpected field type " + javaType);
-      }
-
-      return result;
-   }
-
-   public static String marshal(String xsdType, Object value, NamespaceContext nsCtx)
-   {
-      if(value == null)
-      {
-         throw new IllegalArgumentException("Can't marshal null value!");
-      }
-
-      int typeCode = xsdType.hashCode();
-      String result;
-      if(typeCode == XS_INT)
-      {
-         Integer i = (Integer)value;
-         result = i.toString();
-      }
-      else if(typeCode == XS_LONG)
-      {
-         Long l = (Long)value;
-         result = l.toString();
-      }
-      else if(typeCode == XS_SHORT)
-      {
-         Short s = (Short)value;
-         result = s.toString();
-      }
-      else if(typeCode == XS_BYTE)
-      {
-         Byte b = (Byte)value;
-         result = b.toString();
-      }
-      else if(typeCode == XS_FLOAT)
-      {
-         Float f = (Float)value;
-         if(f.floatValue() == Float.POSITIVE_INFINITY)
-         {
-            result = "INF";
-         }
-         else if(f.floatValue() == Float.NEGATIVE_INFINITY)
-         {
-            result = "-INF";
-         }
-         else
-         {
-            result = f.toString();
-         }
-      }
-      else if(typeCode == XS_DOUBLE)
-      {
-         Double d = (Double)value;
-         if(d.doubleValue() == Double.POSITIVE_INFINITY)
-         {
-            result = "INF";
-         }
-         else if(d.doubleValue() == Double.NEGATIVE_INFINITY)
-         {
-            result = "-INF";
-         }
-         else
-         {
-            result = d.toString();
-         }
-      }
-      else if(typeCode == XS_BOOLEAN)
-      {
-         if(value instanceof Boolean)
-         {
-            result = ((Boolean)value).booleanValue() ? "true" : "false";
-         }
-         else if(value instanceof Number)
-         {
-            Number n = (Number)value;
-            switch(n.byteValue())
-            {
-               case 1:
-                  result = "1";
-                  break;
-               case 0:
-                  result = "0";
-                  break;
-               default:
-                  throw new JBossXBValueFormatException("An instance of a datatype that is defined as ?boolean? can have the following legal literals" +
-                     " {true, false, 1, 0}. But got: " + value
-                  );
-            }
-         }
-         else
-         {
-            throw new JBossXBValueFormatException("Java value for XSD boolean type expected to be an instance of java.lang.Boolean or java.lang.Number. But the value is of type " +
-               value.getClass().getName()
-            );
-         }
-      }
-      else if(typeCode == XS_STRING)
-      {
-         result = (String)value;
-      }
-      else if(typeCode == XS_INTEGER)
-      {
-         BigInteger bi = (BigInteger)value;
-         result = bi.toString();
-      }
-      else if(typeCode == XS_DECIMAL)
-      {
-         BigDecimal bd = (BigDecimal)value;
-         result = bd.toString();
-      }
-      else if(typeCode == XS_DATETIME)
-      {
-         Calendar c;
-         if(value.getClass() == java.util.Date.class)
-         {
-            c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
-            c.clear();
-            c.setTime((java.util.Date)value);
-         }
-         else
-         {
-            c = (Calendar)value;
-         }
-         result = marshalDateTime(c);
-      }
-      else if(typeCode == XS_QNAME)
-      {
-         QName qName = (QName)value;
-         result = marshalQName(qName, nsCtx);
-      }
-      else if(typeCode == XS_ANYURI)
-      {
-         java.net.URI u = (java.net.URI)value;
-         result = u.toString();
-      }
-      else if(typeCode == XS_UNSIGNEDLONG)
-      {
-         BigInteger d = (BigInteger)value;
-         if (d.doubleValue() < 0 || d.doubleValue() > 18446744073709551615D)
-         {
-            throw new JBossXBValueFormatException("Invalid unsignedLong value: " + value);
-         }
-         result = d.toString();
-      }
-      else if(typeCode == XS_UNSIGNEDINT)
-      {
-         Long l = (Long)value;
-         if(l.longValue() < 0 || l.longValue() > 4294967295L)
-         {
-            throw new JBossXBValueFormatException("Invalid unsignedInt value: " + value);
-         }
-         result = l.toString();
-      }
-      else if(typeCode == XS_UNSIGNEDSHORT)
-      {
-         Integer i = (Integer)value;
-         if(i.intValue() < 0 || i.intValue() > 65535)
-         {
-            throw new JBossXBValueFormatException("Invalid unsignedShort value: " + value);
-         }
-         result = i.toString();
-      }
-      else if(typeCode == XS_UNSIGNEDBYTE)
-      {
-         Short s = (Short)value;
-         if(s.shortValue() < 0 || s.shortValue() > 255)
-         {
-            throw new JBossXBValueFormatException("Invalid unsignedByte value: " + value);
-         }
-         result = s.toString();
-      }
-      else if(typeCode == XS_DATE)
-      {
-         Calendar c = (Calendar)value;
-         result = marshalDate(c);
-      }
-      else if(typeCode == XS_TIME)
-      {
-         Calendar c = (Calendar)value;
-         result = marshalTime(c);
-      }
-      else if(typeCode == XS_BASE64BINARY)
-      {
-         byte[] b = (byte[])value;
-         result = marshalBase64(b);
-      }
-      else if(typeCode == XS_HEXBINARY)
-      {
-         byte[] b = (byte[])value;
-         result = marshalHexBinary(b);
-      }
-      else if(typeCode == XS_ANYSIMPLETYPE)
-      {
-         return (String)value;
-      }
-      else if(typeCode == XS_DURATION)
-      {
-         // todo XS_DURATION
-         throw new IllegalStateException("Recognized but not supported xsdType: " + xsdType);
-      }
-      else if(typeCode == XS_GYEARMONTH)
-      {
-         Calendar c = (Calendar)value;
-         result = marshalGYearMonth(c);
-      }
-      else if(typeCode == XS_GYEAR)
-      {
-         Calendar c = (Calendar)value;
-         result = marshalGYear(c);
-      }
-      else if(typeCode == XS_GMONTHDAY)
-      {
-         Calendar c = (Calendar)value;
-         result = marshalGMonthDay(c);
-      }
-      else if(typeCode == XS_GMONTH)
-      {
-         Calendar c = (Calendar)value;
-         result = marshalGMonth(c);
-      }
-      else if(typeCode == XS_GDAY)
-      {
-         Calendar c = (Calendar)value;
-         result = marshalGDay(c);
-      }
-      else if(typeCode == XS_NORMALIZEDSTRING)
-      {
-         String s = (String)value;
-         if(isNormalizedString(s))
-         {
-            result = s;
-         }
-         else
-         {
-            throw new JBossXBValueFormatException("Invalid normalizedString value: " + value);
-         }
-      }
-      else if(typeCode == XS_TOKEN)
-      {
-         String s = (String)value;
-         if(isValidToken(s))
-         {
-            result = s;
-         }
-         else
-         {
-            throw new JBossXBValueFormatException("Invalid token value: " + value);
-         }
-      }
-      else if(typeCode == XS_LANGUAGE)
-      {
-         result = (String)value;
-      }
-      else if(typeCode == XS_NAME)
-      {
-         result = (String)value;
-      }
-      else if(typeCode == XS_NCNAME)
-      {
-         result = (String)value;
-      }
-      else if(typeCode == XS_ID)
-      {
-         result = (String)value;
-      }
-      else if(typeCode == XS_NMTOKEN)
-      {
-         result = (String)value;
-      }
-      else if(typeCode == XS_NMTOKENS)
-      {
-         String[] tokens = (String[])value;
-         if(tokens.length > 0)
-         {
-            result = tokens[0];
-            for(int i = 1; i < tokens.length; ++i)
-            {
-               result += ' ' + tokens[i];
-            }
-         }
-         else
-         {
-            result = "";
-         }
-      }
-      else if(typeCode == XS_NONPOSITIVEINTEGER)
-      {
-         BigInteger bi = (BigInteger)value;
-         if(BigInteger.ZERO.compareTo(bi) < 0)
-         {
-            throw new JBossXBValueFormatException("Invalid nonPositiveInteger value: " + value);
-         }
-         result = bi.toString();
-      }
-      else if(typeCode == XS_NEGATIVEINTEGER)
-      {
-         BigInteger bi = (BigInteger)value;
-         if(BigInteger.ZERO.compareTo(bi) <= 0)
-         {
-            throw new JBossXBValueFormatException("Invalid negativeInteger value: " + value);
-         }
-         result = bi.toString();
-      }
-      else if(typeCode == XS_NONNEGATIVEINTEGER)
-      {
-         BigInteger bi = (BigInteger)value;
-         if(BigInteger.ZERO.compareTo(bi) > 0)
-         {
-            throw new JBossXBValueFormatException("Invalid nonNegativeInteger value: " + value);
-         }
-         result = bi.toString();
-      }
-      else if(typeCode == XS_POSITIVEINTEGER)
-      {
-         BigInteger bi = (BigInteger)value;
-         if(BigInteger.ZERO.compareTo(bi) >= 0)
-         {
-            throw new JBossXBValueFormatException("Invalid positiveInteger value: " + value);
-         }
-         result = bi.toString();
-      }
-      else if(typeCode == XS_NOTATION)
-      {
-         // todo NOTATION
-         result = (String)value;
-      }
-      else if(typeCode == XS_IDREF)
-      {
-         result = (String)value;
-      }
-      else if(typeCode == XS_IDREFS)
-      {
-         String[] refs = (String[])value;
-         if(refs.length > 0)
-         {
-            result = refs[0];
-            for(int i = 1; i < refs.length; ++i)
-            {
-               result += ' ' + refs[i];
-            }
-         }
-         else
-         {
-            result = "";
-         }
-      }
-      else if(typeCode == XS_ENTITY)
-      {
-         result = (String)value;
-      }
-      else if(typeCode == XS_ENTITIES)
-      {
-         String[] refs = (String[])value;
-         if(refs.length > 0)
-         {
-            result = refs[0];
-            for(int i = 1; i < refs.length; ++i)
-            {
-               result += ' ' + refs[i];
-            }
-         }
-         else
-         {
-            result = "";
-         }
-      }
-      else
-      {
-         throw new IllegalStateException("Not supported xsdType: " + xsdType + ", hashCode=" + xsdType.hashCode());
-      }
-      return result;
-   }
-
-   public static QName typeQName(Class cls)
-   {
-      if(cls == null)
-      {
-         throw new IllegalArgumentException("The argument must not be null.");
-      }
-
-      QName result = null;
-      if(Integer.class == cls)
-      {
-         result = Constants.QNAME_INT;
-      }
-      else if(cls == Long.class)
-      {
-         result = Constants.QNAME_LONG;
-      }
-      else if(cls == Short.class)
-      {
-         result = Constants.QNAME_SHORT;
-      }
-      else if(cls == Byte.class)
-      {
-         result = Constants.QNAME_BYTE;
-      }
-      else if(cls == Float.class)
-      {
-         result = Constants.QNAME_FLOAT;
-      }
-      else if(cls == Double.class)
-      {
-         result = Constants.QNAME_DOUBLE;
-      }
-      else if(cls == Boolean.class)
-      {
-         result = Constants.QNAME_BOOLEAN;
-      }
-      else if(cls == String.class)
-      {
-         result = Constants.QNAME_STRING;
-      }
-      else if(cls == BigInteger.class)
-      {
-         result = Constants.QNAME_INTEGER;
-      }
-      else if(cls == BigDecimal.class)
-      {
-         result = Constants.QNAME_DECIMAL;
-      }
-      else if(cls == java.util.Date.class || java.util.Calendar.class.isAssignableFrom(cls))
-      {
-         result = Constants.QNAME_DATETIME;
-      }
-      else if(cls == QName.class)
-      {
-         result = Constants.QNAME_QNAME;
-      }
-      else if(cls == java.net.URI.class)
-      {
-         result = Constants.QNAME_ANYURI;
-      }
-      else if(cls == byte[].class)
-      {
-         result = Constants.QNAME_BASE64BINARY;
-      }
-      return result;
-   }
-
-   public static String[] unmarshalNMTokens(String value)
-   {
-      StringTokenizer tokenizer = new StringTokenizer(value);
-      String[] tokens = new String[tokenizer.countTokens()];
-      for(int i = 0; i < tokens.length; ++i)
-      {
-         tokens[i] = tokenizer.nextToken();
-      }
-      return tokens;
-   }
-
-   public static String[] unmarshalIdRefs(String value)
-   {
-      StringTokenizer tokenizer = new StringTokenizer(value);
-      String[] tokens = new String[tokenizer.countTokens()];
-      for(int i = 0; i < tokens.length; ++i)
-      {
-         tokens[i] = tokenizer.nextToken();
-      }
-      return tokens;
-   }
-
-   /**
-    * --MM-DD[timezone]
-    *
-    * @param value
-    * @return unmarshalled Calendar
-    */
-   public static Calendar unmarshalGMonthDay(String value)
-   {
-      if(value.length() < 6 ||
-         value.charAt(0) != '-' ||
-         value.charAt(1) != '-' ||
-         value.charAt(4) != '-')
-      {
-         throw new JBossXBValueFormatException(
-            "gMonthDay value does not follow the format '--MM-DD[timezone]: " + value
-         );
-      }
-
-      Calendar cal = Calendar.getInstance();
-      cal.clear();
-      cal.set(Calendar.MONTH, Integer.parseInt(value.substring(2, 4)) - 1);
-      cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(value.substring(5, 7)));
-      if(value.length() > 7)
-      {
-         cal.setTimeZone(parseTimeZone(value, 7));
-      }
-      return cal;
-   }
-
-   /**
-    * --MM-DD[timezone]
-    *
-    * @param value
-    * @return
-    */
-   public static String marshalGMonthDay(Calendar value)
-   {
-      String result = "--";
-      result += marshalInt(value.get(Calendar.MONTH) + 1, 2);
-      result += '-';
-      result += marshalInt(value.get(Calendar.DAY_OF_MONTH), 2);
-      result += marshalTimeZone(value);
-      return result;
-   }
-
-   /**
-    * --MM[timezone]
-    *
-    * @param value
-    * @return
-    */
-   public static Calendar unmarshalGMonth(String value)
-   {
-      if(value.length() < 4 || value.charAt(0) != '-' || value.charAt(1) != '-')
-      {
-         throw new JBossXBValueFormatException("gMonth value does not follow the format '--MM': " + value);
-      }
-
-      Calendar cal = Calendar.getInstance();
-      cal.clear();
-
-      cal.set(Calendar.MONTH, Integer.parseInt(value.substring(2, 4)) - 1);
-      if(value.length() > 4)
-      {
-         cal.setTimeZone(parseTimeZone(value, 4));
-      }
-      return cal;
-   }
-
-   /**
-    * --MM[timezone]
-    *
-    * @param value
-    * @return
-    */
-   public static String marshalGMonth(Calendar value)
-   {
-      String result = "--";
-      result += marshalInt(value.get(Calendar.MONTH) + 1, 2);
-      result += marshalTimeZone(value);
-      return result;
-   }
-
-   public static Calendar unmarshalGYear(String value)
-   {
-      Calendar cal = Calendar.getInstance();
-      cal.clear();
-      int timeZone = parseGYear(value, 0, cal);
-      if(value.length() > timeZone)
-      {
-         TimeZone tz = parseTimeZone(value, timeZone);
-         cal.setTimeZone(tz);
-      }
-      return cal;
-   }
-
-   public static String marshalGYear(Calendar value)
-   {
-      String result = String.valueOf(value.get(Calendar.YEAR));
-      result += marshalTimeZone(value);
-      return result;
-   }
-
-   /**
-    * Unmarshals gYearDate string following the format [-]CCYY-MM[timezone]
-    *
-    * @param value
-    * @return
-    */
-   public static Calendar unmarshalGYearMonth(String value)
-   {
-      Calendar cal = Calendar.getInstance();
-      cal.clear();
-
-      int month = parseGYear(value, 0, cal);
-      if(value.charAt(month) != '-')
-      {
-         throw new JBossXBValueFormatException(
-            "gYearMonth value does not follow the format '[-]CCYY-MM[timezone]': " + value
-         );
-      }
-
-      cal.set(Calendar.MONTH, Integer.parseInt(value.substring(month + 1, month + 3)) - 1);
-
-      if(value.length() > month + 3)
-      {
-         TimeZone tz = parseTimeZone(value, month + 3);
-         cal.setTimeZone(tz);
-      }
-
-      return cal;
-   }
-
-   /**
-    * [-]CCYY-MM[timezone]
-    *
-    * @param value
-    * @return
-    */
-   public static String marshalGYearMonth(Calendar value)
-   {
-      String result = String.valueOf(value.get(Calendar.YEAR));
-      result += '-';
-      result += marshalInt(value.get(Calendar.MONTH) + 1, 2);
-      result += marshalTimeZone(value);
-      return result;
-   }
-
-   /**
-    * ---DD[timezonePart]
-    *
-    * @param value
-    * @return
-    */
-   public static Calendar unmarshalGDay(String value)
-   {
-      if(value.length() < 5 || value.charAt(0) != '-' || value.charAt(1) != '-' || value.charAt(2) != '-')
-      {
-         throw new NumberFormatException("gDay value does not follow the format (---DD[timezonePart]): " + value);
-      }
-
-      // validate day
-      int day = Integer.parseInt(value.substring(3, 5));
-      if(day < 1 || day > 31)
-      {
-         throw new NumberFormatException("gDay value is not in the interval [1..31]: " + day);
-      }
-
-      // validate timezonePart
-      TimeZone tz = parseTimeZone(value, 5);
-
-      Calendar cal = Calendar.getInstance();
-      cal.clear();
-      if(tz != null)
-      {
-         cal.setTimeZone(tz);
-      }
-      cal.set(Calendar.DAY_OF_MONTH, day);
-
-      return cal;
-   }
-
-   /**
-    * ---DD[timezonePart]
-    *
-    * @param value
-    * @return
-    */
-   public static String marshalGDay(Calendar value)
-   {
-      String result = "---";
-      result += marshalInt(value.get(Calendar.DAY_OF_MONTH), 2);
-      result += marshalTimeZone(value);
-      return result;
-   }
-
-   /**
-    * Parses a string value that represents date following the format defined in
-    * http://www.w3.org/TR/xmlschema-2/#dateTime, i.e. '-'? yyyy '-' mm '-' dd.
-    * Creates an instance of java.util.Calendar and initializes it to the parsed values of the year, month and day.
-    *
-    * @param value string date value
-    * @return equivalent date as an instance of java.util.Calendar.
-    */
-   public static Calendar unmarshalDate(String value)
-   {
-      Calendar cal = Calendar.getInstance();
-      cal.clear();
-
-      int ind = parseDate(value, 0, cal);
-
-      TimeZone tz = null;
-      if(ind < value.length())
-      {
-         tz = parseTimeZone(value, ind);
-      }
-
-      if(tz != null)
-      {
-         cal.setTimeZone(tz);
-      }
-
-      return cal;
-   }
-
-   /**
-    * [-]yyyy-mm-dd
-    *
-    * @param value string date value
-    * @return equivalent date as an instance of java.util.Calendar.
-    */
-   public static String marshalDate(Calendar value)
-   {
-      String result = String.valueOf(value.get(Calendar.YEAR));
-      result += '-';
-      result += marshalInt(value.get(Calendar.MONTH) + 1, 2);
-      result += '-';
-      result += marshalInt(value.get(Calendar.DAY_OF_MONTH), 2);
-      result += marshalTimeZone(value);
-      return result;
-   }
-
-   /**
-    * Parses string representation of time following the format hh:mm:ss:sss with optional timezone indicator.
-    *
-    * @param value
-    * @return
-    */
-   public static Calendar unmarshalTime(String value)
-   {
-      Calendar cal = Calendar.getInstance();
-      cal.clear();
-
-      int tzLoc = parseTime(value, 0, cal);
-
-      TimeZone tz = null;
-      if(value.length() > tzLoc)
-      {
-         tz = parseTimeZone(value, tzLoc);
-      }
-
-      if(tz != null)
-      {
-         cal.setTimeZone(tz);
-      }
-      return cal;
-   }
-
-   /**
-    * hh:mm:ss:sss[timezone]
-    *
-    * @param value
-    * @return
-    */
-   public static String marshalTime(Calendar value)
-   {
-      String result = marshalInt(value.get(Calendar.HOUR_OF_DAY), 2);
-      result += ':';
-      result += marshalInt(value.get(Calendar.MINUTE), 2);
-      result += ':';
-      result += marshalInt(value.get(Calendar.SECOND), 2);
-      result += '.';
-
-      int millis = value.get(Calendar.MILLISECOND);
-      if(millis > 99)
-      {
-         result += String.valueOf(millis);
-      }
-      else if(millis > 9)
-      {
-         result += "0" + String.valueOf(millis);
-      }
-      else
-      {
-         result += "00" + String.valueOf(millis);
-      }
-
-      result += marshalTimeZone(value);
-      return result;
-   }
-
-   /**
-    * Parses string value of datetime following the format [-]yyyy-mm-ddThh:mm:ss[.s+][timezone].
-    *
-    * @param value
-    * @return
-    */
-   public static Calendar unmarshalDateTime(String value)
-   {
-      Calendar cal = Calendar.getInstance();
-      cal.clear();
-
-      int timeInd = parseDate(value, 0, cal);
-      if(value.charAt(timeInd) != 'T')
-      {
-         throw new JBossXBValueFormatException("DateTime value does not follow the format '[-]yyyy-mm-ddThh:mm:ss[.s+][timezone]': expected 'T' but got " +
-            value.charAt(timeInd)
-         );
-      }
-
-      int tzStart = parseTime(value, timeInd + 1, cal);
-
-      TimeZone tz = null;
-      if(value.length() > tzStart)
-      {
-         tz = parseTimeZone(value, tzStart);
-      }
-
-      if(tz != null)
-      {
-         cal.setTimeZone(tz);
-      }
-
-      return cal;
-   }
-
-   /**
-    * [-]yyyy-mm-ddThh:mm:ss[.s+][timezone]
-    *
-    * @param value
-    * @return
-    */
-   public static String marshalDateTime(Calendar value)
-   {
-      String result = marshalInt(value.get(Calendar.YEAR), 4);
-      result += '-';
-      result += marshalInt(value.get(Calendar.MONTH) + 1, 2);
-      result += '-';
-      result += marshalInt(value.get(Calendar.DAY_OF_MONTH), 2);
-      result += 'T';
-      result += marshalInt(value.get(Calendar.HOUR_OF_DAY), 2);
-      result += ':';
-      result += marshalInt(value.get(Calendar.MINUTE), 2);
-      result += ':';
-      result += marshalInt(value.get(Calendar.SECOND), 2);
-      result += '.';
-
-      int millis = value.get(Calendar.MILLISECOND);
-      if(millis > 99)
-      {
-         result += String.valueOf(millis);
-      }
-      else if(millis > 9)
-      {
-         result += "0" + String.valueOf(millis);
-      }
-      else
-      {
-         result += "00" + String.valueOf(millis);
-      }
-
-      result += marshalTimeZone(value);
-      return result;
-   }
-
-   /**
-    * Converts hexBinary value into byte array by encoding two subsequent hexadecimal digits into one byte.
-    *
-    * @param value
-    * @return
-    */
-   public static byte[] unmarshalHexBinary(String value)
-   {
-      if(value.length() % 2 != 0)
-      {
-         throw new IllegalArgumentException("hexBinary value must have even length.");
-      }
-
-      ByteArrayOutputStream baos = new ByteArrayOutputStream();
-      for(int i = 0; i < value.length(); i += 2)
-      {
-         char c1 = value.charAt(i);
-         char c2 = value.charAt(i + 1);
-         byte b = 0;
-         if((c1 >= '0') && (c1 <= '9'))
-         {
-            b += ((c1 - '0') * 16);
-         }
-         else if((c1 >= 'a') && (c1 <= 'f'))
-         {
-            b += ((c1 - 'a' + 10) * 16);
-         }
-         else if((c1 >= 'A') && (c1 <= 'F'))
-         {
-            b += ((c1 - 'A' + 10) * 16);
-         }
-         else
-         {
-            throw new IllegalArgumentException("hexBinary value contains illegal character: " + value);
-         }
-
-         if((c2 >= '0') && (c2 <= '9'))
-         {
-            b += (c2 - '0');
-         }
-         else if((c2 >= 'a') && (c2 <= 'f'))
-         {
-            b += (c2 - 'a' + 10);
-         }
-         else if((c2 >= 'A') && (c2 <= 'F'))
-         {
-            b += (c2 - 'A' + 10);
-         }
-         else
-         {
-            throw new IllegalArgumentException("hexBinary value contains illegal character: " + value);
-         }
-         baos.write(b);
-      }
-      return (baos.toByteArray());
-   }
-
-   /**
-    * @param value
-    * @return
-    */
-   public static String marshalHexBinary(byte[] value)
-   {
-      StringBuffer result = new StringBuffer(2 * value.length);
-      for(int i = 0; i < value.length; ++i)
-      {
-         result.append(convertDigit((value[i] >> 4)));
-         result.append(convertDigit((value[i] & 0x0f)));
-      }
-      return result.toString();
-   }
-
-   public static boolean isNormalizedString(String value)
-   {
-      for(int i = 0; i < value.length(); ++i)
-      {
-         char c = value.charAt(i);
-         if(c == 0x09 || c == 0x0A || c == 0x0D)
-         {
-            return false;
-         }
-      }
-      return true;
-   }
-
-   /**
-    * Converts base64Binary value into byte array.
-    */
-   public static byte[] unmarshalBase64(String value)
-   {
-      return Base64.decode(value);
-   }
-
-   /**
-    * Converts byte array into a base64Binary value.
-    */
-   public static String marshalBase64(byte[] value)
-   {
-      return Base64.encodeBytes(value);
-   }
-
-   /**
-    * Converts a value of form prefix:localPart into a QName
-    * The prefix must be registered previously
-    */
-   public static QName unmarshalQName(String value, NamespaceContext nsRegistry)
-   {
-      int colonIndex = value.lastIndexOf(":");
-      if(colonIndex > 0)
-      {
-         String prefix = value.substring(0, colonIndex);
-         String nsURI = nsRegistry.getNamespaceURI(prefix);
-         if(nsURI == null)
-         {
-            throw new IllegalStateException("No namespace URI registered for prefix: " + prefix);
-         }
-
-         String localPart = value.substring(colonIndex + 1);
-         return new QName(nsURI, localPart, prefix);
-      }
-      else
-      {
-         return new QName(value);
-      }
-   }
-
-   /**
-    * Converts a QName value to form prefix:localPart
-    * The prefix must be registered previously
-    */
-   public static String marshalQName(QName value, NamespaceContext nsRegistry)
-   {
-      String nsURI = value.getNamespaceURI();
-      if(nsURI.length() > 0)
-      {
-         String prefix;
-         if(nsRegistry != null)
-         {
-            prefix = nsRegistry.getPrefix(nsURI);
-            if(prefix == null)
-            {
-               throw new IllegalStateException("Namespace URI not registered: " + nsURI);
-            }
-         }
-         else
-         {
-            // WARN
-            prefix = value.getPrefix();
-         }
-         return prefix.length() > 0 ? prefix + ":" + value.getLocalPart() : value.getLocalPart();
-      }
-      else
-      {
-         return value.getLocalPart();
-      }
-   }
-
-   public static boolean isValidToken(String value)
-   {
-      if(value != null && value.length() > 0)
-      {
-         if(value.charAt(0) == 0x20 || value.charAt(value.length() - 1) == 0x20)
-         {
-            return false;
-         }
-
-         for(int i = 0; i < value.length(); ++i)
-         {
-            char c = value.charAt(i);
-            if(c == 0x09 || c == 0x0A || c == 0x0D)
-            {
-               return false;
-            }
-            else if(c == 0x20)
-            {
-               if(i + 1 < value.length() && value.charAt(i + 1) == 0x20)
-               {
-                  return false;
-               }
-            }
-         }
-      }
-
-      return true;
-   }
-
-   private static int parseGYear(String value, int start, Calendar cal)
-   {
-      int negative = (value.charAt(start) == '-' ? 1 : 0);
-      cal.set(Calendar.YEAR, Integer.parseInt(value.substring(start, start + 4 + negative)));
-      return start + 4 + negative;
-   }
-
-   private static int parseDate(String value, int start, Calendar cal)
-   {
-      if(value.charAt(start) == '-')
-      {
-         ++start;
-      }
-
-      if(!Character.isDigit(value.charAt(start)))
-      {
-         throw new JBossXBValueFormatException(
-            "Date value does not follow the format '-'? yyyy '-' mm '-' dd: " + value
-         );
-      }
-
-      int nextToken = value.indexOf('-', start);
-      if(nextToken == -1 || nextToken - start < 4)
-      {
-         throw new JBossXBValueFormatException(
-            "Date value does not follow the format '-'? yyyy '-' mm '-' dd: " + value
-         );
-      }
-
-      int year = Integer.parseInt(value.substring(start, nextToken));
-
-      start = nextToken + 1;
-      nextToken = value.indexOf('-', start);
-      if(nextToken == -1 || nextToken - start < 2)
-      {
-         throw new JBossXBValueFormatException(
-            "Date value does not follow the format '-'? yyyy '-' mm '-' dd: " + value
-         );
-      }
-
-      int month = Integer.parseInt(value.substring(start, nextToken));
-
-      start = nextToken + 1;
-      nextToken += 3;
-      int day = Integer.parseInt(value.substring(start, nextToken));
-
-      cal.set(Calendar.YEAR, year);
-      cal.set(Calendar.MONTH, month - 1);
-      cal.set(Calendar.DAY_OF_MONTH, day);
-
-      return nextToken;
-   }
-
-   /**
-    * Parses string value of time following the format 'hh:mm:ss:sss' and sets time value on the passed in
-    * java.util.Calendar instace.
-    *
-    * @param value
-    * @param cal
-    */
-   private static int parseTime(String value, int start, Calendar cal)
-   {
-      if(value.charAt(start + 2) != ':' || value.charAt(start + 5) != ':')
-      {
-         throw new JBossXBValueFormatException("Time value does not follow the format 'hh:mm:ss.[s+]': " + value);
-      }
-
-      int hh = Integer.parseInt(value.substring(start, start + 2));
-      int mm = Integer.parseInt(value.substring(start + 3, start + 5));
-      int ss = Integer.parseInt(value.substring(start + 6, start + 8));
-
-      int millis = 0;
-
-      int x = start + 8;
-
-      if(value.length() > x && value.charAt(x) == '.')
-      {
-         int mul = 100;
-         for(x += 1; x < value.length(); x++)
-         {
-            char c = value.charAt(x);
-
-            if(Character.isDigit(c))
-            {
-               if(mul != 0)
-               {
-                  millis += Character.digit(c, 10) * mul;
-                  mul = (mul == 1) ? 0 : mul / 10;
-               }
-            }
-            else
-            {
-               break;
-            }
-         }
-      }
-
-      cal.set(Calendar.HOUR_OF_DAY, hh);
-      cal.set(Calendar.MINUTE, mm);
-      cal.set(Calendar.SECOND, ss);
-      cal.set(Calendar.MILLISECOND, millis);
-
-      return x;
-   }
-
-   /**
-    * Parses timzone.
-    * Format: [+/-]HH:MM
-    *
-    * @return
-    */
-   private static TimeZone parseTimeZone(String value, int start)
-   {
-      TimeZone tz;
-      if(value.charAt(start) == '+' || (value.charAt(start) == '-'))
-      {
-         if(value.length() - start == 6 &&
-            Character.isDigit(value.charAt(start + 1)) &&
-            Character.isDigit(value.charAt(start + 2)) &&
-            value.charAt(start + 3) == ':' &&
-            Character.isDigit(value.charAt(start + 4)) &&
-            Character.isDigit(value.charAt(start + 5)))
-         {
-            tz = TimeZone.getTimeZone("GMT" + value.substring(start));
-         }
-         else
-         {
-            throw new NumberFormatException(
-               "Timezone value does not follow the format ([+/-]HH:MM): " + value.substring(start)
-            );
-         }
-      }
-      else if(value.charAt(start) == 'Z')
-      {
-         tz = TimeZone.getTimeZone("GMT");
-      }
-      else
-      {
-         throw new NumberFormatException(
-            "Timezone value does not follow the format ([+/-]HH:MM): " + value.substring(start)
-         );
-      }
-      return tz;
-   }
-
-   /**
-    * Parses timezone.
-    * Format: [+/-]HH:MM
-    *
-    * @return
-    */
-   private static String marshalTimeZone(Calendar value)
-   {
-      int offset = value.get(Calendar.ZONE_OFFSET) + value.get(Calendar.DST_OFFSET);
-      if(offset == 0)
-      {
-         return "Z";
-      }
-
-      DecimalFormat hourFormat = new DecimalFormat("'+'00;-00");
-      DecimalFormat minuteFormat = new DecimalFormat("00");
-
-      int minutes = offset / (1000 * 60);
-      int hours = minutes / 60;
-
-      minutes -= (hours * 60);
-
-      return hourFormat.format(hours) + ":" + minuteFormat.format(minutes);
-   }
-
-   private static String marshalInt(int value, int length)
-   {
-      String result = String.valueOf(value);
-      if(result.length() < length)
-      {
-         while(result.length() < length)
-         {
-            result = '0' + result;
-         }
-      }
-      else if(result.length() > length)
-      {
-         throw new JBossXBValueFormatException(
-            "Can't marshal int value " + value + " to a string with length of " + length
-         );
-      }
-      return result;
-   }
-
-   private static char convertDigit(int value)
-   {
-      value &= 0x0f;
-      if(value >= 10)
-      {
-         return ((char)(value - 10 + 'a'));
-      }
-      else
-      {
-         return ((char)(value + '0'));
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SimpleTypeBindings.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SimpleTypeBindings.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/TypeBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/TypeBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/TypeBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,33 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface TypeBinding
-{
-   Object unmarshal(String value);
-
-   String marshal(Object value);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/TypeBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/TypeBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Unmarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Unmarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Unmarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.xb.binding;
-
-import java.io.InputStream;
-import java.io.Reader;
-
-import org.jboss.xb.binding.parser.JBossXBParser;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.metadata.unmarshalling.DocumentBinding;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface Unmarshaller
-{
-   String VALIDATION = "http://xml.org/sax/features/validation";
-   String NAMESPACES = "http://xml.org/sax/features/namespaces";
-   String NAMESPACE_PREFIXES = "http://xml.org/sax/features/namespace-prefixes";
-   // set some xerces specific features that allow transparent DTD and Schema validation
-   String DYNAMIC_VALIDATION = "http://apache.org/xml/features/validation/dynamic";
-   String SCHEMA_VALIDATION = "http://apache.org/xml/features/validation/schema";
-   String SCHEMA_FULL_CHECKING = "http://apache.org/xml/features/validation/schema-full-checking";
-
-   void setValidation(boolean validation) throws JBossXBException;
-
-   void setNamespaceAware(boolean namespaces) throws JBossXBException;
-
-   void setSchemaValidation(boolean validation) throws JBossXBException;
-   
-   void setFeature(String feature, boolean value) throws JBossXBException;
-
-   void setEntityResolver(EntityResolver entityResolver) throws JBossXBException;
-
-   void setErrorHandler(ErrorHandler errorHandler);
-
-   void mapFactoryToNamespace(ObjectModelFactory factory, String namespaceUri);
-
-   Object unmarshal(String xmlFile, JBossXBParser.ContentHandler handler) throws JBossXBException;
-
-   Object unmarshal(String xmlFile) throws JBossXBException;
-
-   Object unmarshal(String xml, SchemaBinding schemaBinding) throws JBossXBException;
-
-   Object unmarshal(Reader xmlReader, SchemaBinding schemaBinding) throws JBossXBException;
-
-   Object unmarshal(InputStream xmlStream, SchemaBinding schemaBinding) throws JBossXBException;
-
-   Object unmarshal(String xml, SchemaBindingResolver schemaResolver) throws JBossXBException;
-
-   Object unmarshal(Reader xmlReader, SchemaBindingResolver schemaResolver) throws JBossXBException;
-
-   Object unmarshal(InputStream xmlStream, SchemaBindingResolver schemaResolver) throws JBossXBException;
-
-   Object unmarshal(Reader reader, ObjectModelFactory factory, Object root) throws JBossXBException;
-
-   Object unmarshal(InputStream is, ObjectModelFactory factory, Object root) throws JBossXBException;
-
-   Object unmarshal(String systemId, ObjectModelFactory factory, Object root) throws JBossXBException;
-
-   Object unmarshal(String systemId, ObjectModelFactory factory, DocumentBinding binding) throws JBossXBException;
-
-   Object unmarshal(Reader reader, ObjectModelFactory factory, DocumentBinding binding) throws JBossXBException;
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Unmarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Unmarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerFactory.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,142 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
-import org.jboss.xb.binding.parser.JBossXBParser;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public abstract class UnmarshallerFactory
-{
-   protected Map features;
-   protected Boolean validation = Boolean.TRUE;
-   protected Boolean namespaces = Boolean.TRUE;
-
-   public static UnmarshallerFactory newInstance()
-   {
-      return new UnmarshallerFactoryImpl();
-   }
-
-   public abstract Unmarshaller newUnmarshaller();
-
-   public void setFeature(String name, Object value)
-   {
-      Boolean bValue;
-      if(value == null)
-      {
-         bValue = null;
-      }
-      else if(value instanceof String)
-      {
-         bValue = Boolean.valueOf((String)value);
-      }
-      else if(value instanceof Boolean)
-      {
-         bValue = (Boolean)value;
-      }
-      else
-      {
-         throw new JBossXBRuntimeException(
-            "Allowed feature values are null, 'true, 'false', Boolean.TRUE, Boolean.FALSE. Passed in value: " + value
-         );
-      }
-
-      if(Unmarshaller.VALIDATION.equals(name))
-      {
-         validation = bValue;
-      }
-      else if(Unmarshaller.NAMESPACES.equals(name))
-      {
-         namespaces = bValue;
-      }
-      else
-      {
-         if(features == null)
-         {
-            features = new HashMap();
-         }
-         features.put(name, value);
-      }
-   }
-
-   // Inner
-
-   static class UnmarshallerFactoryImpl
-      extends UnmarshallerFactory
-   {
-      public Unmarshaller newUnmarshaller()
-      {
-         UnmarshallerImpl unmarshaller;
-         try
-         {
-            unmarshaller = new UnmarshallerImpl();
-         }
-         catch(JBossXBException e)
-         {
-            throw new JBossXBRuntimeException(e.getMessage(), e);
-         }
-
-         JBossXBParser parser = unmarshaller.getParser();
-         if(validation != null)
-         {
-            parser.setFeature(Unmarshaller.VALIDATION, validation.booleanValue());
-         }
-
-         if(namespaces != null)
-         {
-            parser.setFeature(Unmarshaller.NAMESPACES, namespaces.booleanValue());
-         }
-
-         if(features != null)
-         {
-            for(Iterator i = features.entrySet().iterator(); i.hasNext();)
-            {
-               Map.Entry entry = (Map.Entry)i.next();
-               if(entry.getValue() != null)
-               {
-                  Boolean value = (Boolean)entry.getValue();
-                  parser.setFeature((String)entry.getKey(), value.booleanValue());
-               }
-            }
-         }
-
-         //parser.setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
-         //parser.setFeature(Unmarshaller.SCHEMA_FULL_CHECKING, true);
-
-         try
-         {
-            parser.setFeature(Unmarshaller.DYNAMIC_VALIDATION, true);
-         }
-         catch(JBossXBRuntimeException e)
-         {
-            // dynamic_validation is a required xerces-specific feature
-         }
-
-         return unmarshaller;
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerFactory.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerFactory.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerImpl.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerImpl.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerImpl.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,207 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.xb.binding;
-
-import java.io.InputStream;
-import java.io.Reader;
-
-import org.jboss.xb.binding.parser.JBossXBParser;
-import org.jboss.xb.binding.parser.sax.SaxJBossXBParser;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler;
-import org.jboss.xb.binding.metadata.unmarshalling.DocumentBinding;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-
-/**
- * Unmarshaller implementation.
- * WARNING: this implementation is not thread-safe.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class UnmarshallerImpl implements Unmarshaller
-{
-   private ObjectModelBuilder builder = new ObjectModelBuilder();
-   private final JBossXBParser parser;
-
-   // Constructor
-
-   /**
-    * The constructor for DTD and XSD client awareness.
-    */
-   public UnmarshallerImpl() throws JBossXBException
-   {
-      parser = new SaxJBossXBParser();
-   }
-
-   public void setValidation(boolean validation) throws JBossXBException
-   {
-      parser.setFeature(VALIDATION, validation);
-   }
-
-   public void setSchemaValidation(boolean validation) throws JBossXBException
-   {
-      parser.setFeature(SCHEMA_VALIDATION, validation);
-   }
-
-   public void setFeature(String feature, boolean value) throws JBossXBException
-   {
-      parser.setFeature(feature, value);
-   }
-
-   public void setNamespaceAware(boolean namespaces) throws JBossXBException
-   {
-      parser.setFeature(NAMESPACES, namespaces);
-   }
-
-   public void setEntityResolver(EntityResolver entityResolver) throws JBossXBException
-   {
-      parser.setEntityResolver(entityResolver);
-   }
-
-   public void setErrorHandler(ErrorHandler errorHandler)
-   {
-      // todo reader.setErrorHandler(errorHandler);
-   }
-
-   public void mapFactoryToNamespace(ObjectModelFactory factory, String namespaceUri)
-   {
-      if(builder == null)
-      {
-         builder = new ObjectModelBuilder();
-      }
-      builder.mapFactoryToNamespace(factory, namespaceUri);
-   }
-
-   public Object unmarshal(String xmlFile) throws JBossXBException
-   {
-      // todo
-      throw new UnsupportedOperationException();
-   }
-
-   public Object unmarshal(String xmlFile, JBossXBParser.ContentHandler handler) throws JBossXBException
-   {
-      parser.parse(xmlFile, handler);
-      return handler.getRoot();
-   }
-
-   public Object unmarshal(String xml, SchemaBinding schemaBinding) throws JBossXBException
-   {
-      SundayContentHandler cHandler = new SundayContentHandler(schemaBinding);
-      parser.parse(xml, cHandler);
-      return cHandler.getRoot();
-   }
-
-   public Object unmarshal(Reader xmlReader, SchemaBinding schemaBinding) throws JBossXBException
-   {
-      SundayContentHandler cHandler = new SundayContentHandler(schemaBinding);
-      parser.parse(xmlReader, cHandler);
-      return cHandler.getRoot();
-   }
-
-   public Object unmarshal(InputStream xmlStream, SchemaBinding schemaBinding) throws JBossXBException
-   {
-      SundayContentHandler cHandler = new SundayContentHandler(schemaBinding);
-      parser.parse(xmlStream, cHandler);
-      return cHandler.getRoot();
-   }
-
-   public Object unmarshal(String xml, SchemaBindingResolver schemaResolver) throws JBossXBException
-   {
-      SundayContentHandler cHandler = new SundayContentHandler(schemaResolver);
-      parser.parse(xml, cHandler);
-      return cHandler.getRoot();
-   }
-
-   public Object unmarshal(Reader xmlReader, SchemaBindingResolver schemaResolver) throws JBossXBException
-   {
-      SundayContentHandler cHandler = new SundayContentHandler(schemaResolver);
-      parser.parse(xmlReader, cHandler);
-      return cHandler.getRoot();
-   }
-
-   public Object unmarshal(InputStream xmlStream, SchemaBindingResolver schemaResolver) throws JBossXBException
-   {
-      SundayContentHandler cHandler = new SundayContentHandler(schemaResolver);
-      parser.parse(xmlStream, cHandler);
-      return cHandler.getRoot();
-   }
-
-   public Object unmarshal(Reader reader, ObjectModelFactory factory, Object root) throws JBossXBException
-   {
-      if(builder == null)
-      {
-         builder = new ObjectModelBuilder();
-      }
-      builder.init(factory, root);
-      parser.parse(reader, builder);
-      return builder.getRoot();
-   }
-
-   public Object unmarshal(InputStream is, ObjectModelFactory factory, Object root) throws JBossXBException
-   {
-      if(builder == null)
-      {
-         builder = new ObjectModelBuilder();
-      }
-      builder.init(factory, root);
-      parser.parse(is, builder);
-      return builder.getRoot();
-   }
-
-   public Object unmarshal(String systemId, ObjectModelFactory factory, Object root) throws JBossXBException
-   {
-      if(builder == null)
-      {
-         builder = new ObjectModelBuilder();
-      }
-      builder.init(factory, root);
-      parser.parse(systemId, builder);
-      return builder.getRoot();
-   }
-
-   public Object unmarshal(String systemId, ObjectModelFactory factory, DocumentBinding binding)
-      throws JBossXBException
-   {
-      if(binding != null)
-      {
-         throw new IllegalStateException("DocumentBinding API is not supported anymore!");
-      }
-      return unmarshal(systemId, factory, (Object)null);
-   }
-
-   public Object unmarshal(Reader reader, ObjectModelFactory factory, DocumentBinding binding) throws JBossXBException
-   {
-      if(binding != null)
-      {
-         throw new IllegalStateException("DocumentBinding API is not supported anymore!");
-      }
-      return unmarshal(reader, factory, (Object)null);
-   }
-
-   JBossXBParser getParser()
-   {
-      return parser;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerImpl.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallerImpl.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallingContext.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallingContext.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallingContext.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,67 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import org.apache.xerces.xs.XSTypeDefinition;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import java.util.Iterator;
-
-/**
- * An interface for content navigation. At the moment it has only one method to get child's content.
- * But it could also implement XPath navigation.
- *
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- */
-public interface UnmarshallingContext
-{
-   /** Construct a QName from a value
-    * @param value A value that is of the form [prefix:]localpart
-    */
-   QName resolveQName(String value);
-
-   /**
-    * @return  all the known namespace URIs
-    */
-   Iterator getNamespaceURIs();
-
-   /**
-    * @return  NamespaceContext instance
-    */
-   NamespaceContext getNamespaceContext();
-
-   /**
-    * Returns child's content.
-    * todo consider deprecating this method
-    * @param namespaceURI
-    * @param qName
-    * @return
-    */
-   String getChildContent(String namespaceURI, String qName);
-
-   /**
-    * @return current element's type definition or null if this info is not available
-    */
-   XSTypeDefinition getType();
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallingContext.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/UnmarshallingContext.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Util.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Util.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Util.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,750 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.StringTokenizer;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-
-import org.apache.xerces.xs.XSImplementation;
-import org.apache.xerces.xs.XSLoader;
-import org.apache.xerces.xs.XSModel;
-import org.jboss.logging.Logger;
-import org.jboss.util.Classes;
-import org.jboss.xb.binding.sunday.unmarshalling.LSInputAdaptor;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.XsdBinderTerminatingErrorHandler;
-import org.w3c.dom.DOMConfiguration;
-import org.w3c.dom.DOMErrorHandler;
-import org.w3c.dom.bootstrap.DOMImplementationRegistry;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSResourceResolver;
-import org.xml.sax.Attributes;
-
-/**
- * Various utilities for XML binding.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public final class Util
-{
-   /**
-    * Characters that are considered to be word separators while convertinging XML names to Java identifiers
-    * according to JAXB 2.0 spec.
-    */
-   public static final char HYPHEN_MINUS = '\u002D';
-   public static final char FULL_STOP = '\u002E';
-   public static final char COLLON = '\u003A';
-   public static final char LOW_LINE = '\u005F';
-   public static final char MIDDLE_DOT = '\u00B7';
-   public static final char GREEK_ANO_TELEIA = '\u0387';
-   public static final char ARABIC_END_OF_AYAH = '\u06DD';
-   public static final char ARABIC_START_OF_RUB_EL_HIZB = '\u06DE';
-
-   private static final Logger log = Logger.getLogger(Util.class);
-
-   private static XSImplementation xsImpl;
-
-   /**
-    * Returns a prefixed name for the passed in QName instance.
-    * If the argument has a prefix, the prefix is used. If not then
-    * local part is returned.
-    *
-    * @param qName  an instance of QName to generate prefix name for
-    * @return generated prefixed name or empty string in case the argument is null
-    */
-   public static String getPrefixedName(QName qName)
-   {
-      String result = "";
-      if(qName != null)
-      {
-         String prefix = qName.getPrefix();
-         if(prefix.length() > 0)
-         {
-            result = prefix + ':' + qName.getLocalPart();
-         }
-         else
-         {
-            result = qName.getLocalPart();
-         }
-      }
-      return result;
-   }
-
-   /**
-    * Returns a prefixed name for passed in QName instance.
-    * If the argument has a prefix then its prefix is used.
-    * If not and the argument has namespace URI then namespace context is used
-    * to get the prefix.
-    *
-    * @param qName  an instance of QName to generate prefix name for
-    * @param nc  an instance of the NamespaceContext
-    * @return generated prefixed name or empty string in case the argument is null
-    */
-   public static String getPrefixedName(QName qName, NamespaceContext nc)
-   {
-      String result = "";
-      if(qName != null)
-      {
-         String prefix = qName.getPrefix();
-         if(prefix.length() > 0)
-         {
-            result = prefix + ':' + qName.getLocalPart();
-         }
-         else
-         {
-            String ns = qName.getNamespaceURI();
-            prefix = nc.getPrefix(ns);
-            if(prefix != null && prefix.length() > 0)
-            {
-               result = prefix + ':' + qName.getLocalPart();
-            }
-            else
-            {
-               result = qName.getLocalPart();
-            }
-         }
-      }
-      return result;
-   }
-
-   /**
-    * Converts XML name to Java class name according to
-    * Binding XML Names to Java Identifiers
-    * C.2. The Name to Identifier Mapping Algorithm
-    * jaxb-2_0-edr-spec-10_jun_2004.pdf
-    *
-    * @param name          XML name
-    * @param ignoreLowLine whether low lines should not be parts of Java identifiers
-    * @return Java class name
-    */
-   public static String xmlNameToClassName(String name, boolean ignoreLowLine)
-   {
-      return XMLNameToJavaIdentifierConverter.PARSER.parse(XMLNameToJavaIdentifierConverter.CLASS_NAME,
-         name,
-         ignoreLowLine
-      );
-   }
-
-   public static String xmlNameToFieldName(String name, boolean ignoreLowLine)
-   {
-      return XMLNameToJavaIdentifierConverter.PARSER.parse(XMLNameToJavaIdentifierConverter.FIELD_NAME,
-         name,
-         ignoreLowLine
-      );
-   }
-
-   /**
-    * Converts XML name to Java getter method name according to
-    * Binding XML Names to Java Identifiers
-    * C.2. The Name to Identifier Mapping Algorithm
-    * jaxb-2_0-edr-spec-10_jun_2004.pdf
-    *
-    * @param name          XML name
-    * @param ignoreLowLine whether low lines should not be parts of Java identifiers
-    * @return Java getter method name
-    */
-   public static String xmlNameToGetMethodName(String name, boolean ignoreLowLine)
-   {
-      return "get" + xmlNameToClassName(name, ignoreLowLine);
-   }
-
-   /**
-    * Converts XML name to Java setter method name according to
-    * Binding XML Names to Java Identifiers
-    * C.2. The Name to Identifier Mapping Algorithm
-    * jaxb-2_0-edr-spec-10_jun_2004.pdf
-    *
-    * @param name          XML name
-    * @param ignoreLowLine whether low lines should not be parts of Java identifiers
-    * @return Java setter method name
-    */
-   public static String xmlNameToSetMethodName(String name, boolean ignoreLowLine)
-   {
-      return "set" + xmlNameToClassName(name, ignoreLowLine);
-   }
-
-   /**
-    * Converts XML name to Java constant name according to
-    * Binding XML Names to Java Identifiers
-    * C.2. The Name to Identifier Mapping Algorithm
-    * jaxb-2_0-edr-spec-10_jun_2004.pdf
-    *
-    * @param name XML name
-    * @return Java constant name
-    */
-   public static String xmlNameToConstantName(String name)
-   {
-      return XMLNameToJavaIdentifierConverter.PARSER.parse(XMLNameToJavaIdentifierConverter.CONSTANT_NAME,
-         name,
-         true
-      );
-   }
-
-   /**
-    * Converts XML namespace to Java package name.
-    * The base algorithm is described in JAXB-2.0 spec in 'C.5 Generating a Java package name'.
-    *
-    * @param namespace XML namespace
-    * @return Java package name
-    */
-   public static String xmlNamespaceToJavaPackage(String namespace)
-   {
-      if(namespace.length() == 0)
-      {
-         return namespace;
-      }
-
-      char[] src = namespace.toLowerCase().toCharArray();
-      char[] dst = new char[namespace.length()];
-
-      int srcInd = 0;
-      // skip protocol part, i.e. http://, urn://
-      while(src[srcInd++] != ':')
-      {
-      }
-
-      while(src[srcInd] == '/')
-      {
-         ++srcInd;
-      }
-
-      // skip www part
-      if(src[srcInd] == 'w' && src[srcInd + 1] == 'w' && src[srcInd + 2] == 'w')
-      {
-         srcInd += 4;
-      }
-
-      // find domain start and end indexes
-      int domainStart = srcInd;
-      while(srcInd < src.length && src[srcInd] != '/')
-      {
-         ++srcInd;
-      }
-
-      int dstInd = 0;
-      // copy domain parts in the reverse order
-      for(int start = srcInd - 1, end = srcInd; true; --start)
-      {
-         if(start == domainStart)
-         {
-            System.arraycopy(src, start, dst, dstInd, end - start);
-            dstInd += end - start;
-            break;
-         }
-
-         if(src[start] == '.')
-         {
-            System.arraycopy(src, start + 1, dst, dstInd, end - start - 1);
-            dstInd += end - start;
-            dst[dstInd - 1] = '.';
-            end = start;
-         }
-      }
-
-      // copy the rest
-      while(srcInd < src.length)
-      {
-         char c = src[srcInd++];
-         if(c == '/')
-         {
-            if(srcInd < src.length)
-            {
-               dst = append(dst, dstInd++, '.');
-               if(!Character.isJavaIdentifierStart(src[srcInd]))
-               {
-                  dst = append(dst, dstInd++, '_');
-               }
-            }
-         }
-         else if(c == '.')
-         {
-            // for now assume it's an extention, i.e. '.xsd'
-            break;
-         }
-         else
-         {
-            dst = append(dst, dstInd++, Character.isJavaIdentifierPart(c) ? c : '_');
-         }
-      }
-
-      return String.valueOf(dst, 0, dstInd);
-   }
-
-   /**
-    * Converts XML namespace URI and local name to fully qualified class name.
-    *
-    * @param namespaceUri  namespace URI
-    * @param localName     local name
-    * @param ignoreLowLine should low lines be ignored in the class name
-    * @return fully qualified class name
-    */
-   public static String xmlNameToClassName(String namespaceUri, String localName, boolean ignoreLowLine)
-   {
-      return namespaceUri == null || namespaceUri.length() == 0 ?
-         xmlNameToClassName(localName, ignoreLowLine) :
-         xmlNamespaceToJavaPackage(namespaceUri) + '.' + xmlNameToClassName(localName, ignoreLowLine);
-   }
-
-   public static boolean isAttributeType(final Class type)
-   {
-      return Classes.isPrimitive(type) ||
-         type == String.class ||
-         type == java.util.Date.class;
-   }
-
-   /**
-    * Parse the namespace location pairs in the schemaLocation and return the
-    * location that matches the nsURI argument.
-    *
-    * @return the location uri if found, null otherwise
-    */
-   public static String getSchemaLocation(Attributes attrs, String nsUri)
-   {
-      String location = null;
-      String schemaLocation = attrs.getValue(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "schemaLocation");
-      if(schemaLocation != null)
-      {
-         StringTokenizer tokenizer = new StringTokenizer(schemaLocation, " \t\n\r");
-         while (tokenizer.hasMoreTokens())
-         {
-            String namespace = tokenizer.nextToken();
-            if (namespace.equals(nsUri) && tokenizer.hasMoreTokens())
-            {
-               location = tokenizer.nextToken();
-               break;
-            }
-         }
-      }
-      return location;
-   }
-
-   public static XSModel loadSchema(String xsdURL, SchemaBindingResolver schemaResolver)
-   {
-      boolean trace = log.isTraceEnabled();
-      long start = System.currentTimeMillis();
-      if(trace)
-         log.trace("loading xsd: " + xsdURL);
-
-      if(xsImpl == null)
-      {
-         xsImpl = getXSImplementation();
-      }
-
-      XSLoader schemaLoader = xsImpl.createXSLoader(null);
-      if(schemaResolver != null)
-      {
-         setResourceResolver(schemaLoader, schemaResolver);
-      }
-
-      setDOMErrorHandler(schemaLoader);
-      XSModel model = schemaLoader.loadURI(xsdURL);
-      if(model == null)
-      {
-         throw new IllegalArgumentException("Invalid URI for schema: " + xsdURL);
-      }
-
-      if (trace)
-         log.trace("Loaded xsd: " + xsdURL + " in " + (System.currentTimeMillis() - start) + "ms");
-      return model;
-   }
-
-   public static XSModel loadSchema(InputStream is, String encoding, SchemaBindingResolver schemaResolver)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("loading xsd from InputStream");
-      }
-
-      LSInputAdaptor input = new LSInputAdaptor(is, encoding);
-
-      XSImplementation impl = getXSImplementation();
-      XSLoader schemaLoader = impl.createXSLoader(null);
-      setDOMErrorHandler(schemaLoader);
-      if(schemaResolver != null)
-      {
-         setResourceResolver(schemaLoader, schemaResolver);
-      }
-
-      return schemaLoader.load(input);
-   }
-
-   public static XSModel loadSchema(Reader reader, String encoding, SchemaBindingResolver schemaResolver)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("loading xsd from Reader");
-      }
-
-      LSInputAdaptor input = new LSInputAdaptor(reader, encoding);
-
-      XSImplementation impl = getXSImplementation();
-      XSLoader schemaLoader = impl.createXSLoader(null);
-      setDOMErrorHandler(schemaLoader);
-      if(schemaResolver != null)
-      {
-         setResourceResolver(schemaLoader, schemaResolver);
-      }
-
-      return schemaLoader.load(input);
-   }
-
-   public static XSModel loadSchema(String data, String encoding)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace("loading xsd from string");
-      }
-
-      LSInputAdaptor input = new LSInputAdaptor(data, encoding);
-
-      XSImplementation impl = getXSImplementation();
-      XSLoader schemaLoader = impl.createXSLoader(null);
-      setDOMErrorHandler(schemaLoader);
-      return schemaLoader.load(input);
-   }
-
-   // Private
-
-   /**
-    * Sets an array character's element with the given index to a character value.
-    * If index is more or equal to the length of the array, a new array is created with enough length to set
-    * the element.
-    *
-    * @param buf   array of characters
-    * @param index index of the element to set
-    * @param ch    character to set
-    * @return if the index parameter is less then array's length then the original array is returned,
-    *         otherwise a new array is returned
-    */
-   private static char[] append(char[] buf, int index, char ch)
-   {
-      if(index >= buf.length)
-      {
-         char[] tmp = buf;
-         buf = new char[index + 4];
-         System.arraycopy(tmp, 0, buf, 0, tmp.length);
-      }
-      buf[index] = ch;
-      return buf;
-   }
-
-   private static void setResourceResolver(XSLoader schemaLoader, final SchemaBindingResolver schemaResolver)
-   {
-      DOMConfiguration config = schemaLoader.getConfig();
-      config.setParameter("resource-resolver", new LSResourceResolver()
-      {
-         public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)
-         {
-            if (Constants.NS_XML_SCHEMA.equals(type))
-            {
-               String schemaLocation = systemId;
-               return schemaResolver.resolveAsLSInput(namespaceURI, baseURI, schemaLocation);
-            }
-            return null;
-         }
-      }
-      );
-   }
-
-   private static void setDOMErrorHandler(XSLoader schemaLoader)
-   {
-      DOMConfiguration config = schemaLoader.getConfig();
-      DOMErrorHandler errorHandler = (DOMErrorHandler)config.getParameter("error-handler");
-      if (errorHandler == null)
-      {
-         config.setParameter("error-handler", XsdBinderTerminatingErrorHandler.newInstance());
-      }
-   }
-
-   private static XSImplementation getXSImplementation()
-   {
-      return (XSImplementation) AccessController.doPrivileged(new PrivilegedAction()
-      {
-         public Object run()
-         {
-            
-            // Get DOM Implementation using DOM Registry
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            try
-            {
-               // Try the 2.6.2 version
-               String name = "org.apache.xerces.dom.DOMXSImplementationSourceImpl";
-               loader.loadClass(name);
-               System.setProperty(DOMImplementationRegistry.PROPERTY, name);
-            }
-            catch(ClassNotFoundException e)
-            {
-               // Try the 2.7.0 version
-               String name = "org.apache.xerces.dom.DOMXSImplementationSourceImpl";
-               System.setProperty(DOMImplementationRegistry.PROPERTY, name);
-            }
-
-            XSImplementation impl;
-            try
-            {
-               DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
-               impl = (XSImplementation)registry.getDOMImplementation("XS-Loader");
-            }
-            catch(Exception e)
-            {
-               log.error("Failed to create schema loader.", e);
-               throw new IllegalStateException("Failed to create schema loader: " + e.getMessage());
-            }
-            return impl;
-         }
-      });
-   }
-
-   // Inner
-
-   /**
-    * An interface for XML name to Java identifier (class name, get/set methods, constant names) converter.
-    * The following rules and algorithms should be supported
-    * <ul>
-    * <li>Binding XML Names to Java Identifiers,
-    * C.2. The Name to Identifier Mapping Algorithm,
-    * jaxb-2_0-edr-spec-10_jun_2004.pdf</li>
-    * <li>http://www.w3.org/TR/soap12-part2/#namemap</li>
-    * </ul>
-    * <p/>
-    * But these are not guaranteed to work yet. Instead, a simplified implementation is provided.
-    * Incompatabilities should be fixed.
-    */
-   interface XMLNameToJavaIdentifierConverter
-   {
-      // commands indicating what should be done with the next character from the XML name
-      byte IGNORE = 0;
-      byte APPEND = 1;
-      byte APPEND_WITH_LOW_LINE = 2;
-      byte APPEND_UPPER_CASED = 3;
-      byte APPEND_UPPER_CASED_WITH_LOW_LINE = 4;
-
-      /**
-       * Returns a command for the next character given the previous character.
-       *
-       * @param prev          previous character
-       * @param next          next character
-       * @param ignoreLowLine whether low lines are allowed in the Java identifier or should be ignored
-       * @return command for the next character
-       */
-      byte commandForNext(char prev, char next, boolean ignoreLowLine);
-
-      char firstCharacter(char ch, String str, int secondCharIndex);
-
-      /**
-       * An XML name parser class that parses the XML name and asks the outer interface implementation
-       * what to do with the next parsed character from the XML name.
-       */
-      final class PARSER
-      {
-         /**
-          * Parses an XML name, asks the converter for a command for the next parsed character,
-          * applies the command, composed the resulting Java identifier.
-          *
-          * @param converter     an implementation of XMLNameToJavaIdentifierConverter
-          * @param xmlName       XML name
-          * @param ignoreLowLine indicated whether low lines are allowed as part of the Java identifier or
-          *                      should be ignored
-          * @return Java identifier
-          */
-         static String parse(XMLNameToJavaIdentifierConverter converter, String xmlName, boolean ignoreLowLine)
-         {
-            if(xmlName == null || xmlName.length() == 0)
-            {
-               throw new IllegalArgumentException("Bad XML name: " + xmlName);
-            }
-
-            char c = xmlName.charAt(0);
-            int i = 1;
-            if(!Character.isJavaIdentifierStart(c) || (c == LOW_LINE && ignoreLowLine))
-            {
-               while(i < xmlName.length())
-               {
-                  c = xmlName.charAt(i++);
-                  if(Character.isJavaIdentifierStart(c) && !(c == LOW_LINE && ignoreLowLine))
-                  {
-                     break;
-                  }
-               }
-
-               if(i == xmlName.length())
-               {
-                  throw new IllegalArgumentException(
-                     "XML name contains no valid character to start Java identifier: " + xmlName
-                  );
-               }
-            }
-
-            char[] buf = new char[xmlName.length() - i + 1];
-            buf[0] = converter.firstCharacter(c, xmlName, i);
-            int bufInd = 1;
-            while(i < xmlName.length())
-            {
-               char prev = c;
-               c = xmlName.charAt(i++);
-               byte command = converter.commandForNext(prev, c, ignoreLowLine);
-               switch(command)
-               {
-                  case IGNORE:
-                     break;
-                  case APPEND:
-                     buf = Util.append(buf, bufInd++, c);
-                     break;
-                  case APPEND_WITH_LOW_LINE:
-                     buf = Util.append(buf, bufInd++, LOW_LINE);
-                     buf = Util.append(buf, bufInd++, c);
-                     break;
-                  case APPEND_UPPER_CASED:
-                     buf = Util.append(buf, bufInd++, Character.toUpperCase(c));
-                     break;
-                  case APPEND_UPPER_CASED_WITH_LOW_LINE:
-                     buf = Util.append(buf, bufInd++, LOW_LINE);
-                     buf = Util.append(buf, bufInd++, Character.toUpperCase(c));
-                     break;
-                  default:
-                     throw new IllegalArgumentException("Unexpected command: " + command);
-               }
-            }
-
-            return new String(buf, 0, bufInd);
-         }
-      }
-
-      /**
-       * XML name to Java class name converter
-       */
-      XMLNameToJavaIdentifierConverter CLASS_NAME = new XMLNameToJavaIdentifierConverter()
-      {
-         public char firstCharacter(char ch, String str, int secondCharIndex)
-         {
-            return Character.toUpperCase(ch);
-         }
-
-         public byte commandForNext(char prev, char next, boolean ignoreLowLine)
-         {
-            byte command;
-            if(Character.isDigit(next))
-            {
-               command = APPEND;
-            }
-            else if(next == LOW_LINE)
-            {
-               command = ignoreLowLine ? IGNORE : APPEND;
-            }
-            else if(Character.isJavaIdentifierPart(next))
-            {
-               if(Character.isJavaIdentifierPart(prev) && !Character.isDigit(prev))
-               {
-                  command = prev == LOW_LINE ? APPEND_UPPER_CASED : APPEND;
-               }
-               else
-               {
-                  command = APPEND_UPPER_CASED;
-               }
-            }
-            else
-            {
-               command = IGNORE;
-            }
-            return command;
-         }
-      };
-
-      /**
-       * XML name to Java class name converter
-       */
-      XMLNameToJavaIdentifierConverter FIELD_NAME = new XMLNameToJavaIdentifierConverter()
-      {
-         public char firstCharacter(char ch, String str, int secondCharIndex)
-         {
-            if(Character.isLowerCase(ch))
-            {
-               return ch;
-            }
-            else
-            {
-               return (str.length() > secondCharIndex &&
-                  Character.isJavaIdentifierPart(str.charAt(secondCharIndex)) &&
-                  Character.isUpperCase(str.charAt(secondCharIndex))
-                  ) ?
-                  Character.toUpperCase(ch) :
-                  Character.toLowerCase(ch);
-            }
-         }
-
-         public byte commandForNext(char prev, char next, boolean ignoreLowLine)
-         {
-            return CLASS_NAME.commandForNext(prev, next, ignoreLowLine);
-         }
-      };
-
-      /**
-       * XML name to Java constant name converter
-       */
-      XMLNameToJavaIdentifierConverter CONSTANT_NAME = new XMLNameToJavaIdentifierConverter()
-      {
-         public char firstCharacter(char ch, String str, int secondCharIndex)
-         {
-            return Character.toUpperCase(ch);
-         }
-
-         public byte commandForNext(char prev, char next, boolean ignoreLowLine)
-         {
-            byte command;
-            if(Character.isDigit(next))
-            {
-               command = Character.isDigit(prev) ? APPEND : APPEND_UPPER_CASED_WITH_LOW_LINE;
-            }
-            else if(Character.isJavaIdentifierPart(next))
-            {
-               if(Character.isDigit(prev))
-               {
-                  command = APPEND_UPPER_CASED_WITH_LOW_LINE;
-               }
-               else if(Character.isJavaIdentifierPart(prev))
-               {
-                  command = Character.isUpperCase(next) ?
-                     (Character.isUpperCase(prev) ? APPEND_UPPER_CASED : APPEND_WITH_LOW_LINE) :
-                     APPEND_UPPER_CASED;
-               }
-               else
-               {
-                  command = APPEND_UPPER_CASED_WITH_LOW_LINE;
-               }
-            }
-            else
-            {
-               command = IGNORE;
-            }
-            return command;
-         }
-      };
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Util.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/Util.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/XercesXsMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/XercesXsMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/XercesXsMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1449 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.AbstractList;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.ParserConfigurationException;
-import org.apache.xerces.xs.StringList;
-import org.apache.xerces.xs.XSAttributeDeclaration;
-import org.apache.xerces.xs.XSAttributeUse;
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSModel;
-import org.apache.xerces.xs.XSModelGroup;
-import org.apache.xerces.xs.XSNamedMap;
-import org.apache.xerces.xs.XSObject;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSParticle;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTerm;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.apache.xerces.xs.XSWildcard;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class XercesXsMarshaller
-   extends AbstractMarshaller
-{
-   private Stack stack = new StackImpl();
-
-   /**
-    * ObjectModelProvider for this marshaller
-    */
-   private GenericObjectModelProvider provider;
-
-   private Object root;
-
-   /**
-    * Whether NULL values should be ignored or marshalled as xsi:nil='1'
-    */
-   private boolean supportNil = true;
-
-   private QName rootTypeQName;
-
-   private SchemaBindingResolver schemaResolver;
-
-   private XSModel model;
-
-   private boolean ignoreUnresolvedWildcard;
-
-   private XSAttributeUse currentAttribute;
-   private XSTypeDefinition currentElementType;
-
-   private String simpleContentProperty = "value";
-   
-   private MarshallingContext ctx = new MarshallingContext()
-   {
-      private ContentHandler ch;
-
-      public boolean isAttributeRequired()
-      {
-         if(currentAttribute == null)
-         {
-            throw new JBossXBRuntimeException("There is no current attribute!");
-         }
-         return currentAttribute.getRequired();
-      }
-
-      public boolean isTypeComplex()
-      {
-         if(currentElementType == null)
-         {
-            throw new JBossXBRuntimeException("There is no current element!");
-         }
-         return currentElementType.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE;
-      }
-
-      public String getSimpleContentProperty()
-      {
-         return simpleContentProperty;
-      }
-
-      public ContentHandler getContentHandler()
-      {
-         if(ch == null)
-         {
-            ch = new ContentHandlerAdaptor();
-         }
-         return ch;
-      }
-
-      public NamespaceRegistry getNamespaceContext()
-      {
-         return nsRegistry;
-      }
-   };
-
-   public String getSimpleContentProperty()
-   {
-      return simpleContentProperty;
-   }
-
-   public void setSimpleContentProperty(String simpleContentProperty)
-   {
-      this.simpleContentProperty = simpleContentProperty;
-   }
-
-   public boolean isIgnoreUnresolvedWildcard()
-   {
-      return ignoreUnresolvedWildcard;
-   }
-
-   public void setIgnoreUnresolvedWildcard(boolean ignoreUnresolvedWildcard)
-   {
-      this.ignoreUnresolvedWildcard = ignoreUnresolvedWildcard;
-   }
-
-   public SchemaBindingResolver getSchemaResolver()
-   {
-      return schemaResolver;
-   }
-
-   public void setSchemaResolver(SchemaBindingResolver schemaResolver)
-   {
-      this.schemaResolver = schemaResolver;
-   }
-
-   public QName getRootTypeQName()
-   {
-      return rootTypeQName;
-   }
-
-   public void setRootTypeQName(QName rootTypeQName)
-   {
-      this.rootTypeQName = rootTypeQName;
-   }
-
-   public boolean isSupportNil()
-   {
-      return supportNil;
-   }
-
-   public void setSupportNil(boolean supportNil)
-   {
-      this.supportNil = supportNil;
-   }
-
-   /**
-    * Adds an attribute to the top most elements.
-    * First, we check whether there is a namespace associated with the passed in prefix.
-    * If the prefix was not declared, an exception is thrown.
-    *
-    * @param prefix    the prefix of the attribute to be declared
-    * @param localName local name of the attribute
-    * @param type      the type of the attribute
-    * @param value     the value of the attribute
-    */
-   public void addAttribute(String prefix, String localName, String type, String value)
-   {
-      // todo addAttribute(String prefix, String localName, String type, String value)
-   }
-
-   // AbstractMarshaller implementation
-
-   public void marshal(Reader xsdReader, ObjectModelProvider provider, Object root, Writer writer)
-      throws IOException, SAXException, ParserConfigurationException
-   {
-      XSModel model = Util.loadSchema(xsdReader, null, schemaResolver);
-      marshallInternal(provider, root, model, writer);
-   }
-
-   public void marshal(String xsdURL, ObjectModelProvider provider, Object root, Writer writer) throws IOException,
-      SAXException
-   {
-      XSModel model = Util.loadSchema(xsdURL, schemaResolver);
-      marshallInternal(provider, root, model, writer);
-   }
-
-   public void marshal(XSModel model, ObjectModelProvider provider, Object root, Writer writer) throws IOException,
-      SAXException
-   {
-      marshallInternal(provider, root, model, writer);
-   }
-
-   private void marshallInternal(ObjectModelProvider provider, Object root, XSModel model, Writer writer)
-      throws IOException, SAXException
-   {
-      if(model == null)
-      {
-         throw new JBossXBRuntimeException("XSModel is not available!");
-      }
-
-      this.model = model;
-      this.provider = provider instanceof GenericObjectModelProvider ?
-         (GenericObjectModelProvider)provider : new DelegatingObjectModelProvider(provider);
-
-      this.root = root;
-
-      content.startDocument();
-
-      if(rootTypeQName != null)
-      {
-         if(rootQNames.isEmpty())
-         {
-            throw new JBossXBRuntimeException("If type name (" +
-               rootTypeQName +
-               ") for the root element is specified then the name for the root element is required!"
-            );
-         }
-         QName rootQName = (QName)rootQNames.get(0);
-
-         XSTypeDefinition type = model.getTypeDefinition(rootTypeQName.getLocalPart(),
-            rootTypeQName.getNamespaceURI()
-         );
-         if(type == null)
-         {
-            throw new JBossXBRuntimeException("Global type definition is not found: " + rootTypeQName);
-         }
-
-         if(isArrayWrapper(type))
-         {
-            Object o = provider.getRoot(root, null, rootQName.getNamespaceURI(), rootQName.getLocalPart());
-            stack.push(o);
-            marshalComplexType(rootQName.getNamespaceURI(),
-               rootQName.getLocalPart(),
-               (XSComplexTypeDefinition)type,
-               true,
-               false
-            );
-            stack.pop();
-         }
-         else
-         {
-            Object o = provider.getRoot(root, null, rootQName.getNamespaceURI(), rootQName.getLocalPart());
-            marshalElementOccurence(rootQName.getNamespaceURI(),
-               rootQName.getLocalPart(),
-               type,
-               o,
-               false,
-               false,
-               true
-            );
-         }
-      }
-      else if(rootQNames.isEmpty())
-      {
-         XSNamedMap components = model.getComponents(XSConstants.ELEMENT_DECLARATION);
-         if(components.getLength() == 0)
-         {
-            throw new JBossXBRuntimeException("The schema doesn't contain global element declarations.");
-         }
-
-         for(int i = 0; i < components.getLength(); ++i)
-         {
-            XSElementDeclaration element = (XSElementDeclaration)components.item(i);
-            Object o = provider.getRoot(root, null, element.getNamespace(), element.getName());
-            marshalElementOccurence(element.getNamespace(),
-               element.getName(),
-               element.getTypeDefinition(),
-               o,
-               element.getNillable(),
-               false,
-               true
-            );
-         }
-      }
-      else
-      {
-         for(int i = 0; i < rootQNames.size(); ++i)
-         {
-            QName qName = (QName)rootQNames.get(i);
-            XSElementDeclaration element = model.getElementDeclaration(qName.getLocalPart(), qName.getNamespaceURI());
-            if(element == null)
-            {
-               XSNamedMap components = model.getComponents(XSConstants.ELEMENT_DECLARATION);
-               String roots = "";
-               for(int j = 0; j < components.getLength(); ++j)
-               {
-                  XSObject xsObject = components.item(j);
-                  if(j > 0)
-                  {
-                     roots += ", ";
-                  }
-                  roots += "{" + xsObject.getNamespace() + "}" + xsObject.getName();
-               }
-               throw new IllegalStateException("Root element not found: " + qName + " among " + roots);
-            }
-
-            Object o = provider.getRoot(root, null, element.getNamespace(), element.getName());
-            marshalElementOccurence(element.getNamespace(),
-               element.getName(),
-               element.getTypeDefinition(),
-               o,
-               element.getNillable(),
-               false,
-               true
-            );
-         }
-      }
-
-      content.endDocument();
-
-      // version & encoding
-      writeXmlVersion(writer);
-
-      ContentWriter contentWriter = new ContentWriter(writer,
-         propertyIsTrueOrNotSet(Marshaller.PROP_OUTPUT_INDENTATION)
-      );
-      content.handleContent(contentWriter);
-
-      if(log.isTraceEnabled())
-      {
-         java.io.StringWriter traceWriter = new java.io.StringWriter();
-         contentWriter = new ContentWriter(traceWriter,
-            propertyIsTrueOrNotSet(Marshaller.PROP_OUTPUT_INDENTATION)
-         );
-         content.handleContent(contentWriter);
-         log.trace("marshalled:\n" + traceWriter.getBuffer().toString());
-      }
-   }
-
-   private boolean marshalElement(String elementNs, String elementLocal,
-                                  XSTypeDefinition type,
-                                  boolean optional,
-                                  boolean nillable,
-                                  boolean declareNs,
-                                  boolean declareXsiType)
-   {
-      Object value = stack.peek();
-      boolean result = value != null || value == null && (optional || nillable);
-      boolean trace = log.isTraceEnabled() && result;
-      if(trace)
-      {
-         String prefix = getPrefix(elementNs);
-         log.trace("started element ns=" + elementNs + ", local=" + elementLocal + ", prefix=" + prefix);
-      }
-
-      if(value != null)
-      {
-         marshalElementType(elementNs, elementLocal, type, declareNs, nillable, declareXsiType);
-      }
-      else if(nillable)
-      {
-         writeNillable(elementNs, elementLocal, nillable);
-      }
-
-      if(trace)
-      {
-         log.trace("finished element ns=" + elementNs + ", local=" + elementLocal);
-      }
-
-      return result;
-   }
-
-   private void marshalElementType(String elementNs,
-                                   String elementLocal,
-                                   XSTypeDefinition type,
-                                   boolean declareNs,
-                                   boolean nillable,
-                                   boolean declareXsiType)
-   {
-      switch(type.getTypeCategory())
-      {
-         case XSTypeDefinition.SIMPLE_TYPE:
-            marshalSimpleType(elementNs,
-               elementLocal,
-               (XSSimpleTypeDefinition)type,
-               declareNs,
-               nillable,
-               declareXsiType
-            );
-            break;
-         case XSTypeDefinition.COMPLEX_TYPE:
-            marshalComplexType(elementNs, elementLocal, (XSComplexTypeDefinition)type, declareNs, declareXsiType);
-            break;
-         default:
-            throw new IllegalStateException("Unexpected type category: " + type.getTypeCategory());
-      }
-   }
-
-   private void marshalSimpleType(String elementUri,
-                                  String elementLocal,
-                                  XSSimpleTypeDefinition type,
-                                  boolean declareNs,
-                                  boolean nillable,
-                                  boolean declareXsiType)
-   {
-      Object value = stack.peek();
-      if(value != null)
-      {
-         String prefix = getPrefix(elementUri);
-         boolean genPrefix = prefix == null && elementUri != null && elementUri.length() > 0;
-         if(genPrefix)
-         {
-            prefix = "ns_" + elementLocal;
-         }
-
-         AttributesImpl attrs = null;
-         String typeName = type.getName();
-         if(SimpleTypeBindings.XS_QNAME_NAME.equals(typeName) ||
-            SimpleTypeBindings.XS_NOTATION_NAME.equals(typeName) ||
-            type.getItemType() != null &&
-            (SimpleTypeBindings.XS_QNAME_NAME.equals(type.getItemType().getName()) ||
-            SimpleTypeBindings.XS_NOTATION_NAME.equals(type.getItemType().getName())
-            )
-         )
-         {
-            attrs = new AttributesImpl(5);
-         }
-
-         String marshalled = marshalCharacters(elementUri, prefix, type, value, attrs);
-
-         if((declareNs || declareXsiType) && nsRegistry.size() > 0)
-         {
-            if(attrs == null)
-            {
-               attrs = new AttributesImpl(nsRegistry.size() + 1);
-            }
-            declareNs(attrs);
-         }
-
-         if(declareXsiType)
-         {
-            declareXsiType(type, attrs);
-         }
-
-         if(genPrefix)
-         {
-            if(attrs == null)
-            {
-               attrs = new AttributesImpl(1);
-            }
-            attrs.add(null, prefix, "xmlns:" + prefix, null, (String)elementUri);
-         }
-
-         String qName = prefixLocalName(prefix, elementLocal);
-
-         content.startElement(elementUri, elementLocal, qName, attrs);
-         content.characters(marshalled.toCharArray(), 0, marshalled.length());
-         content.endElement(elementUri, elementLocal, qName);
-      }
-      else
-      {
-         writeNillable(elementUri, elementLocal, nillable);
-      }
-   }
-
-   private void marshalComplexType(String elementNsUri,
-                                   String elementLocalName,
-                                   XSComplexTypeDefinition type,
-                                   boolean declareNs,
-                                   boolean declareXsiType)
-   {
-      Object o = stack.peek();
-      XSParticle particle = type.getParticle();
-
-      XSObjectList attributeUses = type.getAttributeUses();
-      int attrsTotal = declareNs || declareXsiType ?
-         nsRegistry.size() + attributeUses.getLength() + 1 :
-         attributeUses.getLength();
-      AttributesImpl attrs = attrsTotal > 0 ? new AttributesImpl(attrsTotal) : null;
-
-      if(declareNs && nsRegistry.size() > 0)
-      {
-         declareNs(attrs);
-      }
-
-      String generatedPrefix = null;
-      if(declareXsiType)
-      {
-         generatedPrefix = declareXsiType(type, attrs);
-         if(generatedPrefix != null)
-         {
-            String typeNsWithGeneratedPrefix = type.getNamespace();
-            declareNs(attrs, generatedPrefix, typeNsWithGeneratedPrefix);
-            declareNamespace(generatedPrefix, typeNsWithGeneratedPrefix);
-         }
-      }
-
-      String prefix = getPrefix(elementNsUri);
-      boolean genPrefix = prefix == null && elementNsUri != null && elementNsUri.length() > 0;
-      if(genPrefix)
-      {
-         // todo: it's possible that the generated prefix already mapped. this should be fixed
-         prefix = "ns_" + elementLocalName;
-         declareNamespace(prefix, elementNsUri);
-         if(attrs == null)
-         {
-            attrs = new AttributesImpl(1);
-         }
-         attrs.add(null, prefix, "xmlns:" + prefix, null, elementNsUri);
-      }
-
-      for(int i = 0; i < attributeUses.getLength(); ++i)
-      {
-         currentAttribute = (XSAttributeUse)attributeUses.item(i);
-         XSAttributeDeclaration attrDec = currentAttribute.getAttrDeclaration();
-         String attrNs = attrDec.getNamespace();
-         String attrLocal = attrDec.getName();
-         Object attrValue = provider.getAttributeValue(o, ctx, attrNs, attrLocal);
-
-         if(attrValue != null)
-         {
-            if(attrs == null)
-            {
-               attrs = new AttributesImpl(5);
-            }
-
-            String attrPrefix = null;
-            if(attrNs != null)
-            {
-               attrPrefix = getPrefix(attrNs);
-               if(attrPrefix == null && attrNs != null && attrNs.length() > 0)
-               {
-                  attrPrefix = "ns_" + attrLocal;
-                  attrs.add(null, attrPrefix, "xmlns:" + attrPrefix, null, attrNs);
-               }
-            }
-
-            String qName = attrPrefix == null || attrPrefix.length() == 0 ? attrLocal : attrPrefix + ":" + attrLocal;
-
-            // todo: this is a quick fix for boolean pattern (0|1 or true|false) should be refactored
-            XSSimpleTypeDefinition attrType = attrDec.getTypeDefinition();
-            if(attrType.getItemType() != null)
-            {
-               XSSimpleTypeDefinition itemType = attrType.getItemType();
-               if(Constants.NS_XML_SCHEMA.equals(itemType.getNamespace()))
-               {
-                  List list;
-                  if(attrValue instanceof List)
-                  {
-                     list = (List)attrValue;
-                  }
-                  else if(attrValue.getClass().isArray())
-                  {
-                     list = Arrays.asList((Object[])attrValue);
-                  }
-                  else
-                  {
-                     throw new JBossXBRuntimeException("Expected value for list type is an array or " +
-                        List.class.getName() +
-                        " but got: " +
-                        attrValue
-                     );
-                  }
-
-                  if(Constants.QNAME_QNAME.getLocalPart().equals(itemType.getName()))
-                  {
-                     for(int listInd = 0; listInd < list.size(); ++listInd)
-                     {
-                        QName item = (QName)list.get(listInd);
-                        String itemNs = item.getNamespaceURI();
-                        if(itemNs != null && itemNs.length() > 0)
-                        {
-                           String itemPrefix;
-                           if(itemNs.equals(elementNsUri))
-                           {
-                              itemPrefix = prefix;
-                           }
-                           else
-                           {
-                              itemPrefix = getPrefix(itemNs);
-                              if(itemPrefix == null)
-                              {
-                                 itemPrefix = attrLocal + listInd;
-                                 declareNs(attrs, itemPrefix, itemNs);
-                              }
-                           }
-                           item = new QName(item.getNamespaceURI(), item.getLocalPart(), itemPrefix);
-                           list.set(listInd, item);
-                        }
-                     }
-                  }
-
-                  attrValue = SimpleTypeBindings.marshalList(itemType.getName(), list, null);
-               }
-               else
-               {
-                  throw new JBossXBRuntimeException("Marshalling of list types with item types not from " +
-                     Constants.NS_XML_SCHEMA + " is not supported."
-                  );
-               }
-            }
-            else if(attrType.getLexicalPattern().item(0) != null
-               &&
-               attrType.derivedFrom(Constants.NS_XML_SCHEMA,
-                  Constants.QNAME_BOOLEAN.getLocalPart(),
-                  XSConstants.DERIVATION_RESTRICTION
-               ))
-            {
-               String item = attrType.getLexicalPattern().item(0);
-               if(item.indexOf('0') != -1 && item.indexOf('1') != -1)
-               {
-                  attrValue = ((Boolean)attrValue).booleanValue() ? "1" : "0";
-               }
-               else
-               {
-                  attrValue = ((Boolean)attrValue).booleanValue() ? "true" : "false";
-               }
-            }
-            else if(Constants.QNAME_QNAME.getNamespaceURI().equals(attrType.getNamespace()) &&
-               Constants.QNAME_QNAME.getLocalPart().equals(attrType.getName()))
-            {
-               QName qNameValue = (QName)attrValue;
-
-               String qNamePrefix = null;
-               boolean declarePrefix = false;
-               String ns = qNameValue.getNamespaceURI();
-               if(ns != null && ns.length() > 0)
-               {
-                  qNamePrefix = getPrefix(ns);
-                  if(qNamePrefix == null)
-                  {
-                     qNamePrefix = qNameValue.getPrefix();
-                     if(qNamePrefix == null || qNamePrefix.length() == 0)
-                     {
-                        qNamePrefix = "ns_" + qNameValue.getLocalPart();
-                     }
-                     declareNs(attrs, qNamePrefix, ns);
-                     nsRegistry.addPrefixMapping(qNamePrefix, ns);
-                     declarePrefix = true;
-                  }
-               }
-
-               attrValue = SimpleTypeBindings.marshalQName(qNameValue, nsRegistry);
-
-               if(declarePrefix)
-               {
-                  nsRegistry.removePrefixMapping(qNamePrefix);
-               }
-            }
-            else
-            {
-               attrValue = attrValue.toString();
-            }
-
-            attrs.add(attrNs,
-               attrLocal,
-               qName,
-               attrDec.getTypeDefinition().getName(),
-               attrValue.toString()
-            );
-         }
-      }
-      currentAttribute = null;
-
-      String characters = null;
-      if(type.getSimpleType() != null)
-      {
-         Object value = getSimpleContentValue(elementNsUri, elementLocalName, type);
-         if(value != null)
-         {
-            XSSimpleTypeDefinition simpleType = type.getSimpleType();
-            String typeName = simpleType.getName();
-            if(attrs == null && (SimpleTypeBindings.XS_QNAME_NAME.equals(typeName) ||
-               SimpleTypeBindings.XS_NOTATION_NAME.equals(typeName) ||
-               simpleType.getItemType() != null &&
-               (SimpleTypeBindings.XS_QNAME_NAME.equals(simpleType.getItemType().getName()) ||
-               SimpleTypeBindings.XS_NOTATION_NAME.equals(simpleType.getItemType().getName())
-               )
-               )
-            )
-            {
-               attrs = new AttributesImpl(5);
-            }
-
-            characters = marshalCharacters(elementNsUri, prefix, simpleType, value, attrs);
-         }
-      }
-
-      String qName = prefixLocalName(prefix, elementLocalName);
-      content.startElement(elementNsUri, elementLocalName, qName, attrs);
-
-      if(particle != null)
-      {
-         marshalParticle(particle, false);
-      }
-
-      if(characters != null)
-      {
-         content.characters(characters.toCharArray(), 0, characters.length());
-      }
-      content.endElement(elementNsUri, elementLocalName, qName);
-
-      if(genPrefix)
-      {
-         removePrefixMapping(prefix);
-      }
-
-      if(generatedPrefix != null)
-      {
-         removePrefixMapping(generatedPrefix);
-      }
-   }
-
-   private boolean marshalParticle(XSParticle particle, boolean declareNs)
-   {
-      boolean marshalled;
-      XSTerm term = particle.getTerm();
-      Object o;
-      Iterator i;
-      switch(term.getType())
-      {
-         case XSConstants.MODEL_GROUP:
-            o = stack.peek();
-            i = o != null && isRepeatable(particle) ? getIterator(o) : null;
-            if(i != null)
-            {
-               marshalled = true;
-               while(i.hasNext() && marshalled)
-               {
-                  Object value = i.next();
-                  stack.push(value);
-                  marshalled = marshalModelGroup(particle, declareNs);
-                  stack.pop();
-               }
-            }
-            else
-            {
-               marshalled = marshalModelGroup(particle, declareNs);
-            }
-            break;
-         case XSConstants.WILDCARD:
-            o = stack.peek();
-
-            boolean popWildcardValue = false;
-            ObjectLocalMarshaller marshaller = null;
-            FieldToWildcardMapping mapping = (FieldToWildcardMapping)field2WildcardMap.get(o.getClass());
-            if(mapping != null)
-            {
-               marshaller = mapping.marshaller;
-               o = mapping.fieldInfo.getValue(o);
-               stack.push(o);
-               popWildcardValue = true;
-            }
-
-            i = o != null && isRepeatable(particle) ? getIterator(o) : null;
-            if(i != null)
-            {
-               marshalled = true;
-               while(i.hasNext() && marshalled)
-               {
-                  Object value = i.next();
-                  marshalled = marshalWildcardOccurence(particle, marshaller, value, declareNs);
-               }
-            }
-            else
-            {
-               marshalled = marshalWildcardOccurence(particle, marshaller, o, declareNs);
-            }
-
-            if(popWildcardValue)
-            {
-               stack.pop();
-            }
-
-            break;
-         case XSConstants.ELEMENT_DECLARATION:
-            XSElementDeclaration element = (XSElementDeclaration)term;
-            XSTypeDefinition type = element.getTypeDefinition();
-            o = getElementValue(element.getNamespace(), element.getName(), type);
-
-            i = o != null && isRepeatable(particle) ? getIterator(o) : null;
-            if(i != null)
-            {
-               marshalled = true;
-               while(i.hasNext() && marshalled)
-               {
-                  Object value = i.next();
-                  marshalled =
-                     marshalElementOccurence(element.getNamespace(),
-                        element.getName(),
-                        type,
-                        value,
-                        element.getNillable(),
-                        particle.getMinOccurs() == 0,
-                        declareNs
-                     );
-               }
-            }
-            else
-            {
-               marshalled =
-                  marshalElementOccurence(element.getNamespace(),
-                     element.getName(),
-                     type,
-                     o,
-                     element.getNillable(),
-                     particle.getMinOccurs() == 0,
-                     declareNs
-                  );
-            }
-            break;
-         default:
-            throw new IllegalStateException("Unexpected term type: " + term.getType());
-      }
-      return marshalled;
-   }
-
-   private boolean marshalElementOccurence(String elementNs,
-                                           String elementLocal,
-                                           XSTypeDefinition type,
-                                           Object value,
-                                           boolean nillable,
-                                           boolean optional,
-                                           boolean declareNs)
-   {
-      boolean declareXsiType = false;
-      QName xsiTypeQName = null;
-      if(value != null)
-      {
-         xsiTypeQName = (QName)cls2TypeMap.get(value.getClass());
-         if(xsiTypeQName != null &&
-            !(type.getName().equals(xsiTypeQName.getLocalPart()) &&
-            type.getNamespace().equals(xsiTypeQName.getNamespaceURI())
-            ))
-         {
-            declareXsiType = true;
-            if(log.isTraceEnabled())
-            {
-               log.trace(value.getClass() + " is mapped to xsi:type " + xsiTypeQName);
-            }
-
-            XSTypeDefinition xsiType = model.getTypeDefinition(xsiTypeQName.getLocalPart(),
-               xsiTypeQName.getNamespaceURI()
-            );
-
-            if(xsiType == null)
-            {
-               log.warn("Class " +
-                  value.getClass() +
-                  " is mapped to type " +
-                  xsiTypeQName +
-                  " but the type is not found in schema."
-               );
-            }
-            // todo should check derivation also, i.e. if(xsiType.derivedFrom())
-            else
-            {
-               type = xsiType;
-            }
-         }
-      }
-
-      stack.push(value);
-      boolean marshalled = marshalElement(elementNs,
-         elementLocal,
-         type,
-         optional,
-         nillable,
-         declareNs,
-         declareXsiType
-      );
-      stack.pop();
-
-      return marshalled;
-   }
-
-   private boolean marshalWildcardOccurence(XSParticle particle,
-                                            ObjectLocalMarshaller marshaller,
-                                            Object value,
-                                            boolean declareNs)
-   {
-      boolean marshalled = true;
-      if(marshaller != null)
-      {
-         marshaller.marshal(ctx, value);
-      }
-      else
-      {
-         stack.push(value);
-         marshalled = marshalWildcard(particle, declareNs);
-         stack.pop();
-      }
-      return marshalled;
-   }
-
-   private boolean marshalWildcard(XSParticle particle, boolean declareNs)
-   {
-      XSWildcard wildcard = (XSWildcard)particle.getTerm();
-      Object o = stack.peek();
-      ClassMapping mapping = getClassMapping(o.getClass());
-      if(mapping == null)
-      {
-         // todo: YAH (yet another hack)
-         QName autoType = SimpleTypeBindings.typeQName(o.getClass());
-         if(autoType != null)
-         {
-            String marshalled = SimpleTypeBindings.marshal(autoType.getLocalPart(), o, null);
-            content.characters(marshalled.toCharArray(), 0, marshalled.length());
-            return true;
-         }
-         else
-         {
-            if(ignoreUnresolvedWildcard)
-            {
-               log.warn("Failed to marshal wildcard. Class mapping not found for " +
-                  o.getClass() +
-                  "@" +
-                  o.hashCode() +
-                  ": " + o
-               );
-               return true;
-            }
-            else
-            {
-               throw new IllegalStateException("Failed to marshal wildcard. Class mapping not found for " +
-                  o.getClass() +
-                  "@" +
-                  o.hashCode() +
-                  ": " + o
-               );
-            }
-         }
-      }
-
-      GenericObjectModelProvider parentProvider = this.provider;
-      Object parentRoot = this.root;
-      Stack parentStack = this.stack;
-      XSModel parentModel = this.model;
-
-      this.root = o;
-      this.stack = new StackImpl();
-      this.model = mapping.schemaUrl == null ? this.model : Util.loadSchema(mapping.schemaUrl, schemaResolver);
-      if(mapping.provider != null)
-      {
-         this.provider = mapping.provider;
-      }
-
-      boolean marshalled;
-      if(mapping.elementName != null)
-      {
-         XSElementDeclaration elDec = model.getElementDeclaration(mapping.elementName.getLocalPart(),
-            mapping.elementName.getNamespaceURI()
-         );
-
-         if(elDec == null)
-         {
-            throw new JBossXBRuntimeException("Element " + mapping.elementName + " is not declared in the schema.");
-         }
-
-         Object elementValue = provider.getRoot(root, null, elDec.getNamespace(), elDec.getName());
-         marshalled = marshalElementOccurence(elDec.getNamespace(),
-            elDec.getName(),
-            elDec.getTypeDefinition(),
-            elementValue,
-            elDec.getNillable(),
-            particle.getMinOccurs() == 0,
-            declareNs
-         );
-      }
-      else if(mapping.typeName != null)
-      {
-         XSTypeDefinition typeDef = model.getTypeDefinition(mapping.typeName.getLocalPart(),
-            mapping.typeName.getNamespaceURI()
-         );
-
-         if(typeDef == null)
-         {
-            List typeNames = new ArrayList();
-            XSNamedMap types = model.getComponents(XSConstants.TYPE_DEFINITION);
-            for(int i = 0; i < types.getLength(); ++i)
-            {
-               XSObject type = types.item(i);
-               if(!Constants.NS_XML_SCHEMA.equals(type.getNamespace()))
-               {
-                  typeNames.add(new QName(type.getNamespace(), type.getName()));
-               }
-            }
-            throw new JBossXBRuntimeException("Type " +
-               mapping.typeName +
-               " is not defined in the schema." +
-               " Defined types are: " + typeNames
-            );
-         }
-
-         Object elementValue = provider.getRoot(root, null, wildcard.getNamespace(), wildcard.getName());
-         marshalled =
-            marshalElementOccurence(wildcard.getNamespace(),
-               wildcard.getName(),
-               typeDef,
-               elementValue,
-               true,
-               particle.getMinOccurs() == 0,
-               declareNs
-            );
-      }
-      else
-      {
-         throw new JBossXBRuntimeException("Class mapping for " +
-            mapping.cls +
-            " is associated with neither global element name nor global type name."
-         );
-      }
-
-      this.root = parentRoot;
-      this.provider = parentProvider;
-      this.stack = parentStack;
-      this.model = parentModel;
-
-      return marshalled;
-   }
-
-   private boolean marshalModelGroup(XSParticle particle, boolean declareNs)
-   {
-      XSModelGroup modelGroup = (XSModelGroup)particle.getTerm();
-      boolean marshalled;
-      switch(modelGroup.getCompositor())
-      {
-         case XSModelGroup.COMPOSITOR_ALL:
-            marshalled = marshalModelGroupAll(modelGroup.getParticles(), declareNs);
-            break;
-         case XSModelGroup.COMPOSITOR_CHOICE:
-            marshalled = marshalModelGroupChoice(modelGroup.getParticles(), declareNs);
-            break;
-         case XSModelGroup.COMPOSITOR_SEQUENCE:
-            marshalled = marshalModelGroupSequence(modelGroup.getParticles(), declareNs);
-            break;
-         default:
-            throw new IllegalStateException("Unexpected compsitor: " + modelGroup.getCompositor());
-      }
-      return marshalled;
-   }
-
-   private boolean marshalModelGroupAll(XSObjectList particles, boolean declareNs)
-   {
-      boolean marshalled = false;
-      for(int i = 0; i < particles.getLength(); ++i)
-      {
-         XSParticle particle = (XSParticle)particles.item(i);
-         marshalled |= marshalParticle(particle, declareNs);
-      }
-      return marshalled;
-   }
-
-   private boolean marshalModelGroupChoice(XSObjectList particles, boolean declareNs)
-   {
-      boolean marshalled = false;
-      Content mainContent = this.content;
-      for(int i = 0; i < particles.getLength() && !marshalled; ++i)
-      {
-         XSParticle particle = (XSParticle)particles.item(i);
-         this.content = new Content();
-         marshalled = marshalParticle(particle, declareNs);
-      }
-
-      if(marshalled)
-      {
-         mainContent.append(this.content);
-      }
-      this.content = mainContent;
-
-      return marshalled;
-   }
-
-   private boolean marshalModelGroupSequence(XSObjectList particles, boolean declareNs)
-   {
-      boolean marshalled = true;
-      for(int i = 0; i < particles.getLength(); ++i)
-      {
-         XSParticle particle = (XSParticle)particles.item(i);
-         marshalled &= marshalParticle(particle, declareNs);
-      }
-      return marshalled;
-   }
-
-   private String marshalCharacters(String elementUri,
-                                    String elementPrefix,
-                                    XSSimpleTypeDefinition type,
-                                    Object value,
-                                    AttributesImpl attrs)
-   {
-      String marshalled;
-      if(type.getItemType() != null)
-      {
-         XSSimpleTypeDefinition itemType = type.getItemType();
-         if(Constants.NS_XML_SCHEMA.equals(itemType.getNamespace()))
-         {
-            List list;
-            if(value instanceof List)
-            {
-               list = (List)value;
-            }
-            else if(value.getClass().isArray())
-            {
-               list = asList(value);
-            }
-            else
-            {
-               // todo: qname are also not yet supported
-               throw new JBossXBRuntimeException(
-                  "Expected value for list type is an array or " + List.class.getName() + " but got: " + value
-               );
-            }
-
-            marshalled = SimpleTypeBindings.marshalList(itemType.getName(), list, null);
-         }
-         else
-         {
-            throw new JBossXBRuntimeException("Marshalling of list types with item types not from " +
-               Constants.NS_XML_SCHEMA + " is not supported."
-            );
-         }
-      }
-      else if(Constants.NS_XML_SCHEMA.equals(type.getNamespace()))
-      {
-         String typeName = type.getName();
-
-         String prefix = null;
-         boolean removePrefix = false;
-         if(SimpleTypeBindings.XS_QNAME_NAME.equals(typeName) ||
-            SimpleTypeBindings.XS_NOTATION_NAME.equals(typeName))
-         {
-            QName qName = (QName)value;
-            if(qName.getNamespaceURI() != null && qName.getNamespaceURI().length() > 0)
-            {
-               prefix = nsRegistry.getPrefix(qName.getNamespaceURI());
-               if(prefix == null)
-               {
-                  prefix = qName.getPrefix();
-                  if(prefix == null || prefix.length() == 0)
-                  {
-                     prefix = qName.getLocalPart() + "_ns";
-                  }
-                  nsRegistry.addPrefixMapping(prefix, qName.getNamespaceURI());
-                  declareNs(attrs, prefix, qName.getNamespaceURI());
-
-                  removePrefix = true;
-               }
-            }
-         }
-         marshalled = SimpleTypeBindings.marshal(typeName, value, nsRegistry);
-
-         if(removePrefix)
-         {
-            nsRegistry.removePrefixMapping(prefix);
-         }
-      }
-      // todo: this is a quick fix for boolean pattern (0|1 or true|false) should be refactored
-      else if(type.getLexicalPattern().item(0) != null
-         &&
-         type.derivedFrom(Constants.NS_XML_SCHEMA,
-            Constants.QNAME_BOOLEAN.getLocalPart(),
-            XSConstants.DERIVATION_RESTRICTION
-         ))
-      {
-         String item = type.getLexicalPattern().item(0);
-         if(item.indexOf('0') != -1 && item.indexOf('1') != -1)
-         {
-            marshalled = ((Boolean)value).booleanValue() ? "1" : "0";
-         }
-         else
-         {
-            marshalled = ((Boolean)value).booleanValue() ? "true" : "false";
-         }
-      }
-      else
-      {
-         StringList lexicalEnumeration = type.getLexicalEnumeration();
-         if(lexicalEnumeration != null && lexicalEnumeration.getLength() > 0)
-         {
-            Method getValue;
-            try
-            {
-               getValue = value.getClass().getMethod("value", null);
-            }
-            catch(NoSuchMethodException e)
-            {
-               try
-               {
-                  getValue = value.getClass().getMethod("getValue", null);
-               }
-               catch(NoSuchMethodException e1)
-               {
-                  List values = new ArrayList(lexicalEnumeration.getLength());
-                  for(int i = 0; i < lexicalEnumeration.getLength(); ++i)
-                  {
-                     values.add(lexicalEnumeration.item(i));
-                  }
-
-                  throw new JBossXBRuntimeException("Failed to find neither value() nor getValue() in " +
-                     value.getClass() +
-                     " which is bound to enumeration type (" +
-                     type.getNamespace() +
-                     ", " +
-                     type.getName() + "): " + values
-                  );
-               }
-            }
-
-            try
-            {
-               value = getValue.invoke(value, null);
-            }
-            catch(Exception e)
-            {
-               throw new JBossXBRuntimeException(
-                  "Failed to invoke getValue() on " + value + " to get the enumeration value", e
-               );
-            }
-         }
-
-         marshalled = marshalCharacters(elementUri,
-            elementPrefix,
-            (XSSimpleTypeDefinition)type.getBaseType(),
-            value, attrs
-         );
-      }
-      return marshalled;
-   }
-
-   /**
-    * Adds xsi:type attribute and optionally declares namespaces for xsi and type's namespace.
-    * @param type  the type to declare xsi:type attribute for
-    * @param attrs  the attributes to add xsi:type attribute to
-    * @return  prefix for the type's ns if it was generated
-    */
-   private String declareXsiType(XSTypeDefinition type, AttributesImpl attrs)
-   {
-      String result = null;
-      String xsiPrefix = nsRegistry.getPrefix(Constants.NS_XML_SCHEMA_INSTANCE);
-      if(xsiPrefix == null)
-      {
-         attrs.add(Constants.NS_XML_SCHEMA, "xmlns", "xmlns:xsi", null, Constants.NS_XML_SCHEMA_INSTANCE);
-         xsiPrefix = "xsi";
-      }
-
-      String pref = getPrefix(type.getNamespace());
-      if(pref == null)
-      {
-         // the ns is not declared
-         result = pref = type.getName() + "_ns";
-      }
-
-      String typeQName = pref == null ? type.getName() : pref + ':' + type.getName();
-      attrs.add(Constants.NS_XML_SCHEMA_INSTANCE, "type", xsiPrefix + ":type", null, typeQName);
-      return result;
-   }
-
-   private Object getElementValue(String elementNs, String elementLocal, XSTypeDefinition type)
-   {
-      Object value;
-      Object peeked = stack.isEmpty() ? root : stack.peek();
-      if(peeked == null)
-      {
-         value = null;
-      }
-      else if(peeked instanceof Collection || peeked.getClass().isArray())
-      {
-         // collection is the provider
-         value = peeked;
-      }
-      else
-      {
-         XSTypeDefinition parentType = currentElementType;
-         currentElementType = type;
-
-         value = provider.getChildren(peeked, ctx, elementNs, elementLocal);
-         if(value == null)
-         {
-            value = provider.getElementValue(peeked, ctx, elementNs, elementLocal);
-         }
-
-         currentElementType = parentType;
-      }
-      return value;
-   }
-
-   private Object getSimpleContentValue(String elementNs, String elementLocal, XSTypeDefinition type)
-   {
-      Object value;
-      Object peeked = stack.isEmpty() ? root : stack.peek();
-      if(peeked == null)
-      {
-         value = null;
-      }
-      else
-      {
-         XSTypeDefinition parentType = currentElementType;
-         currentElementType = type;
-         value = provider.getElementValue(peeked, ctx, elementNs, elementLocal);
-         currentElementType = parentType;
-      }
-      return value;
-   }
-
-   private void writeNillable(String elementNs, String elementLocal, boolean nillable)
-   {
-      if(!supportNil)
-      {
-         return;
-      }
-
-      if(!nillable)
-      {
-         throw new JBossXBRuntimeException("Failed to marshal " +
-            new QName(elementNs, elementLocal) +
-            ": Java value is null but the element is not nillable."
-         );
-      }
-
-      AttributesImpl attrs;
-      String prefix = getPrefix(elementNs);
-      if(prefix == null && elementNs != null && elementNs.length() > 0)
-      {
-         prefix = "ns_" + elementLocal;
-         attrs = new AttributesImpl(2);
-         attrs.add(null, prefix, "xmlns:" + prefix, null, elementNs);
-      }
-      else
-      {
-         attrs = new AttributesImpl(1);
-      }
-
-      String xsiPrefix = getPrefix(Constants.NS_XML_SCHEMA_INSTANCE);
-      if(xsiPrefix == null)
-      {
-         xsiPrefix = "xsi";
-         attrs.add(null,
-            xsiPrefix,
-            "xmlns:xsi",
-            null,
-            Constants.NS_XML_SCHEMA_INSTANCE
-         );
-      }
-
-      String nilQName = xsiPrefix + ":nil";
-      attrs.add(Constants.NS_XML_SCHEMA_INSTANCE, "nil", nilQName, null, "1");
-
-      String qName = prefixLocalName(prefix, elementLocal);
-      content.startElement(elementNs, elementLocal, qName, attrs);
-      content.endElement(elementNs, elementLocal, qName);
-   }
-
-   private static boolean isArrayWrapper(XSTypeDefinition type)
-   {
-      boolean is = false;
-      if(XSTypeDefinition.COMPLEX_TYPE == type.getTypeCategory())
-      {
-         XSComplexTypeDefinition cType = (XSComplexTypeDefinition)type;
-         XSParticle particle = cType.getParticle();
-         if(particle != null)
-         {
-            is = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
-         }
-      }
-      return is;
-   }
-
-   private Iterator getIterator(Object value)
-   {
-      Iterator i = null;
-      if(value instanceof Collection)
-      {
-         i = ((Collection)value).iterator();
-      }
-      else if(value.getClass().isArray())
-      {
-         final Object arr = value;
-         i = new Iterator()
-         {
-            private int curInd = 0;
-            private int length = Array.getLength(arr);
-
-            public boolean hasNext()
-            {
-               return curInd < length;
-            }
-
-            public Object next()
-            {
-               return Array.get(arr, curInd++);
-            }
-
-            public void remove()
-            {
-               throw new UnsupportedOperationException("remove is not implemented.");
-            }
-         };
-      }
-      else if(value instanceof Iterator)
-      {
-         i = (Iterator)value;
-      }
-      else
-      {
-         //throw new JBossXBRuntimeException("Unexpected type for children: " + value.getClass());
-      }
-      return i;
-   }
-
-   private static boolean isRepeatable(XSParticle particle)
-   {
-      return particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1 || particle.getMinOccurs() > 1;
-   }
-
-   private static final List asList(final Object arr)
-   {
-      return new AbstractList()
-      {
-         private final Object array = arr;
-
-         public Object get(int index)
-         {
-            return Array.get(array, index);
-         }
-
-         public int size()
-         {
-            return Array.getLength(array);
-         }
-      };
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/XercesXsMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/XercesXsMarshaller.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueList.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueList.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueList.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,214 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.group;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ValueList
-{
-   private final ValueListInitializer initializer;
-   private final ValueListHandler handler;
-   private final Class targetClass;
-   //private final int requiredTotal;
-
-   //private final Object[] requiredValues;
-   //private int state;
-   //private Map nonRequiredValues = Collections.EMPTY_MAP;
-   //private List nonRequiredBindings;
-   private List nonRequiredValues = Collections.EMPTY_LIST;
-
-   ValueList(ValueListInitializer initializer, ValueListHandler handler, Class targetClass)
-   {
-      this.initializer = initializer;
-      this.handler = handler;
-      this.targetClass = targetClass;
-      //this.requiredTotal = initializer.getRequiredBindings().size();
-      //requiredValues = new Object[requiredTotal];
-   }
-
-   void setRequiredValue(int index, int stateIncrement, Object value)
-   {
-      throw new UnsupportedOperationException();
-/*
-      if(index >= requiredTotal)
-      {
-         throw new JBossXBRuntimeException(
-            "Maximum argument index for this value list is " + requiredTotal + " but got " + index
-         );
-      }
-      requiredValues[index] = value;
-      state += stateIncrement;
-*/
-   }
-
-   Object getRequiredValue(int index)
-   {
-/*
-      if(index >= requiredTotal)
-      {
-         throw new JBossXBRuntimeException(
-            "Maximum argument index for this value list is " + requiredTotal + " but got " + index
-         );
-      }
-      return requiredValues[index];
-*/
-      throw new UnsupportedOperationException();
-   }
-
-   int getState()
-   {
-//      return state;
-      throw new UnsupportedOperationException();
-   }
-
-   void setAttributeValue(QName qName, AttributeBinding binding, Object value)
-   {
-      setNonRequiredValue(qName, binding, null, value);
-   }
-
-   void addTextValue(QName qName, ParticleBinding particle, CharactersHandler handler, Object value)
-   {
-      setNonRequiredValue(qName, particle, handler, value);
-   }
-
-   void addTermValue(QName qName, ParticleBinding binding, Object handler, Object value)
-   {
-      if(binding.isRepeatable())
-      {
-         NonRequiredValue last = (NonRequiredValue)(nonRequiredValues.isEmpty() ?
-            null :
-            nonRequiredValues.get(nonRequiredValues.size() - 1)
-            );
-
-         if(last == null || last.binding != binding)
-         {
-            value = Collections.singletonList(value);
-            setNonRequiredValue(qName, binding, handler, value);
-         }
-         else
-         {
-            List list = (List)last.value;
-            if(list.size() == 1)
-            {
-               list = new ArrayList(list);
-               last.value = list;
-            }
-            list.add(value);
-         }
-      }
-      else
-      {
-         setNonRequiredValue(qName, binding, handler, value);
-      }
-   }
-
-   void setNonRequiredValue(QName qName, Object binding, Object handler, Object value)
-   {
-      NonRequiredValue val = new NonRequiredValue(qName, binding, handler, value);
-      switch(nonRequiredValues.size())
-      {
-         case 0:
-            nonRequiredValues = Collections.singletonList(val);
-            break;
-         case 1:
-            nonRequiredValues = new ArrayList(nonRequiredValues);
-         default:
-            nonRequiredValues.add(val);
-      }
-   }
-
-   Object getNonRequiredValue(QName qName)
-   {
-//      return nonRequiredValues.get(qName);
-      throw new UnsupportedOperationException();
-   }
-
-   public ValueListInitializer getInitializer()
-   {
-      return initializer;
-   }
-
-   public List getRequiredValues()
-   {
-//      return Arrays.asList(requiredValues);
-      throw new UnsupportedOperationException();
-   }
-
-   public Map getNonRequiredValues()
-   {
-//      return nonRequiredValues;
-      throw new UnsupportedOperationException();
-   }
-
-   public List getNonRequiredBindings()
-   {
-//      return nonRequiredBindings;
-      throw new UnsupportedOperationException();
-   }
-
-   public ValueListHandler getHandler()
-   {
-      return handler;
-   }
-
-   public Class getTargetClass()
-   {
-      return targetClass;
-   }
-
-   public NonRequiredValue getValue(int i)
-   {
-      return (NonRequiredValue)nonRequiredValues.get(i);
-   }
-
-   public int size()
-   {
-      return nonRequiredValues.size();
-   }
-
-   public static final class NonRequiredValue
-   {
-      public final QName qName;
-      public final Object binding;
-      public final Object handler;
-      public Object value;
-
-      public NonRequiredValue(QName qName, Object binding, Object handler, Object value)
-      {
-         this.qName = qName;
-         this.binding = binding;
-         this.handler = handler;
-         this.value = value;
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueList.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueList.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,352 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.group;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import org.jboss.util.Classes;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface ValueListHandler
-{
-   ValueListHandler IMMUTABLE = new ValueListHandler()
-   {
-      public Object newInstance(ParticleBinding particle, ValueList valueList)
-      {
-         Class cls = valueList.getTargetClass();
-         Map map = valueList.getNonRequiredValues();
-
-         Collection values = map.values();
-         if(values.isEmpty())
-         {
-            throw new JBossXBRuntimeException("Value list does not contain non-required values.");
-         }
-
-         Constructor ctor = null;
-         Constructor[] ctors = cls.getConstructors();
-
-         if(ctors == null || ctors.length == 0)
-         {
-            throw new JBossXBRuntimeException("The class has no declared constructors: " + cls);
-         }
-
-         for(int i = 0; i < ctors.length; ++i)
-         {
-            Class[] types = ctors[i].getParameterTypes();
-
-            if(types == null || types.length == 0)
-            {
-               throw new IllegalStateException("Found no-arg constructor for immutable " + cls);
-            }
-
-            if(types.length == map.size())
-            {
-               ctor = ctors[i];
-
-               int typeInd = 0;
-               Iterator iter = values.iterator();
-               while(iter.hasNext())
-               {
-                  Class type = types[typeInd++];
-                  if(type.isPrimitive())
-                  {
-                     type = Classes.getPrimitiveWrapper(type);
-                  }
-
-                  if(!type.isAssignableFrom(iter.next().getClass()))
-                  {
-                     ctor = null;
-                     break;
-                  }
-               }
-
-               if(ctor != null)
-               {
-                  break;
-               }
-            }
-         }
-
-         if(ctor == null)
-         {
-            StringBuffer buf = new StringBuffer();
-            buf.append("There is no ctor in ")
-               .append(cls)
-               .append(" that would take the following arguments:\n");
-            int cnt = 0;
-            for(Iterator i = values.iterator(); i.hasNext();)
-            {
-               Object o = i.next();
-               buf.append(' ').append(++cnt).append(") ").append(o.getClass()).append(": ").append(o).append('\n');
-            }
-            throw new IllegalStateException(buf.toString());
-         }
-
-         try
-         {
-            return ctor.newInstance(values.toArray());
-         }
-         catch(Exception e)
-         {
-            throw new IllegalStateException("Failed to create immutable instance of " +
-               cls +
-               " using arguments: "
-               + values + ": " + e.getMessage()
-            );
-         }
-      }
-   };
-
-   ValueListHandler NON_DEFAULT_CTOR = new ValueListHandler()
-   {
-      public Object newInstance(ParticleBinding particle, ValueList valueList)
-      {
-         Class cls = valueList.getTargetClass();
-         int size = valueList.size();
-
-         if(size == 0)
-         {
-            try
-            {
-               return newInstance(cls.getConstructor(null), null);
-            }
-            catch(NoSuchMethodException e)
-            {
-               throw new JBossXBRuntimeException(
-                  "Value list does not contain non-required values and there is no no-arg ctor in " + cls
-               );
-            }
-         }
-
-         Constructor ctor = matchBestCtor(cls, valueList);
-
-         if(ctor == null)
-         {
-            StringBuffer buf = new StringBuffer();
-            buf.append("Failed to find no-arg ctor or best-match ctor in ")
-               .append(cls)
-               .append(", property values:\n");
-            int cnt = 0;
-            for(int i = 0; i < size; ++i)
-            {
-               Object o = valueList.getValue(i).value;
-               buf.append(' ').append(++cnt).append(") ").append(o).append('\n');
-            }
-            throw new JBossXBRuntimeException(buf.toString());
-         }
-
-         Object o;
-         int argsTotal = ctor.getParameterTypes().length;
-         if(argsTotal == size)
-         {
-            Object[] args = getArgs(ctor, valueList);
-            o = newInstance(ctor, args);
-         }
-         else
-         {
-            Object[] args = getArgs(ctor, valueList);
-            o = newInstance(ctor, args);
-
-            int i = argsTotal;
-            while(i < size)
-            {
-               ValueList.NonRequiredValue valueEntry = valueList.getValue(i++);
-               Object binding = valueEntry.binding;
-               if(binding instanceof ParticleBinding)
-               {
-                  Object handler = valueEntry.handler;
-                  ParticleBinding childParticle = (ParticleBinding)binding;
-                  if(handler instanceof ParticleHandler)
-                  {
-                     ParticleHandler pHandler = (ParticleHandler)handler;
-                     if(childParticle.isRepeatable())
-                     {
-                        List list = (List)valueEntry.value;
-                        for(int listInd = 0; listInd < list.size(); ++listInd)
-                        {
-                           pHandler.setParent(o, list.get(listInd), valueEntry.qName, childParticle, particle);
-                        }
-                     }
-                     else
-                     {
-                        pHandler.setParent(o, valueEntry.value, valueEntry.qName, childParticle, particle);
-                     }
-                  }
-                  else
-                  {
-                     ((CharactersHandler)handler).setValue(valueEntry.qName,
-                        (ElementBinding)childParticle.getTerm(),
-                        o,
-                        valueEntry.value
-                     );
-                  }
-               }
-               else if(binding instanceof AttributeBinding)
-               {
-                  AttributeBinding attr = (AttributeBinding)binding;
-                  AttributeHandler handler = attr.getHandler();
-                  if(handler != null)
-                  {
-                     handler.attribute(valueEntry.qName, attr.getQName(), attr, o, valueEntry.value);
-                  }
-                  else
-                  {
-                     throw new JBossXBRuntimeException("Attribute binding present but has no handler: element=" +
-                        valueEntry.qName +
-                        ", attrinute=" +
-                        attr.getQName()
-                     );
-                  }
-               }
-               else
-               {
-                  throw new JBossXBRuntimeException("Unexpected binding type: " + binding);
-               }
-            }
-         }
-
-         return o;
-      }
-
-      private Constructor matchBestCtor(Class cls, ValueList valueList)
-      {
-         Constructor bestMatch = null;
-         int bestMatchArgsTotal = 0;
-         Constructor[] ctors = cls.getConstructors();
-         int size = valueList.size();
-
-         for(int i = 0; i < ctors.length; ++i)
-         {
-            Constructor ctor = ctors[i];
-            Class[] types = ctor.getParameterTypes();
-
-            if((types == null || types.length == 0) && bestMatch == null)
-            {
-               bestMatch = ctor;
-               continue;
-            }
-
-            if(bestMatchArgsTotal <= types.length)
-            {
-               int typeInd = 0;
-               for(int valueInd = 0; typeInd < types.length && valueInd < size; ++typeInd, ++valueInd)
-               {
-                  Class type = types[typeInd];
-                  if(type.isPrimitive())
-                  {
-                     type = Classes.getPrimitiveWrapper(type);
-                  }
-
-                  ValueList.NonRequiredValue valueEntry = valueList.getValue(valueInd);
-                  Object value = valueEntry.value;
-                  if(value != null &&
-                     !(type.isAssignableFrom(value.getClass()) ||
-                     // if particle is repeatable and the type is array of a specific collection
-                     // then we assume we can convert the arg later at creation time
-                     // todo this code should be smarter
-                     valueEntry.binding instanceof ParticleBinding &&
-                     ((ParticleBinding)valueEntry.binding).isRepeatable() &&
-                     type.isArray()
-                     ))
-                  {
-                     break;
-                  }
-
-                  if(bestMatchArgsTotal == types.length &&
-                     !bestMatch.getParameterTypes()[typeInd].isAssignableFrom(type))
-                  {
-                     break;
-                  }
-               }
-
-               if(typeInd == types.length)
-               {
-                  bestMatch = ctor;
-                  bestMatchArgsTotal = types.length;
-               }
-            }
-         }
-         return bestMatch;
-      }
-
-      private Object newInstance(Constructor bestMatch, Object[] args)
-      {
-         try
-         {
-            return bestMatch.newInstance(args);
-         }
-         catch(Exception e)
-         {
-            throw new JBossXBRuntimeException("Failed to create an instance of " +
-               bestMatch.getDeclaringClass() +
-               " using the following ctor arguments " +
-               Arrays.asList(args), e
-            );
-         }
-      }
-
-      private Object[] getArgs(Constructor ctor, ValueList valueList)
-      {
-         Class[] types = ctor.getParameterTypes();
-         Object[] args = new Object[types.length];
-         for(int i = 0; i < types.length; ++i)
-         {
-            ValueList.NonRequiredValue valueEntry = valueList.getValue(i);
-            Object arg = valueEntry.value;
-            if(valueEntry.value != null && !types[i].isAssignableFrom(arg.getClass()))
-            {
-               // if type is array then convert collection to array
-               // todo this part should be smarter about collections
-               if(types[i].isArray() && Collection.class.isAssignableFrom(arg.getClass()))
-               {
-                  Collection col = (Collection)arg;
-                  arg = Array.newInstance(types[i].getComponentType(), col.size());
-                  int arrInd = 0;
-                  for(Iterator iter = col.iterator(); iter.hasNext();)
-                  {
-                     Array.set(arg, arrInd++, iter.next());
-                  }
-               }
-            }
-            args[i] = arg;
-         }
-         return args;
-      }
-   };
-
-   Object newInstance(ParticleBinding particle, ValueList valueList);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListInitializer.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListInitializer.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListInitializer.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,194 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.group;
-
-import java.util.Map;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ValueListInitializer
-{
-   private int initializedState;
-   private Map attrIndex = Collections.EMPTY_MAP;
-   private Map elemIndex = Collections.EMPTY_MAP;
-   private List requiredBindings = Collections.EMPTY_LIST;
-
-   public void addRequiredAttribute(QName qName, AttributeBinding binding)
-   {
-/*
-      Integer index = new Integer(requiredBindings.size());
-      switch(attrIndex.size())
-      {
-         case 0:
-            attrIndex = Collections.singletonMap(qName, index);
-            break;
-         case 1:
-            attrIndex = new HashMap(attrIndex);
-         default:
-            attrIndex.put(qName, index);
-      }
-      addBinding(binding);
-      initializedState += Math.abs(qName.hashCode());
-*/
-      throw new UnsupportedOperationException();
-   }
-
-   public void addRequiredElement(QName qName, ElementBinding binding)
-   {
-/*
-      Integer index = new Integer(requiredBindings.size());
-      switch(elemIndex.size())
-      {
-         case 0:
-            elemIndex = Collections.singletonMap(qName, index);
-            break;
-         case 1:
-            elemIndex = new HashMap(elemIndex);
-         default:
-            elemIndex.put(qName, index);
-      }
-      addBinding(binding);
-      initializedState += Math.abs(qName.hashCode());
-*/
-      throw new UnsupportedOperationException();
-   }
-
-   public ValueList newValueList(ValueListHandler handler, Class targetClass)
-   {
-      return new ValueList(this, handler, targetClass);
-   }
-
-   public void addAttributeValue(QName qName, AttributeBinding binding, ValueList valueList, Object value)
-   {
-      Integer index = (Integer)attrIndex.get(qName);
-      if(index == null)
-      {
-         valueList.setAttributeValue(qName, binding, value);
-      }
-      else
-      {
-         if(isInitialized(valueList))
-         {
-            throw new JBossXBRuntimeException("The value list has already been initialized!");
-         }
-         valueList.setRequiredValue(index.intValue(), qName.hashCode(), value);
-      }
-   }
-
-   public void addTextValue(QName qName,
-                            ParticleBinding particle,
-                            CharactersHandler handler,
-                            ValueList valueList,
-                            Object value)
-   {
-      valueList.addTextValue(qName, particle, handler, value);
-   }
-
-   public void addTermValue(QName qName, ParticleBinding binding, Object handler, ValueList valueList, Object value)
-   {
-      Integer index = (Integer)elemIndex.get(qName);
-      if(index == null)
-      {
-         valueList.addTermValue(qName, binding, handler, value);
-      }
-      else
-      {
-         if(isInitialized(valueList))
-         {
-            throw new JBossXBRuntimeException("The value list has already been initialized!");
-         }
-         valueList.setRequiredValue(index.intValue(), qName.hashCode(), value);
-      }
-   }
-
-   public boolean isInitialized(ValueList valueList)
-   {
-//      return requiredBindings.size() == 0 || initializedState == valueList.getState();
-      throw new UnsupportedOperationException();
-   }
-
-   public Object getAttributeValue(QName qName, ValueList valueList)
-   {
-/*
-      Object value;
-      Integer index = (Integer)attrIndex.get(qName);
-      if(index == null)
-      {
-         value = valueList.getNonRequiredValue(qName);
-      }
-      else
-      {
-         value = valueList.getRequiredValue(index.intValue());
-      }
-      return value;
-*/
-      throw new UnsupportedOperationException();
-   }
-
-   public Object getElementValue(QName qName, ValueList valueList)
-   {
-/*
-      Object value;
-      Integer index = (Integer)elemIndex.get(qName);
-      if(index == null)
-      {
-         value = valueList.getNonRequiredValue(qName);
-      }
-      else
-      {
-         value = valueList.getRequiredValue(index.intValue());
-      }
-      return value;
-*/
-      throw new UnsupportedOperationException();
-   }
-
-   public List getRequiredBindings()
-   {
-//      return requiredBindings;
-      throw new UnsupportedOperationException();
-   }
-
-   // Private
-
-   private void addBinding(Object binding)
-   {
-      if(requiredBindings == Collections.EMPTY_LIST)
-      {
-         requiredBindings = new ArrayList();
-      }
-      requiredBindings.add(binding);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListInitializer.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/group/ValueListInitializer.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfo.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfo.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfo.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,128 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.introspection;
-
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Method;
-import java.util.Map;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision: $</tt>
- */
-public class ClassInfo
-{
-   private static final Object FIELD_INFO_NA = new Object();
-   private final Class type;
-   private Map fields = new ConcurrentHashMap();
-   private boolean introspected;
-
-   public ClassInfo(Class cls)
-   {
-      this.type = cls;
-   }
-
-   public Class getType()
-   {
-      return type;
-   }
-
-   /**
-    * @param name     the name of the field
-    * @param required if true never returns null (if the FieldInfo is not available, an exception will be thrown).
-    *                 If false and FieldInfo is not available then null will be returned.
-    * @return an instance of FieldInfo or null
-    */
-   public FieldInfo getFieldInfo(String name, boolean required)
-   {
-      Object o = fields.get(name);
-      if(o == null)
-      {
-         FieldInfo fieldInfo = FieldInfo.getFieldInfo(this, name);
-         if(fieldInfo == null)
-         {
-            fields.put(name, FIELD_INFO_NA);
-         }
-         else
-         {
-            return fieldInfo;
-         }
-      }
-      else if(o != FIELD_INFO_NA)
-      {
-         return (FieldInfo)o;
-      }
-
-      if(required)
-      {
-         throw new JBossXBRuntimeException(
-            "Failed to find read method or field for property '" + name + "' in " + type
-         );
-      }
-
-      return null;
-   }
-
-   void addFieldInfo(FieldInfo fieldInfo)
-   {
-      fields.put(fieldInfo.getName(), fieldInfo);
-   }
-
-   FieldInfo introspect(String name)
-   {
-      if(introspected)
-      {
-         return null;
-      }
-
-      try
-      {
-         BeanInfo info = java.beans.Introspector.getBeanInfo(type);
-         PropertyDescriptor[] props = info.getPropertyDescriptors();
-         if(props != null)
-         {
-            for(int i = 0; i < props.length; ++i)
-            {
-               PropertyDescriptor prop = props[i];
-               Method readMethod = prop.getReadMethod();
-               // todo: there are issues with null readMethod, e.g. scale in BigDecimal...
-               if(readMethod != null)
-               {
-                  Method writeMethod = prop.getWriteMethod();
-                  FieldInfo fieldInfo = new FieldInfo(type, prop.getName(), readMethod, writeMethod);
-                  addFieldInfo(fieldInfo);
-               }
-            }
-         }
-      }
-      catch(IntrospectionException e)
-      {
-      }
-
-      introspected = true;
-      return getFieldInfo(name, false);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfo.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfo.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfos.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfos.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfos.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,174 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.introspection;
-
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.lang.ref.WeakReference;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.util.NoopMap;
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision: $</tt>
- */
-public class ClassInfos
-{
-   private static Map classloaderCache = new WeakHashMap();
-
-   /**
-    * Disables caching of ClassInfo's. Already cached ClassInfo's will be lost after
-    * the method returns.
-    */
-   public static void disableCache()
-   {
-      synchronized(classloaderCache)
-      {
-         classloaderCache = NoopMap.INSTANCE;
-      }
-   }
-
-   /**
-    * Enables caching of ClassInfo's unless caching is already enabled.
-    */
-   public static void enableCache()
-   {
-      synchronized(classloaderCache)
-      {
-         if(!isCacheEnabled())
-         {
-            classloaderCache = new WeakHashMap();
-         }
-      }
-   }
-
-   /**
-    * @return true if caching is enabled, false otherwise.
-    */
-   public static boolean isCacheEnabled()
-   {
-      synchronized(classloaderCache)
-      {
-         return classloaderCache != NoopMap.INSTANCE;
-      }
-   }
-
-   /**
-    * Flushes all the cached ClassInfo's.
-    */
-   public static void flushCache()
-   {
-      synchronized(classloaderCache)
-      {
-         classloaderCache.clear();
-      }
-   }
-
-   /**
-    * Evicts ClassInfo for a specific class.
-    * @param cls  fully qualified class name of the class
-    */
-   public static void flushCache(String cls)
-   {
-      ClassLoader cl = Thread.currentThread().getContextClassLoader();
-      Map classLoaderCache = getClassLoaderCache(cl);
-      classLoaderCache.remove(cls);
-   }
-
-   /**
-    * Evicts ClassInfo for a specific class.
-    * @param cls  the class to remove the ClassInfo for
-    */
-   public static void flushCache(Class cls)
-   {
-      Map classLoaderCache = getClassLoaderCache(cls.getClassLoader());
-      classLoaderCache.remove(cls.getName());
-   }
-
-   public static ClassInfo getClassInfo(Class cls)
-   {
-      Map classLoaderCache = getClassLoaderCache(cls.getClassLoader());
-
-      WeakReference weak = (WeakReference)classLoaderCache.get(cls.getName());
-      if(weak != null)
-      {
-         Object result = weak.get();
-         if(result != null)
-         {
-            return (ClassInfo)result;
-         }
-      }
-
-      ClassInfo clsInfo = new ClassInfo(cls);
-      weak = new WeakReference(clsInfo);
-      classLoaderCache.put(cls.getName(), weak);
-      return clsInfo;
-   }
-
-   public static ClassInfo getClassInfo(String name, boolean required)
-   {
-      ClassLoader cl = Thread.currentThread().getContextClassLoader();
-      Map classLoaderCache = getClassLoaderCache(cl);
-
-      WeakReference weak = (WeakReference)classLoaderCache.get(name);
-      if(weak != null)
-      {
-         Object result = weak.get();
-         if(result != null)
-         {
-            return (ClassInfo)result;
-         }
-      }
-
-      try
-      {
-         ClassInfo clsInfo = new ClassInfo(cl.loadClass(name));
-         weak = new WeakReference(clsInfo);
-         classLoaderCache.put(name, weak);
-         return clsInfo;
-      }
-      catch(ClassNotFoundException e)
-      {
-         if(required)
-         {
-            throw new JBossXBRuntimeException("Failed to load class " + name);
-         }
-      }
-
-      return null;
-   }
-
-   private static Map getClassLoaderCache(ClassLoader cl)
-   {
-      synchronized(classloaderCache)
-      {
-         Map result = (Map) classloaderCache.get(cl);
-         if (result == null)
-         {
-            result = new ConcurrentHashMap();
-            classloaderCache.put(cl, result);
-         }
-         return result;
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfos.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/ClassInfos.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/FieldInfo.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/FieldInfo.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/FieldInfo.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,239 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.introspection;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import org.jboss.util.Classes;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision: $</tt>
- */
-public class FieldInfo
-{
-   private static final Object[] NO_ARGS = new Object[0];
-
-   private interface GetValueAccess
-   {
-      Object get(Object owner) throws IllegalAccessException, InvocationTargetException;
-   }
-
-   public static class GetValueAccessFactory
-   {
-      public static GetValueAccess fieldAccess(final Field field)
-      {
-         return new GetValueAccess()
-         {
-            public Object get(Object owner) throws IllegalAccessException
-            {
-               return field.get(owner);
-            }
-         };
-      }
-
-      public static GetValueAccess methodAccess(final Method m)
-      {
-         return new GetValueAccess()
-         {
-            public Object get(Object owner) throws IllegalAccessException, InvocationTargetException
-            {
-               return m.invoke(owner, NO_ARGS);
-            }
-         };
-      }
-   }
-
-   private interface SetValueAccess
-   {
-      void set(Object owner, Object value) throws IllegalAccessException, InvocationTargetException;
-   }
-
-   public static class SetValueAccessFactory
-   {
-      public static SetValueAccess fieldAccess(final Field field)
-      {
-         return new SetValueAccess()
-         {
-            public void set(Object owner, Object value) throws IllegalAccessException
-            {
-               field.set(owner, value);
-            }
-         };
-      }
-
-      public static SetValueAccess methodAccess(final Method m)
-      {
-         return new SetValueAccess()
-         {
-            public void set(Object owner, Object value) throws IllegalAccessException, InvocationTargetException
-            {
-               m.invoke(owner, new Object[]{value});
-            }
-         };
-      }
-   }
-
-   static FieldInfo getFieldInfo(ClassInfo clsInfo, String name)
-   {
-      FieldInfo fieldInfo = null;
-      try
-      {
-         Method getter = Classes.getAttributeGetter(clsInfo.getType(), name);
-         fieldInfo = new FieldInfo(clsInfo.getType(), name, getter);
-         clsInfo.addFieldInfo(fieldInfo);
-      }
-      catch(NoSuchMethodException e)
-      {
-         try
-         {
-            Field field = clsInfo.getType().getField(name);
-            fieldInfo = new FieldInfo(clsInfo.getType(), field);
-            clsInfo.addFieldInfo(fieldInfo);
-         }
-         catch(NoSuchFieldException e1)
-         {
-            fieldInfo = clsInfo.introspect(name);
-         }
-      }
-      return fieldInfo;
-   }
-
-   public static FieldInfo getFieldInfo(Class cls, String fieldName, boolean required)
-   {
-      return ClassInfos.getClassInfo(cls).getFieldInfo(fieldName, required);
-   }
-
-   private final Class owner;
-   private final String name;
-   private final Class type;
-   private final GetValueAccess getter;
-   private SetValueAccess setter;
-   private boolean setterInitialized;
-
-   public FieldInfo(Class owner, String name, Method getter)
-   {
-      this.owner = owner;
-      this.name = name;
-      this.type = getter.getReturnType();
-      this.getter = GetValueAccessFactory.methodAccess(getter);
-   }
-
-   public FieldInfo(Class owner, String name, Method getter, Method setter)
-   {
-      this.owner = owner;
-      this.name = name;
-      this.type = getter.getReturnType();
-      this.getter = GetValueAccessFactory.methodAccess(getter);
-      this.setter = SetValueAccessFactory.methodAccess(setter);
-      setterInitialized = true;
-   }
-
-   public FieldInfo(Class owner, Field field)
-   {
-      this.owner = owner;
-      this.name = field.getName();
-      this.type = field.getType();
-      this.getter = GetValueAccessFactory.fieldAccess(field);
-      this.setter = SetValueAccessFactory.fieldAccess(field);
-      setterInitialized = true;
-   }
-
-   public Class getOwner()
-   {
-      return owner;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public Class getType()
-   {
-      return type;
-   }
-
-   public boolean isReadable()
-   {
-      return true;
-   }
-
-   public boolean isWritable()
-   {
-      if(!setterInitialized)
-      {
-         initializeSetter();
-      }
-      return setter != null;
-   }
-
-   public Object getValue(Object owner)
-   {
-      try
-      {
-         return getter.get(owner);
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBRuntimeException(
-            "Failed to get value of the property '" + name + "' defined in " + owner + " from instance " + owner
-         );
-      }
-   }
-
-   public void setValue(Object owner, Object value)
-   {
-      if(!isWritable())
-      {
-         throw new JBossXBRuntimeException(
-            "Failed to find setter or field for property '" + name + "' in " + owner
-         );
-      }
-
-      try
-      {
-         setter.set(owner, value);
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBRuntimeException(
-            "Failed to set value '" + value + "' for property '" + name + "' defined in " +
-            owner + " on instance " + owner
-         );
-      }
-   }
-
-   private void initializeSetter()
-   {
-      try
-      {
-         setter = SetValueAccessFactory.methodAccess(Classes.getAttributeSetter(owner, name, type));
-      }
-      catch(NoSuchMethodException e)
-      {
-      }
-      setterInitialized = true;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/FieldInfo.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/introspection/FieldInfo.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/AddMethodMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/AddMethodMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/AddMethodMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,63 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class AddMethodMetaData
-{
-   private String methodName;
-   private String valueType;
-   private boolean childType;
-
-   public String getMethodName()
-   {
-      return methodName;
-   }
-
-   public void setMethodName(String methodName)
-   {
-      this.methodName = methodName;
-   }
-
-   public String getValueType()
-   {
-      return valueType;
-   }
-
-   public void setValueType(String valueType)
-   {
-      this.valueType = valueType;
-   }
-
-   public boolean isChildType()
-   {
-      return childType;
-   }
-
-   public void setChildType(boolean childType)
-   {
-      this.childType = childType;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/AddMethodMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/AddMethodMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/CharactersMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/CharactersMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/CharactersMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,75 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class CharactersMetaData
-{
-   private PropertyMetaData property;
-   private ValueMetaData value;
-   private boolean mapEntryValue;
-   private boolean mapEntryKey;
-
-   public PropertyMetaData getProperty()
-   {
-      return property;
-   }
-
-   public void setProperty(PropertyMetaData property)
-   {
-      this.property = property;
-   }
-
-   public ValueMetaData getValue()
-   {
-      return value;
-   }
-
-   public void setValue(ValueMetaData value)
-   {
-      this.value = value;
-   }
-
-   public boolean isMapEntryValue()
-   {
-      return mapEntryValue;
-   }
-
-   public void setMapEntryValue(boolean mapEntryValue)
-   {
-      this.mapEntryValue = mapEntryValue;
-   }
-
-   public boolean isMapEntryKey()
-   {
-      return mapEntryKey;
-   }
-
-   public void setMapEntryKey(boolean mapEntryKey)
-   {
-      this.mapEntryKey = mapEntryKey;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/CharactersMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/CharactersMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ClassMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ClassMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ClassMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,101 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-import org.jboss.util.JBossStringBuilder;
-import org.jboss.util.Strings;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ClassMetaData
-{
-   private String impl;
-   private Boolean useNoArgCtor;
-
-   public String getImpl()
-   {
-      return impl;
-   }
-
-   public void setImpl(String impl)
-   {
-      this.impl = impl;
-   }
-
-   /**
-    * Whether no-arg ctor should be used if it declared even if there are
-    * other ctors declared.
-    *
-    * @return  true - no-arg ctor should be used if it declared even if there are
-    * other ctors declared;
-    * false - no-arg ctor should be used only if other ctors could not be;
-    * null - use SchemaBinding's default.
-    */
-   public Boolean isUseNoArgCtor()
-   {
-      return useNoArgCtor;
-   }
-
-   public void setUseNoArgCtor(Boolean useNoArgCtor)
-   {
-      this.useNoArgCtor = useNoArgCtor;
-   }
-   
-   public boolean equals(Object o)
-   {
-      if(this == o)
-      {
-         return true;
-      }
-      if(!(o instanceof ClassMetaData))
-      {
-         return false;
-      }
-
-      final ClassMetaData classMetaData = (ClassMetaData)o;
-
-      if(impl != null ? !impl.equals(classMetaData.impl) : classMetaData.impl != null)
-      {
-         return false;
-      }
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      return (impl != null ? impl.hashCode() : 0);
-   }
-   
-   public String toString()
-   {
-      JBossStringBuilder buffer = new JBossStringBuilder();
-      Strings.defaultToString(buffer, this);
-      buffer.append('[');
-      buffer.append("impl=").append(impl);
-      buffer.append(']');
-      return buffer.toString();
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ClassMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ClassMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/MapEntryMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/MapEntryMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/MapEntryMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,107 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class MapEntryMetaData
-{
-   private String impl;
-   private String getKeyMethod;
-   private String setKeyMethod;
-   private String getValueMethod;
-   private String setValueMethod;
-   private String valueType;
-   private boolean nonNullValue;
-
-   public String getImpl()
-   {
-      return impl;
-   }
-
-   public void setImpl(String impl)
-   {
-      this.impl = impl;
-   }
-
-   public String getGetKeyMethod()
-   {
-      return getKeyMethod;
-   }
-
-   public void setGetKeyMethod(String getKeyMethod)
-   {
-      this.getKeyMethod = getKeyMethod;
-   }
-
-   public String getSetKeyMethod()
-   {
-      return setKeyMethod;
-   }
-
-   public void setSetKeyMethod(String setKeyMethod)
-   {
-      this.setKeyMethod = setKeyMethod;
-   }
-
-   public String getGetValueMethod()
-   {
-      return getValueMethod;
-   }
-
-   public void setGetValueMethod(String getValueMethod)
-   {
-      this.getValueMethod = getValueMethod;
-   }
-
-   public String getSetValueMethod()
-   {
-      return setValueMethod;
-   }
-
-   public void setSetValueMethod(String setValueMethod)
-   {
-      this.setValueMethod = setValueMethod;
-   }
-
-   public String getValueType()
-   {
-      return valueType;
-   }
-
-   public void setValueType(String valueType)
-   {
-      this.valueType = valueType;
-   }
-
-   public boolean isNonNullValue()
-   {
-      return nonNullValue;
-   }
-
-   public void setNonNullValue(boolean nonNullValue)
-   {
-      this.nonNullValue = nonNullValue;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/MapEntryMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/MapEntryMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PackageMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PackageMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PackageMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,81 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-import org.jboss.util.JBossStringBuilder;
-import org.jboss.util.Strings;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class PackageMetaData
-{
-   private String name;
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public boolean equals(Object o)
-   {
-      if(this == o)
-      {
-         return true;
-      }
-      if(!(o instanceof PackageMetaData))
-      {
-         return false;
-      }
-
-      final PackageMetaData packageMetaData = (PackageMetaData)o;
-
-      if(name != null ? !name.equals(packageMetaData.name) : packageMetaData.name != null)
-      {
-         return false;
-      }
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      return (name != null ? name.hashCode() : 0);
-   }
-   
-   public String toString()
-   {
-      JBossStringBuilder buffer = new JBossStringBuilder();
-      Strings.defaultToString(buffer, this);
-      buffer.append('[');
-      buffer.append("name=").append(name);
-      buffer.append(']');
-      return buffer.toString();
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PackageMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PackageMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PropertyMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PropertyMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PropertyMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,53 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class PropertyMetaData
-{
-   private String name;
-   private String collectionType;
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public String getCollectionType()
-   {
-      return collectionType;
-   }
-
-   public void setCollectionType(String collectionType)
-   {
-      this.collectionType = collectionType;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PropertyMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PropertyMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PutMethodMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PutMethodMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PutMethodMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,101 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class PutMethodMetaData
-{
-   private String methodName;
-   private String keyType;
-   private String valueType;
-
-   public String getName()
-   {
-      return methodName;
-   }
-
-   public void setName(String methodName)
-   {
-      this.methodName = methodName;
-   }
-
-   public String getKeyType()
-   {
-      return keyType;
-   }
-
-   public void setKeyType(String keyType)
-   {
-      this.keyType = keyType;
-   }
-
-   public String getValueType()
-   {
-      return valueType;
-   }
-
-   public void setValueType(String valueType)
-   {
-      this.valueType = valueType;
-   }
-
-   public boolean equals(Object o)
-   {
-      if(this == o)
-      {
-         return true;
-      }
-      if(!(o instanceof PutMethodMetaData))
-      {
-         return false;
-      }
-
-      final PutMethodMetaData putMethodMetaData = (PutMethodMetaData)o;
-
-      if(keyType != null ? !keyType.equals(putMethodMetaData.keyType) : putMethodMetaData.keyType != null)
-      {
-         return false;
-      }
-      if(methodName != null ? !methodName.equals(putMethodMetaData.methodName) : putMethodMetaData.methodName != null)
-      {
-         return false;
-      }
-      if(valueType != null ? !valueType.equals(putMethodMetaData.valueType) : putMethodMetaData.valueType != null)
-      {
-         return false;
-      }
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      int result;
-      result = (methodName != null ? methodName.hashCode() : 0);
-      result = 29 * result + (keyType != null ? keyType.hashCode() : 0);
-      result = 29 * result + (valueType != null ? valueType.hashCode() : 0);
-      return result;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PutMethodMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/PutMethodMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/SchemaMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/SchemaMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/SchemaMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,92 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-import java.util.Map;
-import java.util.Collections;
-import java.util.HashMap;
-
-/**
- * Metadata for the SchemaBinding instance.
- * 
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SchemaMetaData
-{
-   private PackageMetaData packageMetaData;
-   private Map values = Collections.EMPTY_MAP;
-   private boolean ignoreUnresolvedFieldOrClass = true;
-   private boolean replacePropertyRefs = true;
-
-   public boolean isIgnoreUnresolvedFieldOrClass()
-   {
-      return ignoreUnresolvedFieldOrClass;
-   }
-   public void setIgnoreUnresolvedFieldOrClass(boolean flag)
-   {
-      this.ignoreUnresolvedFieldOrClass = flag;
-   }
-
-   public boolean isReplacePropertyRefs()
-   {
-      return replacePropertyRefs;
-   }
-   public void setReplacePropertyRefs(boolean flag)
-   {
-      this.replacePropertyRefs = flag;
-   }
-
-   public PackageMetaData getPackage()
-   {
-      return packageMetaData;
-   }
-
-   public void setPackage(PackageMetaData pkg)
-   {
-      this.packageMetaData = pkg;
-   }
-
-   public ValueMetaData getValue(String id)
-   {
-      return (ValueMetaData)values.get(id);
-   }
-
-   public void addValue(ValueMetaData value)
-   {
-      if(value.getId() == null)
-      {
-         throw new IllegalArgumentException("ValueMetaData must have a non-null id.");
-      }
-
-      switch(values.size())
-      {
-         case 0:
-            values = Collections.singletonMap(value.getId(), value);
-            break;
-         case 1:
-            values = new HashMap(values);
-         default:
-            values.put(value.getId(), value);
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/SchemaMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/SchemaMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ValueMetaData.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ValueMetaData.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ValueMetaData.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,120 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ValueMetaData
-{
-   private String id;
-   private String ref;
-   private String unmarshalMethod;
-   private String marshalMethod;
-
-   public String getId()
-   {
-      return id;
-   }
-
-   public void setId(String id)
-   {
-      this.id = id;
-   }
-
-   public String getRef()
-   {
-      return ref;
-   }
-
-   public void setRef(String ref)
-   {
-      this.ref = ref;
-   }
-
-   public String getUnmarshalMethod()
-   {
-      return unmarshalMethod;
-   }
-
-   public void setUnmarshalMethod(String unmarshalMethod)
-   {
-      this.unmarshalMethod = unmarshalMethod;
-   }
-
-   public String getMarshalMethod()
-   {
-      return marshalMethod;
-   }
-
-   public void setMarshalMethod(String marshalMethod)
-   {
-      this.marshalMethod = marshalMethod;
-   }
-
-   public boolean equals(Object o)
-   {
-      if(this == o)
-      {
-         return true;
-      }
-      if(!(o instanceof ValueMetaData))
-      {
-         return false;
-      }
-
-      final ValueMetaData valueMetaData = (ValueMetaData)o;
-
-      if(id != null ? !id.equals(valueMetaData.id) : valueMetaData.id != null)
-      {
-         return false;
-      }
-      if(marshalMethod != null ? !marshalMethod.equals(valueMetaData.marshalMethod) : valueMetaData.marshalMethod != null)
-      {
-         return false;
-      }
-      if(ref != null ? !ref.equals(valueMetaData.ref) : valueMetaData.ref != null)
-      {
-         return false;
-      }
-      if(unmarshalMethod != null ?
-         !unmarshalMethod.equals(valueMetaData.unmarshalMethod) :
-         valueMetaData.unmarshalMethod != null)
-      {
-         return false;
-      }
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      int result;
-      result = (id != null ? id.hashCode() : 0);
-      result = 29 * result + (ref != null ? ref.hashCode() : 0);
-      result = 29 * result + (unmarshalMethod != null ? unmarshalMethod.hashCode() : 0);
-      result = 29 * result + (marshalMethod != null ? marshalMethod.hashCode() : 0);
-      return result;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ValueMetaData.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/ValueMetaData.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAnnotation.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAnnotation.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAnnotation.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,730 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-import java.io.StringReader;
-import javax.xml.namespace.QName;
-
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.GenericObjectModelFactory;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.jboss.logging.Logger;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class XsdAnnotation
-   extends XsdElement
-{
-   private static final Logger log = Logger.getLogger(XsdAnnotation.class);
-
-   public XsdAnnotation(QName qName)
-   {
-      super(qName);
-   }
-
-   public static final XsdAnnotation unmarshal(String annotation)
-   {
-      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
-      unmarshaller.mapFactoryToNamespace(JaxbObjectModelFactory.INSTANCE, Constants.NS_JAXB);
-      unmarshaller.mapFactoryToNamespace(JbxbObjectModelFactory.INSTANCE, Constants.NS_JBXB);
-
-      try
-      {
-         return (XsdAnnotation)unmarshaller.unmarshal(new StringReader(annotation),
-            XsdObjectModelFactory.INSTANCE,
-            (Object)null
-         );
-      }
-      catch(JBossXBException e)
-      {
-         throw new JBossXBRuntimeException("Failed to parse annotation string: " + annotation + ": " + e.getMessage(),
-            e
-         );
-      }
-   }
-
-   public XsdAppInfo getAppInfo()
-   {
-      return (XsdAppInfo)getChild(XsdAppInfo.QNAME);
-   }
-
-   // Inner
-
-   private static abstract class AbstractGOMF
-      implements GenericObjectModelFactory
-   {
-      public Object newChild(Object parent,
-                             UnmarshallingContext ctx,
-                             String namespaceURI,
-                             String localName,
-                             Attributes attrs)
-      {
-         return null;
-      }
-
-      public void addChild(Object parent,
-                           Object child,
-                           UnmarshallingContext ctx,
-                           String namespaceURI,
-                           String localName)
-      {
-         XsdElement p = (XsdElement)parent;
-         XsdElement c = (XsdElement)child;
-         p.addChild(c);
-      }
-
-      public void setValue(Object o, UnmarshallingContext ctx, String namespaceURI, String localName, String value)
-      {
-         XsdElement e = (XsdElement)o;
-         e.setData(value);
-      }
-
-      public Object completeRoot(Object root, UnmarshallingContext ctx, String namespaceURI, String localName)
-      {
-         return root;
-      }
-
-      }
-
-   private static final class XsdObjectModelFactory
-      extends AbstractGOMF
-   {
-      public static final GenericObjectModelFactory INSTANCE = new XsdObjectModelFactory();
-
-      public Object newChild(Object parent,
-                             UnmarshallingContext ctx,
-                             String namespaceURI,
-                             String localName,
-                             Attributes attrs)
-      {
-         XsdElement element = null;
-         if("appinfo".equals(localName))
-         {
-            element = new XsdAppInfo();
-            for(int i = 0; i < attrs.getLength(); ++i)
-            {
-               element.addAttribute(new QName(attrs.getURI(i), attrs.getLocalName(i)), attrs.getValue(i));
-            }
-         }
-         return element;
-      }
-
-      public void addChild(Object parent,
-                           Object child,
-                           UnmarshallingContext ctx,
-                           String namespaceURI,
-                           String localName)
-      {
-         if(parent instanceof XsdAppInfo)
-         {
-            XsdAppInfo appInfo = (XsdAppInfo)parent;
-            if(child instanceof ClassMetaData)
-            {
-               appInfo.setClassMetaData((ClassMetaData)child);
-            }
-            else if(child instanceof PropertyMetaData)
-            {
-               appInfo.setPropertyMetaData((PropertyMetaData)child);
-            }
-            else if(child instanceof SchemaMetaData)
-            {
-               appInfo.setSchemaMetaData((SchemaMetaData)child);
-            }
-            else if(child instanceof ValueMetaData)
-            {
-               appInfo.setValueMetaData((ValueMetaData)child);
-            }
-            else if(child instanceof CharactersMetaData)
-            {
-               appInfo.setCharactersMetaData((CharactersMetaData)child);
-            }
-         }
-         else
-         {
-            super.addChild(parent, child, ctx, namespaceURI, localName);
-         }
-      }
-
-      public Object newRoot(Object root,
-                            UnmarshallingContext ctx,
-                            String namespaceURI,
-                            String localName,
-                            Attributes attrs)
-      {
-         return new XsdAnnotation(new QName(namespaceURI, localName));
-      }
-   }
-
-   private static final class JaxbObjectModelFactory
-      implements GenericObjectModelFactory
-   {
-      public static final GenericObjectModelFactory INSTANCE = new JaxbObjectModelFactory();
-
-      public Object newChild(Object parent,
-                             UnmarshallingContext ctx,
-                             String namespaceURI,
-                             String localName,
-                             Attributes attrs)
-      {
-         Object element = null;
-         if("package".equals(localName))
-         {
-            element = new PackageMetaData();
-            setAttributes(element, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("name".equals(localName))
-                  {
-                     ((PackageMetaData)o).setName(value);
-                  }
-               }
-            }
-            );
-         }
-         else if("javaType".equals(localName))
-         {
-            ValueMetaData valueMetaData = new ValueMetaData();
-            setAttributes(valueMetaData, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("parseMethod".equals(localName))
-                  {
-                     ((ValueMetaData)o).setUnmarshalMethod(value);
-                  }
-                  else if("printMethod".equals(localName))
-                  {
-                     ((ValueMetaData)o).setMarshalMethod(value);
-                  }
-               }
-            }
-            );
-
-            // todo review this...
-            XsdAppInfo appInfo = (XsdAppInfo)parent;
-            appInfo.setValueMetaData(valueMetaData);
-         }
-
-         return element;
-      }
-
-      public void addChild(Object parent,
-                           Object child,
-                           UnmarshallingContext ctx,
-                           String namespaceURI,
-                           String localName)
-      {
-         if(parent instanceof SchemaMetaData)
-         {
-            SchemaMetaData schemaMetaData = (SchemaMetaData)parent;
-            if(child instanceof PackageMetaData)
-            {
-               schemaMetaData.setPackage((PackageMetaData)child);
-            }
-            else
-            {
-               schemaMetaData.addValue((ValueMetaData)child);
-            }
-         }
-      }
-
-      public void setValue(Object o, UnmarshallingContext ctx, String namespaceURI, String localName, String value)
-      {
-      }
-
-      public Object newRoot(Object root,
-                            UnmarshallingContext ctx,
-                            String namespaceURI,
-                            String localName,
-                            Attributes attrs)
-      {
-         Object element = null;
-         if("schemaBindings".equals(localName))
-         {
-            element = new SchemaMetaData();
-         }
-         else if("property".equals(localName))
-         {
-            PropertyMetaData property = new PropertyMetaData();
-            setAttributes(property, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("name".equals(localName))
-                  {
-                     ((PropertyMetaData)o).setName(value);
-                  }
-                  else if("collectionType".equals(localName))
-                  {
-                     ((PropertyMetaData)o).setCollectionType(value);
-                  }
-               }
-            }
-            );
-            //element = property;
-            XsdAppInfo appInfo = (XsdAppInfo)root;
-            appInfo.setPropertyMetaData(property);
-            // return null;
-         }
-         else if("class".equals(localName))
-         {
-            element = new ClassMetaData();
-            setAttributes(element, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("implClass".equals(localName))
-                  {
-                     ((ClassMetaData)o).setImpl(value);
-                  }
-               }
-            }
-            );
-         }
-         else if("javaType".equals(localName))
-         {
-            element = new ValueMetaData();
-            setAttributes(element, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("printMethod".equals(localName))
-                  {
-                     ((ValueMetaData)o).setMarshalMethod(value);
-                  }
-                  else if("parseMethod".equals(localName))
-                  {
-                     ((ValueMetaData)o).setUnmarshalMethod(value);
-                  }
-               }
-            }
-            );
-         }
-
-         return element;
-      }
-
-      public Object completeRoot(Object root, UnmarshallingContext ctx, String namespaceURI, String localName)
-      {
-         return root;
-      }
-
-      private void setAttributes(Object o, Attributes attrs, AttributeSetter attrSetter)
-      {
-         for(int i = 0; i < attrs.getLength(); ++i)
-         {
-            attrSetter.setAttribute(o, attrs.getURI(i), attrs.getLocalName(i), attrs.getValue(i));
-         }
-      }
-   }
-
-   private static final class JbxbObjectModelFactory
-      implements GenericObjectModelFactory
-   {
-      public static final JbxbObjectModelFactory INSTANCE = new JbxbObjectModelFactory();
-
-      public Object newChild(Object parent,
-                             UnmarshallingContext ctx,
-                             String namespaceURI,
-                             String localName,
-                             Attributes attrs)
-      {
-         Object child = null;
-         // schemaBindings/package
-         if("package".equals(localName))
-         {
-            child = new PackageMetaData();
-            setAttributes(child, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("name".equals(localName))
-                  {
-                     ((PackageMetaData)o).setName(value);
-                  }
-               }
-            }
-            );
-         }
-         else if("value".equals(localName))
-         {
-            child = new ValueMetaData();
-            setAttributes(child, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("marshalMethod".equals(localName))
-                  {
-                     ((ValueMetaData)o).setMarshalMethod(value);
-                  }
-                  else if("unmarshalMethod".equals(localName))
-                  {
-                     ((ValueMetaData)o).setUnmarshalMethod(value);
-                  }
-               }
-            }
-            );
-         }
-         else if("property".equals(localName))
-         {
-            PropertyMetaData property = new PropertyMetaData();
-            setAttributes(property, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("name".equals(localName))
-                  {
-                     ((PropertyMetaData)o).setName(value);
-                  }
-                  else if("collectionType".equals(localName))
-                  {
-                     ((PropertyMetaData)o).setCollectionType(value);
-                  }
-               }
-            }
-            );
-
-            if(parent instanceof XsdAppInfo)
-            {
-               ((XsdAppInfo)parent).setPropertyMetaData(property);
-            }
-            else
-            {
-               ((CharactersMetaData)parent).setProperty(property);
-            }
-         }
-         else if("mapEntryKey".equals(localName))
-         {
-            if(parent instanceof XsdAppInfo)
-            {
-               ((XsdAppInfo)parent).setMapEntryKey(true);
-            }
-            else
-            {
-               ((CharactersMetaData)parent).setMapEntryKey(true);
-            }
-         }
-         else if("mapEntryValue".equals(localName))
-         {
-            if(parent instanceof XsdAppInfo)
-            {
-               ((XsdAppInfo)parent).setMapEntryValue(true);
-            }
-            else
-            {
-               ((CharactersMetaData)parent).setMapEntryValue(true);
-            }
-         }
-         else if("skip".equals(localName))
-         {
-            XsdAppInfo appInfo = (XsdAppInfo)parent;
-            appInfo.setSkip(true);
-         }
-         else
-         {
-            // Log a warning for any unexpected elements
-            if( "ignoreUnresolvedFieldOrClass".equals(localName) == false
-               && "replacePropertyRefs".equals(localName) == false )
-            {
-               log.warn("newChild: " + localName);
-            }
-         }
-         return child;
-      }
-
-      public void addChild(Object parent,
-                           Object child,
-                           UnmarshallingContext ctx,
-                           String namespaceURI,
-                           String localName)
-      {
-         if(child instanceof PackageMetaData)
-         {
-            SchemaMetaData schema = (SchemaMetaData)parent;
-            schema.setPackage((PackageMetaData)child);
-         }
-         else if(child instanceof ValueMetaData)
-         {
-            ValueMetaData valueMetaData = (ValueMetaData)child;
-            if(parent instanceof XsdAppInfo)
-            {
-               ((XsdAppInfo)parent).setValueMetaData(valueMetaData);
-            }
-            else
-            {
-               ((CharactersMetaData)parent).setValue(valueMetaData);
-            }
-         }
-         else if(child instanceof CharactersMetaData)
-         {
-            CharactersMetaData charMD = (CharactersMetaData)child;
-            ((XsdAppInfo)parent).setCharactersMetaData(charMD);
-         }
-         else
-         {
-            log.warn("addChild: " + localName + "=" + child);
-         }
-      }
-
-      public void setValue(Object o, UnmarshallingContext ctx, String namespaceURI, String localName, String value)
-      {
-         // schemaBindings/ignoreUnresolvedFieldOrClass
-         if( "ignoreUnresolvedFieldOrClass".equals(localName) )
-         {
-            SchemaMetaData schema = (SchemaMetaData) o;
-            Boolean flag = Boolean.valueOf(value);
-            schema.setIgnoreUnresolvedFieldOrClass(flag.booleanValue());
-         }
-         // schemaBindings/replacePropertyRefs
-         else if( "replacePropertyRefs".equals(localName) )
-         {
-            SchemaMetaData schema = (SchemaMetaData) o;
-            Boolean flag = Boolean.valueOf(value);
-            schema.setReplacePropertyRefs(flag.booleanValue());
-         }
-         else
-         {
-            log.warn("setValue: " + localName + "=" + value);
-         }
-      }
-
-      public Object newRoot(Object root,
-                            UnmarshallingContext ctx,
-                            String namespaceURI,
-                            String localName,
-                            Attributes attrs)
-      {
-         Object element = null;
-         if("schemaBindings".equals(localName))
-         {
-            element = new SchemaMetaData();
-         }
-         // Legacy schema element name change to schemaBindings for jaxb consistency
-         else if("schema".equals(localName))
-         {
-            element = new SchemaMetaData();
-         }
-         else if("value".equals(localName))
-         {
-            element = new ValueMetaData();
-            setAttributes(element, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("marshalMethod".equals(localName))
-                  {
-                     ((ValueMetaData)o).setMarshalMethod(value);
-                  }
-                  else if("unmarshalMethod".equals(localName))
-                  {
-                     ((ValueMetaData)o).setUnmarshalMethod(value);
-                  }
-               }
-            }
-            );
-         }
-         else if("class".equals(localName))
-         {
-            element = new ClassMetaData();
-            setAttributes(element, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("impl".equals(localName))
-                  {
-                     ((ClassMetaData)o).setImpl(value);
-                  }
-               }
-            }
-            );
-         }
-         else if("property".equals(localName))
-         {
-            PropertyMetaData property = new PropertyMetaData();
-            setAttributes(property, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("name".equals(localName))
-                  {
-                     ((PropertyMetaData)o).setName(value);
-                  }
-                  else if("collectionType".equals(localName))
-                  {
-                     ((PropertyMetaData)o).setCollectionType(value);
-                  }
-               }
-            }
-            );
-            XsdAppInfo appInfo = (XsdAppInfo)root;
-            appInfo.setPropertyMetaData(property);
-         }
-         else if("putMethod".equals(localName))
-         {
-            PutMethodMetaData putMethod = new PutMethodMetaData();
-            setAttributes(putMethod, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("name".equals(localName))
-                  {
-                     ((PutMethodMetaData)o).setName(value);
-                  }
-                  else if("keyType".equals(localName))
-                  {
-                     ((PutMethodMetaData)o).setKeyType(value);
-                  }
-                  else if("valueType".equals(localName))
-                  {
-                     ((PutMethodMetaData)o).setValueType(value);
-                  }
-               }
-            }
-            );
-            XsdAppInfo appInfo = (XsdAppInfo)root;
-            appInfo.setPutMethodMetaData(putMethod);
-         }
-         else if("addMethod".equals(localName))
-         {
-            AddMethodMetaData addMethod = new AddMethodMetaData();
-            setAttributes(addMethod, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("name".equals(localName))
-                  {
-                     ((AddMethodMetaData)o).setMethodName(value);
-                  }
-                  else if("valueType".equals(localName))
-                  {
-                     if("child".equals(value))
-                     {
-                        ((AddMethodMetaData)o).setChildType(true);
-                     }
-                     else
-                     {
-                        ((AddMethodMetaData)o).setValueType(value);
-                     }
-                  }
-               }
-            }
-            );
-            XsdAppInfo appInfo = (XsdAppInfo)root;
-            appInfo.setAddMethodMetaData(addMethod);
-         }
-         else if("mapEntry".equals(localName))
-         {
-            MapEntryMetaData mapEntry = new MapEntryMetaData();
-            setAttributes(mapEntry, attrs, new AttributeSetter()
-            {
-               public void setAttribute(Object o, String nsUri, String localName, String value)
-               {
-                  if("impl".equals(localName))
-                  {
-                     ((MapEntryMetaData)o).setImpl(value);
-                  }
-                  else if("getKeyMethod".equals(localName))
-                  {
-                     ((MapEntryMetaData)o).setGetKeyMethod(value);
-                  }
-                  else if("setKeyMethod".equals(localName))
-                  {
-                     ((MapEntryMetaData)o).setSetKeyMethod(value);
-                  }
-                  else if("getValueMethod".equals(localName))
-                  {
-                     ((MapEntryMetaData)o).setGetValueMethod(value);
-                  }
-                  else if("setValueMethod".equals(localName))
-                  {
-                     ((MapEntryMetaData)o).setSetValueMethod(value);
-                  }
-                  else if("valueType".equals(localName))
-                  {
-                     ((MapEntryMetaData)o).setValueType(value);
-                  }
-                  else if("nonNullValue".equals(localName))
-                  {
-                     boolean b = Boolean.valueOf(value).booleanValue();
-                     ((MapEntryMetaData)o).setNonNullValue(b);
-                  }
-               }
-            }
-            );
-            XsdAppInfo appInfo = (XsdAppInfo)root;
-            appInfo.setMapEntryMetaData(mapEntry);
-         }
-         else if("mapEntryKey".equals(localName))
-         {
-            XsdAppInfo appInfo = (XsdAppInfo)root;
-            appInfo.setMapEntryKey(true);
-         }
-         else if("mapEntryValue".equals(localName))
-         {
-            XsdAppInfo appInfo = (XsdAppInfo)root;
-            appInfo.setMapEntryValue(true);
-         }
-         else if("characters".equals(localName))
-         {
-            element = new CharactersMetaData();
-         }
-         else if("skip".equals(localName))
-         {
-            XsdAppInfo appInfo = (XsdAppInfo)root;
-            appInfo.setSkip(true);
-         }
-         else
-         {
-            log.warn("Unexpected jbxb annotation: ns=" + namespaceURI + ", localName=" + localName);
-         }
-         return element;
-      }
-
-      public Object completeRoot(Object root, UnmarshallingContext ctx, String namespaceURI, String localName)
-      {
-         return root;
-      }
-
-      // Private
-
-      private void setAttributes(Object o, Attributes attrs, AttributeSetter attrSetter)
-      {
-         for(int i = 0; i < attrs.getLength(); ++i)
-         {
-            attrSetter.setAttribute(o, attrs.getURI(i), attrs.getLocalName(i), attrs.getValue(i));
-         }
-      }
-   }
-
-   interface AttributeSetter
-   {
-      void setAttribute(Object o, String nsUri, String localName, String value);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAnnotation.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAnnotation.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAppInfo.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAppInfo.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAppInfo.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,163 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.xb.binding.Constants;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class XsdAppInfo
-   extends XsdElement
-{
-   static final QName QNAME = new QName(Constants.NS_XML_SCHEMA, "appinfo");
-
-   private SchemaMetaData schemaMetaData;
-   private ClassMetaData classMetaData;
-   private PropertyMetaData propertyMetaData;
-   private MapEntryMetaData mapEntryMetaData;
-   private PutMethodMetaData putMethodMetaData;
-   private AddMethodMetaData addMethodMetaData;
-   private ValueMetaData valueMetaData;
-   private CharactersMetaData charactersMetaData;
-   private boolean mapEntryKey;
-   private boolean mapEntryValue;
-   private boolean skip;
-
-   public XsdAppInfo()
-   {
-      super(QNAME);
-   }
-
-   public SchemaMetaData getSchemaMetaData()
-   {
-      return schemaMetaData;
-   }
-
-   public void setSchemaMetaData(SchemaMetaData schema)
-   {
-      this.schemaMetaData = schema;
-   }
-
-   public ClassMetaData getClassMetaData()
-   {
-      return classMetaData;
-   }
-
-   public void setClassMetaData(ClassMetaData classMetaData)
-   {
-      this.classMetaData = classMetaData;
-   }
-
-   public PropertyMetaData getPropertyMetaData()
-   {
-      return propertyMetaData;
-   }
-
-   public void setPropertyMetaData(PropertyMetaData propertyMetaData)
-   {
-      this.propertyMetaData = propertyMetaData;
-   }
-
-   public MapEntryMetaData getMapEntryMetaData()
-   {
-      return mapEntryMetaData;
-   }
-
-   public void setMapEntryMetaData(MapEntryMetaData mapEntryMetaData)
-   {
-      this.mapEntryMetaData = mapEntryMetaData;
-   }
-
-   public ValueMetaData getValueMetaData()
-   {
-      return valueMetaData;
-   }
-
-   public void setValueMetaData(ValueMetaData valueMetaData)
-   {
-      this.valueMetaData = valueMetaData;
-   }
-
-   public boolean isMapEntryKey()
-   {
-      return mapEntryKey;
-   }
-
-   public void setMapEntryKey(boolean mapEntryKey)
-   {
-      this.mapEntryKey = mapEntryKey;
-   }
-
-   public boolean isMapEntryValue()
-   {
-      return mapEntryValue;
-   }
-
-   public void setMapEntryValue(boolean mapEntryValue)
-   {
-      this.mapEntryValue = mapEntryValue;
-   }
-
-   public PutMethodMetaData getPutMethodMetaData()
-   {
-      return putMethodMetaData;
-   }
-
-   public void setPutMethodMetaData(PutMethodMetaData putMethodMetaData)
-   {
-      this.putMethodMetaData = putMethodMetaData;
-   }
-
-   public void setAddMethodMetaData(AddMethodMetaData addMethod)
-   {
-      this.addMethodMetaData = addMethod;
-   }
-
-   public AddMethodMetaData getAddMethodMetaData()
-   {
-      return addMethodMetaData;
-   }
-
-   public boolean isSkip()
-   {
-      return skip;
-   }
-
-   public void setSkip(boolean skip)
-   {
-      this.skip = skip;
-   }
-
-   public CharactersMetaData getCharactersMetaData()
-   {
-      return charactersMetaData;
-   }
-
-   public void setCharactersMetaData(CharactersMetaData charactersMetaData)
-   {
-      this.charactersMetaData = charactersMetaData;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAppInfo.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdAppInfo.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdElement.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdElement.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdElement.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,135 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata;
-
-import java.util.HashMap;
-import java.util.Collections;
-import java.util.Map;
-import javax.xml.namespace.QName;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class XsdElement
-{
-   public static final QName QNAME_NAME = new QName("name");
-
-   private final QName qName;
-   private Map attributes = Collections.EMPTY_MAP;
-   private Map children = Collections.EMPTY_MAP;
-   private String data;
-
-   public XsdElement(QName qName)
-   {
-      this.qName = qName;
-   }
-
-   public String getAttribute(QName qName)
-   {
-      return (String)attributes.get(qName);
-   }
-
-   public void addAttribute(QName qName, String value)
-   {
-      switch(attributes.size())
-      {
-         case 0:
-            attributes = Collections.singletonMap(qName, value);
-            break;
-         case 1:
-            attributes = new HashMap(attributes);
-         default:
-            attributes.put(qName, value);
-      }
-   }
-
-   public XsdElement getChild(QName qName)
-   {
-      return (XsdElement)children.get(qName);
-   }
-
-   public void addChild(XsdElement child)
-   {
-      switch(children.size())
-      {
-         case 0:
-            children = Collections.singletonMap(child.qName, child);
-            break;
-         case 1:
-            children = new HashMap(children);
-         default:
-            children.put(child.qName, child);
-      }
-   }
-
-   public String getData()
-   {
-      return data;
-   }
-
-   public void setData(String data)
-   {
-      this.data = data;
-   }
-
-   public QName getQName()
-   {
-      return qName;
-   }
-
-   public String getNameAttribute()
-   {
-      return getAttribute(QNAME_NAME);
-   }
-
-   public void setNameAttribute(String name)
-   {
-      addAttribute(QNAME_NAME, name);
-   }
-   
-   public boolean equals(Object o)
-   {
-      if(this == o)
-      {
-         return true;
-      }
-      if(!(o instanceof XsdElement))
-      {
-         return false;
-      }
-
-      final XsdElement xsdElement = (XsdElement)o;
-
-      if(!qName.equals(xsdElement.qName))
-      {
-         return false;
-      }
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      return qName.hashCode();
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdElement.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/XsdElement.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/DocumentBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/DocumentBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/DocumentBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,30 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.metadata.unmarshalling;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision: $</tt>
- */
-public interface DocumentBinding
-{
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/DocumentBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/metadata/unmarshalling/DocumentBinding.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/JBossXBParser.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/JBossXBParser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/JBossXBParser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,66 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.parser;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
-import org.jboss.xb.binding.JBossXBException;
-import org.apache.xerces.xs.XSTypeDefinition;
-
-import java.io.Reader;
-import java.io.InputStream;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface JBossXBParser
-{
-   interface ContentHandler
-   {
-      void characters(char[] ch, int start, int length);
-
-      void endElement(String namespaceURI, String localName, String qName);
-
-      void startElement(String namespaceURI, String localName, String qName, Attributes atts, XSTypeDefinition type);
-
-      void startPrefixMapping(String prefix, String uri);
-
-      void endPrefixMapping(String prefix);
-
-      void processingInstruction(String target, String data);
-
-      Object getRoot();
-   }
-
-   void setEntityResolver(EntityResolver entityResolver) throws JBossXBException;
-
-   void setProperty(String name, Object value);
-
-   void setFeature(String name, boolean value);
-
-   void parse(String source, ContentHandler handler) throws JBossXBException;
-
-   void parse(InputStream is, ContentHandler handler) throws JBossXBException;
-
-   void parse(Reader reader, ContentHandler handler) throws JBossXBException;
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/JBossXBParser.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/JBossXBParser.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/SaxJBossXBParser.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/SaxJBossXBParser.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/SaxJBossXBParser.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,362 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.parser.sax;
-
-import java.io.InputStream;
-import java.io.Reader;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.jboss.logging.Logger;
-import org.jboss.util.JBossStringBuilder;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.parser.JBossXBParser;
-import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SaxJBossXBParser
-   implements JBossXBParser
-{
-   private static final Logger log = Logger.getLogger(SaxJBossXBParser.class);
-
-   private static final SAXParserFactory saxFactory = SAXParserFactory.newInstance();
-   static
-   {
-      saxFactory.setValidating(true);
-      saxFactory.setNamespaceAware(true);
-   }
-
-   private final XMLReader reader;
-   private JBossXBParser.ContentHandler contentHandler;
-   private DelegatingContentHandler delegateHandler;
-   private boolean trace;
-
-   public SaxJBossXBParser()
-      throws JBossXBException
-   {
-      SAXParser parser;
-      try
-      {
-         parser = saxFactory.newSAXParser();
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBException("Failed to create a new SAX parser", e);
-      }
-
-      try
-      {
-         reader = parser.getXMLReader();
-      }
-      catch(SAXException e1)
-      {
-         throw new JBossXBRuntimeException("Failed to get parser's XMLReader", e1);
-      }
-
-      delegateHandler = new DelegatingContentHandler();
-      reader.setContentHandler(delegateHandler);
-      reader.setErrorHandler(MetaDataErrorHandler.INSTANCE);
-      reader.setEntityResolver(new JBossEntityResolver());
-
-/*
-      setFeature(Unmarshaller.VALIDATION, true);
-      setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
-      setFeature(Unmarshaller.SCHEMA_FULL_CHECKING, true);
-      setFeature(Unmarshaller.DYNAMIC_VALIDATION, true);
-      setFeature(Unmarshaller.NAMESPACES, true);
-*/
-   }
-
-   // JBossXBParser implementation
-
-   public void setEntityResolver(EntityResolver entityResolver)
-      throws JBossXBException
-   {
-      reader.setEntityResolver(entityResolver);
-   }
-
-   public void setProperty(String name, Object value)
-   {
-      try
-      {
-         reader.setProperty(name, value);
-      }
-      catch(SAXException e)
-      {
-         throw new JBossXBRuntimeException("Failed to set property on the XML reader", e);
-      }
-   }
-
-   public void setFeature(String name, boolean value)
-   {
-      try
-      {
-         reader.setFeature(name, value);
-      }
-      catch(SAXException e)
-      {
-         throw new JBossXBRuntimeException("Failed to set feature on the XMLReader", e);
-      }
-   }
-
-   public void parse(String systemId, ContentHandler handler) throws JBossXBException
-   {
-      this.contentHandler = handler;
-      trace = log.isTraceEnabled();
-      try
-      {
-         reader.parse(systemId);
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBException("Failed to parse source: " + getLocationAsString(systemId), e);
-      }
-   }
-
-   public void parse(InputStream is, ContentHandler handler) throws JBossXBException
-   {
-      this.contentHandler = handler;
-      trace = log.isTraceEnabled();
-      try
-      {
-         reader.parse(new InputSource(is));
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBException("Failed to parse source: " + e.getMessage(), e);
-      }
-   }
-
-   public void parse(Reader reader, ContentHandler handler) throws JBossXBException
-   {
-      this.contentHandler = handler;
-      trace = log.isTraceEnabled();
-      try
-      {
-         this.reader.parse(new InputSource(reader));
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBException("Failed to parse source: " + e.getMessage(), e);
-      }
-   }
-
-   public String getLocationAsString(String fileName)
-   {
-      Locator locator = delegateHandler.getDocumentLocator();
-      if (locator == null)
-         return fileName;
-      else
-      {
-         JBossStringBuilder buffer = new JBossStringBuilder();
-         String id = locator.getSystemId();
-         if (id == null)
-            id = locator.getPublicId();
-         buffer.append(id).append('@');
-         buffer.append(locator.getLineNumber());
-         buffer.append(',');
-         buffer.append(locator.getColumnNumber());
-         return buffer.toString();
-      }
-   }
-
-   // Inner
-
-   private final class DelegatingContentHandler
-      implements org.xml.sax.ContentHandler
-   {
-      Locator locator;
-      
-      public void endDocument()
-      {
-      }
-
-      public void startDocument()
-      {
-      }
-
-      public void characters(char ch[], int start, int length)
-      {
-         // todo look at this later
-         // do not notify content handler if these are just whitespaces
-         int i = start;
-         while(i < start + length)
-         {
-            if(!Character.isWhitespace(ch[i++]))
-            {
-               contentHandler.characters(ch, start, length);
-               break;
-            }
-         }
-      }
-
-      public void ignorableWhitespace(char ch[], int start, int length)
-      {
-      }
-
-      public void endPrefixMapping(String prefix)
-      {
-         contentHandler.endPrefixMapping(prefix);
-      }
-
-      public void skippedEntity(String name)
-      {
-      }
-
-      public Locator getDocumentLocator()
-      {
-         return locator;
-      }
-      
-      public void setDocumentLocator(Locator locator)
-      {
-         this.locator = locator;
-      }
-
-      public void processingInstruction(String target, String data)
-      {
-         contentHandler.processingInstruction(target, data);
-      }
-
-      public void startPrefixMapping(String prefix, String uri)
-      {
-         contentHandler.startPrefixMapping(prefix, uri);
-      }
-
-      public void endElement(String namespaceURI, String localName, String qName)
-      {
-         String name = null;
-         if(trace)
-         {
-            if(localName.length() == 0)
-            {
-               name = qName;
-            }
-            else
-            {
-               name = namespaceURI + ':' + localName;
-            }
-            log.trace("Enter endElement " + name);
-         }
-         try
-         {
-            contentHandler.endElement(namespaceURI, localName, qName);
-         }
-         finally
-         {
-            if(trace)
-            {
-               log.trace("Exit endElement  " + name);
-            }
-         }
-      }
-
-      public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
-      {
-         String name = null;
-         if(trace)
-         {
-            if(localName.length() == 0)
-            {
-               name = qName;
-            }
-            else
-            {
-               name = namespaceURI + ':' + localName;
-            }
-            log.trace("Enter startElement " + name);
-         }
-         try
-         {
-            contentHandler.startElement(namespaceURI, localName, qName, atts, null);
-         }
-         finally
-         {
-            if(trace)
-            {
-               log.trace("Exit startElement  " + name);
-            }
-         }
-      }
-   }
-
-   private static final class MetaDataErrorHandler
-      implements ErrorHandler
-   {
-      public static final ErrorHandler INSTANCE = new MetaDataErrorHandler();
-
-      public void warning(SAXParseException exception)
-      {
-         log.warn(formatMessage(exception));
-      }
-
-      public void error(SAXParseException exception)
-         throws SAXException
-      {
-         throw new SAXException(formatMessage(exception));
-      }
-
-      public void fatalError(SAXParseException exception)
-         throws SAXException
-      {
-         throw new SAXException(formatMessage(exception));
-      }
-
-      public String formatMessage(SAXParseException exception)
-      {
-         StringBuffer buffer = new StringBuffer(50);
-         buffer.append(exception.getMessage()).append(" @ ");
-         String location = exception.getPublicId();
-         if(location != null)
-         {
-            buffer.append(location);
-         }
-         else
-         {
-            location = exception.getSystemId();
-            if(location != null)
-            {
-               buffer.append(location);
-            }
-            else
-            {
-               buffer.append("*unknown*");
-            }
-         }
-         buffer.append('[');
-         buffer.append(exception.getLineNumber()).append(',');
-         buffer.append(exception.getColumnNumber()).append(']');
-         return buffer.toString();
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/SaxJBossXBParser.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/parser/sax/SaxJBossXBParser.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/MarshallerImpl.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/MarshallerImpl.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/MarshallerImpl.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,34 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday;
-
-/**
- * Please, never use this marshaller. The extended marshaller should be
- * used instead.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class MarshallerImpl
-   extends org.jboss.xb.binding.sunday.marshalling.MarshallerImpl
-{
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/MarshallerImpl.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/MarshallerImpl.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AbstractAttributeMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AbstractAttributeMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AbstractAttributeMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.marshalling;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public abstract class AbstractAttributeMarshaller
-   implements AttributeMarshaller
-{
-   public abstract Object getValue(MarshallingContext ctx);
-
-   public abstract String marshalValue(MarshallingContext ctx, Object value);
-
-   public String marshal(MarshallingContext ctx)
-   {
-      Object value = getValue(ctx);
-      return marshalValue(ctx, value);
-   }
-
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AbstractAttributeMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AbstractAttributeMarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AttributeMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AttributeMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AttributeMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,32 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.marshalling;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface AttributeMarshaller
-{
-   String marshal(MarshallingContext ctx);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AttributeMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/AttributeMarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/DefaultAttributeMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/DefaultAttributeMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/DefaultAttributeMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,202 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.marshalling;
-
-import java.util.Arrays;
-import java.util.List;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.jboss.xb.binding.Util;
-import org.jboss.xb.binding.introspection.FieldInfo;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class DefaultAttributeMarshaller
-   extends AbstractAttributeMarshaller
-{
-   public static final DefaultAttributeMarshaller INSTANCE = new DefaultAttributeMarshaller();
-   
-   public Object getValue(MarshallingContext ctx)
-   {
-      Object owner = ctx.peek();
-      SchemaBinding schema = ctx.getSchemaBinding();
-      AttributeBinding binding = ctx.getAttributeBinding();
-      QName qName = binding.getQName();
-
-      String fieldName = null;
-      PropertyMetaData propertyMetaData = binding.getPropertyMetaData();
-      if(propertyMetaData != null)
-      {
-         fieldName = propertyMetaData.getName();
-      }
-
-      if(fieldName == null)
-      {
-         fieldName =
-            Util.xmlNameToFieldName(qName.getLocalPart(), schema.isIgnoreLowLine());
-      }
-
-      FieldInfo fieldInfo = FieldInfo.getFieldInfo(
-         owner.getClass(), fieldName, binding.getRequired() && !schema.isIgnoreUnresolvedFieldOrClass()
-      );
-      Object value = null;
-      if(fieldInfo != null)
-      {
-         value = fieldInfo.getValue(owner);
-      }
-
-      return value;
-   }
-
-   public String marshalValue(MarshallingContext ctx, Object value)
-   {
-      if(value == null)
-      {
-         return null;
-      }
-
-      String marshalled;
-
-      AttributeBinding binding = ctx.getAttributeBinding();
-      TypeBinding attrType = binding.getType();
-
-      if(attrType.getItemType() != null)
-      {
-         TypeBinding itemType = attrType.getItemType();
-         if(Constants.NS_XML_SCHEMA.equals(itemType.getQName().getNamespaceURI()))
-         {
-            List list;
-            if(value instanceof List)
-            {
-               list = (List)value;
-            }
-            else if(value.getClass().isArray())
-            {
-               list = Arrays.asList((Object[])value);
-            }
-            else
-            {
-               throw new JBossXBRuntimeException("Expected value for list type is an array or " +
-                  List.class.getName() +
-                  " but got: " +
-                  value
-               );
-            }
-
-            if(Constants.QNAME_QNAME.getLocalPart().equals(itemType.getQName().getLocalPart()))
-            {
-               String attrLocal = binding.getQName().getLocalPart();
-               for(int listInd = 0; listInd < list.size(); ++listInd)
-               {
-                  QName item = (QName)list.get(listInd);
-                  String itemNs = item.getNamespaceURI();
-                  if(itemNs != null && itemNs.length() > 0)
-                  {
-                     String itemPrefix = ctx.getPrefix(itemNs);
-                     if(itemPrefix == null)
-                     {
-                        itemPrefix = item.getPrefix();
-                        if(itemPrefix == null || itemPrefix.length() == 0)
-                        {
-                           itemPrefix = attrLocal + listInd;
-                        }
-                        ctx.declareNamespace(itemPrefix, itemNs);
-                     }
-
-                     if(!itemPrefix.equals(item.getPrefix()))
-                     {
-                        item = new QName(item.getNamespaceURI(), item.getLocalPart(), itemPrefix);
-                        list.set(listInd, item);
-                     }
-                  }
-               }
-            }
-
-            marshalled = SimpleTypeBindings.marshalList(itemType.getQName().getLocalPart(), list, null);
-         }
-         else
-         {
-            throw new JBossXBRuntimeException("Marshalling of list types with item types not from " +
-               Constants.NS_XML_SCHEMA + " is not supported."
-            );
-         }
-      }
-      else if(attrType.getLexicalPattern() != null &&
-         attrType.getBaseType() != null &&
-         Constants.QNAME_BOOLEAN.equals(attrType.getBaseType().getQName()))
-      {
-         String item = (String)attrType.getLexicalPattern().get(0);
-         if(item.indexOf('0') != -1 && item.indexOf('1') != -1)
-         {
-            marshalled = ((Boolean)value).booleanValue() ? "1" : "0";
-         }
-         else
-         {
-            marshalled = ((Boolean)value).booleanValue() ? "true" : "false";
-         }
-      }
-      else if(Constants.QNAME_QNAME.equals(attrType.getQName()))
-      {
-         boolean removePrefix = false;
-         String prefix = null;
-         String ns = ((QName)value).getNamespaceURI();
-         if(ns != null && ns.length() > 0)
-         {
-            prefix = ctx.getPrefix(ns);
-            if(prefix == null)
-            {
-               prefix = ((QName)value).getPrefix();
-               if(prefix == null || prefix.length() == 0)
-               {
-                  prefix = "ns_" + ((QName)value).getLocalPart();
-               }
-               ctx.declareNamespace(prefix, ns);
-            }
-            ctx.getNamespaceContext().addPrefixMapping(prefix, ns);
-            removePrefix = true;
-         }
-
-         marshalled = SimpleTypeBindings.marshalQName((QName)value, ctx.getNamespaceContext());
-
-         if(removePrefix)
-         {
-            ctx.getNamespaceContext().removePrefixMapping(prefix);
-         }
-      }
-      else
-      {
-         marshalled = value.toString();
-      }
-
-      return marshalled;
-   }
-
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/DefaultAttributeMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/DefaultAttributeMarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1346 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.marshalling;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.AbstractList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.ParserConfigurationException;
-import org.jboss.util.Classes;
-import org.jboss.xb.binding.AbstractMarshaller;
-import org.jboss.xb.binding.AttributesImpl;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.Content;
-import org.jboss.xb.binding.ContentWriter;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.ObjectLocalMarshaller;
-import org.jboss.xb.binding.ObjectModelProvider;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.jboss.xb.binding.Util;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.introspection.FieldInfo;
-import org.jboss.xb.binding.metadata.CharactersMetaData;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.AllBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.TermBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.XsdBinder;
-import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
-import org.jboss.xb.binding.sunday.xop.XOPObject;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class MarshallerImpl
-   extends AbstractMarshaller
-{
-   private Stack stack = new StackImpl();
-
-   private Object root;
-
-   /**
-    * Whether NULL values should be ignored or marshalled as xsi:nil='1'
-    */
-   private boolean supportNil = true;
-
-   private boolean ignoreUnresolvedWildcard;
-
-   private QName rootTypeQName;
-
-   private SchemaBindingResolver schemaResolver;
-
-   private SchemaBinding schema;
-
-   private MarshallingContextImpl ctx = new MarshallingContextImpl();
-
-   public boolean isIgnoreUnresolvedWildcard()
-   {
-      return ignoreUnresolvedWildcard;
-   }
-
-   public void setIgnoreUnresolvedWildcard(boolean ignoreUnresolvedWildcard)
-   {
-      this.ignoreUnresolvedWildcard = ignoreUnresolvedWildcard;
-   }
-
-   public SchemaBindingResolver getSchemaResolver()
-   {
-      return schemaResolver;
-   }
-
-   public void setSchemaResolver(SchemaBindingResolver schemaResolver)
-   {
-      this.schemaResolver = schemaResolver;
-   }
-
-   public QName getRootTypeQName()
-   {
-      return rootTypeQName;
-   }
-
-   public void setRootTypeQName(QName rootTypeQName)
-   {
-      this.rootTypeQName = rootTypeQName;
-   }
-
-   public boolean isSupportNil()
-   {
-      return supportNil;
-   }
-
-   public void setSupportNil(boolean supportNil)
-   {
-      this.supportNil = supportNil;
-   }
-
-   /**
-    * Adds an attribute to the top most elements.
-    * First, we check whether there is a namespace associated with the passed in prefix.
-    * If the prefix was not declared, an exception is thrown.
-    *
-    * @param prefix    the prefix of the attribute to be declared
-    * @param localName local name of the attribute
-    * @param type      the type of the attribute
-    * @param value     the value of the attribute
-    */
-   public void addAttribute(String prefix, String localName, String type, String value)
-   {
-      // todo addAttribute(String prefix, String localName, String type, String value)
-   }
-
-   // AbstractMarshaller implementation
-
-   public void marshal(Reader xsdReader, ObjectModelProvider provider, Object root, Writer writer)
-      throws IOException, SAXException, ParserConfigurationException
-   {
-      SchemaBinding model = XsdBinder.bind(xsdReader, null, schemaResolver);
-      marshallInternal(root, model, writer);
-   }
-
-   public void marshal(String xsdURL, ObjectModelProvider provider, Object root, Writer writer) throws IOException,
-      SAXException
-   {
-      SchemaBinding model = XsdBinder.bind(xsdURL, schemaResolver);
-      marshallInternal(root, model, writer);
-   }
-
-   public void marshal(SchemaBinding model, ObjectModelProvider provider, Object root, Writer writer)
-      throws IOException,
-      SAXException
-   {
-      marshallInternal(root, model, writer);
-   }
-
-   private void marshallInternal(Object root, SchemaBinding schema, Writer writer)
-      throws IOException, SAXException
-   {
-      if(schema == null)
-      {
-         throw new JBossXBRuntimeException("XSModel is not available!");
-      }
-
-      this.schema = schema;
-      this.root = root;
-
-      content.startDocument();
-
-      if(rootTypeQName != null)
-      {
-         if(rootQNames.isEmpty())
-         {
-            throw new JBossXBRuntimeException("If type name (" +
-               rootTypeQName +
-               ") for the root element is specified then the name for the root element is required!"
-            );
-         }
-         QName rootQName = (QName)rootQNames.get(0);
-
-         TypeBinding type = schema.getType(rootTypeQName);
-         if(type == null)
-         {
-            throw new JBossXBRuntimeException("Global type definition is not found: " + rootTypeQName);
-         }
-
-         if(isArrayWrapper(type))
-         {
-            stack.push(root);
-            marshalComplexType(rootQName, type, true, false);
-            stack.pop();
-         }
-         else
-         {
-            ElementBinding element = new ElementBinding(schema, rootQName, type);
-            marshalElementOccurence(element, root, false, true);
-         }
-      }
-      else if(rootQNames.isEmpty())
-      {
-         Iterator elements = schema.getElements();
-         if(!elements.hasNext())
-         {
-            throw new JBossXBRuntimeException("The schema doesn't contain global element declarations.");
-         }
-
-         while(elements.hasNext())
-         {
-            ElementBinding element = (ElementBinding)elements.next();
-            marshalElementOccurence(element, root, true, true);
-         }
-      }
-      else
-      {
-         for(int i = 0; i < rootQNames.size(); ++i)
-         {
-            QName qName = (QName)rootQNames.get(i);
-            ElementBinding element = schema.getElement(qName);
-            if(element == null)
-            {
-               Iterator components = schema.getElements();
-               String roots = "";
-               for(int j = 0; components.hasNext(); ++j)
-               {
-                  ElementBinding xsObject = (ElementBinding)components.next();
-                  if(j > 0)
-                  {
-                     roots += ", ";
-                  }
-                  roots += xsObject.getQName();
-               }
-               throw new IllegalStateException("Root element not found: " + qName + " among " + roots);
-            }
-
-            marshalElementOccurence(element, root, true, true);
-         }
-      }
-
-      content.endDocument();
-
-      // version & encoding
-      writeXmlVersion(writer);
-
-      ContentWriter contentWriter = new ContentWriter(writer,
-         propertyIsTrueOrNotSet(org.jboss.xb.binding.Marshaller.PROP_OUTPUT_INDENTATION)
-      );
-      content.handleContent(contentWriter);
-
-      if(log.isTraceEnabled())
-      {
-         java.io.StringWriter traceWriter = new java.io.StringWriter();
-         contentWriter = new ContentWriter(traceWriter,
-            propertyIsTrueOrNotSet(org.jboss.xb.binding.Marshaller.PROP_OUTPUT_INDENTATION)
-         );
-         content.handleContent(contentWriter);
-         log.trace("marshalled:\n" + traceWriter.getBuffer().toString());
-      }
-   }
-
-   private boolean marshalElementOccurence(ElementBinding element,
-                                           Object value,
-                                           boolean optional,
-                                           boolean declareNs)
-   {
-      QName xsiTypeQName = null;
-      TypeBinding xsiType = null;
-      if(value != null)
-      {
-         QName typeQName = element.getType().getQName();
-         xsiTypeQName = (QName)cls2TypeMap.get(value.getClass());
-         // in case xsiTypeQName is not null, typeQName should also be not null
-         if(xsiTypeQName != null &&
-            !(typeQName.getLocalPart().equals(xsiTypeQName.getLocalPart()) &&
-            typeQName.getNamespaceURI().equals(xsiTypeQName.getNamespaceURI())
-            ))
-         {
-            if(log.isTraceEnabled())
-            {
-               log.trace(value.getClass() + " is mapped to xsi:type " + xsiTypeQName);
-            }
-
-            xsiType = schema.getType(xsiTypeQName);
-            if(xsiType == null)
-            {
-               log.warn("Class " +
-                  value.getClass() +
-                  " is mapped to type " +
-                  xsiTypeQName +
-                  " but the type is not found in schema."
-               );
-            }
-            // todo should check derivation also, i.e. if(xsiType.derivedFrom())
-         }
-      }
-
-      stack.push(value);
-      boolean marshalled = marshalElement(element, xsiType, optional, declareNs);
-      stack.pop();
-
-      return marshalled;
-   }
-
-   private boolean marshalElement(ElementBinding element, TypeBinding xsiType, boolean optional, boolean declareNs)
-   {
-      Object value = stack.peek();
-      boolean nillable = element.isNillable();
-      boolean result = value != null || value == null && (optional || nillable);
-      boolean trace = log.isTraceEnabled() && result;
-      if(trace)
-      {
-         log.trace("started element " + element.getQName());
-      }
-
-      if(value != null)
-      {
-         boolean declareXsiType = xsiType != null;
-         marshalElementType(element.getQName(),
-            declareXsiType ? xsiType : element.getType(),
-            declareNs,
-            declareXsiType
-         );
-      }
-      else if(nillable)
-      {
-         writeNillable(element.getQName(), nillable);
-      }
-
-      if(trace)
-      {
-         log.trace("finished element " + element.getQName());
-      }
-
-      return result;
-   }
-
-   private void marshalElementType(QName elementQName,
-                                   TypeBinding type,
-                                   boolean declareNs,
-                                   boolean declareXsiType)
-   {
-      String elementNs = elementQName.getNamespaceURI();
-      String elementLocal = elementQName.getLocalPart();
-
-      XOPMarshaller xopMarshaller = type.getXopMarshaller();
-      if(xopMarshaller != null && isXopOptimizable(type))
-      {
-         String cid = null;
-         if(xopMarshaller.isXOPPackage())
-         {
-            Object o = stack.peek();
-            cid = xopMarshaller.addMtomAttachment(new XOPObject(o), elementNs, elementLocal);
-         }
-
-         if(cid == null)
-         {
-            if(!type.isSimple())
-            {
-               if(type.hasOnlyXmlMimeAttributes())
-               {
-                  if(log.isTraceEnabled())
-                  {
-                     log.trace(
-                        "XML MIME attributes of type " + type.getQName() +
-                        " are ignored, the value is marshalled as " + type.getSimpleType().getQName()
-                     );
-                  }
-
-                  type = type.getSimpleType();
-               }
-            }
-         }
-         else
-         {
-            AttributesImpl attrs = null;
-            String prefix = getPrefix(elementNs);
-            boolean genPrefix = prefix == null && elementNs != null && elementNs.length() > 0;
-            if(genPrefix)
-            {
-               prefix = "ns_" + elementLocal;
-               attrs = new AttributesImpl(1);
-               declareNs(attrs, prefix, elementNs);
-            }
-
-            String qName = prefixLocalName(prefix, elementLocal);
-            content.startElement(elementNs, elementLocal, qName, attrs);
-
-            AttributesImpl xopAttrs = new AttributesImpl(2);
-            xopAttrs.add(Constants.NS_XML_SCHEMA, "xop", "xmlns:xop", "CDATA", Constants.NS_XOP_INCLUDE);
-            xopAttrs.add(null, "href", "href", "CDATA", cid);
-
-            content.startElement(Constants.NS_XOP_INCLUDE, "Include", "xop:Include", xopAttrs);
-            content.endElement(Constants.NS_XOP_INCLUDE, "Include", "xop:Include");
-
-            content.endElement(elementNs, elementLocal, qName);
-            return;
-         }
-      }
-
-      if(type.isSimple())
-      {
-         marshalSimpleType(elementQName, type, declareNs, declareXsiType);
-      }
-      else
-      {
-         marshalComplexType(elementQName, type, declareNs, declareXsiType);
-      }
-   }
-
-   private void marshalSimpleType(QName elementQName,
-                                  TypeBinding type,
-                                  boolean declareNs,
-                                  boolean declareXsiType)
-   {
-      ctx.attrs = null;
-      if((declareNs || declareXsiType) && nsRegistry.size() > 0)
-      {
-         if(ctx.attrs == null)
-         {
-            ctx.attrs = new AttributesImpl(nsRegistry.size() + 1);
-         }
-         declareNs(ctx.attrs);
-      }
-
-      String elementNs = elementQName.getNamespaceURI();
-      String elementLocal = elementQName.getLocalPart();
-
-      String prefix = getPrefix(elementNs);
-      boolean genPrefix = prefix == null && elementNs != null && elementNs.length() > 0;
-      if(genPrefix)
-      {
-         prefix = "ns_" + elementLocal;
-         if(ctx.attrs == null)
-         {
-            ctx.attrs = new AttributesImpl(1);
-         }
-         declareNs(ctx.attrs, prefix, elementNs);
-      }
-
-      if(declareXsiType)
-      {
-         declareXsiType(type.getQName(), ctx.attrs);
-      }
-
-      String typeName = type.getQName().getLocalPart();
-      if(ctx.attrs == null && SimpleTypeBindings.XS_QNAME_NAME.equals(typeName) ||
-         SimpleTypeBindings.XS_NOTATION_NAME.equals(typeName) ||
-         type.getItemType() != null &&
-         (SimpleTypeBindings.XS_QNAME_NAME.equals(type.getItemType().getQName().getLocalPart()) ||
-         SimpleTypeBindings.XS_NOTATION_NAME.equals(type.getItemType().getQName().getLocalPart())
-         )
-      )
-      {
-         ctx.attrs = new AttributesImpl(5);
-      }
-
-      Object value = stack.peek();
-      String marshalled = marshalCharacters(elementNs, prefix, type, value);
-
-      String qName = prefixLocalName(prefix, elementLocal);
-      content.startElement(elementNs, elementLocal, qName, ctx.attrs);
-      content.characters(marshalled.toCharArray(), 0, marshalled.length());
-      content.endElement(elementNs, elementLocal, qName);
-   }
-
-   private void marshalComplexType(QName elementQName,
-                                   TypeBinding type,
-                                   boolean declareNs,
-                                   boolean declareXsiType)
-   {
-      Collection attrBindings = type.getAttributes();
-      int attrsTotal = declareNs || declareXsiType ? nsRegistry.size() + attrBindings.size() + 1: attrBindings.size();
-      ctx.attrs = attrsTotal > 0 ? new AttributesImpl(attrsTotal) : null;
-
-      if(declareNs && nsRegistry.size() > 0)
-      {
-         declareNs(ctx.attrs);
-      }
-
-      String generatedPrefix = null;
-      if(declareXsiType)
-      {
-         generatedPrefix = declareXsiType(type.getQName(), ctx.attrs);
-         if(generatedPrefix != null)
-         {
-            String typeNsWithGeneratedPrefix = type.getQName().getNamespaceURI();
-            declareNs(ctx.attrs, generatedPrefix, typeNsWithGeneratedPrefix);
-            declareNamespace(generatedPrefix, typeNsWithGeneratedPrefix);
-         }
-      }
-
-      String elementNs = elementQName.getNamespaceURI();
-      String elementLocal = elementQName.getLocalPart();
-
-      String prefix = getPrefix(elementNs);
-      boolean genPrefix = prefix == null && elementNs != null && elementNs.length() > 0;
-      if(genPrefix)
-      {
-         // todo: it's possible that the generated prefix already mapped. this should be fixed
-         prefix = "ns_" + elementLocal;
-         declareNamespace(prefix, elementNs);
-         if(ctx.attrs == null)
-         {
-            ctx.attrs = new AttributesImpl(1);
-         }
-         declareNs(ctx.attrs, prefix, elementNs);
-      }
-
-      if(!attrBindings.isEmpty())
-      {
-         for(Iterator i = attrBindings.iterator(); i.hasNext();)
-         {
-            AttributeBinding attrBinding = (AttributeBinding)i.next();
-            QName attrQName = attrBinding.getQName();
-
-            if(Constants.QNAME_XMIME_CONTENTTYPE.equals(attrQName))
-            {
-               continue;
-            }
-
-            ctx.attr = attrBinding;
-            AttributeMarshaller marshaller = attrBinding.getMarshaller();
-            String marshalledAttr = marshaller.marshal(ctx);
-
-            if(marshalledAttr != null)
-            {
-               if(ctx.attrs == null)
-               {
-                  ctx.attrs = new AttributesImpl(5);
-               }
-
-               String attrNs = attrQName.getNamespaceURI();
-               String attrLocal = attrQName.getLocalPart();
-               String attrPrefix = null;
-               if(attrNs != null)
-               {
-                  attrPrefix = getPrefix(attrNs);
-                  if(attrPrefix == null && attrNs != null && attrNs.length() > 0)
-                  {
-                     attrPrefix = "ns_" + attrLocal;
-                     declareNs(ctx.attrs, attrPrefix, attrNs);
-                  }
-               }
-
-               String prefixedName = prefixLocalName(attrPrefix, attrLocal);
-               ctx.attrs.add(attrNs, attrLocal, prefixedName, "CDATA", marshalledAttr);
-            }
-         }
-         ctx.attr = null;
-      }
-
-      String characters = null;
-      TypeBinding simpleType = type.getSimpleType();
-      if(simpleType != null)
-      {
-         String fieldName = ctx.getSimpleContentProperty();
-         CharactersMetaData charactersMetaData = type.getCharactersMetaData();
-         PropertyMetaData propertyMetaData = charactersMetaData == null ? null : charactersMetaData.getProperty();
-         if(propertyMetaData != null)
-         {
-            fieldName = propertyMetaData.getName();
-         }
-
-         if(fieldName != null)
-         {
-            boolean ignoreUnresolvedFieldOrClass = type.getSchemaBinding().isIgnoreUnresolvedFieldOrClass();
-            Object o = stack.peek();
-            Object value = getElementValue(o, fieldName, ignoreUnresolvedFieldOrClass);
-            if(value != null)
-            {
-               String typeName = simpleType.getQName().getLocalPart();
-               if(ctx.attrs == null && (SimpleTypeBindings.XS_QNAME_NAME.equals(typeName) ||
-                  SimpleTypeBindings.XS_NOTATION_NAME.equals(typeName) ||
-                  simpleType.getItemType() != null &&
-                  (SimpleTypeBindings.XS_QNAME_NAME.equals(simpleType.getItemType().getQName().getLocalPart()) ||
-                  SimpleTypeBindings.XS_NOTATION_NAME.equals(simpleType.getItemType().getQName().getLocalPart())
-                  )
-                  )
-               )
-               {
-                  ctx.attrs = new AttributesImpl(5);
-               }
-
-               characters = marshalCharacters(elementNs, prefix, simpleType, value);
-            }
-         }
-      }
-
-      String qName = prefixLocalName(prefix, elementLocal);
-      content.startElement(elementNs, elementLocal, qName, ctx.attrs);
-
-      ParticleBinding particle = type.getParticle();
-      if(particle != null)
-      {
-         marshalParticle(particle, false);
-      }
-
-      if(characters != null)
-      {
-         content.characters(characters.toCharArray(), 0, characters.length());
-      }
-      content.endElement(elementNs, elementLocal, qName);
-
-      ctx.attrs = null;
-
-      if(genPrefix)
-      {
-         removePrefixMapping(prefix);
-      }
-
-      if(generatedPrefix != null)
-      {
-         removePrefixMapping(generatedPrefix);
-      }
-   }
-
-   private boolean marshalParticle(ParticleBinding particle, boolean declareNs)
-   {
-      boolean marshalled;
-      TermBinding term = particle.getTerm();
-      Object o;
-      Iterator i;
-      if(term.isModelGroup())
-      {
-         ModelGroupBinding modelGroup = (ModelGroupBinding)term;
-         if(modelGroup.isSkip() || stack.isEmpty())
-         {
-            marshalled = marshalModelGroup(modelGroup, declareNs);
-         }
-         else
-         {
-            PropertyMetaData propertyMetaData = modelGroup.getPropertyMetaData();
-            if(propertyMetaData == null)
-            {
-               throw new JBossXBRuntimeException(
-                  "Currently, property binding metadata must be available for a model group to be marshalled!"
-               );
-            }
-
-            o = getChildren(stack.peek(), propertyMetaData.getName(),
-               modelGroup.getSchema().isIgnoreUnresolvedFieldOrClass()
-            );
-
-            i = o != null && isRepeatable(particle) ? getIterator(o) : null;
-            if(i != null)
-            {
-               marshalled = true;
-               while(i.hasNext() && marshalled)
-               {
-                  Object value = i.next();
-                  stack.push(value);
-                  marshalled = marshalModelGroup(modelGroup, declareNs);
-                  stack.pop();
-               }
-            }
-            else
-            {
-               stack.push(o);
-               marshalled = marshalModelGroup(modelGroup, declareNs);
-               stack.pop();
-            }
-         }
-      }
-      else if(term.isWildcard())
-      {
-         o = stack.peek();
-
-         boolean popWildcardValue = false;
-         ObjectLocalMarshaller marshaller = null;
-         FieldToWildcardMapping mapping = (FieldToWildcardMapping)field2WildcardMap.get(o.getClass());
-         if(mapping != null)
-         {
-            marshaller = mapping.marshaller;
-            o = mapping.fieldInfo.getValue(o);
-            stack.push(o);
-            popWildcardValue = true;
-         }
-
-         i = o != null && isRepeatable(particle) ? getIterator(o) : null;
-         if(i != null)
-         {
-            marshalled = true;
-            while(i.hasNext() && marshalled)
-            {
-               Object value = i.next();
-               marshalled = marshalWildcardOccurence(particle, marshaller, value, declareNs);
-            }
-         }
-         else
-         {
-            marshalled = marshalWildcardOccurence(particle, marshaller, o, declareNs);
-         }
-
-         if(popWildcardValue)
-         {
-            stack.pop();
-         }
-      }
-      else
-      {
-         ElementBinding element = (ElementBinding)term;
-         SchemaBinding schema = element.getSchema();
-         o = getElementValue(element, schema.isIgnoreLowLine(), schema.isIgnoreUnresolvedFieldOrClass());
-
-         i = o != null && isRepeatable(particle) ? getIterator(o) : null;
-         if(i != null)
-         {
-            marshalled = true;
-            while(i.hasNext() && marshalled)
-            {
-               Object value = i.next();
-               marshalled = marshalElementOccurence(element, value, particle.getMinOccurs() == 0, declareNs);
-            }
-         }
-         else
-         {
-            marshalled = marshalElementOccurence(element, o, particle.getMinOccurs() == 0, declareNs);
-         }
-      }
-      return marshalled;
-   }
-
-   private boolean marshalWildcardOccurence(ParticleBinding particle,
-                                            ObjectLocalMarshaller marshaller,
-                                            Object value,
-                                            boolean declareNs)
-   {
-      boolean marshalled = true;
-      if(marshaller != null)
-      {
-         marshaller.marshal(ctx, value);
-      }
-      else
-      {
-         stack.push(value);
-         marshalled = marshalWildcard(particle, declareNs);
-         stack.pop();
-      }
-      return marshalled;
-   }
-
-   private boolean marshalWildcard(ParticleBinding particle, boolean declareNs)
-   {
-      WildcardBinding wildcard = (WildcardBinding)particle.getTerm();
-      Object o = stack.peek();
-      ClassMapping mapping = getClassMapping(o.getClass());
-      if(mapping == null)
-      {
-         // todo: YAH (yet another hack)
-         QName autoType = SimpleTypeBindings.typeQName(o.getClass());
-         if(autoType != null)
-         {
-            String marshalled = SimpleTypeBindings.marshal(autoType.getLocalPart(), o, null);
-            content.characters(marshalled.toCharArray(), 0, marshalled.length());
-            return true;
-         }
-         else
-         {
-            if(ignoreUnresolvedWildcard)
-            {
-               log.warn("Failed to marshal wildcard. Class mapping not found for " +
-                  o.getClass() +
-                  "@" +
-                  o.hashCode() +
-                  ": " + o
-               );
-               return true;
-            }
-            else
-            {
-               throw new IllegalStateException("Failed to marshal wildcard. Class mapping not found for " +
-                  o.getClass() +
-                  "@" +
-                  o.hashCode() +
-                  ": " + o
-               );
-            }
-         }
-      }
-
-      Object parentRoot = this.root;
-      Stack parentStack = this.stack;
-      SchemaBinding parentSchema = this.schema;
-
-      this.root = o;
-      this.stack = new StackImpl();
-      this.schema = XsdBinder.bind(mapping.schemaUrl, schemaResolver);
-
-      boolean marshalled;
-      if(mapping.elementName != null)
-      {
-         ElementBinding elDec = schema.getElement(mapping.elementName);
-         if(elDec == null)
-         {
-            throw new JBossXBRuntimeException("Element " + mapping.elementName + " is not declared in the schema.");
-         }
-
-         marshalled = marshalElementOccurence(elDec, root, particle.getMinOccurs() == 0, declareNs);
-      }
-      else if(mapping.typeName != null)
-      {
-         TypeBinding typeDef = schema.getType(mapping.typeName);
-         if(typeDef == null)
-         {
-            throw new JBossXBRuntimeException("Type " +
-               mapping.typeName +
-               " is not defined in the schema."
-            );
-         }
-
-         if(wildcard.getQName() == null)
-         {
-            throw new JBossXBRuntimeException("Expected the wildcard to have a non-null QName.");
-         }
-
-         ElementBinding element = new ElementBinding(schema, wildcard.getQName(), typeDef);
-         marshalled = marshalElementOccurence(element, root, particle.getMinOccurs() == 0, declareNs);
-      }
-      else
-      {
-         throw new JBossXBRuntimeException("Class mapping for " +
-            mapping.cls +
-            " is associated with neither global element name nor global type name."
-         );
-      }
-
-      this.root = parentRoot;
-      this.stack = parentStack;
-      this.schema = parentSchema;
-
-      return marshalled;
-   }
-
-   private boolean marshalModelGroup(ModelGroupBinding modelGroup, boolean declareNs)
-   {
-      boolean marshalled;
-      if(modelGroup instanceof AllBinding)
-      {
-         marshalled = marshalModelGroupAll(modelGroup.getParticles(), declareNs);
-      }
-      else if(modelGroup instanceof ChoiceBinding)
-      {
-         marshalled = marshalModelGroupChoice(modelGroup.getParticles(), declareNs);
-      }
-      else
-      {
-         marshalled = marshalModelGroupSequence(modelGroup, declareNs);
-      }
-      return marshalled;
-   }
-
-   private boolean marshalModelGroupAll(Collection particles, boolean declareNs)
-   {
-      boolean marshalled = false;
-      for(Iterator i = particles.iterator(); i.hasNext();)
-      {
-         ParticleBinding particle = (ParticleBinding)i.next();
-         marshalled |= marshalParticle(particle, declareNs);
-      }
-      return marshalled;
-   }
-
-   private boolean marshalModelGroupChoice(Collection particles, boolean declareNs)
-   {
-      boolean marshalled = false;
-      Content mainContent = this.content;
-      for(Iterator i = particles.iterator(); i.hasNext() && !marshalled;)
-      {
-         ParticleBinding particle = (ParticleBinding)i.next();
-         this.content = new Content();
-         marshalled = marshalParticle(particle, declareNs);
-      }
-
-      if(marshalled)
-      {
-         mainContent.append(this.content);
-      }
-      this.content = mainContent;
-
-      return marshalled;
-   }
-
-   private boolean marshalModelGroupSequence(ModelGroupBinding sequence, boolean declareNs)
-   {
-      // if sequence is bound to a collection,
-      // we assume the iterator over the collection is in sync with the particle iterator
-      Iterator valueIterator = null;
-      if(!sequence.isSkip() && !stack.isEmpty())
-      {
-         Object o = stack.peek();
-         if(o != null && (Collection.class.isAssignableFrom(o.getClass()) || o.getClass().isArray()))
-         {
-            valueIterator = getIterator(o);
-         }
-      }
-
-      boolean marshalled = true;
-      for(Iterator i = sequence.getParticles().iterator(); i.hasNext();)
-      {
-         if(valueIterator != null)
-         {
-            Object o = valueIterator.hasNext() ? valueIterator.next() : null;
-            stack.push(o);
-         }
-
-         ParticleBinding particle = (ParticleBinding)i.next();
-         marshalled &= marshalParticle(particle, declareNs);
-
-         if(valueIterator != null)
-         {
-            stack.pop();
-         }
-      }
-      return marshalled;
-   }
-
-   private String marshalCharacters(String elementUri,
-                                    String elementPrefix,
-                                    TypeBinding simpleType,
-                                    Object value)
-   {
-      String marshalled;
-      if(simpleType.getItemType() != null)
-      {
-         TypeBinding itemType = simpleType.getItemType();
-         if(Constants.NS_XML_SCHEMA.equals(itemType.getQName().getNamespaceURI()))
-         {
-            List list;
-            if(value instanceof List)
-            {
-               list = (List)value;
-            }
-            else if(value.getClass().isArray())
-            {
-               list = asList(value);
-            }
-            else
-            {
-               // todo: qname are also not yet supported
-               throw new JBossXBRuntimeException(
-                  "Expected value for list type is an array or " + List.class.getName() + " but got: " + value
-               );
-            }
-
-            marshalled = SimpleTypeBindings.marshalList(itemType.getQName().getLocalPart(), list, null);
-         }
-         else
-         {
-            throw new JBossXBRuntimeException("Marshalling of list types with item types not from " +
-               Constants.NS_XML_SCHEMA + " is not supported."
-            );
-         }
-      }
-      else if(Constants.NS_XML_SCHEMA.equals(simpleType.getQName().getNamespaceURI()))
-      {
-         String typeName = simpleType.getQName().getLocalPart();
-
-         String prefix = null;
-         boolean removePrefix = false;
-         if(SimpleTypeBindings.XS_QNAME_NAME.equals(typeName) ||
-            SimpleTypeBindings.XS_NOTATION_NAME.equals(typeName))
-         {
-            QName qNameValue = (QName)value;
-            if(qNameValue.getNamespaceURI() != null && qNameValue.getNamespaceURI().length() > 0)
-            {
-               prefix = nsRegistry.getPrefix(qNameValue.getNamespaceURI());
-               if(prefix == null)
-               {
-                  prefix = qNameValue.getPrefix();
-                  if(prefix == null || prefix.length() == 0)
-                  {
-                     prefix = qNameValue.getLocalPart() + "_ns";
-                  }
-                  nsRegistry.addPrefixMapping(prefix, qNameValue.getNamespaceURI());
-                  ctx.declareNamespace(prefix, qNameValue.getNamespaceURI());
-
-                  removePrefix = true;
-               }
-            }
-         }
-
-         marshalled = SimpleTypeBindings.marshal(typeName, value, nsRegistry);
-
-         if(removePrefix)
-         {
-            nsRegistry.removePrefixMapping(prefix);
-         }
-      }
-      // todo: this is a quick fix for boolean pattern (0|1 or true|false) should be refactored
-      else if(simpleType.getLexicalPattern() != null &&
-         simpleType.getBaseType() != null &&
-         Constants.QNAME_BOOLEAN.equals(simpleType.getBaseType().getQName()))
-      {
-         String item = (String)simpleType.getLexicalPattern().get(0);
-         if(item.indexOf('0') != -1 && item.indexOf('1') != -1)
-         {
-            marshalled = ((Boolean)value).booleanValue() ? "1" : "0";
-         }
-         else
-         {
-            marshalled = ((Boolean)value).booleanValue() ? "true" : "false";
-         }
-      }
-      else
-      {
-         if(simpleType.getLexicalEnumeration() != null)
-         {
-            Method getValue;
-            try
-            {
-               getValue = value.getClass().getMethod("value", null);
-            }
-            catch(NoSuchMethodException e)
-            {
-               try
-               {
-                  getValue = value.getClass().getMethod("getValue", null);
-               }
-               catch(NoSuchMethodException e1)
-               {
-                  throw new JBossXBRuntimeException("Failed to find neither value() nor getValue() in " +
-                     value.getClass() +
-                     " which is bound to enumeration type " + simpleType.getQName()
-                  );
-               }
-            }
-
-            try
-            {
-               value = getValue.invoke(value, null);
-            }
-            catch(Exception e)
-            {
-               throw new JBossXBRuntimeException(
-                  "Failed to invoke getValue() on " + value + " to get the enumeration value", e
-               );
-            }
-         }
-
-         marshalled = marshalCharacters(elementUri,
-            elementPrefix,
-            simpleType.getBaseType(),
-            value
-         );
-      }
-      return marshalled;
-   }
-
-   private void writeNillable(QName elementQName, boolean nillable)
-   {
-      if(!supportNil)
-      {
-         return;
-      }
-
-      if(!nillable)
-      {
-         throw new JBossXBRuntimeException("Failed to marshal " +
-            elementQName +
-            ": Java value is null but the element is not nillable."
-         );
-      }
-
-      String elementNs = elementQName.getNamespaceURI();
-      String elementLocal = elementQName.getLocalPart();
-
-      AttributesImpl attrs;
-      String prefix = getPrefix(elementNs);
-      if(prefix == null && elementNs != null && elementNs.length() > 0)
-      {
-         prefix = "ns_" + elementLocal;
-         attrs = new AttributesImpl(2);
-         declareNs(attrs, prefix, elementNs);
-      }
-      else
-      {
-         attrs = new AttributesImpl(1);
-      }
-
-      String xsiPrefix = getPrefix(Constants.NS_XML_SCHEMA_INSTANCE);
-      if(xsiPrefix == null)
-      {
-         xsiPrefix = "xsi";
-         declareNs(attrs, "xsi", Constants.NS_XML_SCHEMA_INSTANCE);
-      }
-
-      String nilQName = xsiPrefix + ":nil";
-      attrs.add(Constants.NS_XML_SCHEMA_INSTANCE, "nil", nilQName, null, "1");
-
-      String qName = prefixLocalName(prefix, elementLocal);
-      content.startElement(elementNs, elementLocal, qName, attrs);
-      content.endElement(elementNs, elementLocal, qName);
-   }
-
-   private Object getElementValue(ElementBinding element,
-                                  boolean ignoreLowLine,
-                                  boolean ignoreNotFoundField)
-   {
-      Object value;
-      Object peeked = stack.peek();
-      if(peeked == null)
-      {
-         value = null;
-      }
-      else if(peeked instanceof Collection || peeked.getClass().isArray())
-      {
-         value = peeked;
-      }
-      else
-      {
-         String fieldName = null;
-         PropertyMetaData propertyMetaData = element.getPropertyMetaData();
-         if(propertyMetaData != null)
-         {
-            fieldName = propertyMetaData.getName();
-         }
-
-         if(fieldName == null)
-         {
-            fieldName = Util.xmlNameToFieldName(element.getQName().getLocalPart(), ignoreLowLine);
-         }
-
-         value = getChildren(peeked, fieldName, ignoreNotFoundField);
-         if(value == null)
-         {
-            value = getElementValue(peeked, fieldName, ignoreNotFoundField);
-         }
-      }
-      return value;
-   }
-
-   private static boolean isArrayWrapper(TypeBinding type)
-   {
-      boolean is = false;
-      if(!type.isSimple())
-      {
-         ParticleBinding particle = type.getParticle();
-         if(particle != null)
-         {
-            is = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
-         }
-      }
-      return is;
-   }
-
-   private Iterator getIterator(Object value)
-   {
-      Iterator i = null;
-      if(value instanceof Collection)
-      {
-         i = ((Collection)value).iterator();
-      }
-      else if(value.getClass().isArray())
-      {
-         final Object arr = value;
-         i = new Iterator()
-         {
-            private int curInd = 0;
-            private int length = Array.getLength(arr);
-
-            public boolean hasNext()
-            {
-               return curInd < length;
-            }
-
-            public Object next()
-            {
-               return Array.get(arr, curInd++);
-            }
-
-            public void remove()
-            {
-               throw new UnsupportedOperationException("remove is not implemented.");
-            }
-         };
-      }
-      else if(value instanceof Iterator)
-      {
-         i = (Iterator)value;
-      }
-      else
-      {
-         //throw new JBossXBRuntimeException("Unexpected type for children: " + value.getClass());
-      }
-      return i;
-   }
-
-   private static Object getChildren(Object o, String fieldName, boolean ignoreNotFoundField)
-   {
-      Object children = null;
-      if(!writeAsValue(o.getClass()))
-      {
-         children = getJavaValue(fieldName, o, true, ignoreNotFoundField);
-      }
-      return children;
-   }
-
-   private static Object getJavaValue(String fieldName,
-                                      Object o,
-                                      boolean forComplexType,
-                                      boolean ignoreNotFoundField)
-   {
-      FieldInfo fieldInfo = FieldInfo.getFieldInfo(o.getClass(), fieldName, !ignoreNotFoundField);
-      Object value = null;
-      if(fieldInfo != null && (!forComplexType || forComplexType && !writeAsValue(fieldInfo.getType())))
-      {
-         value = fieldInfo.getValue(o);
-      }
-      return value;
-   }
-
-   private static Object getElementValue(Object o, String fieldName, boolean ignoreNotFoundField)
-   {
-      Object value;
-      if(writeAsValue(o.getClass()))
-      {
-         value = o;
-      }
-      else
-      {
-         value = getJavaValue(fieldName, o, false, ignoreNotFoundField);
-      }
-      return value;
-   }
-
-   private static boolean writeAsValue(final Class type)
-   {
-      return Classes.isPrimitive(type) ||
-         type == String.class ||
-         type == java.util.Date.class ||
-         type == java.math.BigDecimal.class ||
-         type == java.math.BigInteger.class;
-   }
-
-   private static boolean isRepeatable(ParticleBinding particle)
-   {
-      return particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1 || particle.getMinOccurs() > 1;
-   }
-
-   private static final List asList(final Object arr)
-   {
-      return new AbstractList()
-      {
-         private final Object array = arr;
-
-         public Object get(int index)
-         {
-            return Array.get(array, index);
-         }
-
-         public int size()
-         {
-            return Array.getLength(array);
-         }
-      };
-   }
-
-   private static boolean isXopOptimizable(TypeBinding type)
-   {
-      while(type != null)
-      {
-         if(Constants.QNAME_BASE64BINARY.equals(type.getQName()))
-         {
-            return true;
-         }
-         type = type.getBaseType();
-      }
-      return false;
-   }
-
-   private class MarshallingContextImpl implements MarshallingContext
-   {
-      private ContentHandler ch;
-      private AttributeBinding attr;
-
-      private AttributesImpl attrs;
-
-      public boolean isAttributeRequired()
-      {
-         throw new UnsupportedOperationException();
-      }
-
-      public boolean isTypeComplex()
-      {
-         throw new UnsupportedOperationException();
-      }
-
-      public String getSimpleContentProperty()
-      {
-         return schema.getSimpleContentProperty();
-      }
-
-      public ContentHandler getContentHandler()
-      {
-         if(ch == null)
-         {
-            ch = new ContentHandlerAdaptor();
-         }
-         return ch;
-      }
-
-      public SchemaBinding getSchemaBinding()
-      {
-         return schema;
-      }
-
-      public AttributeBinding getAttributeBinding()
-      {
-         return attr;
-      }
-
-      public String getPrefix(String ns)
-      {
-         return MarshallerImpl.this.getPrefix(ns);
-      }
-
-      public void declareNamespace(String prefix, String ns)
-      {
-         declareNs(attrs, prefix, ns);
-         nsRegistry.addPrefixMapping(prefix, ns);
-      }
-
-      public NamespaceRegistry getNamespaceContext()
-      {
-         return nsRegistry;
-      }
-
-      public Object peek()
-      {
-         return stack.isEmpty() ? null : stack.peek();
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallingContext.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallingContext.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallingContext.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,62 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.marshalling;
-
-import javax.xml.namespace.NamespaceContext;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface MarshallingContext
-   extends org.jboss.xb.binding.MarshallingContext
-{
-   /**
-    * @return  schema binding
-    */
-   SchemaBinding getSchemaBinding();
-
-   /**
-    * @return  current attribute binding
-    */
-   AttributeBinding getAttributeBinding();
-
-   /**
-    * @param ns  the namespace to return the prefix for
-    * @return  the prefix for the namespace (can be null if the namespace is not mapped to a prefix
-    *    and the second parameter is false)
-    */
-   String getPrefix(String ns);
-
-   /**
-    * @param prefix  prefix for the namespace being declared
-    * @param ns  the namespace to declare for the current component
-    */
-   void declareNamespace(String prefix, String ns);
-
-   /**
-    * @return  current object on the stack
-    */
-   Object peek();
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallingContext.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/marshalling/MarshallingContext.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AllBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AllBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AllBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,154 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.Set;
-import java.util.Map;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Collection;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.logging.Logger;
-import org.xml.sax.Attributes;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class AllBinding
-   extends ModelGroupBinding
-{
-   private static final Logger log = Logger.getLogger(AllBinding.class);
-
-   private Map elements = Collections.EMPTY_MAP;
-
-   public AllBinding(SchemaBinding schema)
-   {
-      super(schema);
-   }
-
-   public ElementBinding getArrayItem()
-   {
-      return null;
-   }
-
-   public void addParticle(ParticleBinding particle)
-   {
-      if(!(particle.getTerm() instanceof ElementBinding))
-      {
-         throw new JBossXBRuntimeException("Model group all may contain only elements!");
-      }
-
-      ElementBinding element = (ElementBinding)particle.getTerm();
-      switch(elements.size())
-      {
-         case 0:
-            elements = Collections.singletonMap(element.getQName(), particle);
-            break;
-         case 1:
-            elements = new HashMap(elements);
-         default:
-            elements.put(element.getQName(), particle);
-      }
-      super.addParticle(particle);
-   }
-
-   public Collection getParticles()
-   {
-      return Collections.unmodifiableCollection(elements.values());
-   }
-
-   public Cursor newCursor(ParticleBinding particle)
-   {
-      return new Cursor(particle)
-      {
-         private ParticleBinding curParticle;
-         private int occurence;
-
-         public ParticleBinding getCurrentParticle()
-         {
-            if(curParticle == null)
-            {
-               throw new JBossXBRuntimeException("The cursor in all group has not been positioned yet!");
-            }
-            return curParticle;
-         }
-
-         public ElementBinding getElement()
-         {
-            return (ElementBinding)getCurrentParticle().getTerm();
-         }
-
-         public void endElement(QName qName)
-         {
-            if(curParticle == null || !getElement().getQName().equals(qName))
-            {
-               throw new JBossXBRuntimeException("Failed to process endElement for " + qName +
-                  " since the current element is " + (curParticle == null ? null : getElement().getQName())
-               );
-            }
-         }
-
-         public int getOccurence()
-         {
-            return occurence;
-         }
-
-         protected List startElement(QName qName, Attributes atts, Set passedGroups, List groupStack, boolean required)
-         {
-            ParticleBinding particle = (ParticleBinding)elements.get(qName);
-            if(particle != null)
-            {
-               if(curParticle == particle)
-               {
-                  ++occurence;
-               }
-               else
-               {
-                  curParticle = particle;
-                  occurence = 1;
-               }
-               groupStack = addItem(groupStack, this);
-            }
-            else
-            {
-               log.warn("Element " + qName + " not found in " + elements.keySet());
-            }
-            return groupStack;
-         }
-
-         protected ElementBinding getElement(QName qName, Attributes atts, Set passedGroups, boolean ignoreWildcards)
-         {
-            ParticleBinding particle = (ParticleBinding)elements.get(qName);
-            return particle == null ? null : (ElementBinding)particle.getTerm();
-         }
-      };
-   }
-
-   protected boolean mayStartWith(QName qName, Set set)
-   {
-      return elements.containsKey(qName);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AllBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AllBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,173 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.sunday.marshalling.AttributeMarshaller;
-import org.jboss.xb.binding.sunday.marshalling.DefaultAttributeMarshaller;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class AttributeBinding
-{
-   private final SchemaBinding schema;
-   private final QName qName;
-   private final TypeBinding type;
-   private AttributeHandler handler;
-   private AttributeMarshaller marshaller = DefaultAttributeMarshaller.INSTANCE;
-   private PropertyMetaData propertyMetaData;
-   private ValueMetaData valueMetaData;
-   /** The default="value" constraint for the attribute */
-   private String defaultConstraint;
-   private boolean mapEntryKey;
-   private boolean mapEntryValue;
-   private ValueAdapter valueAdapter;
-   private boolean required;
-
-   public AttributeBinding(SchemaBinding schema, QName qName, TypeBinding type, AttributeHandler handler)
-   {
-      this.schema = schema;
-      this.qName = qName;
-      this.type = type;
-      this.handler = handler;
-
-      if(qName == null)
-      {
-         throw new JBossXBRuntimeException("Each attribute should have a non-null QName!");
-      }
-   }
-
-   public QName getQName()
-   {
-      return qName;
-   }
-
-   public TypeBinding getType()
-   {
-      return type;
-   }
-
-   public AttributeHandler getHandler()
-   {
-      return handler;
-   }
-
-   public void setHandler(AttributeHandler handler)
-   {
-      this.handler = handler;
-   }
-
-   public AttributeMarshaller getMarshaller()
-   {
-      return marshaller;
-   }
-
-   public void setMarshaller(AttributeMarshaller marshaller)
-   {
-      this.marshaller = marshaller;
-   }
-
-   public PropertyMetaData getPropertyMetaData()
-   {
-      return propertyMetaData;
-   }
-
-   public void setPropertyMetaData(PropertyMetaData propertyMetaData)
-   {
-      this.propertyMetaData = propertyMetaData;
-   }
-
-   public ValueMetaData getValueMetaData()
-   {
-      return valueMetaData != null ? valueMetaData : type.getValueMetaData();
-   }
-
-   public void setValueMetaData(ValueMetaData valueMetaData)
-   {
-      this.valueMetaData = valueMetaData;
-   }
-
-   public void setMapEntryKey(boolean mapEntryKey)
-   {
-      this.mapEntryKey = mapEntryKey;
-   }
-
-   public boolean isMapEntryKey()
-   {
-      return mapEntryKey;
-   }
-
-   public boolean isMapEntryValue()
-   {
-      return mapEntryValue;
-   }
-
-   public void setMapEntryValue(boolean mapEntryValue)
-   {
-      this.mapEntryValue = mapEntryValue;
-   }
-
-   public String getDefaultConstraint()
-   {
-      return defaultConstraint;
-   }
-
-   public void setDefaultConstraint(String value)
-   {
-      defaultConstraint = value;
-   }
-
-   public SchemaBinding getSchema()
-   {
-      return schema;
-   }
-
-   public ValueAdapter getValueAdapter()
-   {
-      return valueAdapter == null ? type.getValueAdapter() : valueAdapter;
-   }
-
-   public void setValueAdapter(ValueAdapter valueAdapter)
-   {
-      this.valueAdapter = valueAdapter;
-   }
-
-   public String toString()
-   {
-      return super.toString() + "[" + qName + "]";
-   }
-
-   public void setRequired(boolean required)
-   {
-      this.required = required;
-   }
-
-   public boolean getRequired()
-   {
-      return required;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,58 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-
-import org.jboss.xb.binding.metadata.ValueMetaData;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public abstract class AttributeHandler
-{
-   public static AttributeHandler NOOP = new AttributeHandler()
-   {
-      public void attribute(QName elemName, QName attrName, AttributeBinding binding, Object owner, Object value)
-      {
-      }
-   };
-
-   public Object unmarshal(QName elemName,
-                           QName attrName,
-                           AttributeBinding binding,
-                           NamespaceContext nsCtx,
-                           String value)
-   {
-      TypeBinding type = binding.getType();
-      ValueMetaData valueMetaData = binding.getValueMetaData();
-      return type == null ? value : type.getCharactersHandler().unmarshal(attrName, type, nsCtx, valueMetaData, value);
-   }
-
-   public abstract void attribute(QName elemName,
-                                  QName attrName,
-                                  AttributeBinding binding,
-                                  Object owner,
-                                  Object value);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributeHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributesHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributesHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributesHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,69 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import org.xml.sax.Attributes;
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class AttributesHandler
-{
-   private static final Logger log = Logger.getLogger(AttributesHandler.class);
-
-   public static final AttributesHandler INSTANCE = new AttributesHandler();
-
-   public void attributes(Object o, QName elementName, TypeBinding type, Attributes attrs, NamespaceContext nsCtx)
-   {
-      for(int i = 0; i < attrs.getLength(); ++i)
-      {
-         QName qName = new QName(attrs.getURI(i), attrs.getLocalName(i));
-         AttributeBinding binding = type.getAttribute(qName);
-         if(binding != null)
-         {
-            AttributeHandler handler = binding.getHandler();
-            Object value = handler.unmarshal(elementName, qName, binding, nsCtx, attrs.getValue(i));
-            handler.attribute(elementName, qName, binding, o, value);
-         }
-         else if(!Constants.NS_XML_SCHEMA_INSTANCE.equals(qName.getNamespaceURI()))
-         {
-            SchemaBinding schemaBinding = type.getSchemaBinding();
-            if(schemaBinding != null && schemaBinding.isStrictSchema())
-            {
-               throw new JBossXBRuntimeException(
-                  "Attribute is not bound: element owner " + elementName + ", attribute " + qName
-               );
-            }
-            else if(log.isTraceEnabled())
-            {
-               log.trace("Attribute is not bound: element owner " + elementName + ", attribute " + qName);
-            }
-         }
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributesHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/AttributesHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/CharactersHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/CharactersHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/CharactersHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,124 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.List;
-import java.lang.reflect.Array;
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public abstract class CharactersHandler
-{
-   public static CharactersHandler NOOP = new CharactersHandler()
-   {
-      public Object unmarshal(QName qName,
-                              TypeBinding typeBinding,
-                              NamespaceContext nsCtx,
-                              ValueMetaData valueMetaData,
-                              String value)
-      {
-         return value;
-      }
-   };
-
-   public static CharactersHandler DEFAULT = new CharactersHandler()
-   {
-   };
-
-   public Object unmarshalEmpty(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, ValueMetaData valueMetaData)
-   {
-      Object result = null;
-      QName typeQName = typeBinding.getQName();
-      if(Constants.QNAME_STRING.equals(typeQName))
-      {
-         result = "";
-      }
-      else if(Constants.QNAME_BASE64BINARY.equals(typeQName))
-      {
-         result = new byte[0];
-      }
-      return result;
-   }
-
-   public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, ValueMetaData valueMetaData, String value)
-   {
-      Object o;
-      QName typeQName = typeBinding.getQName();
-      TypeBinding itemType = typeBinding.getItemType();
-      if(itemType != null)
-      {
-         QName itemTypeQName = itemType.getQName();
-         if(itemTypeQName != null && Constants.NS_XML_SCHEMA.equals(itemTypeQName.getNamespaceURI()))
-         {
-            List list = SimpleTypeBindings.unmarshalList(itemTypeQName.getLocalPart(), value, nsCtx);
-            if(typeBinding.getSchemaBinding().isUnmarshalListsToArrays())
-            {
-               if(list.isEmpty())
-               {
-                  Class compType = SimpleTypeBindings.classForType(itemTypeQName.getLocalPart(), true);
-                  o = Array.newInstance(compType, 0);
-               }
-               else
-               {
-                  Class compType = list.get(0).getClass();
-                  o = list.toArray((Object[])Array.newInstance(compType, list.size()));
-               }
-            }
-            else
-            {
-               o = list;
-            }
-         }
-         else
-         {
-            // todo
-            throw new JBossXBRuntimeException(
-               "Only list types with item type from " + Constants.NS_XML_SCHEMA +
-               " namespace are supported currently."
-            );
-         }
-      }
-      else if(typeQName != null && Constants.NS_XML_SCHEMA.equals(typeQName.getNamespaceURI()))
-      {
-         o = SimpleTypeBindings.unmarshal(typeQName.getLocalPart(), value, nsCtx);
-      }
-      else
-      {
-         TypeBinding baseType = typeBinding.getBaseType();
-         o = (baseType == null ? value : unmarshal(qName, baseType, nsCtx, valueMetaData, value));
-      }
-      return o;
-   }
-
-   public void setValue(QName qName, ElementBinding element, Object owner, Object value)
-   {
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/CharactersHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/CharactersHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ChoiceBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ChoiceBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ChoiceBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,330 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collection;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.xml.sax.Attributes;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ChoiceBinding
-   extends ModelGroupBinding
-{
-   private List choices = Collections.EMPTY_LIST;
-
-   public ChoiceBinding(SchemaBinding schema)
-   {
-      super(schema);
-   }
-
-   public ElementBinding getArrayItem()
-   {
-      return null;
-   }
-
-   public void addParticle(ParticleBinding particle)
-   {
-      switch(choices.size())
-      {
-         case 0:
-            choices = Collections.singletonList(particle);
-            break;
-         case 1:
-            choices = new ArrayList(choices);
-         default:
-            choices.add(particle);
-      }
-
-      super.addParticle(particle);
-   }
-
-   public Collection getParticles()
-   {
-      return Collections.unmodifiableCollection(choices);
-   }
-
-   public Cursor newCursor(ParticleBinding particle)
-   {
-      return new Cursor(particle)
-      {
-         private int pos = -1;
-         private ElementBinding element;
-         private int occurence;
-
-         public ParticleBinding getCurrentParticle()
-         {
-            if(pos < 0)
-            {
-               throw new JBossXBRuntimeException(
-                  "The cursor has not been positioned yet! startElement should be called."
-               );
-            }
-            return (ParticleBinding)choices.get(pos);
-         }
-
-         public ElementBinding getElement()
-         {
-            if(pos < 0)
-            {
-               throw new JBossXBRuntimeException(
-                  "The cursor has not been positioned yet! startElement should be called."
-               );
-            }
-            return element;
-         }
-
-         public void endElement(QName qName)
-         {
-            if(element == null || !element.getQName().equals(qName))
-            {
-               throw new JBossXBRuntimeException("Failed to process endElement for " + qName +
-                  " since the current element is " + (element == null ? "null" : element.getQName().toString())
-               );
-            }
-
-            if(trace)
-            {
-               log.trace("endElement " + qName + " in " + getModelGroup());
-            }
-         }
-
-         public int getOccurence()
-         {
-            return occurence;
-         }
-
-         protected List startElement(QName qName, Attributes atts, Set passedGroups, List groupStack, boolean required)
-         {
-            if(trace)
-            {
-               StringBuffer sb = new StringBuffer();
-               sb.append("startElement " + qName + " in " + getModelGroup() + ", " + choices.size() + ": ");
-
-               for(int i = 0; i < choices.size(); ++i)
-               {
-                  ParticleBinding particle = (ParticleBinding)choices.get(i);
-                  Object o = particle.getTerm();
-                  if(o instanceof ElementBinding)
-                  {
-                     sb.append(((ElementBinding)o).getQName());
-                  }
-                  else if(o instanceof SequenceBinding)
-                  {
-                     sb.append("sequence");
-                  }
-                  else if(o instanceof ChoiceBinding)
-                  {
-                     sb.append("choice");
-                  }
-                  else if(o instanceof AllBinding)
-                  {
-                     sb.append("all");
-                  }
-
-                  sb.append(" ");
-               }
-               sb.append("]");
-               log.trace(sb.toString());
-            }
-
-            int i = pos;
-            if(pos >= 0)
-            {
-               ParticleBinding particle = getCurrentParticle();
-               if(particle.getMaxOccursUnbounded() ||
-                  occurence < particle.getMinOccurs() ||
-                  occurence < particle.getMaxOccurs())
-               {
-                  --i;
-               }
-            }
-
-            // i update pos only if the element has been found, though it seems to be irrelevant
-            // since the cursor is going to be thrown away in case the element has not been found
-            while(i < choices.size() - 1)
-            {
-               ParticleBinding particle = (ParticleBinding)choices.get(++i);
-               Object item = particle.getTerm();
-               if(item instanceof ElementBinding)
-               {
-                  ElementBinding element = (ElementBinding)item;
-                  if(qName.equals(element.getQName()))
-                  {
-                     if(pos == i)
-                     {
-                        ++occurence;
-                     }
-                     else
-                     {
-                        pos = i;
-                        occurence = 1;
-                     }
-                     groupStack = addItem(groupStack, this);
-                     this.element = element;
-
-                     if(trace)
-                     {
-                        log.trace("found " + qName + " in " + getModelGroup());
-                     }
-                     break;
-                  }
-               }
-               else if(item instanceof ModelGroupBinding)
-               {
-                  ModelGroupBinding modelGroup = (ModelGroupBinding)item;
-                  if(!passedGroups.contains(modelGroup))
-                  {
-                     switch(passedGroups.size())
-                     {
-                        case 0:
-                           passedGroups = Collections.singleton(this);
-                           break;
-                        case 1:
-                           passedGroups = new HashSet(passedGroups);
-                        default:
-                           passedGroups.add(this);
-                     }
-
-                     int groupStackSize = groupStack.size();
-                     groupStack = modelGroup.newCursor(particle).startElement(
-                        qName, atts, passedGroups, groupStack, particle.isRequired(occurence)
-                     );
-
-                     if(groupStackSize != groupStack.size())
-                     {
-                        if(pos != i)
-                        {
-                           pos = i;
-                           occurence = 1;
-                        }
-                        else
-                        {
-                           ++occurence;
-                        }
-                        groupStack = addItem(groupStack, this);
-                        element = null;
-                        break;
-                     }
-                  }
-               }
-               else if(item instanceof WildcardBinding)
-               {
-                  WildcardBinding wildcard = (WildcardBinding)item;
-                  element = wildcard.getElement(qName, atts);
-                  if(element != null)
-                  {
-                     if(pos != i)
-                     {
-                        pos = i;
-                        occurence = 1;
-                     }
-                     else
-                     {
-                        ++occurence;
-                     }
-                     groupStack = addItem(groupStack, this);
-                     break;
-                  }
-               }
-            }
-
-            if(trace)
-            {
-               if(i == choices.size())
-               {
-                  log.trace(qName + " not found in " + getModelGroup());
-               }
-               else
-               {
-                  log.trace("leaving " + getModelGroup() + " i=" + i + ", pos=" + pos);
-               }
-            }
-
-            return groupStack;
-         }
-
-         protected ElementBinding getElement(QName qName, Attributes atts, Set passedGroups, boolean ignoreWildcards)
-         {
-            return getElement(choices, qName, atts, passedGroups, ignoreWildcards);
-         }
-      };
-   }
-
-   protected boolean mayStartWith(QName qName, Set set)
-   {
-      boolean result = false;
-      for(int i = 0; i < choices.size(); ++i)
-      {
-         ParticleBinding particle = (ParticleBinding)choices.get(i);
-         Object item = particle.getTerm();
-         if(item instanceof ElementBinding)
-         {
-            ElementBinding element = (ElementBinding)item;
-            if(qName.equals(element.getQName()))
-            {
-               result = true;
-               break;
-            }
-         }
-         else if(item instanceof ModelGroupBinding)
-         {
-            ModelGroupBinding modelGroup = (ModelGroupBinding)item;
-            if(!set.contains(modelGroup))
-            {
-               switch(set.size())
-               {
-                  case 0:
-                     set = Collections.singleton(this);
-                     break;
-                  case 1:
-                     set = new HashSet(set);
-                  default:
-                     set.add(this);
-               }
-
-               result = modelGroup.mayStartWith(qName, set);
-
-               if(result)
-               {
-                  break;
-               }
-            }
-         }
-         else
-         {
-            throw new JBossXBRuntimeException("Unexpected item type in model group: " + item);
-         }
-      }
-
-      return result;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ChoiceBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ChoiceBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,113 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-
-import org.jboss.logging.Logger;
-import org.xml.sax.Attributes;
-
-/**
- * This handler can only be used if model group binding is not used.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class DefaultElementHandler
-   implements ElementHandler, ParticleHandler
-{
-   /** The log */
-   private static final Logger log = Logger.getLogger(DefaultElementHandler.class);
-   
-   public static final DefaultElementHandler INSTANCE = new DefaultElementHandler();
-
-   private AttributesHandler attrsHandler;
-
-   public DefaultElementHandler()
-   {
-      this(AttributesHandler.INSTANCE);
-   }
-
-   public DefaultElementHandler(AttributesHandler attrsHandler)
-   {
-      this.attrsHandler = attrsHandler;
-   }
-
-   public Object startElement(Object parent, QName qName, ElementBinding element)
-   {
-      return parent;
-   }
-
-   public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
-   {
-      if(attrsHandler != null)
-      {
-         attrsHandler.attributes(o, elementName, element.getType(), attrs, nsCtx);
-      }
-   }
-
-   public Object endElement(Object o, QName qName, ElementBinding element)
-   {
-      return o;
-   }
-
-   public void setParent(Object parent, Object o, QName qName, ElementBinding element, ElementBinding parentElement)
-   {
-      if (log.isTraceEnabled())
-         log.trace("Not setting " + o + " on " + parent + " for " + qName);
-   }
-
-   // ParticleHandler impl
-
-   public Object startParticle(Object parent,
-                               QName elementName,
-                               ParticleBinding particle,
-                               Attributes attrs,
-                               NamespaceContext nsCtx)
-   {
-      ElementBinding element = (ElementBinding)particle.getTerm();
-      Object o = startElement(parent, elementName, element);
-      if(o != null)
-      {
-         attrs = element.getType().expandWithDefaultAttributes(attrs);
-         attributes(o, elementName, element, attrs, nsCtx);
-      }
-      return o;
-   }
-
-   public Object endParticle(Object o, QName elementName, ParticleBinding particle)
-   {
-      return endElement(o, elementName, (ElementBinding)particle.getTerm());
-   }
-
-   public void setParent(Object parent,
-                         Object o,
-                         QName elementName,
-                         ParticleBinding particle,
-                         ParticleBinding parentParticle)
-   {
-      ElementBinding element = (ElementBinding)particle.getTerm();
-      ElementBinding parentElement = (ElementBinding)parentParticle.getTerm();
-      setParent(parent, o, elementName, element, parentElement);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementInterceptor.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementInterceptor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementInterceptor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,58 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class DefaultElementInterceptor
-   implements ElementInterceptor
-{
-   public static final ElementInterceptor INSTANCE = new DefaultElementInterceptor();
-
-   public Object startElement(Object parent, QName qName, TypeBinding type)
-   {
-      return parent;
-   }
-
-   public void attributes(Object o, QName elementName, TypeBinding type, Attributes attrs, NamespaceContext nsCtx)
-   {
-   }
-
-   public void characters(Object o, QName qName, TypeBinding type, NamespaceContext nsCtx, String text)
-   {
-   }
-
-   public Object endElement(Object o, QName qName, TypeBinding type)
-   {
-      return o;
-   }
-
-   public void add(Object parent, Object child, QName qName)
-   {
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementInterceptor.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultElementInterceptor.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultHandlers.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultHandlers.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultHandlers.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,57 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtAttributeHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtCharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler;
-import org.jboss.xb.binding.sunday.xop.XOPElementHandler;
-
-/**
- * The DefaultHandlers.
- * 
- * @FIXME This just exposes the default handlers because
- *        they are hardwired to the RtHandlers without being
- *        overridable.
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DefaultHandlers
-{
-   public static ParticleHandler ELEMENT_HANDLER = RtElementHandler.INSTANCE;
-
-   public static ParticleHandler SIMPLE_HANDLER = new RtElementHandler()
-   {
-      public Object startParticle(Object parent, QName qName, ParticleBinding particle)
-      {
-         return null;
-      }
-   };
-
-   public static AttributeHandler ATTRIBUTE_HANDLER = RtAttributeHandler.INSTANCE;
-
-   public static CharactersHandler CHARACTERS_HANDLER = RtCharactersHandler.INSTANCE;
-
-   public static ParticleHandler XOP_HANDLER = new XOPElementHandler();
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultHandlers.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultHandlers.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,372 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Map;
-import java.util.Collections;
-import java.util.HashMap;
-
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.logging.Logger;
-import org.xml.sax.InputSource;
-import org.w3c.dom.ls.LSInput;
-
-/**
- * A default SchemaBindingResolver that uses a JBossEntityResolver to locate
- * the schema xsd.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class DefaultSchemaResolver implements SchemaBindingResolver
-{
-   private static Logger log = Logger.getLogger(DefaultSchemaResolver.class);
-
-   private String baseURI;
-   private JBossEntityResolver resolver;
-   private boolean cacheResolvedSchemas = true;
-   private Map schemasByUri = Collections.EMPTY_MAP;
-   private Map schemaInitByUri = Collections.EMPTY_MAP;
-   private Map schemaParseAnnotationsByUri = Collections.EMPTY_MAP;
-
-   public DefaultSchemaResolver()
-   {
-      this(new JBossEntityResolver());
-   }
-
-   public DefaultSchemaResolver(JBossEntityResolver resolver)
-   {
-      this.resolver = resolver;
-   }
-
-   /**
-    * @return true if resolved SchemaBinding's are cached, false otherwise
-    */
-   public boolean isCacheResolvedSchemas()
-   {
-      return cacheResolvedSchemas;
-   }
-
-   /**
-    * Passing in true will make the schema resolver to cache successfully resolved
-    * schemas (which is the default) with namespace URI being the identifier of a schema.
-    * False will flush the cache and make the schema resolver to resolve schemas
-    * on each request.
-    * @param cacheResolvedSchemas
-    */
-   public void setCacheResolvedSchemas(boolean cacheResolvedSchemas)
-   {
-      this.cacheResolvedSchemas = cacheResolvedSchemas;
-      if(!cacheResolvedSchemas)
-      {
-         schemasByUri = Collections.EMPTY_MAP;
-      }
-   }
-
-   /**
-    * Registers a location for the namespace URI.<p>
-    * 
-    * This location is looked using the JBossEntityResolver, i.e. it is a classpath location
-    * 
-    * @param nsUri the namespace location
-    * @param location the classpath location
-    */
-   public void addSchemaLocation(String nsUri, String location)
-   {
-      resolver.registerLocalEntity(nsUri, location);
-   }
-   
-
-   /**
-    * Removes a location for the namespace URI.
-    * 
-    * @todo actually remove it rather than setting null
-    * @param nsUri the namespace location
-    */
-   public void removeSchemaLocation(String nsUri)
-   {
-      resolver.registerLocalEntity(nsUri, null);
-   }
-
-   /**
-    * Whether to parse annotations for this namespace.
-    * 
-    * @param nsUri the namespace
-    * @param value the value of the option
-    */
-   public void addSchemaParseAnnotations(String nsUri, Boolean value)
-   {
-      if (nsUri == null)
-         throw new IllegalArgumentException("Null namespace uri");
-      if (value == null)
-         throw new IllegalArgumentException("Null value");
-      switch(schemaParseAnnotationsByUri.size())
-      {
-         case 0:
-            schemaParseAnnotationsByUri = Collections.singletonMap(nsUri, value);
-            break;
-         case 1:
-            schemaParseAnnotationsByUri = new HashMap(schemaParseAnnotationsByUri);
-         default:
-            schemaParseAnnotationsByUri.put(nsUri, value);
-      }
-   }
-   
-   /**
-    * Removes the parse annotation configuration for this namespace
-    * 
-    * @param nsUri the namespace
-    * @return the previous value
-    */
-   public Boolean removeSchemaParseAnnotations(String nsUri)
-   {
-      if (nsUri == null)
-         throw new IllegalArgumentException("Null namespace uri");
-      return (Boolean) schemaParseAnnotationsByUri.remove(nsUri);
-   }
-   
-   /**
-    * Registers a SchemaBindingInitializer for the namespace URI.
-    * When the schema binding that corresponds to the namespace URI
-    * is resolved, the init(SchemaBinding schema) method will be invoked on the
-    * instance of SchemaBindingInitializer with the SchemaBinding returned from the
-    * XsdBinder.bind() method.
-    *
-    * @param nsUri  the namespace URI to register the schema initializer for
-    * @param sbiClassName  the class name SchemaBindingInitializer
-    * @throws Exception for any error
-    */
-   public void addSchemaInitializer(String nsUri, String sbiClassName) throws Exception
-   {
-      if (sbiClassName == null)
-         throw new IllegalArgumentException("Null class name");
-      Class clazz = Thread.currentThread().getContextClassLoader().loadClass(sbiClassName);
-      Object object = clazz.newInstance();
-      if (object instanceof SchemaBindingInitializer == false)
-         throw new IllegalArgumentException(clazz.getName() + " is not an instance of " + SchemaBindingInitializer.class.getName());
-      SchemaBindingInitializer sbi = (SchemaBindingInitializer) object;
-      addSchemaInitializer(nsUri, sbi);
-   }
-
-   /**
-    * Registers an instance of SchemaBindingInitializer for the namespace URI.
-    * When the schema binding that corresponds to the namespace URI
-    * is resolved, the init(SchemaBinding schema) method will be invoked on the
-    * instance of SchemaBindingInitializer with the SchemaBinding returned from the
-    * XsdBinder.bind() method.
-    *
-    * @param nsUri  the namespace URI to register the schema initializer for
-    * @param sbi  an instance of SchemaBindingInitializer
-    */
-   public void addSchemaInitializer(String nsUri, SchemaBindingInitializer sbi)
-   {
-      if (nsUri == null)
-         throw new IllegalArgumentException("Null namespace uri");
-      if (sbi == null)
-         throw new IllegalArgumentException("Null schema binding initializer");
-      switch(schemaInitByUri.size())
-      {
-         case 0:
-            schemaInitByUri = Collections.singletonMap(nsUri, sbi);
-            break;
-         case 1:
-            schemaInitByUri = new HashMap(schemaInitByUri);
-         default:
-            schemaInitByUri.put(nsUri, sbi);
-      }
-   }
-
-   /**
-    * Unregisters and returns the SchemaBindingInitializer for the namespace URI.
-    * @param nsUri  the namespace URI to unregister SchemaBindingInitializer for
-    * @return  unregistered SchemaBindingInitializer for the namespace URI or null
-    * if there was no SchemaBindingInitialzer registered for the namespace URI
-    */
-   public SchemaBindingInitializer removeSchemaInitializer(String nsUri)
-   {
-      if (nsUri == null)
-         throw new IllegalArgumentException("Null namespace uri");
-      return (SchemaBindingInitializer)schemaInitByUri.remove(nsUri);
-   }
-
-   public String getBaseURI()
-   {
-      return baseURI;
-   }
-
-   public void setBaseURI(String baseURI)
-   {
-      this.baseURI = baseURI;
-   }
-
-   /**
-    * Uses the JBossEntityResolver.resolveEntity by:
-    * 
-    * 1. Using the nsUri as the systemID
-    * 2. Using the schemaLocation as the systemID
-    * 3. If that fails, the baseURI is not null, the xsd is located using URL(baseURL, schemaLocation)
-    * 4. If the baseURI is null, the xsd is located using URL(schemaLocation)
-    */
-   public SchemaBinding resolve(String nsURI, String baseURI, String schemaLocation)
-   {
-      SchemaBinding schema = (SchemaBinding)schemasByUri.get(nsURI);
-      if(schema != null)
-      {
-         return schema;
-      }
-
-      InputSource is = getInputSource(nsURI, baseURI, schemaLocation);
-      
-      if (is != null)
-      {
-         if( baseURI == null )
-            baseURI = this.baseURI;
-
-         Boolean processAnnotationsBoolean = (Boolean) schemaParseAnnotationsByUri.get(nsURI);
-         boolean processAnnotations = (processAnnotationsBoolean == null) ? true : processAnnotationsBoolean.booleanValue();
-         schema = XsdBinder.bind(is.getByteStream(), null, baseURI, processAnnotations);
-      }
-
-      if(schema != null)
-      {
-         schema.setSchemaResolver(this);
-         SchemaBindingInitializer sbi = (SchemaBindingInitializer)schemaInitByUri.get(nsURI);
-         if(sbi != null)
-         {
-            schema = sbi.init(schema);
-         }
-
-         if(schema != null && cacheResolvedSchemas)
-         {
-            if(schemasByUri == Collections.EMPTY_MAP)
-            {
-               schemasByUri = new HashMap();
-            }
-            schemasByUri.put(nsURI, schema);
-         }
-      }
-
-      if(log.isTraceEnabled())
-      {
-         log.trace("resolved schema: " + schema);
-      }
-
-      return schema;
-   }
-
-   public LSInput resolveAsLSInput(String nsURI, String baseURI, String schemaLocation)
-   {
-      LSInput lsInput = null;
-      InputSource is = getInputSource(nsURI, baseURI, schemaLocation);
-      if (is != null)
-      {
-         String publicId = is.getPublicId();
-         String systemId = is.getSystemId();
-         lsInput = new LSInputAdaptor(publicId, systemId, baseURI);
-         lsInput.setCharacterStream(is.getCharacterStream());
-         lsInput.setByteStream(is.getByteStream());
-         lsInput.setEncoding(is.getEncoding());
-      }
-      return lsInput;
-   }
-
-   private InputSource getInputSource(String nsURI, String baseURI, String schemaLocation)
-   {
-      boolean trace = log.isTraceEnabled();
-      InputSource is = null;
-
-      if( trace )
-         log.trace("getInputSource, nsURI="+nsURI+", baseURI="+baseURI+", schemaLocation="+schemaLocation);
-      // First try to resolve the namespace as a systemID
-      try
-      {
-         is = resolver.resolveEntity(null, nsURI);
-      }
-      catch (Exception e)
-      {
-         if (trace)
-            log.trace("Failed to use nsUri as systemID", e);
-      }
-
-      if (is == null && schemaLocation != null)
-      {
-         // Next try the schemaLocation as a systemID
-         try
-         {
-            is = resolver.resolveEntity(null, schemaLocation);
-            if( trace && is != null )
-               log.trace("Resolved schemaLocation as systemID");
-         }
-         catch (Exception e)
-         {
-            if (trace)
-               log.trace("Failed to use schemaLocation as systemID", e);
-         }
-
-         if (is == null)
-         {
-            // Just try resolving the schemaLocation against the baseURI
-            try
-            {
-               if (baseURI == null)
-               {
-                  baseURI = this.baseURI;
-                  if( trace )
-                     log.trace("Using resolver baseURI="+baseURI);
-               }
-
-               URL schemaURL = null;
-               if (baseURI != null)
-               {
-                  URL baseURL = new URL(baseURI);
-                  schemaURL = new URL(baseURL, schemaLocation);
-               }
-               else
-               {
-                  schemaURL = new URL(schemaLocation);
-               }
-
-               if (schemaURL != null)
-               {
-                  InputStream is2 = schemaURL.openStream();
-                  is = new InputSource(is2);
-                  if( trace )
-                     log.trace("Using resolver schemaURL="+schemaURL);
-               }
-            }
-            catch (Exception e)
-            {
-               if (trace)
-                  log.trace("Failed to use schemaLocation as URL", e);
-            }
-         }
-      }
-      if( trace )
-      {
-         log.trace("getInputSource, nsURI="+nsURI+", baseURI="
-            +baseURI+", schemaLocation="+schemaLocation+", is="+is);
-      }
-      return is;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultSchemaResolver.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultWildcardHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultWildcardHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultWildcardHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,66 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.xml.sax.Attributes;
-
-/**
- * DefaultWildcardHandler.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class DefaultWildcardHandler implements ParticleHandler
-{
-   /** The log */
-   private static final Logger log = Logger.getLogger(DefaultWildcardHandler.class);
-
-   public Object startParticle(Object parent, QName elementName, ParticleBinding particle, Attributes attrs,
-         NamespaceContext nsCtx)
-   {
-      return parent;
-   }
-
-   public Object endParticle(Object o, QName elementName, ParticleBinding particle)
-   {
-      return o;
-   }
-
-   public void setParent(Object parent, Object o, QName elementName, ElementBinding element,
-         ElementBinding parentElement)
-   {
-      if (log.isTraceEnabled())
-         log.trace("Not setting " + o + " on " + parent + " for " + elementName);
-   }
-
-   public void setParent(Object parent, Object o, QName elementName, ParticleBinding particle,
-         ParticleBinding parentParticle)
-   {
-      ElementBinding element = (ElementBinding) particle.getTerm();
-      ElementBinding parentElement = (ElementBinding) parentParticle.getTerm();
-      setParent(parent, o, elementName, element, parentElement);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultWildcardHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/DefaultWildcardHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,183 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.List;
-import java.util.Collections;
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.metadata.AddMethodMetaData;
-import org.jboss.xb.binding.metadata.ClassMetaData;
-import org.jboss.xb.binding.metadata.MapEntryMetaData;
-import org.jboss.xb.binding.metadata.PutMethodMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ElementBinding
-   extends TermBinding
-{
-   protected List interceptors = Collections.EMPTY_LIST;
-
-   protected QName qName;
-   protected TypeBinding typeBinding;
-   protected boolean nillable;
-
-   protected XOPUnmarshaller xopUnmarshaller;
-
-   public ElementBinding(SchemaBinding schema, QName qName, TypeBinding typeBinding)
-   {
-      super(schema);
-      this.qName = qName;
-      this.typeBinding = typeBinding;
-
-      if(qName == null)
-      {
-         throw new JBossXBRuntimeException("Each element must have a non-null QName!");
-      }
-   }
-
-   protected ElementBinding()
-   {
-   }
-   
-   public QName getQName()
-   {
-      return qName;
-   }
-
-   public List getInterceptors()
-   {
-      return interceptors;
-   }
-
-   public TypeBinding getType()
-   {
-      return typeBinding;
-   }
-
-   public void pushInterceptor(ElementInterceptor interceptor)
-   {
-      switch(interceptors.size())
-      {
-         case 0:
-            interceptors = Collections.singletonList(interceptor);
-            break;
-         case 1:
-            interceptors = new ArrayList(interceptors);
-         default:
-            interceptors.add(interceptor);
-
-      }
-   }
-
-   public ClassMetaData getClassMetaData()
-   {
-      ClassMetaData result = classMetaData;
-      if(result == null && mapEntryMetaData == null)
-      {
-         result = typeBinding.getClassMetaData();
-      }
-      return result;
-   }
-
-   public MapEntryMetaData getMapEntryMetaData()
-   {
-      MapEntryMetaData result = mapEntryMetaData;
-      if(result == null && classMetaData == null)
-      {
-         result = typeBinding.getMapEntryMetaData();
-      }
-      return result;
-   }
-
-   public ValueMetaData getValueMetaData()
-   {
-      return valueMetaData != null ? valueMetaData : typeBinding.getValueMetaData();
-   }
-
-   public PutMethodMetaData getPutMethodMetaData()
-   {
-      // todo should types be allowed to have putMethod metadata
-      return putMethodMetaData;
-   }
-
-   public AddMethodMetaData getAddMethodMetaData()
-   {
-      AddMethodMetaData result =  addMethodMetaData;
-      if(result == null && putMethodMetaData == null && propertyMetaData == null)
-      {
-         result = typeBinding.getAddMethodMetaData();
-      }
-      return result;
-   }
-
-   public boolean isSkip()
-   {
-      return skip == null ? typeBinding.isSkip() : skip.booleanValue();
-   }
-
-   public ValueAdapter getValueAdapter()
-   {
-      return valueAdapter == null ? typeBinding.getValueAdapter() : valueAdapter;
-   }
-
-   public boolean isNillable()
-   {
-      return nillable;
-   }
-
-   public void setNillable(boolean nillable)
-   {
-      this.nillable = nillable;
-   }
-
-   public boolean isModelGroup()
-   {
-      return false;
-   }
-
-   public boolean isWildcard()
-   {
-      return false;
-   }
-
-   public XOPUnmarshaller getXopUnmarshaller()
-   {
-      return xopUnmarshaller == null ? typeBinding.getXopUnmarshaller() : xopUnmarshaller;
-   }
-
-   public void setXopUnmarshaller(XOPUnmarshaller xopUnmarshaller)
-   {
-      this.xopUnmarshaller = xopUnmarshaller;
-   }
-
-   public String toString()
-   {
-      return super.toString() + "(" + qName + ", type=" + typeBinding.getQName() + ")";
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,44 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface ElementHandler
-{
-   Object startElement(Object parent, QName elementName, ElementBinding element);
-
-   void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx);
-
-   Object endElement(Object o, QName elementName, ElementBinding element);
-
-   /**
-    * WARN: currently, this method is called only if there are no interceptors in the element binding.
-    */
-   void setParent(Object parent, Object o, QName qName, ElementBinding element, ElementBinding parentElement);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementInterceptor.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementInterceptor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementInterceptor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,43 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface ElementInterceptor
-{
-   Object startElement(Object parent, QName elementName, TypeBinding type);
-
-   void attributes(Object o, QName elementName, TypeBinding type, Attributes attrs, NamespaceContext nsCtx);
-
-   void characters(Object o, QName elementName, TypeBinding type, NamespaceContext nsCtx, String text);
-
-   Object endElement(Object o, QName elementName, TypeBinding type);
-
-   void add(Object o, Object child, QName qName);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementInterceptor.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ElementInterceptor.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/LSInputAdaptor.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/LSInputAdaptor.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/LSInputAdaptor.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,151 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.io.InputStream;
-import java.io.Reader;
-
-import org.w3c.dom.ls.LSInput;
-
-/**
- * A simple implementation of the dom3 LSInput
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class LSInputAdaptor
-   implements LSInput
-{
-   private String baseURI;
-   private String publicId;
-   private String systemId;
-   private String encoding;
-   private InputStream byteStream;
-   private Reader characterStream;
-   private String stringData;
-   private boolean certifiedText;
-
-   public LSInputAdaptor(String publicId, String systemId, String baseURI)
-   {
-      this.publicId = publicId;
-      this.systemId = systemId;
-      this.baseURI = baseURI;
-   }
-
-   public LSInputAdaptor(InputStream is, String encoding)
-   {
-      setByteStream(is);
-      setEncoding(encoding);
-   }
-
-   public LSInputAdaptor(Reader charStream, String encoding)
-   {
-      this.setCharacterStream(charStream);
-      setEncoding(encoding);
-   }
-
-   public LSInputAdaptor(String data, String encoding)
-   {
-      this.setStringData(data);
-      setEncoding(encoding);
-   }
-
-   public String getBaseURI()
-   {
-      return baseURI;
-   }
-
-   public void setBaseURI(String baseURI)
-   {
-      this.baseURI = baseURI;
-   }
-
-   public String getPublicId()
-   {
-      return publicId;
-   }
-
-   public void setPublicId(String publicId)
-   {
-      this.publicId = publicId;
-   }
-
-   public String getSystemId()
-   {
-      return systemId;
-   }
-
-   public void setSystemId(String systemId)
-   {
-      this.systemId = systemId;
-   }
-
-   public InputStream getByteStream()
-   {
-      return byteStream;
-   }
-
-   public void setByteStream(InputStream is)
-   {
-      this.byteStream = is;
-   }
-
-   public Reader getCharacterStream()
-   {
-      return characterStream;
-   }
-
-   public void setCharacterStream(Reader reader)
-   {
-      this.characterStream = reader;
-   }
-
-   public String getStringData()
-   {
-      return stringData;
-   }
-
-   public void setStringData(String stringData)
-   {
-      this.stringData = stringData;
-   }
-
-   public String getEncoding()
-   {
-      return encoding;
-   }
-
-   public void setEncoding(String encoding)
-   {
-      this.encoding = encoding;
-   }
-
-   public boolean getCertifiedText()
-   {
-      return certifiedText;
-   }
-
-   public void setCertifiedText(boolean flag)
-   {
-      this.certifiedText = flag;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/LSInputAdaptor.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/LSInputAdaptor.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ModelGroupBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ModelGroupBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ModelGroupBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,255 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public abstract class ModelGroupBinding
-   extends TermBinding
-   implements Cloneable
-{
-   protected final Logger log = Logger.getLogger(getClass());
-
-   protected boolean requiredParticle;
-   protected ParticleHandler handler = DefaultHandlers.ELEMENT_HANDLER;
-
-   protected ModelGroupBinding(SchemaBinding schema)
-   {
-      super(schema);
-   }
-
-   public ParticleHandler getHandler()
-   {
-      return handler;
-   }
-
-   public void setHandler(ParticleHandler handler)
-   {
-      this.handler = handler;
-   }
-
-   public abstract ElementBinding getArrayItem();
-
-   /**
-    * Model group that is passed in as an argument to this method must be fully populated with
-    * element, wildcard and child model group bindings.
-    * @param particle
-    */
-   public void addParticle(ParticleBinding particle)
-   {
-      if(particle.isRequired())
-      {
-         requiredParticle = true;
-      }
-   }
-
-   public abstract Collection getParticles();
-
-   public boolean hasRequiredParticle()
-   {
-      return requiredParticle;
-   }
-
-   /**
-    * This method is not actually used during parsing. It's here only for internal tests.
-    *
-    * @param qName an element name
-    * @return true if the model group may start with the specified element
-    */
-   public boolean mayStartWith(QName qName)
-   {
-      return mayStartWith(qName, Collections.EMPTY_SET);
-   }
-
-   public abstract Cursor newCursor(ParticleBinding particle);
-
-   public Object clone() throws CloneNotSupportedException
-   {
-      return super.clone();
-   }
-
-   // Protected
-
-   protected abstract boolean mayStartWith(QName qName, Set set);
-
-   public boolean isSkip()
-   {
-      return skip == null ? true : skip.booleanValue();
-   }
-
-   public boolean isModelGroup()
-   {
-      return true;
-   }
-
-   public boolean isWildcard()
-   {
-      return false;
-   }
-
-   // Inner
-
-   public abstract class Cursor
-   {
-      protected final ParticleBinding particle;
-      protected final boolean trace = log.isTraceEnabled();
-
-      protected Cursor(ParticleBinding particle)
-      {
-         this.particle = particle;
-      }
-
-      public ParticleBinding getParticle()
-      {
-         return particle;
-      }
-
-      public ModelGroupBinding getModelGroup()
-      {
-         return (ModelGroupBinding)particle.getTerm();
-      }
-
-      public abstract ParticleBinding getCurrentParticle();
-
-      public abstract ElementBinding getElement();
-
-      public List startElement(QName qName, Attributes attrs)
-      {
-         return startElement(qName, attrs, Collections.EMPTY_SET, Collections.EMPTY_LIST, true);
-      }
-
-      public ElementBinding getElement(QName qName, Attributes attrs, boolean ignoreWildcards)
-      {
-         return getElement(qName, attrs, Collections.EMPTY_SET, ignoreWildcards);
-      }
-
-      public abstract void endElement(QName qName);
-
-      public abstract int getOccurence();
-
-      // Protected
-
-      protected abstract List startElement(QName qName,
-                                           Attributes atts,
-                                           Set passedGroups,
-                                           List groupStack,
-                                           boolean required);
-
-      protected abstract ElementBinding getElement(QName qName, Attributes atts, Set passedGroups, boolean ignoreWildcards);
-
-      protected ElementBinding getElement(List group, QName qName, Attributes atts, Set passedGroups, boolean ignoreWildcards)
-      {
-         ElementBinding element = null;
-         for(int i = 0; i < group.size(); ++i)
-         {
-            ParticleBinding nextParticle = (ParticleBinding)group.get(i);
-            Object item = nextParticle.getTerm();
-            if(item instanceof ElementBinding)
-            {
-               ElementBinding choice = (ElementBinding)item;
-               if(qName.equals(choice.getQName()))
-               {
-                  element = choice;
-                  break;
-               }
-            }
-            else if(item instanceof ModelGroupBinding)
-            {
-               ModelGroupBinding modelGroup = (ModelGroupBinding)item;
-               if(!passedGroups.contains(modelGroup))
-               {
-                  switch(passedGroups.size())
-                  {
-                     case 0:
-                        passedGroups = Collections.singleton(this);
-                        break;
-                     case 1:
-                        passedGroups = new HashSet(passedGroups);
-                     default:
-                        passedGroups.add(this);
-                  }
-
-                  ElementBinding e = modelGroup.newCursor(nextParticle).getElement(qName, atts, passedGroups, ignoreWildcards);
-                  if(e != null)
-                  {
-                     element = e;
-                     if(!qName.equals(e.getQName()))
-                     {
-                        throw new JBossXBRuntimeException(
-                           "There is a bug in ModelGroupBinding.Cursor.getElement(QName,Attributes) impl"
-                        );
-                     }
-                     break;
-                  }
-               }
-            }
-            else if(item instanceof WildcardBinding && !ignoreWildcards)
-            {
-               WildcardBinding wildcard = (WildcardBinding)item;
-               ElementBinding e = wildcard.getElement(qName, atts);
-               if(e != null)
-               {
-                  element = e;
-                  if(!qName.equals(e.getQName()))
-                  {
-                     throw new JBossXBRuntimeException(
-                        "There is a bug in ModelGroupBinding.Cursor.getElement(QName,Attributes) impl"
-                     );
-                  }
-                  break;
-               }
-            }
-         }
-         return element;
-      }
-
-      protected List addItem(List list, Object o)
-      {
-         switch(list.size())
-         {
-            case 0:
-               list = Collections.singletonList(o);
-               break;
-            case 1:
-               list = new ArrayList(list);
-            default:
-               list.add(o);
-         }
-         return list;
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ModelGroupBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ModelGroupBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,107 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class ParticleBinding
-{
-   private TermBinding term;
-   private int minOccurs = 1;
-   private int maxOccurs = -1;
-   private boolean maxOccursUnbounded;
-
-   public ParticleBinding(TermBinding term, int minOccurs, int maxOccurs, boolean maxOccursUnbounded)
-   {
-      this.term = term;
-      this.minOccurs = minOccurs;
-      this.maxOccurs = maxOccurs;
-      this.maxOccursUnbounded = maxOccursUnbounded;
-   }
-
-   public ParticleBinding(TermBinding term)
-   {
-      this.term = term;
-   }
-
-   public int getMinOccurs()
-   {
-      return minOccurs;
-   }
-
-   public int getMaxOccurs()
-   {
-      return maxOccurs;
-   }
-
-   public boolean getMaxOccursUnbounded()
-   {
-      return maxOccursUnbounded;
-   }
-
-   public void setMinOccurs(int minOccurs)
-   {
-      this.minOccurs = minOccurs;
-   }
-
-   public void setMaxOccurs(int maxOccurs)
-   {
-      this.maxOccurs = maxOccurs;
-   }
-
-   public void setMaxOccursUnbounded(boolean maxOccursUnbounded)
-   {
-      this.maxOccursUnbounded = maxOccursUnbounded;
-   }
-
-   public TermBinding getTerm()
-   {
-      return term;
-   }
-
-   public void setTerm(TermBinding term)
-   {
-      this.term = term;
-   }
-
-   public boolean isRepeatable()
-   {
-      return maxOccursUnbounded || maxOccurs > 1 || minOccurs > 1;
-   }
-
-   public boolean isRequired()
-   {
-      return isRequired(0);
-   }
-
-   public boolean isRequired(int occurs)
-   {
-      return minOccurs > occurs && (!term.isModelGroup() || ((ModelGroupBinding)term).hasRequiredParticle());
-   }
-   
-   public String toString()
-   {
-      return term.toString();
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface ParticleHandler
-{
-   Object startParticle(Object parent,
-                        QName elementName,
-                        ParticleBinding particle,
-                        Attributes attrs,
-                        NamespaceContext nsCtx);
-
-   Object endParticle(Object o, QName elementName, ParticleBinding particle);
-
-   void setParent(Object parent,
-                  Object o,
-                  QName elementName,
-                  ParticleBinding particle,
-                  ParticleBinding parentParticle);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ParticleHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,378 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Collections;
-import java.util.Iterator;
-import javax.xml.namespace.QName;
-
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
-import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
-import org.jboss.xb.binding.metadata.PackageMetaData;
-
-/**
- * A SchemaBinding is a collection of binding objects (TypeBinding,
- * ChoiceBinding, ElementBinding, ModelGroupBinding, SequenceBinding, WildcardBinding)
- * for a single namespace keyed by the QNames of the schema components.
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SchemaBinding
-{
-   private static final Map SIMPLE_TYPES = new HashMap();
-
-   // populate SIMPLE_TYPES
-   static
-   {
-      ValueAdapter dateAdapter = new ValueAdapter()
-      {
-         public Object cast(Object o, Class c)
-         {
-            if(o != null && java.util.Date.class.isAssignableFrom(c))
-            {
-               o = ((java.util.Calendar)o).getTime();
-            }
-            return o;
-         }
-      };
-
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_ANYSIMPLETYPE));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_STRING));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_BOOLEAN));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_DECIMAL));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_FLOAT));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_DOUBLE));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_DURATION));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_DATETIME, dateAdapter));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_TIME, dateAdapter));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_DATE, dateAdapter));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_GYEARMONTH));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_GYEAR));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_GMONTHDAY));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_GDAY));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_GMONTH));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_HEXBINARY));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_BASE64BINARY));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_ANYURI));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_QNAME));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NOTATION));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NORMALIZEDSTRING));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_TOKEN));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_LANGUAGE));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NMTOKEN));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NMTOKENS));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NAME));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NCNAME));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_ID));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_IDREF));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_IDREFS));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_ENTITY));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_ENTITIES));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_INTEGER));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NONPOSITIVEINTEGER));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NEGATIVEINTEGER));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_LONG));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_INT));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_SHORT));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_BYTE));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_NONNEGATIVEINTEGER));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_UNSIGNEDLONG));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_UNSIGNEDINT));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_UNSIGNEDSHORT));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_UNSIGNEDBYTE));
-      addSimpleType(new SimpleTypeBinding(Constants.QNAME_POSITIVEINTEGER));
-   }
-
-   protected static TypeBinding getSimpleType(QName name)
-   {
-      return (TypeBinding) SIMPLE_TYPES.get(name);
-   }
-
-   private static void addSimpleType(TypeBinding type)
-   {
-      SIMPLE_TYPES.put(type.getQName(), type);
-   }
-
-   /** Map<QName, TypeBinding> for simple/complex types */
-   private Map types = new HashMap(SIMPLE_TYPES);
-   /** Map<QName, ParticleBinding> for */
-   private Map elements = new HashMap();
-   /** The default package information */
-   private PackageMetaData packageMetaData;
-   /** Schema resolver to use for foreign namespaces */
-   private SchemaBindingResolver schemaResolver;
-   /** Must all content have a valid binding */
-   private boolean strictSchema = true;
-   /** Should child elements be ignored if they don't map to a parent field */
-   private boolean ignoreUnresolvedFieldOrClass = true;
-   /** Should '_' be considered as a word separator or part of Java identifier */
-   private boolean ignoreLowLine = true;
-   /** Should ${x} references be replaced with x system property */
-   private boolean replacePropertyRefs = true;
-   /** Should list xml types be unmarshalled as arrays */
-   private boolean unmarshalListsToArrays;
-   /** Should the default no-arg ctor be used to create the java instance */
-   private boolean useNoArgCtorIfFound;
-   /** The default property name to use for simple content bindings */
-   private String simpleContentProperty = "value";
-
-   /** default XOP unmarshaller */
-   private XOPUnmarshaller xopUnmarshaller;
-   /** default XOP marshaller */
-   private XOPMarshaller xopMarshaller;
-
-   public TypeBinding getType(QName qName)
-   {
-      return (TypeBinding)types.get(qName);
-   }
-
-   public void addType(TypeBinding type)
-   {
-      QName qName = type.getQName();
-      if(qName == null)
-      {
-         throw new JBossXBRuntimeException("Global type must have a name.");
-      }
-      types.put(qName, type);
-   }
-
-   public ElementBinding getElement(QName name)
-   {
-      ParticleBinding particle = (ParticleBinding)elements.get(name);
-      ElementBinding element = (ElementBinding)(particle == null ? null : particle.getTerm());
-      return element;
-   }
-
-   public ParticleBinding getElementParticle(QName name)
-   {
-      return (ParticleBinding)elements.get(name);
-   }
-
-   public void addElement(ElementBinding element)
-   {
-      ParticleBinding particle = new ParticleBinding(element);
-      elements.put(element.getQName(), particle);
-   }
-
-   public ElementBinding addElement(QName name, TypeBinding type)
-   {
-      ElementBinding element = new ElementBinding(this, name, type);
-      addElement(element);
-      return element;
-   }
-
-   public Iterator getElements()
-   {
-      return new Iterator()
-      {
-         private Iterator particleIterator = elements.values().iterator();
-
-         public boolean hasNext()
-         {
-            return particleIterator.hasNext();
-         }
-
-         public Object next()
-         {
-            ParticleBinding particle = (ParticleBinding)particleIterator.next();
-            return particle.getTerm();
-         }
-
-         public void remove()
-         {
-            throw new UnsupportedOperationException("remove is not implemented.");
-         }
-      };
-   }
-
-   public Iterator getElementParticles()
-   {
-      return elements.values().iterator();
-   }
-
-   public Iterator getTypes()
-   {
-      return Collections.unmodifiableCollection(types.values()).iterator();
-   }
-
-   public PackageMetaData getPackageMetaData()
-   {
-      return packageMetaData;
-   }
-
-   public void setPackageMetaData(PackageMetaData packageMetaData)
-   {
-      this.packageMetaData = packageMetaData;
-   }
-
-   public SchemaBindingResolver getSchemaResolver()
-   {
-      return schemaResolver;
-   }
-
-   public void setSchemaResolver(SchemaBindingResolver schemaResolver)
-   {
-      this.schemaResolver = schemaResolver;
-   }
-
-   public boolean isStrictSchema()
-   {
-      return strictSchema;
-   }
-
-   /**
-    * If strict-schema is true then all the elements and attributes in XML content being parsed must be bound
-    * in this instance of SchemaBinding (except attributes from xmlns and xsi namespaces),
-    * otherwise a runtime exception is thrown. The default value for this property is true.
-    */
-   public void setStrictSchema(boolean strictSchema)
-   {
-      this.strictSchema = strictSchema;
-   }
-
-   public boolean isIgnoreUnresolvedFieldOrClass()
-   {
-      return ignoreUnresolvedFieldOrClass;
-   }
-
-   /**
-    * If a field is not found in the parent class to set child value on or
-    * a class an element is bound to
-    * an exception will be thrown if this property is false. Otherwise,
-    * the process will just go on (the default for now).
-    */
-   public void setIgnoreUnresolvedFieldOrClass(boolean ignoreUnresolvedFieldOrClass)
-   {
-      this.ignoreUnresolvedFieldOrClass = ignoreUnresolvedFieldOrClass;
-   }
-
-   public boolean isReplacePropertyRefs()
-   {
-      return replacePropertyRefs;
-   }
-   /**
-    *
-    * @param flag
-    */
-   public void setReplacePropertyRefs(boolean flag)
-   {
-      this.replacePropertyRefs = flag;
-   }
-
-   public boolean isIgnoreLowLine()
-   {
-      return ignoreLowLine;
-   }
-
-   /**
-    * Where '_' should be considered as a word separator or a part of the Java identifier
-    * when mapping XML names to Java identifiers.
-    */
-   public void setIgnoreLowLine(boolean ignoreLowLine)
-   {
-      this.ignoreLowLine = ignoreLowLine;
-   }
-
-   public boolean isUnmarshalListsToArrays()
-   {
-      return unmarshalListsToArrays;
-   }
-
-   /**
-    * Should list xml types be unmarshalled as arrays
-    * @param unmarshalListsToArrays
-    */
-   public void setUnmarshalListsToArrays(boolean unmarshalListsToArrays)
-   {
-      this.unmarshalListsToArrays = unmarshalListsToArrays;
-   }
-
-   public boolean isUseNoArgCtorIfFound()
-   {
-      return useNoArgCtorIfFound;
-   }
-
-   /**
-    * Should the default no-arg ctor be used to create the java instance
-    * @param useNoArgCtorIfFound
-    */
-   public void setUseNoArgCtorIfFound(boolean useNoArgCtorIfFound)
-   {
-      this.useNoArgCtorIfFound = useNoArgCtorIfFound;
-   }
-
-   public String getSimpleContentProperty()
-   {
-      return simpleContentProperty;
-   }
-
-   /**
-    * Set the default property name to use for simple content bindings
-    * @param simpleContentProperty
-    */
-   public void setSimpleContentProperty(String simpleContentProperty)
-   {
-      this.simpleContentProperty = simpleContentProperty;
-   }
-
-   /**
-    * @return  schema default XOP unmarshaller
-    */
-   public XOPUnmarshaller getXopUnmarshaller()
-   {
-      return xopUnmarshaller;
-   }
-
-   /**
-    * @param xopUnmarshaller  schema default XOP unmarshaller
-    */
-   public void setXopUnmarshaller(XOPUnmarshaller xopUnmarshaller)
-   {
-      this.xopUnmarshaller = xopUnmarshaller;
-   }
-
-   /**
-    * @return schema default XOP marshaller
-    */
-   public XOPMarshaller getXopMarshaller()
-   {
-      return xopMarshaller;
-   }
-
-   /**
-    * @param xopMarshaller  schema default XOP marshaller
-    */
-   public void setXopMarshaller(XOPMarshaller xopMarshaller)
-   {
-      this.xopMarshaller = xopMarshaller;
-   }
-
-   void addElementParticle(ParticleBinding particle)
-   {
-      ElementBinding element = (ElementBinding)particle.getTerm();
-      elements.put(element.getQName(), particle);
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingInitializer.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingInitializer.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingInitializer.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,43 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-/**
- * An implementation of this interface is given an instance of SchemaBinding
- * that is returned from XsdBinder.bind() method during schema binding resolution
- * in SchemaBindingResolver.resolve(). In the init(SchemaBinding schema) method an
- * implementation of this interface can correct/adjust bindings programmatically
- * if pure XSD with annotations binding approach was not sufficient.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface SchemaBindingInitializer
-{
-   /**
-    * Adjust schema binding programatically if needed.
-    *
-    * @param schema  just resolved schema binding returned from XsdBinder
-    * @return  SchemaBinding instance with complete binding metadata
-    */
-   SchemaBinding init(SchemaBinding schema);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingInitializer.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingInitializer.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingResolver.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingResolver.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingResolver.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,57 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import org.w3c.dom.ls.LSInput;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface SchemaBindingResolver
-{
-   String getBaseURI();
-
-   void setBaseURI(String baseURI);
-
-   /**
-    * Returns an instance of SchemaBinding corresponding to the namespace URI.
-    *
-    * @param nsUri - namespace URI of the element with the schema reference
-    * @param baseURI - an optional baseURI for resolving the schemaLocation.
-    * @param schemaLocation - the option schema location uri that matches
-    *    nsUri if one exists
-    * @return an instance of SchemaBinding correspnding to the namespace URI
-    * or null if the namespace URI is not recognized (though, in this case it
-    * could also throw an exception)
-    */
-   SchemaBinding resolve(String nsUri, String baseURI, String schemaLocation);
-
-   /**
-    * This one is used to resolve imported schemas with <xsd:import>
-    * @param nsUri
-    * @param baseUri
-    * @param schemaLocation
-    * @return LIInput for the resolved namespace schema if found, null otherwise
-    */
-   LSInput resolveAsLSInput(String nsUri, String baseUri, String schemaLocation);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingResolver.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaBindingResolver.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfig.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfig.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfig.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,121 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
-
-/**
- * SchemaResolverConfig.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class SchemaResolverConfig implements SchemaResolverConfigMBean
-{
-   /** The log */
-   private static final Logger log = Logger.getLogger(SchemaResolverConfig.class);
-   
-   /** The singleton schema resolver */
-   protected static DefaultSchemaResolver resolver = (DefaultSchemaResolver) SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
-   
-   /** The initializers by namespace */
-   protected Properties schemaInitializers;
-
-   /** The locations by namespace */
-   protected Properties schemaLocations;
-
-   /** The parse annotations by namespace */
-   protected Properties parseAnnotations;
-
-   public Properties getSchemaInitializers()
-   {
-      return schemaInitializers;
-   }
-
-   public void setSchemaInitializers(Properties schemaInitializers)
-   {
-      this.schemaInitializers = schemaInitializers;
-      if (schemaInitializers != null && schemaInitializers.size() != 0)
-      {
-         for (Iterator i = schemaInitializers.entrySet().iterator(); i.hasNext();)
-         {
-            Map.Entry entry = (Map.Entry) i.next();
-            String namespace = (String) entry.getKey();
-            String initializer = (String) entry.getValue();
-            try
-            {
-               resolver.addSchemaInitializer(namespace, initializer);
-            }
-            catch (Exception ignored)
-            {
-               log.debug("Ignored: ", ignored);
-            }
-         }
-      }
-   }
-
-   public Properties getSchemaLocations()
-   {
-      return schemaLocations;
-   }
-
-   public void setSchemaLocations(Properties schemaLocations)
-   {
-      this.schemaLocations = schemaLocations;
-      if (schemaLocations != null && schemaLocations.size() != 0)
-      {
-         for (Iterator i = schemaLocations.entrySet().iterator(); i.hasNext();)
-         {
-            Map.Entry entry = (Map.Entry) i.next();
-            String namespace = (String) entry.getKey();
-            String location = (String) entry.getValue();
-            resolver.addSchemaLocation(namespace, location);
-         }
-      }
-   }
-
-   public Properties getParseAnnotations()
-   {
-      return parseAnnotations;
-   }
-
-   public void setParseAnnotations(Properties parseAnnotations)
-   {
-      this.parseAnnotations = parseAnnotations;
-      if (parseAnnotations != null && parseAnnotations.size() != 0)
-      {
-         for (Iterator i = parseAnnotations.entrySet().iterator(); i.hasNext();)
-         {
-            Map.Entry entry = (Map.Entry) i.next();
-            String namespace = (String) entry.getKey();
-            String value = (String) entry.getValue();
-            Boolean booleanValue = Boolean.valueOf(value); 
-            resolver.addSchemaParseAnnotations(namespace, booleanValue);
-         }
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfig.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfig.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfigMBean.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfigMBean.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfigMBean.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,75 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.Properties;
-
-/**
- * SchemaResolverConfigMBean.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public interface SchemaResolverConfigMBean
-{
-   /**
-    * Get the schemaInitializers.
-    * 
-    * @return the schemaInitializers.
-    */
-   Properties getSchemaInitializers();
-
-   /**
-    * Set the schemaInitializers.
-    * 
-    * @param schemaInitializers the schemaInitializers.
-    */
-   void setSchemaInitializers(Properties schemaInitializers);
-
-   /**
-    * Get the schemaLocations.
-    * 
-    * @return the schemaLocations.
-    */
-   Properties getSchemaLocations();
-
-   /**
-    * Set the schemaLocations.
-    * 
-    * @param schemaLocations the schemaLocations.
-    */
-   void setSchemaLocations(Properties schemaLocations);
-
-   /**
-    * Get the parseAnnotations.
-    * 
-    * @return the parseAnnotations.
-    */
-   Properties getParseAnnotations();
-
-   /**
-    * Set the parseAnnotations.
-    * 
-    * @param parseAnnotations the parseAnnotations.
-    */
-   void setParseAnnotations(Properties parseAnnotations);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfigMBean.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverConfigMBean.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverFactory.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-
-/**
- * SchemaResolverFactory.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public interface SchemaResolverFactory
-{
-   /**
-    * Get the schema binding resolver
-    * 
-    * @return the schema binding resolver
-    */
-   SchemaBindingResolver getSchemaBindingResolver();
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverFactory.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SchemaResolverFactory.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SequenceBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SequenceBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SequenceBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,394 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Collection;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.xml.sax.Attributes;
-
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SequenceBinding
-   extends ModelGroupBinding
-{
-   private List sequence = Collections.EMPTY_LIST;
-   private ElementBinding arrayItem;
-
-   public SequenceBinding(SchemaBinding schema)
-   {
-      super(schema);
-   }
-
-   public ElementBinding getArrayItem()
-   {
-      return arrayItem;
-   }
-
-   public void addParticle(ParticleBinding particle)
-   {
-      switch(sequence.size())
-      {
-         case 0:
-            sequence = Collections.singletonList(particle);
-            if(particle.isRepeatable() && particle.getTerm() instanceof ElementBinding)
-            {
-               ElementBinding element = (ElementBinding)particle.getTerm();
-               if(particle.isRepeatable())
-               {
-                  arrayItem = element;
-               }
-            }
-            break;
-         case 1:
-            sequence = new ArrayList(sequence);
-            arrayItem = null;
-         default:
-            sequence.add(particle);
-      }
-      super.addParticle(particle);
-   }
-
-   public Collection getParticles()
-   {
-      return Collections.unmodifiableCollection(sequence);
-   }
-
-   public Cursor newCursor(ParticleBinding particle)
-   {
-      return new Cursor(particle)
-      {
-         private int pos = -1;
-         private ElementBinding element;
-         private int occurence;
-
-         public ParticleBinding getCurrentParticle()
-         {
-            if(pos < 0)
-            {
-               throw new JBossXBRuntimeException(
-                  "The cursor has not been positioned yet! startElement should be called."
-               );
-            }
-            return (ParticleBinding)sequence.get(pos);
-         }
-
-         public ElementBinding getElement()
-         {
-            if(pos < 0)
-            {
-               throw new JBossXBRuntimeException(
-                  "The cursor has not been positioned yet! startElement should be called."
-               );
-            }
-            return element;
-         }
-
-         public void endElement(QName qName)
-         {
-            if(element == null || !element.getQName().equals(qName))
-            {
-               throw new JBossXBRuntimeException("Failed to process endElement for " + qName +
-                  " since the current element is " + (element == null ? "null" : element.getQName().toString())
-               );
-            }
-
-            if(trace)
-            {
-               log.trace("endElement " + qName + " in " + getModelGroup());
-            }
-         }
-
-         public int getOccurence()
-         {
-            return occurence;
-         }
-
-         protected List startElement(QName qName, Attributes atts, Set passedGroups, List groupStack, boolean required)
-         {
-            if(trace)
-            {
-               StringBuffer sb = new StringBuffer();
-               sb.append("startElement " + qName + " in " + getModelGroup() + ", " + sequence.size() + ": ");
-
-               for(int i = 0; i < sequence.size(); ++i)
-               {
-                  ParticleBinding particle = (ParticleBinding)sequence.get(i);
-                  Object o = particle.getTerm();
-                  if(o instanceof ElementBinding)
-                  {
-                     sb.append(((ElementBinding)o).getQName());
-                  }
-                  else if(o instanceof SequenceBinding)
-                  {
-                     sb.append("sequence");
-                  }
-                  else if(o instanceof ChoiceBinding)
-                  {
-                     sb.append("choice");
-                  }
-                  else if(o instanceof AllBinding)
-                  {
-                     sb.append("all");
-                  }
-
-                  sb.append(" ");
-               }
-               sb.append("]");
-               log.trace(sb.toString());
-            }
-
-            int i = pos;
-            if(pos >= 0)
-            {
-               ParticleBinding particle = getCurrentParticle();
-               if(particle.getMaxOccursUnbounded() ||
-                  occurence < particle.getMinOccurs() ||
-                  occurence < particle.getMaxOccurs())
-               {
-                  --i;
-               }
-            }
-
-            // i update pos only if the element has been found, though it seems to be irrelevant
-            // since the cursor is going to be thrown away in case the element has not been found
-            while(i < sequence.size() - 1)
-            {
-               ParticleBinding particle = (ParticleBinding)sequence.get(++i);
-               Object item = particle.getTerm();
-               if(item instanceof ElementBinding)
-               {
-                  ElementBinding element = (ElementBinding)item;
-                  if(qName.equals(element.getQName()))
-                  {
-                     if(pos == i)
-                     {
-                        ++occurence;
-                     }
-                     else
-                     {
-                        pos = i;
-                        occurence = 1;
-                     }
-                     groupStack = addItem(groupStack, this);
-                     this.element = element;
-
-                     if(trace)
-                     {
-                        log.trace("found " + qName + " in " + getModelGroup());
-                     }
-                     break;
-                  }
-
-                  if(i != pos && particle.getMinOccurs() > 0)
-                  {
-                     if(required)
-                     {
-                        throw new JBossXBRuntimeException("Requested element " + qName +
-                           " is not allowed in this position in the sequence. The next element should be " +
-                           element.getQName()
-                        );
-                     }
-                     else
-                     {
-                        break;
-                     }
-                  }
-               }
-               else if(item instanceof ModelGroupBinding)
-               {
-                  ModelGroupBinding modelGroup = (ModelGroupBinding)item;
-                  if(!passedGroups.contains(modelGroup))
-                  {
-                     switch(passedGroups.size())
-                     {
-                        case 0:
-                           passedGroups = Collections.singleton(this);
-                           break;
-                        case 1:
-                           passedGroups = new HashSet(passedGroups);
-                        default:
-                           passedGroups.add(this);
-                     }
-
-                     int groupStackSize = groupStack.size();
-                     groupStack = modelGroup.newCursor(particle).startElement(
-                        qName, atts, passedGroups, groupStack, particle.isRequired(occurence)
-                     );
-
-                     if(groupStackSize != groupStack.size())
-                     {
-                        if(pos != i)
-                        {
-                           pos = i;
-                           occurence = 1;
-                        }
-                        else
-                        {
-                           ++occurence;
-                        }
-                        groupStack = addItem(groupStack, this);
-                        element = null;
-                        break;
-                     }
-
-                     if(i != pos && particle.isRequired())
-                     {
-                        if(required)
-                        {
-                           throw new JBossXBRuntimeException("Requested element " + qName +
-                              " is not allowed in this position in the sequence. A model group with minOccurs=" +
-                              particle.getMinOccurs() + " that doesn't contain this element must follow."
-                           );
-                        }
-                        else
-                        {
-                           break;
-                        }
-                     }
-                  }
-                  else if(i != pos && particle.isRequired())
-                  {
-                     if(required)
-                     {
-                        throw new JBossXBRuntimeException("Requested element " + qName +
-                           " is not allowed in this position in the sequence. A model group with minOccurs=" +
-                           particle.getMinOccurs() + " that doesn't contain this element must follow."
-                        );
-                     }
-                     else
-                     {
-                        break;
-                     }
-                  }
-               }
-               else if(item instanceof WildcardBinding)
-               {
-                  WildcardBinding wildcard = (WildcardBinding)item;
-                  element = wildcard.getElement(qName, atts);
-                  if(element != null)
-                  {
-                     if(pos != i)
-                     {
-                        pos = i;
-                        occurence = 1;
-                     }
-                     else
-                     {
-                        ++occurence;
-                     }
-                     groupStack = addItem(groupStack, this);
-                     break;
-                  }
-
-                  if(i != pos && particle.getMinOccurs() > 0)
-                  {
-                     if(required)
-                     {
-                        throw new JBossXBRuntimeException("Requested element " + qName +
-                           " is not allowed in this position in the sequence."
-                        );
-                     }
-                     else
-                     {
-                        break;
-                     }
-                  }
-               }
-            }
-
-            if(trace && i == sequence.size())
-            {
-               log.trace(qName + " not found in " + getModelGroup());
-            }
-
-            return groupStack;
-         }
-
-         protected ElementBinding getElement(QName qName, Attributes atts, Set passedGroups, boolean ignoreWildcards)
-         {
-            return getElement(sequence, qName, atts, passedGroups, ignoreWildcards);
-         }
-      };
-   }
-
-   protected boolean mayStartWith(QName qName, Set set)
-   {
-      boolean result = false;
-      for(int i = 0; i < sequence.size(); ++i)
-      {
-         ParticleBinding particle = (ParticleBinding)sequence.get(i);
-         Object item = particle.getTerm();
-         if(item instanceof ElementBinding)
-         {
-            ElementBinding element = (ElementBinding)item;
-            if(qName.equals(element.getQName()))
-            {
-               result = true;
-               break;
-            }
-
-            if(particle.getMinOccurs() > 0)
-            {
-               break;
-            }
-         }
-         else if(item instanceof ModelGroupBinding)
-         {
-            ModelGroupBinding modelGroup = (ModelGroupBinding)item;
-            if(!set.contains(modelGroup))
-            {
-               switch(set.size())
-               {
-                  case 0:
-                     set = Collections.singleton(this);
-                     break;
-                  case 1:
-                     set = new HashSet(set);
-                  default:
-                     set.add(this);
-               }
-
-               result = modelGroup.mayStartWith(qName, set);
-
-               if(result || particle.getMinOccurs() > 0)
-               {
-                  break;
-               }
-            }
-            else if(particle.getMinOccurs() > 0)
-            {
-               break;
-            }
-         }
-      }
-      return result;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SequenceBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SequenceBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SimpleTypeBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SimpleTypeBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SimpleTypeBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,73 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.xb.binding.JBossXBRuntimeException;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SimpleTypeBinding
-   extends TypeBinding
-{
-   public SimpleTypeBinding()
-   {
-      setDefaultHandler();
-   }
-
-   public SimpleTypeBinding(QName qName)
-   {
-      super(qName, DefaultHandlers.CHARACTERS_HANDLER);
-      setDefaultHandler();
-   }
-
-   public SimpleTypeBinding(QName qName, ValueAdapter valueAdapter)
-   {
-      super(qName, DefaultHandlers.CHARACTERS_HANDLER);
-      setDefaultHandler();
-      setValueAdapter(valueAdapter);
-   }
-
-   public SimpleTypeBinding(QName qName, CharactersHandler simple)
-   {
-      super(qName, simple);
-      setDefaultHandler();
-   }
-
-   private void setDefaultHandler()
-   {
-      setHandler(DefaultHandlers.SIMPLE_HANDLER);
-   }
-
-   public AttributeBinding addAttribute(QName name, TypeBinding type, AttributeHandler handler)
-   {
-      throw new JBossXBRuntimeException("Simple types can't have attributes.");
-   }
-
-   public void addElement(QName qName, ElementBinding binding)
-   {
-      throw new JBossXBRuntimeException("Simple types can't have child elements.");
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SimpleTypeBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SimpleTypeBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,163 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY 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 along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaResolverFactory;
-
-/**
- * SingletonSchemaResolverFactory.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class SingletonSchemaResolverFactory implements SchemaResolverFactory
-{
-   /** The log */
-   private static final Logger log = Logger.getLogger(SingletonSchemaResolverFactory.class);
-
-   /** The factory instance */
-   private static final SingletonSchemaResolverFactory singleton = new SingletonSchemaResolverFactory();
-
-   /** The resolver */
-   private final DefaultSchemaResolver resolver = new DefaultSchemaResolver();
-
-   /**
-    * Get the factory instance
-    * 
-    * @return the instance
-    */
-   public static SingletonSchemaResolverFactory getInstance()
-   {
-      return singleton;
-   }
-
-   /**
-    * Create a new SingletonSchemaResolverFactory.
-    */
-   private SingletonSchemaResolverFactory()
-   {
-      addSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.xml.AOPBeansSchemaInitializer", Boolean.FALSE);
-      addSchema("urn:jboss:bean-deployer", "org.jboss.kernel.plugins.deployment.xml.BeanSchemaInitializer", Boolean.FALSE);
-      addSchema("urn:jboss:bean-deployer:2.0", "org.jboss.kernel.plugins.deployment.xml.BeanSchemaInitializer20", Boolean.FALSE);
-      addSchema("urn:jboss:javabean:1.0", "org.jboss.kernel.plugins.config.xml.JavaBeanSchemaInitializer", Boolean.FALSE);
-   }
-
-   public SchemaBindingResolver getSchemaBindingResolver()
-   {
-      return resolver;
-   }
-
-   /**
-    * Add a schema
-    * 
-    * @param namespace the namespace
-    * @param initializer the initializer
-    * @return true when added
-    */
-   protected boolean addSchema(String namespace, String initializer)
-   {
-      try
-      {
-         resolver.addSchemaInitializer(namespace, initializer);
-         log.trace("Mapped initializer '" + namespace + "' to '" + initializer + "'");
-         return true;
-      }
-      catch (Exception ignored)
-      {
-         log.trace("Ignored: ", ignored);
-         return false;
-      }
-   }
-
-   /**
-    * Add a schema
-    * 
-    * @param namespace the namespace
-    * @param initializer the initializer
-    * @param parseAnnotations whether to parse annotations
-    * @return true when added
-    */
-   protected boolean addSchema(String namespace, String initializer, Boolean parseAnnotations)
-   {
-      if (addSchema(namespace, initializer) == false)
-         return false;
-      setParseAnnotations(namespace, parseAnnotations);
-      return true;
-   }
-
-   /**
-    * Add a schema
-    * 
-    * @param namespace the namespace
-    * @param initializer the initializer
-    * @param location the location
-    * @return true when added
-    */
-   protected boolean addSchema(String namespace, String initializer, String location)
-   {
-      if (addSchema(namespace, initializer) == false)
-         return false;
-      try
-      {
-         resolver.addSchemaLocation(namespace, location);
-         log.trace("Mapped location '" + namespace + "' to '" + location + "'");
-         return true;
-      }
-      catch (Exception ignored)
-      {
-         log.trace("Ignored: ", ignored);
-         return false;
-      }
-   }
-
-   /**
-    * Add a schema
-    * 
-    * @param namespace the namespace
-    * @param initializer the initializer
-    * @param location the location
-    * @param parseAnnotations whether to parse annotations
-    * @return true when added
-    */
-   protected boolean addSchema(String namespace, String initializer, String location, Boolean parseAnnotations)
-   {
-      if (addSchema(namespace, initializer, location) == false)
-         return false;
-      setParseAnnotations(namespace, parseAnnotations);
-      return true;
-   }
-
-   /**
-    * Set the parse annotations for a schema
-    * 
-    * @param namespace the namespace
-    * @param parseAnnotations whether to parse annotations
-    */
-   protected void setParseAnnotations(String namespace, Boolean parseAnnotations)
-   {
-      resolver.addSchemaParseAnnotations(namespace, parseAnnotations);
-      log.trace("Parse annotations '" + namespace + "' set to '" + parseAnnotations + "'");
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SingletonSchemaResolverFactory.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,893 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.List;
-import java.util.ListIterator;
-import java.util.ArrayList;
-import javax.xml.namespace.QName;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.logging.Logger;
-import org.jboss.util.StringPropertyReplacer;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.Util;
-import org.jboss.xb.binding.group.ValueList;
-import org.jboss.xb.binding.metadata.CharactersMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.parser.JBossXBParser;
-import org.xml.sax.Attributes;
-
-/**
- * todo: to improve performance, consider gathering all the necessary binding metadata in startElement and
- * pushing it instead of ElementBinding into elementStack to free the endElement implementation from
- * re-gathering this same metadata again.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SundayContentHandler
-   implements JBossXBParser.ContentHandler
-{
-   private final static Logger log = Logger.getLogger(SundayContentHandler.class);
-
-   private final static Object NIL = new Object();
-
-   private final SchemaBinding schema;
-   private final SchemaBindingResolver schemaResolver;
-
-   private final StackImpl stack = new StackImpl();
-
-   private Object root;
-   private NamespaceRegistry nsRegistry = new NamespaceRegistry();
-
-   private ParticleHandler defParticleHandler = DefaultHandlers.ELEMENT_HANDLER;
-
-   private final boolean trace = log.isTraceEnabled();
-
-   public SundayContentHandler(SchemaBinding schema)
-   {
-      this.schema = schema;
-      this.schemaResolver = null;
-   }
-
-   public SundayContentHandler(SchemaBindingResolver schemaResolver)
-   {
-      this.schemaResolver = schemaResolver;
-      this.schema = null;
-   }
-
-   public void characters(char[] ch, int start, int length)
-   {
-      StackItem stackItem = (StackItem)stack.peek();
-      if(stackItem.particle != null)
-      {
-         if(stackItem.textContent == null)
-         {
-            stackItem.textContent = new StringBuffer(length);
-         }
-         stackItem.textContent.append(ch, start, length);
-      }
-   }
-
-   public void endElement(String namespaceURI, String localName, String qName)
-   {
-      ElementBinding elementBinding = null;
-      QName endName = null;
-      StackItem item = pop();
-      while(true)
-      {
-         if(item.particle != null)
-         {
-            elementBinding = (ElementBinding)item.particle.getTerm();
-            break;
-         }
-
-         if(stack.isEmpty())
-         {
-            break;
-         }
-
-         if(endName == null)
-         {
-            endName = localName.length() == 0 ? new QName(qName) : new QName(namespaceURI, localName);
-         }
-
-         item = endParticle(item, endName);
-         pop();
-      }
-
-      if(elementBinding == null)
-      {
-         throw new JBossXBRuntimeException("Failed to endElement " + qName + ": binding not found");
-      }
-
-      endName = elementBinding.getQName();
-      if(!endName.getLocalPart().equals(localName) || !endName.getNamespaceURI().equals(namespaceURI))
-      {
-         throw new JBossXBRuntimeException("Failed to end element " +
-            new QName(namespaceURI, localName) +
-            ": element on the stack is " + endName
-         );
-      }
-
-      endElement(item.o, item.particle, item.textContent == null ? "" : item.textContent.toString());
-
-      // if parent group is choice, it should also be finished
-      if(!stack.isEmpty() && ((StackItem)stack.peek()).cursor.getParticle().getTerm() instanceof ChoiceBinding)
-      {
-         endParticle(pop(), endName);
-      }
-   }
-
-   public void startElement(String namespaceURI,
-                            String localName,
-                            String qName,
-                            Attributes atts,
-                            XSTypeDefinition xercesType)
-   {
-      QName startName = localName.length() == 0 ? new QName(qName) : new QName(namespaceURI, localName);
-      ParticleBinding particle = null;
-      ModelGroupBinding.Cursor cursor = null; // used only when particle is a wildcard
-      SchemaBinding schemaBinding = schema;
-
-      if(stack.isEmpty())
-      {
-         if(schemaBinding != null)
-         {
-            particle = schemaBinding.getElementParticle(startName);
-         }
-         else if(schemaResolver != null)
-         {
-            String schemaLocation = atts == null ? null : Util.getSchemaLocation(atts, namespaceURI);
-            schemaBinding = schemaResolver.resolve(namespaceURI, null, schemaLocation);
-            if(schemaBinding != null)
-            {
-               particle = schemaBinding.getElementParticle(startName);
-            }
-         }
-         else
-         {
-            throw new JBossXBRuntimeException("Neither schema binding nor schema binding resolver is available!");
-         }
-      }
-      else
-      {
-         StackItem item = (StackItem)stack.peek();
-         if(item.particle != null)
-         {
-            TermBinding term = item.particle.getTerm();
-            ElementBinding element = (ElementBinding)term;
-            ParticleBinding typeParticle = element.getType().getParticle();
-            ModelGroupBinding modelGroup = typeParticle == null ?
-               null :
-               (ModelGroupBinding)typeParticle.getTerm();
-            if(modelGroup == null)
-            {
-               QName typeName = element.getType().getQName();
-               throw new JBossXBRuntimeException(
-                  (typeName == null ? "Anonymous" : typeName.toString()) +
-                  " type of element " + element.getQName() +
-                  " should be complex and contain " + startName + " as a child element."
-               );
-            }
-
-            cursor = modelGroup.newCursor(typeParticle);
-            List newCursors = cursor.startElement(startName, atts);
-            if(newCursors.isEmpty())
-            {
-               throw new JBossXBRuntimeException(
-                  startName + " not found as a child of " + ((ElementBinding)term).getQName()
-               );
-            }
-            else
-            {
-               // push all except the last one
-               for(int i = newCursors.size() - 1; i >= 0; --i)
-               {
-                  cursor = (ModelGroupBinding.Cursor)newCursors.get(i);
-
-                  ParticleBinding modelGroupParticle = cursor.getParticle();
-                  ParticleHandler handler = ((ModelGroupBinding)modelGroupParticle.getTerm()).getHandler();
-                  if(handler == null)
-                  {
-                     handler = defParticleHandler;
-                  }
-                  Object o = handler.startParticle(item.o, startName, modelGroupParticle, atts, nsRegistry);
-
-                  push(cursor, o);
-               }
-               particle = cursor.getCurrentParticle();
-            }
-         }
-         else
-         {
-            while(!stack.isEmpty())
-            {
-               if(item.particle != null)
-               {
-                  TermBinding term = item.particle.getTerm();
-                  ElementBinding element = (ElementBinding)term;
-                  ParticleBinding typeParticle = element.getType().getParticle();
-                  ModelGroupBinding modelGroup = typeParticle == null ?
-                     null :
-                     (ModelGroupBinding)typeParticle.getTerm();
-                  if(modelGroup == null)
-                  {
-                     throw new JBossXBRuntimeException(
-                        "Element " + element.getQName() + " should be of a complex type!"
-                     );
-                  }
-
-                  /*
-                  if(!typeParticle.isRepeatable())
-                  {
-                     throw new JBossXBRuntimeException("Particle is not repeatable for " + startName);
-                  } */
-
-                  cursor = modelGroup.newCursor(typeParticle);
-                  List newCursors = cursor.startElement(startName, atts);
-                  if(newCursors.isEmpty())
-                  {
-                     throw new JBossXBRuntimeException(
-                        startName + " not found as a child of " + ((ElementBinding)term).getQName()
-                     );
-                  }
-                  else
-                  {
-                     // push all except the last one
-                     for(int i = newCursors.size() - 1; i >= 0; --i)
-                     {
-                        cursor = (ModelGroupBinding.Cursor)newCursors.get(i);
-
-                        ParticleBinding modelGroupParticle = cursor.getParticle();
-                        ParticleHandler handler = ((ModelGroupBinding)modelGroupParticle.getTerm()).getHandler();
-                        if(handler == null)
-                        {
-                           handler = defParticleHandler;
-                        }
-                        Object o = handler.startParticle(item.o, startName, modelGroupParticle, atts, nsRegistry);
-
-                        push(cursor, o);
-                     }
-                     particle = cursor.getCurrentParticle();
-                  }
-                  break;
-               }
-               else
-               {
-                  cursor = item.cursor;
-                  if (cursor == null)
-                     throw new JBossXBRuntimeException("No cursor for " + startName);
-                  int currentOccurence = cursor.getOccurence();
-                  List newCursors = cursor.startElement(startName, atts);
-                  if(newCursors.isEmpty())
-                  {
-                     pop();
-                     item = endParticle(item, startName);
-                  }
-                  else
-                  {
-                     if(cursor.getOccurence() - currentOccurence > 0)
-                     {
-                        item = endParticle(item, startName);
-
-                        ParticleBinding modelGroupParticle = cursor.getParticle();
-                        ParticleHandler handler = ((ModelGroupBinding)modelGroupParticle.getTerm()).getHandler();
-                        if(handler == null)
-                        {
-                           handler = defParticleHandler;
-                        }
-                        Object o = handler.startParticle(item.o, startName, modelGroupParticle, atts, nsRegistry);
-
-                        item = push(cursor, o);
-                     }
-
-                     // push all except the last one
-                     for(int i = newCursors.size() - 2; i >= 0; --i)
-                     {
-                        cursor = (ModelGroupBinding.Cursor)newCursors.get(i);
-
-                        ParticleBinding modelGroupParticle = cursor.getParticle();
-                        ParticleHandler handler = ((ModelGroupBinding)modelGroupParticle.getTerm()).getHandler();
-                        if(handler == null)
-                        {
-                           handler = defParticleHandler;
-                        }
-                        Object o = handler.startParticle(item.o, startName, modelGroupParticle, atts, nsRegistry);
-
-                        push(cursor, o);
-                     }
-                     cursor = (ModelGroupBinding.Cursor)newCursors.get(0);
-                     particle = cursor.getCurrentParticle();
-                     break;
-                  }
-               }
-            }
-         }
-      }
-
-      Object o = null;
-      if(particle != null)
-      {
-         Object parent = stack.isEmpty() ? null : ((StackItem)stack.peek()).o;
-         if(particle.getTerm() instanceof WildcardBinding)
-         {
-            /*
-            WildcardBinding wildcard = (WildcardBinding)particle.getTerm();
-            ElementBinding element = wildcard.getElement(startName, atts);
-            */
-            ElementBinding element = cursor.getElement();
-            if(element == null)
-            {
-               throw new JBossXBRuntimeException("Failed to resolve element " +
-                  startName + " for wildcard."
-               );
-            }
-
-            particle = new ParticleBinding(element, particle.getMinOccurs(), particle.getMaxOccurs(), particle.getMaxOccursUnbounded());
-         }
-
-         ElementBinding element = (ElementBinding)particle.getTerm();
-
-         // todo xsi:type support should be implemented in a better way
-         String xsiType = atts.getValue("xsi:type");
-         if(xsiType != null)
-         {
-            if(trace)
-            {
-               log.trace(element.getQName() + " uses xsi:type " + xsiType);
-            }
-
-            String xsiTypePrefix;
-            String xsiTypeLocal;
-            int colon = xsiType.indexOf(':');
-            if(colon == -1)
-            {
-               xsiTypePrefix = "";
-               xsiTypeLocal = xsiType;
-            }
-            else
-            {
-               xsiTypePrefix = xsiType.substring(0, colon);
-               xsiTypeLocal = xsiType.substring(colon + 1);
-            }
-
-            String xsiTypeNs = nsRegistry.getNamespaceURI(xsiTypePrefix);
-            QName xsiTypeQName = new QName(xsiTypeNs, xsiTypeLocal);
-
-            TypeBinding xsiTypeBinding = schemaBinding.getType(xsiTypeQName);
-            if(xsiTypeBinding == null)
-            {
-               throw new JBossXBRuntimeException("Type binding not found for type " +
-                  xsiTypeQName +
-                  " specified with xsi:type for element " + startName
-               );
-            }
-
-            element = new ElementBinding(schemaBinding, startName, xsiTypeBinding);
-            particle = new ParticleBinding(element, particle.getMinOccurs(), particle.getMaxOccurs(), particle.getMaxOccursUnbounded());
-         }
-
-         TypeBinding type = element.getType();
-         if(type == null)
-         {
-            throw new JBossXBRuntimeException("No type for element " + element);
-         }
-
-         List interceptors = element.getInterceptors();
-         for(int i = 0; i < interceptors.size(); ++i)
-         {
-            ElementInterceptor interceptor = (ElementInterceptor)interceptors.get(i);
-            parent = interceptor.startElement(parent, startName, type);
-            push(startName, particle, parent);
-            interceptor.attributes(parent, startName, type, atts, nsRegistry);
-         }
-
-         ParticleHandler handler = type.getHandler();
-         if(handler == null)
-         {
-            handler = defParticleHandler;
-         }
-
-         String nil = atts.getValue("xsi:nil");
-         if(nil == null || !("1".equals(nil) || "true".equals(nil)))
-         {
-            o = handler.startParticle(parent, startName, particle, atts, nsRegistry);
-         }
-         else
-         {
-            o = NIL;
-         }
-      }
-      else
-      {
-         ElementBinding parentBinding = null;
-         if(!stack.isEmpty())
-         {
-            ParticleBinding stackParticle = ((StackItem)stack.peek()).particle;
-            if(stackParticle != null)
-            {
-               parentBinding = (ElementBinding)stackParticle.getTerm();
-            }
-         }
-
-         if(parentBinding != null && parentBinding.getSchema() != null)
-         {
-            schemaBinding = parentBinding.getSchema();
-         }
-
-         String msg = "Element " +
-            startName +
-            " is not bound " +
-            (parentBinding == null ? "as a global element." : "in type " + parentBinding.getType().getQName());
-         if(schemaBinding != null && schemaBinding.isStrictSchema())
-         {
-            throw new JBossXBRuntimeException(msg);
-         }
-         else if(trace)
-         {
-            log.trace(msg);
-         }
-      }
-
-      push(startName, particle, o);
-   }
-
-   private StackItem endParticle(StackItem item, QName qName)
-   {
-      ParticleBinding modelGroupParticle = item.cursor.getParticle();
-      ParticleHandler handler = ((ModelGroupBinding)modelGroupParticle.getTerm()).getHandler();
-      if(handler == null)
-      {
-         handler = defParticleHandler;
-      }
-
-      Object o;
-      if(item.o instanceof ValueList && !modelGroupParticle.getTerm().isSkip())
-      {
-         if(trace)
-         {
-            log.trace("endParticle " + qName + " valueList");
-         }
-         ValueList valueList = (ValueList)item.o;
-         o = valueList.getHandler().newInstance(modelGroupParticle, valueList);
-      }
-      else
-      {
-         o = handler.endParticle(item.o, qName, modelGroupParticle);
-      }
-
-      // model group should always have parent particle
-      item = (StackItem)stack.peek();
-      if(item.o != null)
-      {
-         ParticleBinding parentParticle = item.particle;
-         if(parentParticle == null)
-         {
-            parentParticle = item.cursor.getParticle();
-         }
-         setParent(handler, item.o, o, qName, modelGroupParticle, parentParticle);
-      }
-
-      if(item.particle == null && item.cursor.getParticle().getTerm() instanceof ChoiceBinding)
-      {
-         item = endParticle(pop(), qName);
-      }
-
-      return item;
-   }
-
-   public void startPrefixMapping(String prefix, String uri)
-   {
-      nsRegistry.addPrefixMapping(prefix, uri);
-   }
-
-   public void endPrefixMapping(String prefix)
-   {
-      nsRegistry.removePrefixMapping(prefix);
-   }
-
-   public void processingInstruction(String target, String data)
-   {
-   }
-
-   public Object getRoot()
-   {
-      return root;
-   }
-
-   // Private
-
-   private void endElement(Object o, ParticleBinding particle, String textContent)
-   {
-      ElementBinding element = (ElementBinding)particle.getTerm();
-      QName endName = element.getQName();
-      TypeBinding type = element.getType();
-      List interceptors = element.getInterceptors();
-
-      if(o != NIL)
-      {
-         //
-         // characters
-         //
-
-         TypeBinding charType = type.getSimpleType();
-         if(charType == null)
-         {
-            charType = type;
-         }
-
-         CharactersHandler charHandler = charType.getCharactersHandler();
-
-         /**
-          * If there is text content then unmarshal it and set.
-          * If there is no text content and the type is simple and
-          * its characters handler is not null then unmarshal and set.
-          * If the type is complex and there is no text data then the unmarshalled value
-          * of the empty text content is assumed to be null
-          * (in case of simple types that's not always true and depends on nillable attribute).
-          */
-         if(textContent.length() > 0 || charHandler != null && type.isSimple())
-         {
-            String dataContent;
-            SchemaBinding schema = element.getSchema();
-            if(textContent.length() == 0)
-            {
-               dataContent = null;
-            }
-            else
-            {
-               dataContent = textContent.toString();
-               if(schema != null && schema.isReplacePropertyRefs())
-               {
-                  dataContent = StringPropertyReplacer.replaceProperties(dataContent);
-               }
-
-               //textContent.delete(0, textContent.length());
-            }
-
-            Object unmarshalled;
-
-            if(charHandler == null)
-            {
-               if(!type.isSimple() && schema != null && schema.isStrictSchema()
-                  // todo this isSkip() doesn't look nice here
-                  && !element.isSkip())
-               {
-                  throw new JBossXBRuntimeException("Element " +
-                     endName +
-                     " with type binding " +
-                     type.getQName() +
-                     " does not include text content binding: " + dataContent
-                  );
-               }
-               unmarshalled = dataContent;
-            }
-            else
-            {
-               ValueMetaData valueMetaData = element.getValueMetaData();
-               if(valueMetaData == null)
-               {
-                  CharactersMetaData charactersMetaData = type.getCharactersMetaData();
-                  if(charactersMetaData != null)
-                  {
-                     valueMetaData = charactersMetaData.getValue();
-                  }
-               }
-
-               // todo valueMetaData is available from type
-               unmarshalled = dataContent == null ?
-                  charHandler.unmarshalEmpty(endName, charType, nsRegistry, valueMetaData) :
-                  charHandler.unmarshal(endName, charType, nsRegistry, valueMetaData, dataContent);
-            }
-
-            if(unmarshalled != null)
-            {
-               // if startElement returned null, we use characters as the object for this element
-               if(o == null)
-               {
-                  o = unmarshalled;
-               }
-               else if(charHandler != null)
-               {
-                  if(o instanceof ValueList)
-                  {
-                     ValueList valueList = (ValueList)o;
-                     if(type.isSimple())
-                     {
-                        valueList.getInitializer().addTermValue(endName, particle, charHandler, valueList, unmarshalled);
-                     }
-                     else
-                     {
-                        valueList.getInitializer().addTextValue(endName, particle, charHandler, valueList, unmarshalled);
-                     }
-                  }
-                  else
-                  {
-                     charHandler.setValue(endName, element, o, unmarshalled);
-                  }
-               }
-            }
-
-            // todo interceptors get dataContent?
-            int i = interceptors.size();
-            while(i-- > 0)
-            {
-               ElementInterceptor interceptor = (ElementInterceptor)interceptors.get(i);
-               interceptor.characters(((StackItem)stack.peek(interceptors.size() - 1 - i)).o,
-                  endName, type, nsRegistry, dataContent
-               );
-            }
-         }
-      }
-      else
-      {
-         o = null;
-      }
-
-      //
-      // endElement
-      //
-
-      Object parent = stack.isEmpty() ? null : ((StackItem)stack.peek()).o;
-      ParticleHandler handler = type.getHandler();
-      if(handler == null)
-      {
-         handler = defParticleHandler;
-      }
-
-      if(o instanceof ValueList && !particle.getTerm().isSkip())
-      {
-         if(trace)
-         {
-            log.trace("endParticle " + endName + " valueList");
-         }
-         ValueList valueList = (ValueList)o;
-         o = valueList.getHandler().newInstance(particle, valueList);
-      }
-      else
-      {
-         o = handler.endParticle(o, endName, particle);
-      }
-
-      int i = interceptors.size();
-      while(i-- > 0)
-      {
-         ElementInterceptor interceptor = (ElementInterceptor)interceptors.get(i);
-         interceptor.endElement(((StackItem)stack.peek(interceptors.size() - 1 - i)).o, endName, type);
-      }
-
-      //
-      // setParent
-      //
-
-      i = interceptors.size();
-      // todo yack...
-      if(i == 0)
-      {
-         ParticleHandler wildcardHandler = null;
-
-         ParticleBinding parentParticle = null;
-         for(ListIterator iter = stack.prevIterator(); iter.hasPrevious();)
-         {
-            StackItem item = (StackItem)iter.previous();
-            ParticleBinding peeked = item.particle;
-            if(peeked != null && peeked.getTerm() instanceof ElementBinding)
-            {
-               parentParticle = peeked;
-               WildcardBinding wildcard = ((ElementBinding)parentParticle.getTerm()).getType().getWildcard();
-               if(wildcard != null)
-               {
-                  wildcardHandler = wildcard.getWildcardHandler();
-               }
-               break;
-            }
-         }
-
-         if(parent != null)
-         {
-            /*if(o == null)
-            {
-               throw new JBossXBRuntimeException(endName + " is null!");
-            } */
-            if(wildcardHandler != null)
-            {
-               setParent(wildcardHandler, parent, o, endName, particle, parentParticle);
-            }
-            else
-            {
-               setParent(handler, parent, o, endName, particle, parentParticle);
-            }
-         }
-         else if(parentParticle != null &&
-            ((ElementBinding)parentParticle.getTerm()).getType().hasWildcard() &&
-            !stack.isEmpty())
-         {
-            // todo: review this> the parent has anyType, so it gets the value of its child
-            for(ListIterator iter = stack.prevIterator(); iter.hasPrevious();)
-            {
-               StackItem peeked = (StackItem)iter.previous();
-               peeked.o = o;
-               if(peeked.particle != null)
-               {
-                  break;
-               }
-            }
-
-            if(trace)
-            {
-               log.trace("Value of " + endName + " " + o + " is promoted as the value of its parent element.");
-            }
-         }
-      }
-      else
-      {
-         while(i-- > 0)
-         {
-            ElementInterceptor interceptor = (ElementInterceptor)interceptors.get(i);
-            parent = ((StackItem)stack.pop()).o;
-            interceptor.add(parent, o, endName);
-            o = parent;
-         }
-      }
-
-      if(stack.isEmpty())
-      {
-         root = o;
-      }
-   }
-
-   private void setParent(ParticleHandler handler,
-                          Object parent,
-                          Object o,
-                          QName endName,
-                          ParticleBinding particle,
-                          ParticleBinding parentParticle)
-   {
-      if(parent instanceof ValueList && !particle.getTerm().isSkip())
-      {
-         ValueList valueList = (ValueList)parent;
-         valueList.getInitializer().addTermValue(endName, particle, handler, valueList, o);
-      }
-      else
-      {
-         handler.setParent(parent, o, endName, particle, parentParticle);
-      }
-   }
-
-   private void push(QName qName, ParticleBinding particle, Object o)
-   {
-      StackItem item = new StackItem(particle, o);
-      stack.push(item);
-      if(trace)
-      {
-         Object binding = null;
-         if(particle != null)
-         {
-            binding = particle.getTerm();
-         }
-         log.trace("pushed " + qName + "=" + o + ", binding=" + binding);
-      }
-   }
-
-   private StackItem push(ModelGroupBinding.Cursor cursor, Object o)
-   {
-      StackItem item = new StackItem(cursor, o);
-      stack.push(item);
-      if(trace)
-      {
-         log.trace("pushed cursor " + cursor);
-      }
-      return item;
-   }
-
-   private StackItem pop()
-   {
-      StackItem item = (StackItem)stack.pop();
-      if(trace)
-      {
-         if(item.particle != null)
-         {
-            log.trace("poped " + ((ElementBinding)item.particle.getTerm()).getQName() + "=" + item.particle);
-         }
-         else if(item.cursor != null)
-         {
-            log.trace("poped " + item.cursor.getCurrentParticle().getTerm());
-         }
-         else
-         {
-            log.trace("poped null");
-         }
-      }
-      return item;
-   }
-
-   // Inner
-
-   private static class StackItem
-   {
-      final ModelGroupBinding.Cursor cursor;
-      final ParticleBinding particle;
-      Object o;
-      StringBuffer textContent;
-
-      public StackItem(ModelGroupBinding.Cursor cursor, Object o)
-      {
-         this.cursor = cursor;
-         this.particle = null;
-         this.o = o;
-      }
-
-      public StackItem(ParticleBinding particle, Object o)
-      {
-         this.cursor = null;
-         this.particle = particle;
-         this.o = o;
-      }
-   }
-
-   static class StackImpl
-   {
-      private List list = new ArrayList();
-
-      public void clear()
-      {
-         list.clear();
-      }
-
-      public void push(Object o)
-      {
-         list.add(o);
-      }
-
-      public Object pop()
-      {
-         return list.remove(list.size() - 1);
-      }
-
-      public Object peek()
-      {
-         return list.get(list.size() - 1);
-      }
-
-      public ListIterator prevIterator()
-      {
-         return list.listIterator(list.size());
-      }
-
-      public Object peek(int i)
-      {
-         return list.get(list.size() - 1 - i);
-      }
-
-      public boolean isEmpty()
-      {
-         return list.isEmpty();
-      }
-
-      public int size()
-      {
-         return list.size();
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TermBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TermBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TermBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,164 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import org.jboss.xb.binding.metadata.ClassMetaData;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.metadata.MapEntryMetaData;
-import org.jboss.xb.binding.metadata.PutMethodMetaData;
-import org.jboss.xb.binding.metadata.AddMethodMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public abstract class TermBinding
-{
-   protected SchemaBinding schema;
-
-   protected ClassMetaData classMetaData;
-   protected PropertyMetaData propertyMetaData;
-   protected MapEntryMetaData mapEntryMetaData;
-   protected PutMethodMetaData putMethodMetaData;
-   protected AddMethodMetaData addMethodMetaData;
-   protected ValueMetaData valueMetaData;
-   protected boolean mapEntryKey;
-   protected boolean mapEntryValue;
-   protected Boolean skip;
-   protected ValueAdapter valueAdapter;
-
-   protected TermBinding(SchemaBinding schema)
-   {
-      this.schema = schema;
-   }
-
-   protected TermBinding()
-   {
-   }
-   
-   public ClassMetaData getClassMetaData()
-   {
-      return classMetaData;
-   }
-
-   public void setClassMetaData(ClassMetaData classMetaData)
-   {
-      this.classMetaData = classMetaData;
-   }
-
-   public PropertyMetaData getPropertyMetaData()
-   {
-      return propertyMetaData;
-   }
-
-   public void setPropertyMetaData(PropertyMetaData propertyMetaData)
-   {
-      this.propertyMetaData = propertyMetaData;
-   }
-
-   public MapEntryMetaData getMapEntryMetaData()
-   {
-      return mapEntryMetaData;
-   }
-
-   public void setMapEntryMetaData(MapEntryMetaData mapEntryMetaData)
-   {
-      this.mapEntryMetaData = mapEntryMetaData;
-   }
-
-   public PutMethodMetaData getPutMethodMetaData()
-   {
-      return putMethodMetaData;
-   }
-
-   public void setPutMethodMetaData(PutMethodMetaData putMethodMetaData)
-   {
-      this.putMethodMetaData = putMethodMetaData;
-   }
-
-   public AddMethodMetaData getAddMethodMetaData()
-   {
-      return addMethodMetaData;
-   }
-
-   public void setAddMethodMetaData(AddMethodMetaData addMethodMetaData)
-   {
-      this.addMethodMetaData = addMethodMetaData;
-   }
-
-   public ValueMetaData getValueMetaData()
-   {
-      return valueMetaData;
-   }
-
-   public void setValueMetaData(ValueMetaData valueMetaData)
-   {
-      this.valueMetaData = valueMetaData;
-   }
-
-   public boolean isMapEntryKey()
-   {
-      return mapEntryKey;
-   }
-
-   public void setMapEntryKey(boolean mapEntryKey)
-   {
-      this.mapEntryKey = mapEntryKey;
-   }
-
-   public boolean isMapEntryValue()
-   {
-      return mapEntryValue;
-   }
-
-   public void setMapEntryValue(boolean mapEntryValue)
-   {
-      this.mapEntryValue = mapEntryValue;
-   }
-
-   public abstract boolean isSkip();
-
-   public void setSkip(Boolean skip)
-   {
-      this.skip = skip;
-   }
-
-   public ValueAdapter getValueAdapter()
-   {
-      return valueAdapter;
-   }
-
-   public void setValueAdapter(ValueAdapter valueAdapter)
-   {
-      this.valueAdapter = valueAdapter;
-   }
-
-   public SchemaBinding getSchema()
-   {
-      return schema;
-   }
-
-   public abstract boolean isModelGroup();
-
-   public abstract boolean isWildcard();
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TermBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TermBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TypeBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TypeBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TypeBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,571 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.xb.binding.metadata.AddMethodMetaData;
-import org.jboss.xb.binding.metadata.CharactersMetaData;
-import org.jboss.xb.binding.metadata.ClassMetaData;
-import org.jboss.xb.binding.metadata.MapEntryMetaData;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
-import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class TypeBinding
-{
-   protected QName qName;
-   /** Map<QName, AttributeBinding>  */
-   private Map attrs = Collections.EMPTY_MAP;
-   private ParticleHandler handler;//todo default handler is now in SundayContentHandler.
-   //private ParticleHandler handler = DefaultHandlers.ELEMENT_HANDLER;
-   private CharactersHandler charactersHandler;
-   private ClassMetaData classMetaData;
-   private ValueMetaData valueMetaData;
-   private PropertyMetaData propertyMetaData;
-   private MapEntryMetaData mapEntryMetaData;
-   private SchemaBinding schemaBinding; // todo it's optional for now...
-   private TypeBinding baseType;
-   private boolean skip;
-   private CharactersMetaData charMetaData;
-   private AddMethodMetaData addMethodMetaData;
-   private ValueAdapter valueAdapter = ValueAdapter.NOOP;
-   private Boolean startElementCreatesObject;
-   private Boolean simple;
-
-   private WildcardBinding wildcard;
-   private ParticleBinding particle;
-
-   private List patternValues;
-   private List enumValues;
-   private TypeBinding itemType; // the type is a list type with this item type
-   private TypeBinding simpleType;
-
-   private XOPUnmarshaller xopUnmarshaller;
-   private XOPMarshaller xopMarshaller;
-
-   public TypeBinding()
-   {
-      this.qName = null;
-   }
-
-   public TypeBinding(QName qName)
-   {
-      //this(qName, (CharactersHandler)null);
-      this(qName, DefaultHandlers.CHARACTERS_HANDLER);
-   }
-
-   public TypeBinding(CharactersHandler charactersHandler)
-   {
-      this(null, charactersHandler);
-   }
-
-   public TypeBinding(QName qName, CharactersHandler charactersHandler)
-   {
-      this.qName = qName;
-      this.charactersHandler = charactersHandler;
-   }
-
-   public TypeBinding(QName qName, TypeBinding baseType)
-   {
-      this(qName, baseType.charactersHandler);
-
-      if(baseType.particle != null)
-      {
-         // todo
-         this.particle = baseType.particle;
-      }
-
-      this.attrs = new HashMap(baseType.attrs);
-      this.classMetaData = baseType.classMetaData;
-      this.valueMetaData = baseType.valueMetaData;
-      this.propertyMetaData = baseType.propertyMetaData;
-      this.mapEntryMetaData = baseType.mapEntryMetaData;
-      this.schemaBinding = baseType.schemaBinding;
-      this.baseType = baseType;
-
-      if(!baseType.isStartElementCreatesObject())
-      {
-         this.handler = baseType.handler;
-      }
-   }
-
-   public QName getQName()
-   {
-      return qName;
-   }
-
-   public ElementBinding getElement(QName name)
-   {
-      return getElement(name, true);
-   }
-
-   private ElementBinding getElement(QName name, boolean ignoreWildcards)
-   {
-      ElementBinding element = null;
-      if(particle != null)
-      {
-         ModelGroupBinding modelGroup = (ModelGroupBinding)particle.getTerm();
-         element = modelGroup.newCursor(particle).getElement(name, null, ignoreWildcards);
-      }
-
-      if(element == null && !ignoreWildcards && wildcard != null)
-      {
-         element = wildcard.getElement(name, null);
-      }
-      return element;
-   }
-
-   public void addParticle(ParticleBinding particle)
-   {
-      ModelGroupBinding modelGroup;
-      if(this.particle == null)
-      {
-         modelGroup = new AllBinding(schemaBinding);
-         this.particle = new ParticleBinding(modelGroup);
-      }
-      else
-      {
-         modelGroup = (ModelGroupBinding)this.particle.getTerm();
-      }
-      modelGroup.addParticle(particle);
-   }
-
-   public void addElement(ElementBinding element)
-   {
-      addElement(element, 1, false);
-   }
-
-   public void addElement(ElementBinding element, int minOccurs, boolean unbounded)
-   {
-      ParticleBinding particle = new ParticleBinding(element);
-      particle.setMinOccurs(minOccurs);
-      particle.setMaxOccursUnbounded(unbounded);
-      addParticle(particle);
-   }
-
-   public ElementBinding addElement(QName name, TypeBinding type)
-   {
-      return addElement(name, type, 1, false);
-   }
-
-   public ElementBinding addElement(QName name, TypeBinding type, int minOccurs, boolean unbounded)
-   {
-      ElementBinding el = new ElementBinding(schemaBinding, name, type);
-      addElement(el, minOccurs, unbounded);
-      return el;
-   }
-
-   public void addGroup(Map group)
-   {
-      for(Iterator i = group.entrySet().iterator(); i.hasNext();)
-      {
-         Map.Entry entry = (Map.Entry)i.next();
-         QName name = (QName)entry.getKey();
-         TypeBinding type = (TypeBinding)entry.getValue();
-         addElement(name, type);
-      }
-   }
-
-   public AttributeBinding getAttribute(QName qName)
-   {
-      return (AttributeBinding)attrs.get(qName);
-   }
-
-   /**
-    * Go through the type attributes to see if there are any with defaults
-    * that do not appears in the attrs list.
-    *
-    * @param attrs - the attributes seen in the document
-    * @return a possibly augmented list that includes unspecified attributes
-    *    with default values.
-    */
-   public Attributes expandWithDefaultAttributes(Attributes attrs)
-   {
-      if(this.attrs.size() == 0)
-      {
-         return attrs;
-      }
-
-      // Map<QName, AttributeBinding>
-      HashMap attrsNotSeen = new HashMap(this.attrs);
-      for(int n = 0; n < attrs.getLength(); n ++)
-      {
-         QName name = new QName(attrs.getURI(n), attrs.getLocalName(n));
-         attrsNotSeen.remove(name);
-      }
-
-      Attributes expandedAttrs = attrs;
-      if( attrsNotSeen.size() > 0 )
-      {
-         AttributesImpl tmp = new AttributesImpl(attrs);
-         Iterator iter = attrsNotSeen.entrySet().iterator();
-         while( iter.hasNext() )
-         {
-            Map.Entry entry = (Map.Entry) iter.next();
-            QName name = (QName) entry.getKey();
-            AttributeBinding binding = (AttributeBinding) entry.getValue();
-            String constraint = binding.getDefaultConstraint();
-            if( constraint != null )
-            {
-               // the Javadoc for Attributes.getType(i) says:
-               // "The attribute type is one of the strings
-               // "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
-               // or "NOTATION" (always in upper case)."
-               tmp.addAttribute(name.getNamespaceURI(), name.getLocalPart(),
-                  name.toString(), "CDATA", constraint);
-            }
-         }
-         expandedAttrs = tmp;
-      }
-
-      return expandedAttrs;
-   }
-
-   public AttributeBinding addAttribute(QName name, TypeBinding type, AttributeHandler handler)
-   {
-      AttributeBinding attr = new AttributeBinding(schemaBinding, name, type, handler);
-      switch(attrs.size())
-      {
-         case 0:
-            attrs = Collections.singletonMap(name, attr);
-            break;
-         case 1:
-            attrs = new HashMap(attrs);
-         default:
-            attrs.put(name, attr);
-      }
-      return attr;
-   }
-
-   public Collection getAttributes()
-   {
-      return attrs.values();
-   }
-
-   public CharactersHandler getCharactersHandler()
-   {
-      return charactersHandler;
-   }
-
-   /**
-    * This method will create a new simple type binding with the passed in characters handler
-    * and set this simple type as the simple type of the complex type the method was invoked on.
-    * @param charactersHandler
-    */
-   public void setSimpleType(CharactersHandler charactersHandler)
-   {
-      setSimpleType(new TypeBinding(charactersHandler));
-   }
-
-   public TypeBinding getSimpleType()
-   {
-      return simpleType;
-   }
-
-   public void setSimpleType(TypeBinding simpleType)
-   {
-      this.simpleType = simpleType;
-   }
-
-   public void setHandler(ParticleHandler handler)
-   {
-      this.handler = handler;
-   }
-
-   public ParticleHandler getHandler()
-   {
-      return handler;
-   }
-
-   public void pushInterceptor(QName qName, ElementInterceptor interceptor)
-   {
-      ElementBinding el = getElement(qName);
-      if(el == null)
-      {
-         el = addElement(qName, new TypeBinding());
-      }
-      el.pushInterceptor(interceptor);
-   }
-
-   public TypeBinding getBaseType()
-   {
-      return baseType;
-   }
-
-   public void setBaseType(TypeBinding baseType)
-   {
-      this.baseType = baseType;
-   }
-
-   public boolean isSimple()
-   {
-      return simple == null ? particle == null && attrs.isEmpty() : simple.booleanValue();
-   }
-
-   public void setSimple(boolean simple)
-   {
-      this.simple = simple ? Boolean.TRUE : Boolean.FALSE;
-   }
-
-   public ClassMetaData getClassMetaData()
-   {
-      return classMetaData;
-   }
-
-   public void setClassMetaData(ClassMetaData classMetaData)
-   {
-      this.classMetaData = classMetaData;
-   }
-
-   public SchemaBinding getSchemaBinding()
-   {
-      return schemaBinding;
-   }
-
-   public void setSchemaBinding(SchemaBinding schemaBinding)
-   {
-      this.schemaBinding = schemaBinding;
-   }
-
-   public void setValueMetaData(ValueMetaData valueMetaData)
-   {
-      this.valueMetaData = valueMetaData;
-   }
-
-   public ValueMetaData getValueMetaData()
-   {
-      return valueMetaData;
-   }
-
-   public PropertyMetaData getPropertyMetaData()
-   {
-      return propertyMetaData;
-   }
-
-   public void setPropertyMetaData(PropertyMetaData propertyMetaData)
-   {
-      this.propertyMetaData = propertyMetaData;
-   }
-
-   public MapEntryMetaData getMapEntryMetaData()
-   {
-      return mapEntryMetaData;
-   }
-
-   public void setMapEntryMetaData(MapEntryMetaData mapEntryMetaData)
-   {
-      this.mapEntryMetaData = mapEntryMetaData;
-   }
-
-   public void setSkip(boolean skip)
-   {
-      this.skip = skip;
-   }
-
-   public boolean isSkip()
-   {
-      return skip;
-   }
-
-   public CharactersMetaData getCharactersMetaData()
-   {
-      return charMetaData;
-   }
-
-   public void setCharactersMetaData(CharactersMetaData charMetaData)
-   {
-      this.charMetaData = charMetaData;
-   }
-
-   public void setAddMethodMetaData(AddMethodMetaData addMethodMetaData)
-   {
-      this.addMethodMetaData = addMethodMetaData;
-   }
-
-   public AddMethodMetaData getAddMethodMetaData()
-   {
-      return addMethodMetaData;
-   }
-
-   public ValueAdapter getValueAdapter()
-   {
-      return valueAdapter;
-   }
-
-   public void setValueAdapter(ValueAdapter valueAdapter)
-   {
-      this.valueAdapter = valueAdapter;
-   }
-
-   public boolean isStartElementCreatesObject()
-   {
-      return startElementCreatesObject == null ?
-         particle != null || !attrs.isEmpty() : startElementCreatesObject.booleanValue();
-   }
-
-   public void setStartElementCreatesObject(boolean startElementCreatesObject)
-   {
-      this.startElementCreatesObject = startElementCreatesObject ? Boolean.TRUE : Boolean.FALSE;
-   }
-
-   public void setWildcard(WildcardBinding wildcard)
-   {
-      this.wildcard = wildcard;
-   }
-
-   public WildcardBinding getWildcard()
-   {
-      return wildcard;
-   }
-
-   public boolean hasWildcard()
-   {
-      return wildcard != null;
-   }
-
-   public ParticleBinding getParticle()
-   {
-      return particle;
-   }
-
-   public void setParticle(ParticleBinding particle)
-   {
-      this.particle = particle;
-   }
-
-   public List getLexicalPattern()
-   {
-      return patternValues;
-   }
-
-   public void addLexicalPattern(String patternValue)
-   {
-      if(patternValues == null)
-      {
-         patternValues = Collections.singletonList(patternValue);
-      }
-      else
-      {
-         if(patternValues.size() == 1)
-         {
-            patternValues = new ArrayList(patternValues);
-         }
-         patternValues.add(patternValue);
-      }
-   }
-
-   public List getLexicalEnumeration()
-   {
-      return enumValues;
-   }
-
-   public void addEnumValue(String value)
-   {
-      if(enumValues == null)
-      {
-         enumValues = Collections.singletonList(value);
-      }
-      else
-      {
-         if(enumValues.size() == 1)
-         {
-            enumValues = new ArrayList(enumValues);
-         }
-         enumValues.add(value);
-      }
-   }
-
-   public void setItemType(TypeBinding itemType)
-   {
-      this.itemType = itemType;
-   }
-
-   public TypeBinding getItemType()
-   {
-      return itemType;
-   }
-
-   public XOPUnmarshaller getXopUnmarshaller()
-   {
-      return xopUnmarshaller == null ?
-         (schemaBinding == null ? null : schemaBinding.getXopUnmarshaller()) : xopUnmarshaller;
-   }
-
-   public void setXopUnmarshaller(XOPUnmarshaller xopUnmarshaller)
-   {
-      this.xopUnmarshaller = xopUnmarshaller;
-   }
-
-   public XOPMarshaller getXopMarshaller()
-   {
-      return xopMarshaller == null ?
-         (schemaBinding == null ? null : schemaBinding.getXopMarshaller()) : xopMarshaller;
-   }
-
-   public void setXopMarshaller(XOPMarshaller xopMarshaller)
-   {
-      this.xopMarshaller = xopMarshaller;
-   }
-
-   public boolean hasOnlyXmlMimeAttributes()
-   {
-      if(attrs.isEmpty())
-      {
-         return false;
-      }
-      else
-      {
-         Iterator iter = attrs.keySet().iterator();
-         while(iter.hasNext())
-         {
-            QName qName = (QName)iter.next();
-            if(!Constants.NS_XML_MIME.equals(qName.getNamespaceURI()))
-            {
-               return false;
-            }
-         }
-      }
-      return true;
-   }
-
-   public String toString()
-   {
-      return super.toString() + "[" + qName + "]";
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TypeBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/TypeBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ValueAdapter.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ValueAdapter.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ValueAdapter.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public interface ValueAdapter
-{
-   ValueAdapter NOOP = new ValueAdapter()
-   {
-      public Object cast(Object o, Class c)
-      {
-         return o;
-      }
-   };
-
-   /**
-    * An implementation should make sure that an object past in as the first parameter
-    * can be set as a value of a field that is of a type passed in as the second parameter
-    *
-    * @param o
-    * @param c
-    * @return
-    */
-   Object cast(Object o, Class c);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ValueAdapter.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/ValueAdapter.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/WildcardBinding.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/WildcardBinding.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/WildcardBinding.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,247 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.Util;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class WildcardBinding
-   extends TermBinding
-{
-   private static final Logger log = Logger.getLogger(WildcardBinding.class);
-
-   private static final short PC_LAX = 3;
-   private static final short PC_SKIP = 2;
-   private static final short PC_STRICT = 1;
-
-   private QName qName;
-   private SchemaBindingResolver schemaResolver;
-   private short pc;
-
-   private ParticleHandler unresolvedElementHandler;
-   private CharactersHandler unresolvedCharactersHandler;
-   private ParticleHandler wildcardHandler;
-
-   public WildcardBinding(SchemaBinding schema)
-   {
-      super(schema);
-   }
-
-   public QName getQName()
-   {
-      return qName;
-   }
-
-   public void setQName(QName qName)
-   {
-      this.qName = qName;
-   }
-
-   public SchemaBindingResolver getSchemaResolver()
-   {
-      return schemaResolver;
-   }
-
-   public void setSchemaResolver(SchemaBindingResolver schemaResolver)
-   {
-      this.schemaResolver = schemaResolver;
-   }
-
-   public short getProcessContents()
-   {
-      return pc;
-   }
-
-   public void setProcessContents(short pc)
-   {
-      this.pc = pc;
-      if(pc != PC_LAX && pc != PC_SKIP && pc != PC_STRICT)
-      {
-         throw new JBossXBRuntimeException("Unexpected value for process contents: " + pc);
-      }
-   }
-
-   public boolean isProcessContentsLax()
-   {
-      return pc == PC_LAX;
-   }
-
-   public boolean isProcessContentsSkip()
-   {
-      return pc == PC_SKIP;
-   }
-
-   public boolean isProcessContentsStrict()
-   {
-      return pc == PC_STRICT;
-   }
-
-   public void setWildcardHandler(ParticleHandler wildcardHandler)
-   {
-      this.wildcardHandler = wildcardHandler;
-   }
-
-   public ParticleHandler getWildcardHandler()
-   {
-      return wildcardHandler;
-   }
-
-   public ParticleHandler getUnresolvedElementHandler()
-   {
-      return unresolvedElementHandler;
-   }
-
-   public void setUnresolvedElementHandler(ParticleHandler unresolvedElementHandler)
-   {
-      this.unresolvedElementHandler = unresolvedElementHandler;
-   }
-
-   public CharactersHandler getUnresolvedCharactersHandler()
-   {
-      return unresolvedCharactersHandler;
-   }
-
-   public void setUnresolvedCharactersHandler(CharactersHandler unresolvedCharactersHandler)
-   {
-      this.unresolvedCharactersHandler = unresolvedCharactersHandler;
-   }
-
-   public ElementBinding getElement(QName qName, Attributes attrs)
-   {
-      if(pc == PC_SKIP)
-      {
-         return getUnresolvedElement(qName, false);
-      }
-
-      ElementBinding element = null;
-      // first, look into the own schema
-      if(schema != null)
-      {
-         element = schema.getElement(qName);
-      }
-
-      if(element == null)
-      {
-         SchemaBindingResolver resolver = schemaResolver;
-         if(resolver == null && schema != null)
-         {
-            resolver = schema.getSchemaResolver();
-         }
-
-         if(resolver != null)
-         {
-            // this is wildcard handling
-            String schemaLocation = attrs == null ? null : Util.getSchemaLocation(attrs, qName.getNamespaceURI());
-            SchemaBinding schema = resolver.resolve(qName.getNamespaceURI(), null, schemaLocation);
-            if(schema != null)
-            {
-               element = schema.getElement(qName);
-            }
-         }
-      }
-
-      if(element == null && pc == PC_LAX)
-      {
-         element = getUnresolvedElement(qName, false);
-      }
-
-      return element;
-   }
-
-   /**
-    * todo: this method is called for each unresolved element TWICE currently
-    * because getElement() is called TWICE. Look into fixing this!
-    *
-    * @param qName
-    * @return
-    */
-   private ElementBinding getUnresolvedElement(QName qName, boolean required)
-   {
-      if(log.isTraceEnabled())
-      {
-         log.trace(
-            "getUnresolvedElement for " + qName + ", required=" + required
-            + ", unresolvedElementHandler=" + unresolvedElementHandler
-         );
-      }
-
-      if(unresolvedElementHandler == null)
-      {
-         if(required)
-         {
-            throw new JBossXBRuntimeException("Schema could not be resolved for wildcard content element " +
-               qName +
-               " and particle handler for unresolved wildcard content elements is not initialized."
-            );
-         }
-         else
-         {
-            // todo this stuff could be cached
-            ParticleBinding particle = new ParticleBinding(this);
-            SequenceBinding sequence = new SequenceBinding(schema);
-            sequence.addParticle(particle);
-
-            TypeBinding type = new TypeBinding();
-            type.setParticle(new ParticleBinding(sequence));
-
-            ElementBinding element = new ElementBinding(schema, qName, type);
-            // this is unresolved element we don't care about
-            element.setSkip(Boolean.TRUE);
-            return element;
-         }
-      }
-
-      // todo this stuff could be cached
-      ParticleBinding particle = new ParticleBinding(this);
-      SequenceBinding sequence = new SequenceBinding(schema);
-      sequence.addParticle(particle);
-
-      TypeBinding type = new TypeBinding();
-      type.setHandler(unresolvedElementHandler);
-      type.setSimpleType(unresolvedCharactersHandler);
-      type.setParticle(new ParticleBinding(sequence));
-
-      return new ElementBinding(schema, qName, type);
-   }
-
-   public boolean isSkip()
-   {
-      return skip == null ? false : skip.booleanValue();
-   }
-
-   public boolean isModelGroup()
-   {
-      return false;
-   }
-
-   public boolean isWildcard()
-   {
-      return true;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/WildcardBinding.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/WildcardBinding.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinder.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinder.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinder.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1403 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.ListIterator;
-import java.util.List;
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-
-import org.apache.xerces.xs.StringList;
-import org.apache.xerces.xs.XSAnnotation;
-import org.apache.xerces.xs.XSAttributeDeclaration;
-import org.apache.xerces.xs.XSAttributeUse;
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSModel;
-import org.apache.xerces.xs.XSModelGroup;
-import org.apache.xerces.xs.XSModelGroupDefinition;
-import org.apache.xerces.xs.XSNamedMap;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSParticle;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTerm;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.apache.xerces.xs.XSWildcard;
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.Util;
-import org.jboss.xb.binding.sunday.xop.XOPIncludeHandler;
-import org.jboss.xb.binding.metadata.AddMethodMetaData;
-import org.jboss.xb.binding.metadata.CharactersMetaData;
-import org.jboss.xb.binding.metadata.ClassMetaData;
-import org.jboss.xb.binding.metadata.MapEntryMetaData;
-import org.jboss.xb.binding.metadata.PackageMetaData;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.metadata.PutMethodMetaData;
-import org.jboss.xb.binding.metadata.SchemaMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.metadata.XsdAnnotation;
-import org.jboss.xb.binding.metadata.XsdAppInfo;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class XsdBinder
-{
-   static final Logger log = Logger.getLogger(XsdBinder.class);
-
-   private XsdBinder()
-   {
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd url/uri.
-    *
-    * @param xsdUrl
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(String xsdUrl)
-   {
-      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
-      resolver.setBaseURI(xsdUrl);
-      return bind(xsdUrl, resolver);
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd url/uri.
-    *
-    * @param xsdUrl
-    * @param resolver the resolver will be used to resolve imported schemas in the schema being loaded
-    *                 and also will be set on the returned instance of SchemaBinding
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(String xsdUrl, SchemaBindingResolver resolver)
-   {
-      XSModel model = Util.loadSchema(xsdUrl, resolver);
-      return bind(model, resolver);
-   }
-
-   public static SchemaBinding bind(InputStream xsdStream, String encoding)
-   {
-      return bind(xsdStream, encoding, new DefaultSchemaResolver());
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd stream.
-    *
-    * @param xsdStream - the xsd InputStream
-    * @param encoding  - optional stream encoding
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(InputStream xsdStream, String encoding, String baseURI)
-   {
-      return bind(xsdStream, encoding, baseURI, true);
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd stream.
-    *
-    * @param xsdStream - the xsd InputStream
-    * @param encoding  - optional stream encoding
-    * @param processAnnotations - process annotations
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(InputStream xsdStream, String encoding, String baseURI, boolean processAnnotations)
-   {
-      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
-      resolver.setBaseURI(baseURI);
-      return bind(xsdStream, encoding, resolver, processAnnotations);
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd stream.
-    *
-    * @param xsdStream - the xsd InputStream
-    * @param encoding  - optional stream encoding
-    * @param resolver  the resolver will be used to resolve imported schemas in the schema being loaded
-    *                  and also will be set on the returned instance of SchemaBinding
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(InputStream xsdStream, String encoding, SchemaBindingResolver resolver)
-   {
-      return bind(xsdStream, encoding, resolver, true);
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd stream.
-    *
-    * @param xsdStream - the xsd InputStream
-    * @param encoding  - optional stream encoding
-    * @param resolver  the resolver will be used to resolve imported schemas in the schema being loaded
-    *                  and also will be set on the returned instance of SchemaBinding
-    * @param processAnnotations whether to process annotations
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(InputStream xsdStream, String encoding, SchemaBindingResolver resolver, boolean processAnnotations)
-   {
-      XSModel model = Util.loadSchema(xsdStream, encoding, resolver);
-      return bind(model, resolver, processAnnotations);
-   }
-
-   public static SchemaBinding bind(Reader xsdReader, String encoding)
-   {
-      return bind(xsdReader, encoding, new DefaultSchemaResolver());
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd reader.
-    *
-    * @param xsdReader - xsd reader
-    * @param encoding  - optional reader encoding
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(Reader xsdReader, String encoding, String baseURI)
-   {
-      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
-      resolver.setBaseURI(baseURI);
-      return bind(xsdReader, encoding, resolver);
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd reader.
-    *
-    * @param xsdReader - xsd reader
-    * @param encoding  - optional reader encoding
-    * @param resolver  the resolver will be used to resolve imported schemas in the schema being loaded
-    *                  and also will be set on the returned instance of SchemaBinding
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(Reader xsdReader, String encoding, SchemaBindingResolver resolver)
-   {
-      XSModel model = Util.loadSchema(xsdReader, encoding, resolver);
-      return bind(model, resolver);
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd string.
-    *
-    * @param xsd      - xsd string
-    * @param encoding - optional string encoding
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(String xsd, String encoding)
-   {
-      return bind(xsd, encoding, new DefaultSchemaResolver());
-   }
-
-   /**
-    * Create a SchemaBinding from and xsd string.
-    *
-    * @param xsd      - xsd string
-    * @param encoding - optional string encoding
-    * @param resolver the resolver will be used to resolve imported schemas in the schema being loaded
-    *                 and also will be set on the returned instance of SchemaBinding
-    * @return SchemaBinding mapping
-    */
-   public static SchemaBinding bind(String xsd, String encoding, SchemaBindingResolver resolver)
-   {
-      XSModel model = Util.loadSchema(xsd, encoding);
-      return bind(model, resolver);
-   }
-
-   public static SchemaBinding bind(XSModel model, SchemaBindingResolver resolver)
-   {
-      return bind(model,resolver, true);
-   }
-
-   public static SchemaBinding bind(XSModel model, SchemaBindingResolver resolver, boolean processAnnotations)
-   {
-      Context ctx = new Context();
-      ctx.processAnnotations = processAnnotations;
-      SchemaBinding schema = ctx.schema;
-      schema.setSchemaResolver(resolver);
-
-      // read annotations. for now just log the ones that are going to be used
-      if (ctx.processAnnotations)
-      {
-         XSObjectList annotations = model.getAnnotations();
-         if (ctx.trace)
-         {
-            log.trace("started binding schema " + schema);
-            log.trace("Schema annotations: " + annotations.getLength());
-         }
-
-         for(int i = 0; i < annotations.getLength(); ++i)
-         {
-            XSAnnotation annotation = (XSAnnotation)annotations.item(i);
-            XsdAnnotation an = XsdAnnotation.unmarshal(annotation.getAnnotationString());
-            XsdAppInfo appinfo = an.getAppInfo();
-            if(appinfo != null)
-            {
-               SchemaMetaData schemaBindings = appinfo.getSchemaMetaData();
-               if(schemaBindings != null)
-               {
-                  // Get the ignoreUnresolvedFieldOrClass
-                  schema.setIgnoreUnresolvedFieldOrClass(schemaBindings.isIgnoreUnresolvedFieldOrClass());
-                  // Get the ignoreUnresolvedFieldOrClass
-                  schema.setReplacePropertyRefs(schemaBindings.isReplacePropertyRefs());
-                  // Get the default package
-                  PackageMetaData packageMetaData = schemaBindings.getPackage();
-                  if(packageMetaData != null)
-                  {
-                     if (ctx.trace)
-                        log.trace("schema default package: " + packageMetaData.getName());
-                     schema.setPackageMetaData(packageMetaData);
-                  }
-               }
-            }
-         }
-      }
-
-      XSNamedMap groups = model.getComponents(XSConstants.MODEL_GROUP_DEFINITION);
-      if (ctx.trace)
-         log.trace("Model groups: " + groups.getLength());
-      for(int i = 0; i < groups.getLength(); ++i)
-      {
-         XSModelGroupDefinition groupDef = (XSModelGroupDefinition)groups.item(i);
-         bindGlobalGroup(groupDef.getModelGroup(), ctx.sharedElements);
-      }
-
-      XSNamedMap types = model.getComponents(XSConstants.TYPE_DEFINITION);
-      if (ctx.trace)
-         log.trace("Model types: " + types.getLength());
-      for(int i = 0; i < types.getLength(); ++i)
-      {
-         XSTypeDefinition type = (XSTypeDefinition)types.item(i);
-         if(!Constants.NS_XML_SCHEMA.equals(type.getNamespace()))
-         {
-            bindType(ctx, type);
-         }
-      }
-
-      XSNamedMap elements = model.getComponents(XSConstants.ELEMENT_DECLARATION);
-      if (ctx.trace)
-         log.trace("Model elements: " + types.getLength());
-      for(int i = 0; i < elements.getLength(); ++i)
-      {
-         XSElementDeclaration element = (XSElementDeclaration)elements.item(i);
-         bindElement(ctx, element, 1, 0, false);
-      }
-
-      if (ctx.trace)
-      {
-         log.trace("finished binding schema " + schema);
-      }
-
-      return schema;
-   }
-
-   /**
-    * @param schema schema binding the type should be added to
-    * @param type   type definition to be bound
-    * @deprecated <i>This method is added temporary to get anonymous type binding working in JBossWS.
-    *             It will be removed when anonymous type binding in JBossWS is implemented properly.
-    *             No one else should use this method.</i>
-    *
-    *             <p>This method binds a type definition and adds it as a global type to the passed in schema binding.
-    */
-   public static void bindType(SchemaBinding schema, XSTypeDefinition type)
-   {
-      TypeBinding typeBinding = bindType(new Context(schema), type);
-      schema.addType(typeBinding);
-   }
-
-   /**
-    * @param schema             schema binding the type should be added to
-    * @param element            element declaration to be bound
-    * @param minOccurs
-    * @param maxOccurs
-    * @param maxOccursUnbounded
-    * @deprecated <i>This method is added temporary to get anonymous type binding working in JBossWS.
-    *             It will be removed when anonymous type binding in JBossWS is implemented properly.
-    *             No one else should use this method.</i>
-    *
-    *             <p>This method binds an element declaration and adds it as a global element to the passed in schema binding.
-    */
-   public static void bindElement(SchemaBinding schema,
-                                  XSElementDeclaration element,
-                                  int minOccurs,
-                                  int maxOccurs,
-                                  boolean maxOccursUnbounded)
-   {
-      ParticleBinding particle = bindElement(new Context(schema),
-         element,
-         minOccurs,
-         maxOccurs,
-         maxOccursUnbounded
-      );
-      schema.addElementParticle(particle);
-   }
-
-   // Private
-
-   private static TypeBinding bindType(Context ctx, XSTypeDefinition type)
-   {
-      TypeBinding binding;
-      switch(type.getTypeCategory())
-      {
-         case XSTypeDefinition.SIMPLE_TYPE:
-            binding = bindSimpleType(ctx, (XSSimpleTypeDefinition)type);
-            break;
-         case XSTypeDefinition.COMPLEX_TYPE:
-            binding = bindComplexType(ctx, (XSComplexTypeDefinition)type);
-            break;
-         default:
-            throw new JBossXBRuntimeException("Unexpected type category: " + type.getTypeCategory());
-      }
-      return binding;
-   }
-
-   private static TypeBinding bindSimpleType(Context ctx, XSSimpleTypeDefinition type)
-   {
-      QName typeName = type.getName() == null ? null : new QName(type.getNamespace(), type.getName());
-      TypeBinding binding = typeName == null ? null : ctx.schema.getType(typeName);
-      if(binding != null)
-      {
-         return binding;
-      }
-
-      if(ctx.trace)
-      {
-         log.trace("binding simple type " + typeName);
-      }
-
-      XSTypeDefinition baseTypeDef = type.getBaseType();
-      TypeBinding baseType = baseTypeDef == null ? null : bindType(ctx, baseTypeDef);
-
-      binding = baseType == null ? new TypeBinding(typeName) : new TypeBinding(typeName, baseType);
-
-      StringList strList = type.getLexicalPattern();
-      if(strList != null && strList.getLength() > 0)
-      {
-         for(int i = 0; i < strList.getLength(); ++i)
-         {
-            binding.addLexicalPattern(strList.item(i));
-         }
-      }
-
-      strList = type.getLexicalEnumeration();
-      if(strList != null && strList.getLength() > 0)
-      {
-         for(int i = 0; i < strList.getLength(); ++i)
-         {
-            binding.addEnumValue(strList.item(i));
-         }
-      }
-
-      if(type.getItemType() != null)
-      {
-         TypeBinding itemType = bindSimpleType(ctx, type.getItemType());
-         binding.setItemType(itemType);
-      }
-
-      if(typeName != null)
-      {
-         ctx.schema.addType(binding);
-      }
-
-      if(ctx.trace)
-      {
-         String msg = typeName == null ? "bound simple anonymous type" : "bound simple type " + typeName;
-         if(baseType != null)
-         {
-            msg += " inherited binding metadata from " + baseType.getQName();
-         }
-         log.trace(msg);
-      }
-
-      // customize binding with annotations
-      if(ctx.processAnnotations)
-      {
-         XSObjectList annotations = type.getAnnotations();
-         if(annotations != null)
-         {
-            if(ctx.trace)
-            {
-               log.trace(typeName + " annotations " + annotations.getLength());
-            }
-            for(int i = 0; i < annotations.getLength(); ++i)
-            {
-               XSAnnotation an = (XSAnnotation)annotations.item(i);
-               XsdAnnotation xsdAn = XsdAnnotation.unmarshal(an.getAnnotationString());
-               XsdAppInfo appInfo = xsdAn.getAppInfo();
-               if(appInfo != null)
-               {
-                  ClassMetaData classMetaData = appInfo.getClassMetaData();
-                  if(classMetaData != null)
-                  {
-                     if(ctx.trace)
-                     {
-                        log.trace("simple type " +
-                           type.getName() +
-                           ": impl=" +
-                           classMetaData.getImpl());
-                     }
-                     binding.setClassMetaData(classMetaData);
-                  }
-
-                  ValueMetaData valueMetaData = appInfo.getValueMetaData();
-                  if(valueMetaData != null)
-                  {
-                     if(ctx.trace)
-                     {
-                        log.trace("simple type " +
-                           type.getName() +
-                           ": unmarshalMethod=" +
-                           valueMetaData.getUnmarshalMethod() +
-                           ", marshalMethod=" +
-                           valueMetaData.getMarshalMethod());
-                     }
-                     binding.setValueMetaData(valueMetaData);
-                  }
-               }
-            }
-         }
-      }
-
-      binding.setSchemaBinding(ctx.schema);
-
-      return binding;
-   }
-
-   private static TypeBinding bindComplexType(Context ctx, XSComplexTypeDefinition type)
-   {
-      QName typeName = type.getName() == null ? null : new QName(type.getNamespace(), type.getName());
-      TypeBinding binding = typeName == null ? null : ctx.schema.getType(typeName);
-      if(binding != null)
-      {
-         return binding;
-      }
-
-      XSTypeDefinition baseTypeDef = type.getBaseType();
-      // anyType is the parent of all the types, even the parent of itself according to xerces :)
-      TypeBinding baseType = null;
-      if(baseTypeDef != null && !Constants.QNAME_ANYTYPE.equals(typeName))
-      {
-         baseType = bindType(ctx, baseTypeDef);
-         // sometimes binding the base type can lead to another request
-         // to bind the type being bound here
-         if(typeName != null)
-         {
-            binding = ctx.schema.getType(typeName);
-            if(binding != null)
-            {
-               return binding;
-            }
-         }
-      }
-
-      if (ctx.trace)
-         log.trace("binding complex " + (typeName == null ? "anonymous type" : "type " + typeName));
-
-      binding = new TypeBinding(typeName);
-      binding.setBaseType(baseType);
-      binding.setStartElementCreatesObject(true);
-      binding.setSimple(false);
-
-      if(type.getSimpleType() != null)
-      {
-         TypeBinding simpleType = bindSimpleType(ctx, type.getSimpleType());
-         binding.setSimpleType(simpleType);
-      }
-      else if(type.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_MIXED)
-      {
-         TypeBinding stringType = ctx.schema.getType(Constants.QNAME_STRING);
-         if(stringType == null)
-         {
-            throw new JBossXBRuntimeException("xsd:string has not been bound yet!");
-         }
-         binding.setSimpleType(stringType);
-      }
-
-      if(typeName != null)
-      {
-         ctx.schema.addType(binding);
-      }
-
-      binding.setSchemaBinding(ctx.schema);
-
-      XSObjectList attrs = type.getAttributeUses();
-      if (ctx.trace)
-         log.trace(typeName + " attributes " + attrs.getLength());
-      for(int i = 0; i < attrs.getLength(); ++i)
-      {
-         XSAttributeUse attr = (XSAttributeUse)attrs.item(i);
-         bindAttributes(ctx, binding, attr);
-      }
-
-      // customize binding with xsd annotations
-      if (ctx.processAnnotations)
-      {
-         XSObjectList annotations = type.getAnnotations();
-         if(annotations != null)
-         {
-            if (ctx.trace)
-               log.trace(typeName + " annotations " + annotations.getLength());
-            for(int i = 0; i < annotations.getLength(); ++i)
-            {
-               XSAnnotation an = (XSAnnotation)annotations.item(i);
-               XsdAnnotation xsdAn = XsdAnnotation.unmarshal(an.getAnnotationString());
-               XsdAppInfo appInfo = xsdAn.getAppInfo();
-               if(appInfo != null)
-               {
-                  ClassMetaData classMetaData = appInfo.getClassMetaData();
-                  if(classMetaData != null)
-                  {
-                     if (ctx.trace)
-                     {
-                        log.trace("complex type " +
-                           type.getName() +
-                           ": impl=" +
-                           classMetaData.getImpl()
-                        );
-                     }
-                     binding.setClassMetaData(classMetaData);
-                  }
-
-                  CharactersMetaData charactersMetaData = appInfo.getCharactersMetaData();
-                  if(charactersMetaData != null)
-                  {
-                     if (ctx.trace)
-                     {
-                        PropertyMetaData propertyMetaData = charactersMetaData.getProperty();
-                        if(propertyMetaData != null)
-                        {
-                           log.trace("complex type " +
-                              type.getName() +
-                              ": characters bound to " + propertyMetaData.getName()
-                           );
-                        }
-
-                        ValueMetaData valueMetaData = charactersMetaData.getValue();
-                        if(valueMetaData != null)
-                        {
-                           log.trace("complex type " +
-                              type.getName() +
-                              ": characters unmarshalMethod=" +
-                              valueMetaData.getUnmarshalMethod() +
-                              ", marshalMethod=" + valueMetaData.getMarshalMethod()
-                           );
-                        }
-
-                        boolean mapEntryKey = appInfo.isMapEntryKey();
-                        if(mapEntryKey)
-                        {
-                           log.trace("complex type " +
-                              type.getName() +
-                              ": characters are bound as a key in a map entry"
-                           );
-                        }
-
-                        boolean mapEntryValue = appInfo.isMapEntryValue();
-                        if(mapEntryValue)
-                        {
-                           log.trace("complex type " +
-                              type.getName() +
-                              ": characters are bound as a value in a map entry"
-                           );
-                        }
-                     }
-                     binding.setCharactersMetaData(charactersMetaData);
-                  }
-
-                  MapEntryMetaData mapEntryMetaData = appInfo.getMapEntryMetaData();
-                  if(mapEntryMetaData != null)
-                  {
-                     if (ctx.trace)
-                     {
-                        log.trace("complex type " +
-                           type.getName() +
-                           " is bound to a map entry: impl=" +
-                           mapEntryMetaData.getImpl() +
-                           ", getKeyMethod=" +
-                           mapEntryMetaData.getGetKeyMethod() +
-                           ", setKeyMethod=" +
-                           mapEntryMetaData.getSetKeyMethod() +
-                           ", getValueMethod=" +
-                           mapEntryMetaData.getGetValueMethod() +
-                           ", setValueMethod=" +
-                           mapEntryMetaData.getSetValueMethod() +
-                           ", valueType=" +
-                           mapEntryMetaData.getValueType() +
-                           ", nonNullValue=" + mapEntryMetaData.isNonNullValue()
-                        );
-                     }
-
-                     if(classMetaData != null)
-                     {
-                        throw new JBossXBRuntimeException("Illegal binding: both jbxb:class and jbxb:mapEntry are specified for complex type " +
-                           type.getName()
-                        );
-                     }
-                     binding.setMapEntryMetaData(mapEntryMetaData);
-                  }
-
-                  boolean skip = appInfo.isSkip();
-                  if(skip)
-                  {
-                     if (ctx.trace)
-                     {
-                        log.trace("complex type " +
-                           type.getName() +
-                           ": elements of this type will be skipped; their attrs, character content " +
-                           "and elements will be set the parent."
-                        );
-                     }
-                     binding.setSkip(skip);
-                  }
-
-                  PropertyMetaData propertyMetaData = appInfo.getPropertyMetaData();
-                  if(propertyMetaData != null)
-                  {
-                     if (ctx.trace)
-                     {
-                        log.trace("complex type " +
-                           type.getName() +
-                           ": the content of elements of this type is bound to property " + propertyMetaData.getName()
-                        );
-                     }
-                     binding.setPropertyMetaData(propertyMetaData);
-                  }
-
-                  AddMethodMetaData addMethodMetaData = appInfo.getAddMethodMetaData();
-                  if(addMethodMetaData != null)
-                  {
-                     if (ctx.trace)
-                     {
-                        log.trace("complex type " +
-                           type.getName() +
-                           ": elements of this type will be added to parent objects with addMethod=" +
-                           addMethodMetaData.getMethodName() + ", valueType=" + addMethodMetaData.getValueType()
-                        );
-                     }
-                     binding.setAddMethodMetaData(addMethodMetaData);
-                  }
-               }
-            }
-         }
-      }
-
-      XSParticle particle = type.getParticle();
-      if(particle != null)
-      {
-         ctx.pushType(binding);
-         bindParticle(ctx, particle);
-         ctx.popType();
-      }
-
-      if(binding.hasOnlyXmlMimeAttributes())
-      {
-         addXOPInclude(binding, ctx.schema);
-      }
-
-      if(ctx.trace)
-      {
-         log.trace(typeName == null ? "bound complex anonymous type" : "bound complex type " + typeName);
-      }
-
-      return binding;
-   }
-
-   private static void bindAttributes(Context ctx, TypeBinding type, XSAttributeUse attrUse)
-   {
-      XSAttributeDeclaration attr = attrUse.getAttrDeclaration();
-      QName attrName = new QName(attr.getNamespace(), attr.getName());
-
-      if (ctx.trace)
-      {
-         log.trace("binding attribute " + attrName + " for " + type.getQName() + ", required=" + attrUse.getRequired());
-      }
-
-      XSSimpleTypeDefinition attrType = attr.getTypeDefinition();
-      TypeBinding typeBinding = bindSimpleType(ctx, attrType);
-      AttributeBinding binding = type.addAttribute(attrName, typeBinding, DefaultHandlers.ATTRIBUTE_HANDLER);
-      binding.setRequired(attrUse.getRequired());
-      if(attrUse.getConstraintType() == XSConstants.VC_DEFAULT)
-      {
-         // Associate the default value with the binding
-         binding.setDefaultConstraint(attrUse.getConstraintValue());
-      }
-
-      if (ctx.processAnnotations)
-      {
-         XSAnnotation an = attr.getAnnotation();
-         if(an != null)
-         {
-            if (ctx.trace)
-            {
-               log.trace(attrName + " attribute annotation");
-            }
-
-            XsdAnnotation xsdAn = XsdAnnotation.unmarshal(an.getAnnotationString());
-            XsdAppInfo appInfo = xsdAn.getAppInfo();
-            if(appInfo != null)
-            {
-               PropertyMetaData propertyMetaData = appInfo.getPropertyMetaData();
-               if(propertyMetaData != null)
-               {
-                  binding.setPropertyMetaData(propertyMetaData);
-               }
-
-               boolean mapEntryKey = appInfo.isMapEntryKey();
-               if(mapEntryKey)
-               {
-                  binding.setMapEntryKey(mapEntryKey);
-               }
-
-               boolean mapEntryValue = appInfo.isMapEntryValue();
-               if(mapEntryValue)
-               {
-                  binding.setMapEntryValue(mapEntryValue);
-               }
-            }
-         }
-      }
-
-
-      if (ctx.trace)
-      {
-         String msg = "bound attribute " + attrName;
-
-         if(binding.getPropertyMetaData() != null)
-         {
-            msg += " property=" +
-               binding.getPropertyMetaData().getName() +
-               ", collectionType=" + binding.getPropertyMetaData().getCollectionType();
-         }
-         else if(binding.isMapEntryKey())
-         {
-            msg += "bound as a key in a map entry";
-         }
-         else if(binding.isMapEntryValue())
-         {
-            msg += "bound as a value in a map entry";
-         }
-         else
-         {
-            msg += " type=" + attrType.getName() + ", owner type=" + type.getQName();
-         }
-
-         if(binding.getDefaultConstraint() != null)
-         {
-            msg += ", default=" + binding.getDefaultConstraint();
-         }
-
-         log.trace(msg);
-      }
-   }
-
-   private static void bindParticle(Context ctx, XSParticle particle)
-   {
-      XSTerm term = particle.getTerm();
-      switch(term.getType())
-      {
-         case XSConstants.MODEL_GROUP:
-            XSModelGroup modelGroup = (XSModelGroup)term;
-            // todo: investigate this
-            if(modelGroup.getParticles().getLength() > 0)
-            {
-               ModelGroupBinding groupBinding;
-               switch(modelGroup.getCompositor())
-               {
-                  case XSModelGroup.COMPOSITOR_ALL:
-                     groupBinding = new AllBinding(ctx.schema);
-                     break;
-                  case XSModelGroup.COMPOSITOR_CHOICE:
-                     groupBinding = new ChoiceBinding(ctx.schema);
-                     break;
-                  case XSModelGroup.COMPOSITOR_SEQUENCE:
-                     groupBinding = new SequenceBinding(ctx.schema);
-                     break;
-                  default:
-                     throw new JBossXBRuntimeException("Unexpected model group: " + modelGroup.getCompositor());
-               }
-
-               ParticleBinding particleBinding = new ParticleBinding(groupBinding);
-               particleBinding.setMaxOccursUnbounded(particle.getMaxOccursUnbounded());
-               particleBinding.setMinOccurs(particle.getMinOccurs());
-               particleBinding.setMaxOccurs(particle.getMaxOccurs());
-
-               if (ctx.trace)
-               {
-                  log.trace("created model group " + groupBinding);
-               }
-
-               if (ctx.processAnnotations)
-               {
-                  XSAnnotation annotation = modelGroup.getAnnotation();
-                  if(annotation != null)
-                  {
-                     customizeTerm(annotation, groupBinding, ctx.trace);
-                  }
-               }
-
-               Object o = ctx.peekTypeOrGroup();
-               if(o instanceof ModelGroupBinding)
-               {
-                  ModelGroupBinding parentGroup = (ModelGroupBinding)o;
-                  parentGroup.addParticle(particleBinding);
-                  if (ctx.trace)
-                  {
-                     log.trace("added " + groupBinding + " to " + parentGroup);
-                  }
-               }
-               else if(o instanceof TypeBinding)
-               {
-                  TypeBinding typeBinding = (TypeBinding)o;
-                  typeBinding.setParticle(particleBinding);
-                  if (ctx.trace)
-                  {
-                     log.trace("added " + groupBinding + " to type " + typeBinding.getQName());
-                  }
-               }
-
-               ctx.pushModelGroup(groupBinding);
-               bindModelGroup(ctx, modelGroup);
-               ctx.popModelGroup();
-            }
-            break;
-         case XSConstants.WILDCARD:
-            bindWildcard(ctx, particle);
-            break;
-         case XSConstants.ELEMENT_DECLARATION:
-            bindElement(ctx,
-               (XSElementDeclaration)term,
-               particle.getMinOccurs(),
-               particle.getMaxOccurs(),
-               particle.getMaxOccursUnbounded()
-            );
-            break;
-         default:
-            throw new IllegalStateException("Unexpected term type: " + term.getType());
-      }
-   }
-
-   private static void bindWildcard(Context ctx, XSParticle particle)
-   {
-      WildcardBinding binding = new WildcardBinding(ctx.schema);
-
-      ModelGroupBinding group = (ModelGroupBinding)ctx.peekTypeOrGroup();
-      ParticleBinding particleBinding = new ParticleBinding(binding);
-      particleBinding.setMaxOccurs(particle.getMaxOccurs());
-      particleBinding.setMaxOccursUnbounded(particle.getMaxOccursUnbounded());
-      particleBinding.setMinOccurs(particle.getMinOccurs());
-      group.addParticle(particleBinding);
-
-      TypeBinding type = ctx.peekType();
-      type.setWildcard(binding);
-
-      if (ctx.trace)
-      {
-         log.trace("added wildcard to " + group);
-         log.trace("added wildcard to type " + type.getQName());
-      }
-
-      XSWildcard wildcard = (XSWildcard)particle.getTerm();
-      if(wildcard.getName() != null)
-      {
-         binding.setQName(new QName(wildcard.getNamespace(), wildcard.getName()));
-      }
-
-      binding.setProcessContents(wildcard.getProcessContents());
-
-      if (ctx.processAnnotations)
-      {
-         XSAnnotation annotation = wildcard.getAnnotation();
-         if(annotation != null)
-         {
-            customizeTerm(annotation, binding, ctx.trace);
-         }
-      }
-   }
-
-   private static ParticleBinding bindElement(Context ctx,
-                                              XSElementDeclaration elementDec,
-                                              int minOccurs,
-                                              int maxOccurs,
-                                              boolean maxOccursUnbounded)
-   {
-      QName qName = new QName(elementDec.getNamespace(), elementDec.getName());
-
-      ModelGroupBinding parentGroup = (ModelGroupBinding)ctx.peekTypeOrGroup();
-
-      boolean global = elementDec.getScope() == XSConstants.SCOPE_GLOBAL;
-      ElementBinding element = ctx.schema.getElement(qName);
-      ParticleBinding particle;
-      if(global && element != null)
-      {
-         particle = new ParticleBinding(element);
-         if(parentGroup != null)
-         {
-            parentGroup.addParticle(particle);
-         }
-
-         particle.setMinOccurs(minOccurs);
-         if(maxOccursUnbounded)
-         {
-            particle.setMaxOccursUnbounded(maxOccursUnbounded);
-         }
-         else
-         {
-            particle.setMaxOccurs(maxOccurs);
-         }
-
-         return particle;
-      }
-
-      TypeBinding type = null;
-
-      boolean shared = ctx.sharedElements.isShared(elementDec);
-      if(shared)
-      {
-         type = ctx.sharedElements.getTypeBinding(elementDec);
-      }
-
-      if(type == null)
-      {
-         type = bindType(ctx, elementDec.getTypeDefinition());
-         if(shared)
-         {
-            ctx.sharedElements.setTypeBinding(elementDec, type);
-         }
-      }
-
-      element = new ElementBinding(ctx.schema, qName, type);
-      element.setNillable(elementDec.getNillable());
-      particle = new ParticleBinding(element);
-      particle.setMinOccurs(minOccurs);
-      particle.setMaxOccurs(maxOccurs);
-      particle.setMaxOccursUnbounded(maxOccursUnbounded);
-      if(global)
-      {
-         ctx.schema.addElementParticle(particle);
-      }
-
-      if(parentGroup != null)
-      {
-         parentGroup.addParticle(particle);
-         if (ctx.trace)
-         {
-            log.trace("Element " + element.getQName() + " added to " + parentGroup);
-         }
-      }
-
-      if (ctx.trace)
-      {
-         TypeBinding parentType = ctx.peekType();
-         log.trace("element: name=" +
-            qName +
-            ", type=" +
-            type.getQName() +
-            ", repeatable=" +
-            particle.isRepeatable() +
-            ", nillable=" +
-            element.isNillable() +
-            ", minOccurs=" + minOccurs +
-            ", maxOccurs=" + (maxOccursUnbounded ? "unbounded" : "" + maxOccurs) +
-            ", " + (global ? "global scope" : " owner type=" + parentType.getQName())
-         );
-      }
-
-      // customize element with annotations
-      if (ctx.processAnnotations)
-      {
-         XSAnnotation an = elementDec.getAnnotation();
-         if(an != null)
-         {
-            customizeTerm(an, element, ctx.trace);
-         }
-      }
-      return particle;
-   }
-
-   private static void bindModelGroup(Context ctx, XSModelGroup modelGroup)
-   {
-      XSObjectList particles = modelGroup.getParticles();
-      for(int i = 0; i < particles.getLength(); ++i)
-      {
-         XSParticle particle = (XSParticle)particles.item(i);
-         bindParticle(ctx, particle);
-      }
-   }
-
-   // Private
-
-   private static void addXOPInclude(TypeBinding binding, SchemaBinding schema)
-   {
-      binding.setHandler(DefaultHandlers.XOP_HANDLER);
-      if(binding.getParticle() != null)
-      {
-         throw new JBossXBRuntimeException(
-            "XOP optimizable type has a particle which is unexpected, please, open a JIRA issue!"
-         );
-      }
-
-      TypeBinding anyUriType = schema.getType(Constants.QNAME_ANYURI);
-      if(anyUriType == null)
-      {
-         log.warn("Type " + Constants.QNAME_ANYURI + " not bound.");
-      }
-
-      TypeBinding xopIncludeType = new TypeBinding(new QName(Constants.NS_XOP_INCLUDE, "Include"));
-      xopIncludeType.setSchemaBinding(schema);
-      xopIncludeType.addAttribute(new QName("href"), anyUriType, DefaultHandlers.ATTRIBUTE_HANDLER);
-      xopIncludeType.setHandler(new XOPIncludeHandler(binding));
-
-      ElementBinding xopInclude = new ElementBinding(schema, new QName(Constants.NS_XOP_INCLUDE, "Include"), xopIncludeType);
-
-      ParticleBinding particleBinding = new ParticleBinding(xopInclude);
-      particleBinding.setMinOccurs(0);
-
-      binding.addParticle(particleBinding);
-   }
-
-   private static void customizeTerm(XSAnnotation an, TermBinding term, boolean trace)
-   {
-      XsdAnnotation xsdAn = XsdAnnotation.unmarshal(an.getAnnotationString());
-      XsdAppInfo appInfo = xsdAn.getAppInfo();
-      if(appInfo != null)
-      {
-         Boolean skip = null;
-
-         ClassMetaData classMetaData = appInfo.getClassMetaData();
-         if(classMetaData != null)
-         {
-            if (trace)
-            {
-               String msg;
-               if(term.isModelGroup())
-               {
-                  msg = term + " bound to ";
-               }
-               else if(term.isWildcard())
-               {
-                  msg = " wildcard bound to ";
-               }
-               else
-               {
-                  msg = "element: name=" + ((ElementBinding)term).getQName() + ", class=";
-               }
-
-               msg += classMetaData.getImpl();
-               log.trace(msg);
-            }
-            term.setClassMetaData(classMetaData);
-            skip = Boolean.FALSE;
-         }
-
-         PropertyMetaData propertyMetaData = appInfo.getPropertyMetaData();
-         if(propertyMetaData != null)
-         {
-            if (trace)
-            {
-               String msg = term.isWildcard() || term.isModelGroup() ? term + " " : "element: name=" +
-                  ((ElementBinding)term).getQName() + ", ";
-               msg += " property=" +
-                  propertyMetaData.getName() +
-                  ", collectionType=" + propertyMetaData.getCollectionType();
-               log.trace(msg);
-            }
-            term.setPropertyMetaData(propertyMetaData);
-         }
-
-         MapEntryMetaData mapEntryMetaData = appInfo.getMapEntryMetaData();
-         if(mapEntryMetaData != null)
-         {
-            if(propertyMetaData != null)
-            {
-               String msg = "A term can be bound either as a property or as a map" +
-                  " entry but not both: " +
-                  (term.isModelGroup() ? term.toString() : ((ElementBinding)term).getQName().toString());
-               throw new JBossXBRuntimeException(msg);
-            }
-
-            if (trace)
-            {
-               String msg = term.isWildcard() || term.isModelGroup() ? term.toString() : "element name=" +
-                  ((ElementBinding)term).getQName();
-
-               msg += " is bound to a map entry: impl=" +
-                  mapEntryMetaData.getImpl() +
-                  ", getKeyMethod=" +
-                  mapEntryMetaData.getGetKeyMethod() +
-                  ", setKeyMethod=" +
-                  mapEntryMetaData.getSetKeyMethod() +
-                  ", getValueMethod=" +
-                  mapEntryMetaData.getGetValueMethod() +
-                  ", setValueMethod=" +
-                  mapEntryMetaData.getSetValueMethod() +
-                  ", valueType=" +
-                  mapEntryMetaData.getValueType() +
-                  ", nonNullValue=" + mapEntryMetaData.isNonNullValue();
-               log.trace(msg);
-            }
-
-            if(classMetaData != null)
-            {
-               String msg = "Invalid customization: both jbxb:class and jbxb:mapEntry are specified for term " +
-                  (term.isWildcard() || term.isModelGroup() ? term.toString() : ((ElementBinding)term).getQName().toString());
-               throw new JBossXBRuntimeException(msg);
-            }
-            term.setMapEntryMetaData(mapEntryMetaData);
-            skip = Boolean.FALSE;
-         }
-
-         PutMethodMetaData putMethodMetaData = appInfo.getPutMethodMetaData();
-         if(putMethodMetaData != null)
-         {
-            if (trace)
-            {
-               String msg = term.isWildcard() || term.isModelGroup() ? term.toString() : "element: name=" +
-                  ((ElementBinding)term).getQName() + ",";
-
-               msg += " putMethod=" +
-                  putMethodMetaData.getName() +
-                  ", keyType=" +
-                  putMethodMetaData.getKeyType() +
-                  ", valueType=" + putMethodMetaData.getValueType();
-               log.trace(msg);
-            }
-            term.setPutMethodMetaData(putMethodMetaData);
-         }
-
-         AddMethodMetaData addMethodMetaData = appInfo.getAddMethodMetaData();
-         if(addMethodMetaData != null)
-         {
-            if (trace)
-            {
-               String msg = term.isWildcard() || term.isModelGroup() ? term.toString() : "element: name=" +
-                  ((ElementBinding)term).getQName() + ",";
-               msg += " addMethod=" +
-                  addMethodMetaData.getMethodName() +
-                  ", valueType=" +
-                  addMethodMetaData.getValueType() +
-                  ", isChildType=" + addMethodMetaData.isChildType();
-               log.trace(msg);
-            }
-            term.setAddMethodMetaData(addMethodMetaData);
-         }
-
-         ValueMetaData valueMetaData = appInfo.getValueMetaData();
-         if(valueMetaData != null)
-         {
-            if (trace)
-            {
-               String msg = term.isWildcard() || term.isModelGroup() ? term.toString() : "element " +
-                  ((ElementBinding)term).getQName();
-               msg += ": unmarshalMethod=" + valueMetaData.getUnmarshalMethod();
-               log.trace(msg);
-            }
-            term.setValueMetaData(valueMetaData);
-         }
-
-         boolean mapEntryKey = appInfo.isMapEntryKey();
-         if(mapEntryKey)
-         {
-            if (trace)
-            {
-               String msg = term.isWildcard() || term.isModelGroup() ? term.toString() : "element name=" +
-                  ((ElementBinding)term).getQName();
-               msg += ": is bound to a key in a map entry";
-               log.trace(msg);
-            }
-            term.setMapEntryKey(mapEntryKey);
-            skip = Boolean.FALSE;
-         }
-
-         boolean mapEntryValue = appInfo.isMapEntryValue();
-         if(mapEntryValue)
-         {
-            if (trace)
-            {
-               String msg = term.isWildcard() || term.isModelGroup() ? term.toString() : "element name=" +
-                  ((ElementBinding)term).getQName();
-               msg += ": is bound to a value in a map entry";
-               log.trace(msg);
-            }
-            term.setMapEntryValue(mapEntryValue);
-            skip = Boolean.FALSE;
-         }
-
-         boolean skipAnnotation = appInfo.isSkip();
-         if(skip != null)
-         {
-            term.setSkip(skip);
-         }
-         else if(skipAnnotation)
-         {
-            if (trace)
-            {
-               String msg = term.isWildcard() || term.isModelGroup() ? term.toString() : "element name=" +
-                  ((ElementBinding)term).getQName();
-               msg += ": will be skipped, it's attributes, character content and children will be set on the parent";
-               log.trace(msg);
-            }
-            term.setSkip(skipAnnotation ? Boolean.TRUE : Boolean.FALSE);
-         }
-      }
-   }
-
-   private static void bindGlobalGroup(XSModelGroup group, SharedElements sharedElements)
-   {
-      XSObjectList particles = group.getParticles();
-      for(int j = 0; j < particles.getLength(); ++j)
-      {
-         XSParticle particle = (XSParticle)particles.item(j);
-         XSTerm term = particle.getTerm();
-         switch(term.getType())
-         {
-            case XSConstants.ELEMENT_DECLARATION:
-               XSElementDeclaration element = ((XSElementDeclaration)term);
-               sharedElements.add(element);
-               break;
-            case XSConstants.WILDCARD:
-               // todo is it actually possible?
-               break;
-            case XSConstants.MODEL_GROUP:
-               bindGlobalGroup((XSModelGroup)term, sharedElements);
-         }
-      }
-   }
-
-
-   // Inner
-
-   private static final class SharedElements
-   {
-      private Map elements = Collections.EMPTY_MAP;
-
-      public void add(XSElementDeclaration element)
-      {
-         switch(elements.size())
-         {
-            case 0:
-               elements = Collections.singletonMap(element, null);
-               break;
-            case 1:
-               elements = new HashMap(elements);
-            default:
-               elements.put(element, null);
-         }
-      }
-
-      public boolean isShared(XSElementDeclaration element)
-      {
-         return elements.containsKey(element);
-      }
-
-      public TypeBinding getTypeBinding(XSElementDeclaration element)
-      {
-         return (TypeBinding)elements.get(element);
-      }
-
-      public void setTypeBinding(XSElementDeclaration element, TypeBinding type)
-      {
-         switch(elements.size())
-         {
-            case 0:
-               elements = Collections.singletonMap(element, type);
-               break;
-            case 1:
-               elements = new HashMap(elements);
-            default:
-               elements.put(element, type);
-         }
-      }
-   }
-
-   private static final class Context
-   {
-      public final SchemaBinding schema;
-      public SharedElements sharedElements = new SharedElements();
-      public boolean processAnnotations = true;
-      public boolean trace = log.isTraceEnabled();
-      private final List typeGroupStack = new ArrayList();
-
-      public Context()
-      {
-         this(new SchemaBinding());
-      }
-
-      public Context(SchemaBinding schema)
-      {
-         this.schema = schema;
-      }
-
-      public void popType()
-      {
-         Object o = typeGroupStack.remove(typeGroupStack.size() - 1);
-         if(!(o instanceof TypeBinding))
-         {
-            throw new JBossXBRuntimeException("Should have poped type binding but got " + o);
-         }
-      }
-
-      public void pushType(TypeBinding binding)
-      {
-         typeGroupStack.add(binding);
-      }
-
-      public void popModelGroup()
-      {
-         Object o = typeGroupStack.remove(typeGroupStack.size() - 1);
-         if(!(o instanceof ModelGroupBinding))
-   {
-            throw new JBossXBRuntimeException("Should have poped model group binding but got " + o);
-         }
-      }
-
-      public void pushModelGroup(ModelGroupBinding binding)
-      {
-         typeGroupStack.add(binding);
-      }
-
-      public Object peekTypeOrGroup()
-      {
-         return typeGroupStack.isEmpty() ? null : typeGroupStack.get(typeGroupStack.size() - 1);
-      }
-
-      public TypeBinding peekType()
-      {
-         TypeBinding binding = null;
-         for(ListIterator i = typeGroupStack.listIterator(typeGroupStack.size()); i.hasPrevious();)
-         {
-            Object o = i.previous();
-            if(o instanceof TypeBinding)
-            {
-               binding = (TypeBinding)o;
-               break;
-            }
-         }
-         return binding;
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinder.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinder.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderLoggingErrorHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderLoggingErrorHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderLoggingErrorHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,63 +0,0 @@
-/**
- * 
- */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import org.w3c.dom.DOMError;
-import org.w3c.dom.DOMErrorHandler;
-import org.w3c.dom.DOMLocator;
-
-public class XsdBinderLoggingErrorHandler implements DOMErrorHandler
-{
-   private static XsdBinderLoggingErrorHandler errorHandler;
-
-   // Hide constructor
-   private XsdBinderLoggingErrorHandler()
-   {
-   }
-
-   public static XsdBinderLoggingErrorHandler newInstance()
-   {
-      if (errorHandler == null)
-      {
-         errorHandler = new XsdBinderLoggingErrorHandler();
-      }
-      return errorHandler;
-   }
-
-   public boolean handleError(DOMError error)
-   {
-      // todo: i do throw exceptions here instead of returning false to stop parsing immediately
-      // since returning false seems to be no different from true (a bug in the parser?)
-      // Although, throwing an exception reports the same error twice but the second time with
-      // location -1:-1
-      switch (error.getSeverity())
-      {
-         case DOMError.SEVERITY_ERROR:
-            XsdBinder.log.error(formatMessage(error));
-         case DOMError.SEVERITY_FATAL_ERROR:
-            XsdBinder.log.fatal(formatMessage(error));
-         case DOMError.SEVERITY_WARNING:
-            XsdBinder.log.warn(formatMessage(error));
-            break;
-      }
-      return false;
-   }
-
-   String formatMessage(DOMError error)
-   {
-      StringBuffer buf = new StringBuffer();
-      DOMLocator location = error.getLocation();
-      if (location != null)
-      {
-         buf.append(location.getLineNumber()).append(':').append(location.getColumnNumber());
-      }
-      else
-      {
-         buf.append("[location unavailable]");
-      }
-
-      buf.append(' ').append(error.getMessage());
-      return buf.toString();
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderLoggingErrorHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderLoggingErrorHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderTerminatingErrorHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderTerminatingErrorHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderTerminatingErrorHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,66 +0,0 @@
-/**
- * 
- */
-package org.jboss.xb.binding.sunday.unmarshalling;
-
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.w3c.dom.DOMError;
-import org.w3c.dom.DOMErrorHandler;
-import org.w3c.dom.DOMLocator;
-
-public class XsdBinderTerminatingErrorHandler implements DOMErrorHandler
-{
-   private static XsdBinderTerminatingErrorHandler errorHandler;
-
-   // Hide constructor
-   private XsdBinderTerminatingErrorHandler()
-   {
-   }
-   
-   public static XsdBinderTerminatingErrorHandler newInstance()
-   {
-      if (errorHandler == null)
-      {
-         errorHandler = new XsdBinderTerminatingErrorHandler();
-      }
-      return errorHandler;
-   }
-
-   public boolean handleError(DOMError error)
-   {
-      // todo: i do throw exceptions here instead of returning false to stop parsing immediately
-      // since returning false seems to be no different from true (a bug in the parser?)
-      // Although, throwing an exception reports the same error twice but the second time with
-      // location -1:-1
-      switch(error.getSeverity())
-      {
-         case DOMError.SEVERITY_ERROR:
-            throw new JBossXBRuntimeException(formatMessage(error));
-         case DOMError.SEVERITY_FATAL_ERROR:
-            throw new JBossXBRuntimeException(formatMessage(error));
-         case DOMError.SEVERITY_WARNING:
-            XsdBinder.log.warn(formatMessage(error));
-            break;
-      }
-      return false;
-   }
-
-   String formatMessage(DOMError error)
-   {
-      StringBuffer buf = new StringBuffer();
-      DOMLocator location = error.getLocation();
-      if(location != null)
-      {
-         buf.append(location.getLineNumber())
-            .append(':')
-            .append(location.getColumnNumber());
-      }
-      else
-      {
-         buf.append("[location unavailable]");
-      }
-
-      buf.append(' ').append(error.getMessage());
-      return buf.toString();
-   }
-}
\ No newline at end of file

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderTerminatingErrorHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/XsdBinderTerminatingErrorHandler.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/MapEntry.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/MapEntry.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/MapEntry.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,104 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling.impl.runtime;
-
-import org.jboss.xb.binding.JBossXBRuntimeException;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class MapEntry
-{
-   private Object key;
-   private Object value;
-
-   public Object getKey()
-   {
-      return key;
-   }
-
-   public void setKey(Object key)
-   {
-      if(this.key != null)
-      {
-         throw new JBossXBRuntimeException(
-            "The key is already set: current value=" + this.key + ", overriding value=" + key
-         );
-      }
-      this.key = key;
-   }
-
-   public Object getValue()
-   {
-      return value;
-   }
-
-   public void setValue(Object value)
-   {
-      if(this.value != null)
-      {
-         throw new JBossXBRuntimeException(
-            "The value is already set: current value=" + this.value + ", overriding value=" + value
-         );
-      }
-      this.value = value;
-   }
-
-   public boolean equals(Object o)
-   {
-      if(this == o)
-      {
-         return true;
-      }
-      if(!(o instanceof MapEntry))
-      {
-         return false;
-      }
-
-      final MapEntry mapEntry = (MapEntry)o;
-
-      if(key != null ? !key.equals(mapEntry.key) : mapEntry.key != null)
-      {
-         return false;
-      }
-      if(value != null ? !value.equals(mapEntry.value) : mapEntry.value != null)
-      {
-         return false;
-      }
-
-      return true;
-   }
-
-   public int hashCode()
-   {
-      int result;
-      result = (key != null ? key.hashCode() : 0);
-      result = 29 * result + (value != null ? value.hashCode() : 0);
-      return result;
-   }
-
-   public String toString()
-   {
-      return "[map-entry key=" + key + ", value=" + value + "]";
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/MapEntry.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/MapEntry.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtAttributeHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtAttributeHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtAttributeHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,94 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling.impl.runtime;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.xb.binding.GenericValueContainer;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.Util;
-import org.jboss.xb.binding.group.ValueList;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeHandler;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class RtAttributeHandler
-   extends AttributeHandler
-{
-   public static final RtAttributeHandler INSTANCE = new RtAttributeHandler();
-
-   public void attribute(QName elemName, QName attrName, AttributeBinding binding, Object owner, Object value)
-   {
-      if(owner instanceof MapEntry)
-      {
-         if(binding.isMapEntryKey())
-         {
-            ((MapEntry)owner).setKey(value);
-         }
-         else if(binding.isMapEntryValue())
-         {
-            ((MapEntry)owner).setValue(value);
-         }
-         else
-         {
-            throw new JBossXBRuntimeException(
-               "Parent object is a map entry but attribute " +
-               attrName +
-               " in element " +
-               elemName +
-               " bound to neither key nor value in a map entry."
-            );
-         }
-      }
-      else if(owner instanceof GenericValueContainer)
-      {
-         ((GenericValueContainer)owner).addChild(attrName, value);         
-      }
-      else if(owner instanceof ValueList)
-      {
-         ValueList valueList = (ValueList)owner;
-         valueList.getInitializer().addAttributeValue(attrName, binding, valueList, value);
-      }
-      else
-      {
-         String property = null;
-         PropertyMetaData propertyMetaData = binding.getPropertyMetaData();
-         if(propertyMetaData != null)
-         {
-            property = propertyMetaData.getName();
-         }
-
-         if(property == null)
-         {
-            property = Util.xmlNameToFieldName(attrName.getLocalPart(), binding.getSchema().isIgnoreLowLine());
-         }
-
-         RtUtil.set(owner, value, property, null,
-            binding.getSchema().isIgnoreUnresolvedFieldOrClass(),
-            binding.getValueAdapter());
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtAttributeHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtAttributeHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtCharactersHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtCharactersHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtCharactersHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,212 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling.impl.runtime;
-
-import java.lang.reflect.Method;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.Util;
-import org.jboss.xb.binding.metadata.CharactersMetaData;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-import org.jboss.util.Classes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class RtCharactersHandler
-   extends CharactersHandler
-{
-   public static final RtCharactersHandler INSTANCE = new RtCharactersHandler();
-
-   public Object unmarshal(QName qName,
-                           TypeBinding typeBinding,
-                           NamespaceContext nsCtx,
-                           ValueMetaData valueMetaData,
-                           String value)
-   {
-      Object unmarshalled = null;
-      if(valueMetaData != null)
-      {
-         Method unmarshalMethod = RtUtil.getUnmarshalMethod(qName, valueMetaData);
-         Object args[] = unmarshalMethod.getParameterTypes().length == 1 ?
-            new Object[]{value} :
-            new Object[]{value, nsCtx};
-         unmarshalled = RtUtil.invokeUnmarshalMethod(unmarshalMethod, args, qName);
-      }
-      else
-      {
-         unmarshalled = super.unmarshal(qName, typeBinding, nsCtx, valueMetaData, value);
-
-         if(typeBinding.isSimple())
-         {
-            String clsName = null;
-            boolean failIfNotFound = false;
-            if(typeBinding.getClassMetaData() != null)
-            {
-               clsName = typeBinding.getClassMetaData().getImpl();
-               failIfNotFound = true;
-            }
-            else
-            {
-               QName typeName = typeBinding.getQName();
-               if(typeName != null && !Constants.NS_XML_SCHEMA.equals(typeName.getNamespaceURI()))
-               {
-                  boolean ignoreLowLine = typeBinding.getSchemaBinding() != null ?
-                     typeBinding.getSchemaBinding().isIgnoreLowLine() :
-                     true;
-                  clsName =
-                     Util.xmlNameToClassName(typeName.getNamespaceURI(), typeName.getLocalPart(), ignoreLowLine);
-               }
-            }
-
-            Class cls = clsName == null ? null : RtUtil.loadClass(clsName, failIfNotFound);
-            if(cls != null && !cls.isPrimitive())
-            {
-               // I assume if it doesn't have ctors, there should be static fromValue
-               // method like it is defined for enum types in JAXB2.0
-               // for java5 cls.isEnum() should be used instead
-               if(cls.getConstructors().length == 0)
-               {
-                  Class valueType = unmarshalled.getClass();
-                  // todo: this should be used in combination element.isNillable...
-                  if(Classes.isPrimitiveWrapper(valueType))
-                  {
-                     valueType = Classes.getPrimitive(valueType);
-                  }
-
-                  // it should probably invoke fromValue even if unmarshalled is null
-                  unmarshalled = unmarshalled == null ? null :
-                     RtUtil.invokeUnmarshalMethod(cls, "fromValue", unmarshalled, valueType, nsCtx, qName);
-               }
-               else
-               {
-                  throw new JBossXBRuntimeException("This case is not yet supported (create a feature request): " +
-                     "simple type (" +
-                     typeBinding.getQName() +
-                     ") is bound to a class (" +
-                     cls +
-                     ") with optional property metadata with " +
-                     "default value for the property name 'value'."
-                  );
-               }
-            }
-         }
-      }
-
-      return unmarshalled;
-   }
-
-   public void setValue(QName qName, ElementBinding element, Object owner, Object value)
-   {
-      //todo: assert if type is not null it must simple...
-
-      if(owner != null) // todo: owner should never be null
-      {
-         if(owner instanceof MapEntry)
-         {
-            TypeBinding type = element.getType();
-            CharactersMetaData characters = type.getCharactersMetaData();
-            if(characters != null)
-            {
-               if(characters.isMapEntryKey())
-               {
-                  ((MapEntry)owner).setKey(value);
-               }
-               else if(characters.isMapEntryValue())
-               {
-                  ((MapEntry)owner).setValue(value);
-               }
-               else
-               {
-                  throw new JBossXBRuntimeException("Parent object is a map entry but characters of element " +
-                     qName +
-                     " of type " +
-                     type.getQName() +
-                     " were bound to niether key nor value in a map entry."
-                  );
-               }
-            }
-            else
-            {
-               throw new JBossXBRuntimeException("Parent object is a map entry but characters of element " +
-                  qName +
-                  " of type " +
-                  type.getQName() +
-                  " were bound to niether key nor value in a map entry."
-               );
-            }
-         }
-         else
-         {
-            String propName = null;
-            String colType = null;
-            TypeBinding type = element.getType();
-            if(type != null && !type.isSimple()/* && type.hasSimpleContent()*/)
-            {
-               PropertyMetaData propertyMetaData = type.getPropertyMetaData();
-               if(propertyMetaData == null)
-               {
-                  CharactersMetaData charactersMetaData = type.getCharactersMetaData();
-                  propertyMetaData = charactersMetaData == null ? null : charactersMetaData.getProperty();
-               }
-
-               if(propertyMetaData != null)
-               {
-                  propName = propertyMetaData.getName();
-                  colType = propertyMetaData.getCollectionType();
-               }
-
-               if(propName == null)
-               {
-                  propName = type.getSchemaBinding().getSimpleContentProperty();
-               }
-            }
-            else
-            {
-               PropertyMetaData PropertyMetaData = element.getPropertyMetaData();
-               if(PropertyMetaData != null)
-               {
-                  propName = PropertyMetaData.getName();
-                  colType = PropertyMetaData.getCollectionType();
-               }
-
-               if(propName == null)
-               {
-                  propName = Util.xmlNameToFieldName(qName.getLocalPart(), element.getSchema().isIgnoreLowLine());
-               }
-            }
-
-            RtUtil.set(owner, value, propName, colType,
-               element.getSchema().isIgnoreUnresolvedFieldOrClass(),
-               element.getValueAdapter()
-            );
-         }
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtCharactersHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtCharactersHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtElementHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtElementHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtElementHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1457 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling.impl.runtime;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-import org.jboss.util.Classes;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.GenericValueContainer;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.jboss.xb.binding.Util;
-import org.jboss.xb.binding.introspection.FieldInfo;
-import org.jboss.xb.binding.group.ValueList;
-import org.jboss.xb.binding.group.ValueListHandler;
-import org.jboss.xb.binding.group.ValueListInitializer;
-import org.jboss.xb.binding.metadata.AddMethodMetaData;
-import org.jboss.xb.binding.metadata.ClassMetaData;
-import org.jboss.xb.binding.metadata.MapEntryMetaData;
-import org.jboss.xb.binding.metadata.PackageMetaData;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.metadata.PutMethodMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TermBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class RtElementHandler
-   implements ParticleHandler
-{
-   private static final Logger log = Logger.getLogger(RtElementHandler.class);
-
-   public static final RtElementHandler INSTANCE = new RtElementHandler();
-   
-   // ParticleHandler impl
-
-   /**
-    * TODO: it seems like for correct type resolution in startParticle
-    * I should take into account the way the object is going to be added
-    * to the parent in setParent (and, hence, do some steps that are done in setParticle).
-    * In setParent then I should reuse the results of what has been done in startParticle.
-    */
-   public Object startParticle(Object parent,
-                               QName elementName,
-                               ParticleBinding particle,
-                               Attributes attrs,
-                               NamespaceContext nsCtx)
-   {
-      TermBinding term = particle.getTerm();
-      Object o = startElement(parent, elementName, particle);
-      if(!term.isModelGroup())
-      {
-         ElementBinding element = (ElementBinding)term;
-         if(o != null)
-         {
-            attrs = element.getType().expandWithDefaultAttributes(attrs);
-            attributes(o, elementName, element, attrs, nsCtx);
-         }
-      }
-      return o;
-   }
-
-   public void setParent(Object parent,
-                         Object o,
-                         QName qName,
-                         ParticleBinding particle,
-                         ParticleBinding parentParticle)
-   {
-      TermBinding term = particle.getTerm();
-      if(term.isSkip())
-      {
-         return;
-      }
-
-      boolean trace = log.isTraceEnabled();
-      if(trace)
-      {
-         log.trace("setParent " + qName + " parent=" + parent + " object=" + o + " term=" + term);
-      }
-
-      TermBinding parentTerm = parentParticle.getTerm();
-
-      if(term.isMapEntryKey())
-      {
-         if(trace)
-         {
-            log.trace("setParent " + qName + " mapKey");
-         }
-
-         if(parent instanceof MapEntry)
-         {
-            MapEntry mapEntry = (MapEntry)parent;
-            mapEntry.setKey(o);
-         }
-         else if(parentTerm != null)
-         {
-            MapEntryMetaData mapEntryMetaData = getMapEntryMetaData(parentTerm, qName);
-
-            String getKeyMethodName = mapEntryMetaData.getGetKeyMethod();
-            if(getKeyMethodName == null)
-            {
-               getKeyMethodName = "getKey";
-            }
-
-            String setKeyMethodName = mapEntryMetaData.getSetKeyMethod();
-            if(setKeyMethodName == null)
-            {
-               setKeyMethodName = "setKey";
-            }
-
-            Class parentCls = parent.getClass();
-            Method setKeyMethod = getSetMethod(parentCls, getKeyMethodName, setKeyMethodName);
-            invokeSetter(setKeyMethod, parent, o, setKeyMethodName);
-         }
-         else
-         {
-            throw new JBossXBRuntimeException(
-               "Element " +
-               qName +
-               " bound as map entry key but parent element is not recognized as map entry and its metadata is not available."
-            );
-         }
-      }
-      else if(term.isMapEntryValue())
-      {
-         if(trace)
-         {
-            log.trace("setParent " + qName + " mapValue");
-         }
-
-         if(parent instanceof MapEntry)
-         {
-            MapEntry mapEntry = (MapEntry)parent;
-            mapEntry.setValue(o);
-         }
-         else if(parentTerm != null)
-         {
-            MapEntryMetaData mapEntryMetaData = getMapEntryMetaData(parentTerm, qName);
-            setMapEntryValue(mapEntryMetaData, parent, o);
-         }
-         else
-         {
-            throw new JBossXBRuntimeException(
-               "Element " +
-               qName +
-               " bound as map entry key but parent element is not recognized as map entry and its metadata is not available."
-            );
-         }
-      }
-      else
-      {
-         Object owner = parent;
-         if(parent instanceof MapEntry)
-         {
-            if(trace)
-            {
-               log.trace("setParent " + qName + " mapEntry");
-            }
-
-            MapEntry mapEntry = (MapEntry)parent;
-            owner = mapEntry.getValue();
-            if(owner == null)
-            {
-               if(parentTerm == null)
-               {
-                  throw new JBossXBRuntimeException("Binding metadata needed for lazy map entry value instantiation is not available " +
-                     "for parent element of element " +
-                     qName
-                  );
-               }
-
-               MapEntryMetaData mapEntryMetaData = getMapEntryMetaData(parentTerm, qName);
-               String valueType = mapEntryMetaData.getValueType();
-               if(valueType == null)
-               {
-                  throw new JBossXBRuntimeException("Element " +
-                     qName +
-                     " is supposed to be bound as map entry value with lazy value instantiation " +
-                     "but value type is not specified in its map entry metadata."
-                  );
-               }
-
-               Class valueCls;
-               try
-               {
-                  valueCls = Thread.currentThread().getContextClassLoader().loadClass(valueType);
-               }
-               catch(ClassNotFoundException e)
-               {
-                  throw new JBossXBRuntimeException(
-                     "Failed to load value type specified in the map entry metadata: " + valueType
-                  );
-               }
-
-               try
-               {
-                  owner = valueCls.newInstance();
-               }
-               catch(Exception e)
-               {
-                  throw new JBossXBRuntimeException(
-                     "Failed to create an instance of value type " + valueType + ": " + e.getMessage()
-                  );
-               }
-
-               setMapEntryValue(mapEntryMetaData, parent, owner);
-            }
-         }
-
-         // the wildcard this element is a content of
-         WildcardBinding wildcard = null;
-         if(parentTerm != null && !parentTerm.isModelGroup())
-         {
-            ElementBinding parentElement = (ElementBinding)parentTerm;
-            TypeBinding parentType = parentElement.getType();
-            wildcard = parentType.getWildcard();
-            // todo: there are should be a better way of checking this
-            if(wildcard != null && parentType.getElement(qName) != null)
-            {
-               wildcard = null;
-            }
-         }
-
-         if(tryPut(owner, o, qName, term, trace))
-         {
-         }
-         else if(tryAdd(owner, o, qName, term, wildcard, trace))
-         {
-         }
-         else
-         {
-            PropertyMetaData propertyMetaData = wildcard == null ? null : wildcard.getPropertyMetaData();
-            if(propertyMetaData == null)
-            {
-               propertyMetaData = term.getPropertyMetaData();
-            }
-
-            /*
-            if(propertyMetaData == null)
-            {
-               propertyMetaData = element.getType().getPropertyMetaData();
-            }
-            */
-
-            if(owner instanceof GenericValueContainer)
-            {
-               if(trace)
-               {
-                  log.trace("setParent " + qName + " addChild");
-               }
-               ((GenericValueContainer)owner).addChild(qName, o);
-            }
-            else if(owner instanceof Collection)
-            {
-               if(trace)
-               {
-                  log.trace("setParent " + qName + " collection.add()");
-               }
-               ((Collection)owner).add(o);
-            }
-            else
-            {
-               String propName = null;
-               String colType = null;
-               if(propertyMetaData != null)
-               {
-                  propName = propertyMetaData.getName();
-                  colType = propertyMetaData.getCollectionType();
-               }
-
-               if(propName == null)
-               {
-                  propName = Util.xmlNameToFieldName(qName.getLocalPart(), term.getSchema().isIgnoreLowLine());
-               }
-
-               if(trace)
-               {
-                  log.trace("setParent " + qName + " metadata set " + propName);
-               }
-
-               if(particle.isRepeatable())
-               {
-                  RtUtil.add(owner, o, propName, colType,
-                     term.getSchema().isIgnoreUnresolvedFieldOrClass(),
-                     term.getValueAdapter()
-                  );
-               }
-               else
-               {
-                  RtUtil.set(owner, o, propName, colType,
-                     term.getSchema().isIgnoreUnresolvedFieldOrClass(),
-                     term.getValueAdapter()
-                  );
-               }
-            }
-         }
-      }
-   }
-
-   public Object endParticle(Object o, QName elementName, ParticleBinding particle)
-   {
-      TermBinding term = particle.getTerm();
-      if(term.isSkip())
-      {
-         return o;
-      }
-
-      boolean trace = log.isTraceEnabled();
-      if(trace)
-      {
-         log.trace("endParticle " + elementName + " object=" + o + " term=" + term);
-      }
-
-      if(o instanceof GenericValueContainer)
-      {
-         try
-         {
-            if(trace)
-            {
-               log.trace("endParticle " + elementName + " instantiate()");
-            }
-            o = ((GenericValueContainer)o).instantiate();
-         }
-         catch(JBossXBRuntimeException e)
-         {
-            throw e;
-         }
-         catch(RuntimeException e)
-         {
-            throw new JBossXBRuntimeException("Container failed to create an instance for " +
-               elementName +
-               ": " + e.getMessage(), e
-            );
-         }
-      }
-
-      return o;
-   }
-
-   // Private
-
-   private Object startElement(Object parent, QName elementName, ParticleBinding particle)
-   {
-      TermBinding term = particle.getTerm();
-      if(term.isSkip())
-      {
-         return parent;
-      }
-
-      boolean trace = log.isTraceEnabled();
-      if(trace)
-      {
-         log.trace("startElement " + elementName + " parent=" + parent + " term=" + term);
-      }
-
-      ClassMetaData classMetaData = term.getClassMetaData();
-      MapEntryMetaData mapEntryMetaData = term.getMapEntryMetaData();
-
-      if(!term.isModelGroup())
-      {
-         TypeBinding type = ((ElementBinding)term).getType();
-         if(!type.isStartElementCreatesObject() ||
-            classMetaData == null && mapEntryMetaData == null && Constants.QNAME_ANYTYPE.equals(type.getQName()))
-         {
-            if(trace)
-            {
-               log.trace("startElement " + elementName + " does not create an object");
-            }
-            return null;
-         }
-      }
-
-      Object o = null;
-
-      // if addMethod is specified, it's probably some collection field
-      // but should not be set as a property. Instead, items are added to it using the addMethod
-      ElementBinding arrayItem = null;
-      if(!term.isModelGroup())
-      {
-         TypeBinding type = ((ElementBinding)term).getType();
-         if(type.getAttributes().isEmpty())
-         {
-            ParticleBinding typeParticle = type.getParticle();
-            ModelGroupBinding modelGroup = (ModelGroupBinding)(typeParticle == null ? null : typeParticle.getTerm());
-            arrayItem = modelGroup == null ? null : modelGroup.getArrayItem();
-
-            // todo refactor later (move it to modelGroup.getArrayItem()?)
-            if(arrayItem != null &&
-               (arrayItem.isSkip() ||
-               arrayItem.getMapEntryMetaData() != null ||
-               arrayItem.getPutMethodMetaData() != null ||
-               arrayItem.getAddMethodMetaData() != null
-               ))
-            {
-               arrayItem = null;
-            }
-         }
-      }
-
-      if(arrayItem != null)
-      {
-         Class wrapperType = null;
-         if(classMetaData != null)
-         {
-            wrapperType = loadClassForTerm(classMetaData.getImpl(),
-               term.getSchema().isIgnoreUnresolvedFieldOrClass(),
-               elementName
-            );
-
-            if(GenericValueContainer.class.isAssignableFrom(wrapperType) ||
-               Collection.class.isAssignableFrom(wrapperType) ||
-               Map.class.isAssignableFrom(wrapperType))
-            {
-               return newInstance(wrapperType, elementName, term.getSchema().isUseNoArgCtorIfFound());
-            }
-         }
-
-         if(wrapperType == null && parent == null)
-         {
-            Class itemType = classForElement(arrayItem, null);
-            if(itemType != null)
-            {
-               if(trace)
-               {
-                  log.trace("startElement " + elementName + " new array " + itemType.getName());
-               }
-               o = GenericValueContainer.FACTORY.array(itemType);
-            }
-         }
-         else
-         {
-            PropertyMetaData propertyMetaData = wrapperType == null ?
-               term.getPropertyMetaData() : arrayItem.getPropertyMetaData();
-
-            String propName;
-            if(propertyMetaData == null)
-            {
-               propName = Util.xmlNameToFieldName(
-                  wrapperType == null ? elementName.getLocalPart() : arrayItem.getQName().getLocalPart(),
-                  term.getSchema().isIgnoreLowLine()
-               );
-            }
-            else
-            {
-               propName = propertyMetaData.getName();
-            }
-
-            if(trace)
-            {
-               log.trace("startElement " + elementName + " property=" + propName);
-            }
-
-            Class parentClass = wrapperType;
-            if(wrapperType == null)
-            {
-               if(parent instanceof GenericValueContainer)
-               {
-                  parentClass = ((GenericValueContainer)parent).getTargetClass();
-               }
-               else if(parent instanceof ValueList)
-               {
-                  parentClass = ((ValueList)parent).getTargetClass();
-               }
-               else
-               {
-                  parentClass = parent.getClass();
-               }
-            }
-
-            Class fieldType;
-            if(parentClass.isArray())
-            {
-               fieldType = parentClass.getComponentType();
-            }
-            else
-            {
-               fieldType = FieldInfo.getFieldInfo(parentClass, propName, true).getType();
-               if(particle.isRepeatable() && fieldType.isArray())
-               {
-                  fieldType = fieldType.getComponentType();
-               }
-            }
-
-            if(fieldType.isArray())
-            {
-               o = GenericValueContainer.FACTORY.array(wrapperType, propName, fieldType.getComponentType());
-            }
-            else if(Collection.class.isAssignableFrom(fieldType))
-            {
-               o = new ArrayList();
-            }
-            else
-            {
-               o = GenericValueContainer.FACTORY.array(wrapperType, propName, fieldType);
-            }
-         }
-      }
-      else
-      {
-         if(mapEntryMetaData != null)
-         {
-            if(mapEntryMetaData.getImpl() != null)
-            {
-               Class cls = loadClassForTerm(mapEntryMetaData.getImpl(),
-                  term.getSchema().isIgnoreUnresolvedFieldOrClass(),
-                  elementName
-               );
-
-               if(trace)
-               {
-                  log.trace("startElement " + elementName + " new map entry " + cls.getName());
-               }
-
-               o = newInstance(cls, elementName, term.getSchema().isUseNoArgCtorIfFound());
-            }
-            else
-            {
-               o = new MapEntry();
-               if(trace)
-               {
-                  log.trace("startElement " + elementName + " new map entry");
-               }
-            }
-
-            if(mapEntryMetaData.isNonNullValue() && mapEntryMetaData.getValueType() != null)
-            {
-               Class mapValueType;
-               try
-               {
-                  mapValueType =
-                     Thread.currentThread().getContextClassLoader().loadClass(mapEntryMetaData.getValueType());
-               }
-               catch(ClassNotFoundException e)
-               {
-                  throw new JBossXBRuntimeException("startElement failed for " +
-                     elementName +
-                     ": failed to load class " +
-                     mapEntryMetaData.getValueType() +
-                     " for map entry value."
-                  );
-               }
-
-               Object value;
-               try
-               {
-                  if(trace)
-                  {
-                     log.trace("startElement " + elementName + " map value type " + mapEntryMetaData.getValueType());
-                  }
-                  value = mapValueType.newInstance();
-               }
-               catch(Exception e)
-               {
-                  throw new JBossXBRuntimeException("startElement failed for " +
-                     elementName +
-                     ": failed to create an instance of " +
-                     mapValueType +
-                     " for map entry value."
-                  );
-               }
-
-               if(o instanceof MapEntry)
-               {
-                  ((MapEntry)o).setValue(value);
-               }
-               else
-               {
-                  String getValueMethodName = mapEntryMetaData.getGetValueMethod();
-                  if(getValueMethodName == null)
-                  {
-                     getValueMethodName = "getValue";
-                  }
-
-                  String setValueMethodName = mapEntryMetaData.getSetValueMethod();
-                  if(setValueMethodName == null)
-                  {
-                     setValueMethodName = "setValue";
-                  }
-
-                  Method getValueMethod;
-                  try
-                  {
-                     getValueMethod = o.getClass().getMethod(getValueMethodName, null);
-                  }
-                  catch(NoSuchMethodException e)
-                  {
-                     throw new JBossXBRuntimeException("getValueMethod=" +
-                        getValueMethodName +
-                        " is not found in map entry " + o.getClass()
-                     );
-                  }
-
-                  Method setValueMethod;
-                  try
-                  {
-                     setValueMethod =
-                        o.getClass().getMethod(setValueMethodName, new Class[]{getValueMethod.getReturnType()});
-                  }
-                  catch(NoSuchMethodException e)
-                  {
-                     throw new JBossXBRuntimeException("setValueMethod=" +
-                        setValueMethodName +
-                        "(" +
-                        getValueMethod.getReturnType().getName() +
-                        " value) is not found in map entry " + o.getClass()
-                     );
-                  }
-
-                  try
-                  {
-                     setValueMethod.invoke(o, new Object[]{value});
-                  }
-                  catch(Exception e)
-                  {
-                     throw new JBossXBRuntimeException("setValueMethod=" +
-                        setValueMethodName +
-                        " failed: owner=" +
-                        o +
-                        ", value=" + value + ", msg=" + e.getMessage(), e
-                     );
-                  }
-               }
-            }
-         }
-         else
-         {
-            // todo: for now we require metadata for model groups to be bound
-            // todo 2: parent.getClass() is not going to work for containers
-            Class parentClass = null;
-            if(parent != null)
-            {
-               if(parent instanceof GenericValueContainer)
-               {
-                  parentClass = ((GenericValueContainer)parent).getTargetClass();
-               }
-               else if(parent instanceof ValueList)
-               {
-                  parentClass = ((ValueList)parent).getTargetClass();
-               }
-               else
-               {
-                  parentClass = parent.getClass();
-               }
-            }
-
-            Class cls;
-            if(term.isModelGroup())
-            {
-               if(classMetaData == null)
-               {
-                  throw new JBossXBRuntimeException(
-                     "Model groups should be annotated with 'class' annotation to be bound."
-                  );
-               }
-               cls = loadClassForTerm(classMetaData.getImpl(),
-                  term.getSchema().isIgnoreUnresolvedFieldOrClass(),
-                  elementName
-               );
-            }
-            else
-            {
-               ElementBinding element = (ElementBinding)term;
-               cls = classForNonArrayItem(element, parentClass);
-
-               if(cls != null)
-               {
-                  // todo: before that, the type should be checked for required attributes and elements
-                  TypeBinding simpleType = element.getType().getSimpleType();
-                  if(simpleType != null)
-                  {
-                     Class simpleCls = classForSimpleType(simpleType, element.isNillable());
-                     if(cls.equals(simpleCls) ||
-                        cls.isPrimitive() && Classes.getPrimitiveWrapper(cls) == simpleCls ||
-                        simpleCls.isPrimitive() && Classes.getPrimitiveWrapper(simpleCls) == cls)
-                     {
-                        cls = null;
-                     }
-                  }
-               }
-            }
-
-            if(cls != null)
-            {
-               boolean noArgCtor;
-               if(classMetaData == null)
-               {
-                  noArgCtor = term.getSchema().isUseNoArgCtorIfFound();
-               }
-               else
-               {
-                  Boolean termUsesNoArgCtor = classMetaData.isUseNoArgCtor();
-                  noArgCtor = termUsesNoArgCtor == null ?
-                     term.getSchema().isUseNoArgCtorIfFound() : termUsesNoArgCtor.booleanValue();               }
-
-               if(trace)
-               {
-                  log.trace("startElement " + elementName + " new " + cls.getName() + ", noArgCtor=" + noArgCtor);
-               }
-               o = newInstance(cls, elementName, noArgCtor);
-            }
-         }
-      }
-
-      return o;
-   }
-
-   private void attributes(Object o,
-                           QName elementName,
-                           ElementBinding element,
-                           Attributes attrs,
-                           NamespaceContext nsCtx)
-   {
-      TypeBinding type = element.getType();
-      for(int i = 0; i < attrs.getLength(); ++i)
-      {
-         QName attrName = new QName(attrs.getURI(i), attrs.getLocalName(i));
-         AttributeBinding binding = type.getAttribute(attrName);
-         if(binding != null)
-         {
-            AttributeHandler handler = binding.getHandler();
-            if(handler != null)
-            {
-               Object value = handler.unmarshal(elementName, attrName, binding, nsCtx, attrs.getValue(i));
-               handler.attribute(elementName, attrName, binding, o, value);
-            }
-            else
-            {
-               throw new JBossXBRuntimeException(
-                  "Attribute binding present but has no handler: element=" + elementName + ", attrinute=" + attrName
-               );
-            }
-         }
-         else
-         {
-            if(!Constants.NS_XML_SCHEMA_INSTANCE.equals(attrs.getURI(i)))
-            {
-               CharactersHandler simpleType = type.getCharactersHandler();
-               Object value;
-               if(simpleType == null)
-               {
-                  value = attrs.getValue(i);
-                  RtUtil.set(o, attrName, value, element.getSchema().isIgnoreLowLine());
-               }
-            }
-         }
-      }
-   }
-
-   private boolean tryAdd(Object owner,
-                          Object o,
-                          QName qName,
-                          TermBinding term,
-                          WildcardBinding wildcard,
-                          boolean trace)
-   {
-      AddMethodMetaData addMetaData = wildcard == null ? null : wildcard.getAddMethodMetaData();
-      if(addMetaData == null)
-      {
-         addMetaData = term.getAddMethodMetaData();
-      }
-
-      if(addMetaData == null)
-      {
-         return false;
-      }
-
-      if(trace)
-      {
-         log.trace("setParent " + qName + " add");
-      }
-      invokeAdd(qName, addMetaData, owner, o);
-      return true;
-   }
-
-   private boolean tryPut(Object owner, Object o, QName qName, TermBinding term, boolean trace)
-   {
-      if(term.getPutMethodMetaData() != null ||
-         term.getMapEntryMetaData() != null && owner instanceof Map)
-      {
-         if(trace)
-         {
-            log.trace("setParent " + qName + " mapPut");
-         }
-         invokePut(qName, term, owner, o);
-         return true;
-      }
-      return false;
-   }
-
-   private Class classForElement(ElementBinding element, Class parentClass)
-   {
-      Class cls;
-      TypeBinding type = element.getType();
-      QName typeQName = type.getQName();
-      if(typeQName != null && Constants.NS_XML_SCHEMA.equals(typeQName.getNamespaceURI()))
-      {
-         cls = SimpleTypeBindings.classForType(type.getQName().getLocalPart(), element.isNillable());
-      }
-      else
-      {
-         ElementBinding arrayItem = null;
-         if(!type.isSimple() && type.getAttributes().isEmpty())
-         {
-            ParticleBinding typeParticle = type.getParticle();
-            ModelGroupBinding modelGroup = (ModelGroupBinding)(typeParticle == null ? null : typeParticle.getTerm());
-            arrayItem = modelGroup == null ? null : modelGroup.getArrayItem();
-         }
-
-         if(arrayItem != null)
-         {
-            cls = classForElement(arrayItem, parentClass);
-            // todo: what's the best way to get an array class having the item class
-            cls = Array.newInstance(cls, 0).getClass();
-         }
-         else
-         {
-            cls = classForNonArrayItem(element, parentClass);
-         }
-      }
-      return cls;
-   }
-
-   private static void setMapEntryValue(MapEntryMetaData mapEntryMetaData, Object parent, Object o)
-   {
-      String getValueMethodName = mapEntryMetaData.getGetValueMethod();
-      if(getValueMethodName == null)
-      {
-         getValueMethodName = "getValue";
-      }
-
-      String setValueMethodName = mapEntryMetaData.getSetValueMethod();
-      if(setValueMethodName == null)
-      {
-         setValueMethodName = "setValue";
-      }
-
-      Class parentCls = parent.getClass();
-      Method setValueMethod = getSetMethod(parentCls, getValueMethodName, setValueMethodName);
-      invokeSetter(setValueMethod, parent, o, setValueMethodName);
-   }
-
-   private static void invokeSetter(Method setValueMethod, Object parent, Object o, String setValueMethodName)
-   {
-      try
-      {
-         setValueMethod.invoke(parent, new Object[]{o});
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBRuntimeException("Failed to invoke " +
-            setValueMethodName +
-            " on " +
-            parent +
-            " with parameter " +
-            o +
-            ": " +
-            e.getMessage()
-         );
-      }
-   }
-
-   private static Method getSetMethod(Class cls, String getMethodName, String setMethodName)
-   {
-      Method getKeyMethod;
-      try
-      {
-         getKeyMethod = cls.getMethod(getMethodName, null);
-      }
-      catch(NoSuchMethodException e)
-      {
-         throw new JBossXBRuntimeException("Method " + getMethodName + " not found in " + cls);
-      }
-
-      Method setKeyMethod;
-      try
-      {
-         setKeyMethod = cls.getMethod(setMethodName, new Class[]{getKeyMethod.getReturnType()});
-      }
-      catch(NoSuchMethodException e)
-      {
-         throw new JBossXBRuntimeException("Method " +
-            setMethodName +
-            "(" +
-            getKeyMethod.getReturnType().getName() +
-            " p) not found in " +
-            cls
-         );
-      }
-      return setKeyMethod;
-   }
-
-   private static MapEntryMetaData getMapEntryMetaData(TermBinding term, QName qName)
-   {
-      MapEntryMetaData mapEntryMetaData = term.getMapEntryMetaData();
-      if(mapEntryMetaData == null)
-      {
-         String msg;
-         if(term.isModelGroup())
-         {
-            msg = "Term " +
-               qName +
-               " bound as map entry key or value but map entry metadata is not available for its parent term.";
-         }
-         else
-         {
-            ElementBinding element = (ElementBinding)term;
-            msg = "Element " +
-               qName +
-               " bound as map entry key or value but map entry metadata is not available for its parent element nor its " +
-               (element.getType().getQName() == null ?
-               "annonymous" :
-               element.getType().getQName().toString()
-               ) +
-               " type.";
-         }
-         throw new JBossXBRuntimeException(msg);
-      }
-      return mapEntryMetaData;
-   }
-
-   private static Object newInstance(Class cls, QName elementName, boolean useNoArgCtorIfFound)
-   {
-      Object o;
-      if(cls.isArray())
-      {
-         o = GenericValueContainer.FACTORY.array(cls.getComponentType());
-      }
-      else
-      {
-         Constructor[] ctors = cls.getConstructors();
-         if(ctors.length == 0)
-         {
-            throw new JBossXBRuntimeException(
-               "Class " + cls.getName() + " has no public constructors or the class reflects a primitive type or void"
-            );
-         }
-
-         if(useNoArgCtorIfFound)
-         {
-            try
-            {
-               Constructor ctor = cls.getConstructor(null);
-               o = ctor.newInstance(null);
-            }
-            catch(NoSuchMethodException e)
-            {
-               o = new ValueListInitializer().newValueList(ValueListHandler.NON_DEFAULT_CTOR, cls);
-            }
-            catch(Exception e)
-            {
-               throw new JBossXBRuntimeException("Failed to create an instance of " +
-                  cls +
-                  " using default constructor for element " +
-                  elementName + ": " + e.getMessage(), e
-               );
-            }
-         }
-         else if(ctors.length > 1 || ctors[0].getParameterTypes().length > 0)
-         {
-            o = new ValueListInitializer().newValueList(ValueListHandler.NON_DEFAULT_CTOR, cls);
-         }
-         else
-         {
-            try
-            {
-               o = ctors[0].newInstance(null);
-            }
-            catch(Exception e)
-            {
-               throw new JBossXBRuntimeException("Failed to create an instance of " +
-                  cls +
-                  " using default constructor for element " +
-                  elementName + ": " + e.getMessage(), e
-               );
-            }
-         }
-      }
-      return o;
-   }
-
-   private static Class loadClassForTerm(String className,
-                                         boolean ignoreCNFE,
-                                         QName elementName)
-   {
-      if(className == null)
-      {
-         throw new JBossXBRuntimeException("No class for " + elementName);
-      }
-
-      Class cls = null;
-      try
-      {
-         cls = Thread.currentThread().getContextClassLoader().loadClass(className);
-      }
-      catch(ClassNotFoundException e)
-      {
-         if(ignoreCNFE)
-         {
-            if(log.isTraceEnabled())
-            {
-               log.trace("Failed to resolve class for element " +
-                  elementName +
-                  ": " +
-                  className
-               );
-            }
-         }
-         else
-         {
-            throw new JBossXBRuntimeException("Failed to resolve class name for " +
-               elementName +
-               ": " +
-               e.getMessage()
-            );
-         }
-      }
-      return cls;
-   }
-
-   private void invokeAdd(QName qName, AddMethodMetaData addMethodMetaData, Object owner, Object o)
-   {
-      Class valueType = Object.class;
-      if(addMethodMetaData.getValueType() != null)
-      {
-         try
-         {
-            valueType = Thread.currentThread().getContextClassLoader().
-               loadClass(addMethodMetaData.getValueType());
-         }
-         catch(ClassNotFoundException e)
-         {
-            throw new JBossXBRuntimeException("Failed to load value type for addMethod.name=" +
-               addMethodMetaData.getMethodName() +
-               ", valueType=" +
-               addMethodMetaData.getValueType() +
-               ": " + e.getMessage(), e
-            );
-         }
-      }
-      else if(addMethodMetaData.isChildType())
-      {
-         if(o == null)
-         {
-            throw new JBossXBRuntimeException("addMethod=" +
-               addMethodMetaData.getMethodName() +
-               " for element " +
-               qName +
-               " is configured with valueType='child'. The valueType cannot be determined because" +
-               " the child is null"
-            );
-         }
-         valueType = o.getClass();
-      }
-
-      Class ownerClass = owner.getClass();
-      Method addMethod;
-      try
-      {
-         addMethod = ownerClass.getMethod(addMethodMetaData.getMethodName(), new Class[]{valueType});
-      }
-      catch(NoSuchMethodException e)
-      {
-         throw new JBossXBRuntimeException("Failed to find addMethod.name=" +
-            addMethodMetaData.getMethodName() +
-            ", addMethod.valueType=" +
-            valueType.getName() +
-            " in class " +
-            ownerClass.getName() +
-            ": " +
-            e.getMessage(), e
-         );
-      }
-
-      try
-      {
-         addMethod.invoke(owner, new Object[]{o});
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBRuntimeException("setParent failed for " +
-            qName +
-            "=" +
-            o +
-            ": addMethod=" +
-            addMethodMetaData.getMethodName() +
-            " threw an exception for owner=" +
-            owner +
-            ", value=" +
-            o +
-            ": " +
-            e.getMessage(),
-            e
-         );
-      }
-   }
-
-   private void invokePut(QName qName, TermBinding term, Object owner, Object o)
-   {
-      PutMethodMetaData putMethodMetaData = term.getPutMethodMetaData();
-
-      MapEntryMetaData mapEntryMetaData = term.getMapEntryMetaData();
-      if(mapEntryMetaData == null)
-      {
-         throw new JBossXBRuntimeException((putMethodMetaData == null ?
-            "Parent object is an instance of java.util.Map" :
-            "putMethod is specified for element " + qName
-            ) +
-            " but mapEntry is specified for neither element " +
-            qName +
-            " nor it's type."
-         );
-      }
-
-      Class oClass = o.getClass();
-      String getKeyMethodName = mapEntryMetaData.getGetKeyMethod();
-      if(getKeyMethodName == null)
-      {
-         getKeyMethodName = "getKey";
-      }
-
-      Method keyMethod;
-      try
-      {
-         keyMethod = oClass.getMethod(getKeyMethodName, null);
-      }
-      catch(NoSuchMethodException e)
-      {
-         throw new JBossXBRuntimeException("setParent failed for " +
-            qName +
-            "=" +
-            o +
-            ": getKeyMethod=" +
-            getKeyMethodName +
-            " not found in " + oClass
-         );
-      }
-
-      Object key;
-      try
-      {
-         key = keyMethod.invoke(o, null);
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBRuntimeException("setParent failed for " +
-            qName +
-            "=" +
-            o +
-            ": getKeyMethod=" +
-            getKeyMethodName +
-            " threw an exception: " + e.getMessage(), e
-         );
-      }
-
-      Class keyType = Object.class;
-      Class valueType = Object.class;
-      String putMethodName = "put";
-      Class ownerClass = owner.getClass();
-
-      if(putMethodMetaData != null)
-      {
-         if(putMethodMetaData.getKeyType() != null)
-         {
-            try
-            {
-               keyType = Thread.currentThread().getContextClassLoader().loadClass(putMethodMetaData.getKeyType());
-            }
-            catch(ClassNotFoundException e)
-            {
-               throw new JBossXBRuntimeException("setParent failed for " + qName + ": " + e.getMessage(), e);
-            }
-         }
-
-         if(putMethodMetaData.getValueType() != null)
-         {
-            try
-            {
-               valueType = Thread.currentThread().getContextClassLoader().loadClass(putMethodMetaData.getValueType());
-            }
-            catch(ClassNotFoundException e)
-            {
-               throw new JBossXBRuntimeException("setParent failed for " + qName + ": " + e.getMessage(), e);
-            }
-         }
-
-         String name = putMethodMetaData.getName();
-         if(name != null)
-         {
-            putMethodName = name;
-         }
-      }
-
-      Method putMethod;
-      try
-      {
-         putMethod = ownerClass.getMethod(putMethodName, new Class[]{keyType, valueType});
-      }
-      catch(NoSuchMethodException e)
-      {
-         throw new JBossXBRuntimeException("setParent failed for " +
-            qName +
-            "=" +
-            o +
-            ": putMethod=" +
-            putMethodName +
-            "(" + keyType.getName() + " key, " + valueType.getName() + " value) not found in " + ownerClass
-         );
-      }
-
-      Object value = o;
-      String valueMethodName = mapEntryMetaData.getGetValueMethod();
-      if(valueMethodName != null)
-      {
-         Method valueMethod;
-         try
-         {
-            valueMethod = oClass.getMethod(valueMethodName, null);
-         }
-         catch(NoSuchMethodException e)
-         {
-            throw new JBossXBRuntimeException("setParent failed for " +
-               qName +
-               "=" +
-               o +
-               ": getValueMethod=" +
-               mapEntryMetaData.getGetValueMethod() +
-               " not found in " + oClass
-            );
-         }
-
-         try
-         {
-            value = valueMethod.invoke(o, null);
-         }
-         catch(Exception e)
-         {
-            throw new JBossXBRuntimeException("setParent failed for " +
-               qName +
-               "=" +
-               o +
-               ": getValueMethod=" +
-               mapEntryMetaData.getGetValueMethod() +
-               " threw an exception: " + e.getMessage(), e
-            );
-         }
-      }
-      else if(o instanceof MapEntry)
-      {
-         value = ((MapEntry)o).getValue();
-      }
-
-      try
-      {
-         putMethod.invoke(owner, new Object[]{key, value});
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBRuntimeException("setParent failed for " +
-            qName +
-            "=" +
-            o +
-            ": putMethod=" +
-            putMethodName +
-            " threw an exception for owner=" +
-            owner +
-            ", key=" +
-            key +
-            ", value=" +
-            value +
-            ": " +
-            e.getMessage(),
-            e
-         );
-      }
-   }
-
-   private Class classForNonArrayItem(ElementBinding element, Class parentClass)
-   {
-      String clsName;
-
-      // first, class metadata and map entry metadata
-      ClassMetaData clsMetaData = element.getClassMetaData();
-      clsName = clsMetaData == null ? null : clsMetaData.getImpl();
-      if(clsName == null)
-      {
-         MapEntryMetaData mapEntryMetaData = element.getMapEntryMetaData();
-         if(mapEntryMetaData != null)
-         {
-            clsName = mapEntryMetaData.getImpl();
-            if(clsName == null)
-            {
-               clsName = MapEntry.class.getName();
-            }
-         }
-      }
-
-      // second, property metadata and property type
-      if(clsName == null)
-      {
-         if(parentClass == null)
-         {
-            clsName = classFromQName(element);
-         }
-         else
-         {
-            PropertyMetaData propertyMetaData = element.getPropertyMetaData();
-            String propName = propertyMetaData == null ? null : propertyMetaData.getName();
-            if(propName == null)
-            {
-               // if there is add or put method metadata then fallback to XML-name-to-class-name algorithm
-               if(element.getAddMethodMetaData() == null && element.getPutMethodMetaData() == null)
-               {
-                  propName =
-                     Util.xmlNameToFieldName(element.getQName().getLocalPart(), element.getSchema().isIgnoreLowLine());
-               }
-            }
-
-            if(propName != null)
-            {
-               FieldInfo fieldInfo = FieldInfo.getFieldInfo(parentClass, propName, false);
-               Class fieldType = fieldInfo == null ? null : fieldInfo.getType();
-
-               if(fieldType == null ||
-                  Modifier.isAbstract(fieldType.getModifiers()) ||
-                  Modifier.isInterface(fieldType.getModifiers()) ||
-                  fieldType.isArray() ||
-                  Collection.class.isAssignableFrom(fieldType))
-               {
-                  clsName = classFromQName(element);
-               }
-               else
-               {
-                  return fieldType;
-               }
-            }
-         }
-      }
-
-      return loadClassForTerm(clsName, element.getSchema().isIgnoreUnresolvedFieldOrClass(), element.getQName());
-   }
-
-   private String classFromQName(ElementBinding element)
-   {
-      String clsName;
-      QName typeBase = element.getType().getQName();
-      if(typeBase == null)
-      {
-         typeBase = element.getQName();
-      }
-
-      SchemaBinding schema = element.getSchema();
-      PackageMetaData pkgMetaData = schema.getPackageMetaData();
-      if(pkgMetaData == null)
-      {
-         clsName =
-            Util.xmlNameToClassName(typeBase.getNamespaceURI(),
-               typeBase.getLocalPart(),
-               schema.isIgnoreLowLine()
-            );
-      }
-      else
-      {
-         String pkg = pkgMetaData.getName();
-         clsName =
-            pkg == null || pkg.length() == 0 ?
-            Util.xmlNameToClassName(typeBase.getLocalPart(), schema.isIgnoreLowLine()) :
-            pkg + "." + Util.xmlNameToClassName(typeBase.getLocalPart(), schema.isIgnoreLowLine());
-      }
-      return clsName;
-   }
-
-   private static Class classForSimpleType(TypeBinding type, boolean nillable)
-   {
-      ValueMetaData valueMetaData = type.getValueMetaData();
-      if(valueMetaData != null && valueMetaData.getUnmarshalMethod() != null)
-      {
-         return RtUtil.getUnmarshalMethod(type.getQName(), valueMetaData).getReturnType();
-      }
-      else if(type.getClassMetaData() != null && type.getClassMetaData().getImpl() != null)
-      {
-         return RtUtil.loadClass(type.getClassMetaData().getImpl(), true);
-      }
-
-      TypeBinding itemType = type.getItemType();
-      if(itemType != null)
-      {
-         if(type.getSchemaBinding().isUnmarshalListsToArrays())
-         {
-            // todo: nillable not always should be propagated to the item
-            Class itemClass = classForSimpleType(itemType, nillable);
-            return Array.newInstance(itemClass, 0).getClass();
-         }
-         else
-         {
-            return java.util.List.class;
-         }
-      }
-      else
-      {
-         QName qName = type.getQName();
-         if(qName != null && Constants.NS_XML_SCHEMA.equals(qName.getNamespaceURI()))
-         {
-            return SimpleTypeBindings.classForType(qName.getLocalPart(), nillable);
-         }
-         else
-         {
-            TypeBinding baseType = type.getBaseType();
-            if(baseType == null)
-            {
-               throw new JBossXBRuntimeException("Expected a base type here.");
-            }
-
-            return classForSimpleType(baseType, nillable);
-         }
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtElementHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtElementHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtUtil.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtUtil.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtUtil.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,403 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.unmarshalling.impl.runtime;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import org.jboss.util.Classes;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.Util;
-import org.jboss.xb.binding.introspection.FieldInfo;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class RtUtil
-{
-   private RtUtil()
-   {
-   }
-
-   public static void add(Object o,
-                          Object value,
-                          String prop,
-                          String colType,
-                          boolean ignoreNotFoundField,
-                          ValueAdapter valueAdapter)
-   {
-      FieldInfo fieldInfo = FieldInfo.getFieldInfo(o.getClass(), prop, !ignoreNotFoundField);
-      if(fieldInfo == null)
-      {
-         return;
-      }
-
-      Class fieldType = fieldInfo.getType();
-      boolean arrType;
-      if(fieldType.isArray())
-      {
-         arrType = true;
-      }
-      else if(Collection.class.isAssignableFrom(fieldType))
-      {
-         arrType = false;
-      }
-      else
-      {
-         throw new JBossXBRuntimeException(
-            "Expected type for " + prop + " in " + o.getClass() + " is an array or java.util.Collection but was " + fieldType
-         );
-      }
-
-
-      if(valueAdapter != null)
-      {
-         value = valueAdapter.cast(value, fieldType);
-      }
-
-      if(!arrType || colType != null)
-      {
-         Collection col = (Collection)fieldInfo.getValue(o);
-         if(col == null)
-         {
-            if(colType == null)
-            {
-               col = new ArrayList();
-            }
-            else
-            {
-               Class colCls;
-               try
-               {
-                  colCls = Thread.currentThread().getContextClassLoader().loadClass(colType);
-               }
-               catch(ClassNotFoundException e)
-               {
-                  throw new JBossXBRuntimeException("Failed to load collection type: " + colType);
-               }
-
-               try
-               {
-                  col = (Collection)colCls.newInstance();
-               }
-               catch(Exception e)
-               {
-                  throw new JBossXBRuntimeException("Failed to create an instance of " + colCls);
-               }
-            }
-
-            fieldInfo.setValue(o, col);
-         }
-
-         col.add(value);
-      }
-      else
-      {
-         Object arr = fieldInfo.getValue(o);
-         int length = 0;
-         if(arr == null)
-         {
-            arr = Array.newInstance(fieldType.getComponentType(), 1);
-         }
-         else
-         {
-            Object tmp = arr;
-            length = Array.getLength(arr);
-            arr = Array.newInstance(fieldType.getComponentType(), length + 1);
-            System.arraycopy(tmp, 0, arr, 0, length);
-         }
-         Array.set(arr, length, value);
-         fieldInfo.setValue(o, arr);
-      }
-   }
-
-   public static void set(Object o,
-                          Object value,
-                          String prop,
-                          String colType,
-                          boolean ignoreNotFoundField,
-                          ValueAdapter valueAdapter)
-   {
-      FieldInfo fieldInfo = FieldInfo.getFieldInfo(o.getClass(), prop, !ignoreNotFoundField);
-      if(fieldInfo == null)
-      {
-         return;
-      }
-
-      Class fieldType = fieldInfo.getType();
-
-      if(valueAdapter != null)
-      {
-         value = valueAdapter.cast(value, fieldType);
-      }
-
-      if(colType != null ||
-         // todo collections of collections
-         Collection.class.isAssignableFrom(fieldType) &&
-         !Collection.class.isAssignableFrom(value.getClass()))
-      {
-         Collection col = (Collection)fieldInfo.getValue(o);
-         if(col == null)
-         {
-            if(colType == null)
-            {
-               col = new ArrayList();
-            }
-            else
-            {
-               Class colCls;
-               try
-               {
-                  colCls = Thread.currentThread().getContextClassLoader().loadClass(colType);
-               }
-               catch(ClassNotFoundException e)
-               {
-                  throw new JBossXBRuntimeException("Failed to load collection type: " + colType);
-               }
-
-               try
-               {
-                  col = (Collection)colCls.newInstance();
-               }
-               catch(Exception e)
-               {
-                  throw new JBossXBRuntimeException("Failed to create an instance of " + colCls);
-               }
-            }
-
-            fieldInfo.setValue(o, col);
-         }
-
-         col.add(value);
-      }
-      else if(fieldType.isArray() &&
-         value != null &&
-         (fieldType.getComponentType().isAssignableFrom(value.getClass()) ||
-         fieldType.getComponentType().isPrimitive() &&
-         Classes.getPrimitiveWrapper(fieldType.getComponentType()) == value.getClass()
-         ))
-      {
-         Object arr = fieldInfo.getValue(o);
-         int length = 0;
-         if(arr == null)
-         {
-            arr = Array.newInstance(fieldType.getComponentType(), 1);
-         }
-         else
-         {
-            Object tmp = arr;
-            length = Array.getLength(arr);
-            arr = Array.newInstance(fieldType.getComponentType(), length + 1);
-            System.arraycopy(tmp, 0, arr, 0, length);
-         }
-         Array.set(arr, length, value);
-         fieldInfo.setValue(o, arr);
-      }
-      else
-      {
-         // todo: unmarshalling should produce the right type instead
-         Class valueClass = value == null ? null : value.getClass();
-         if(valueClass != null && !fieldType.isAssignableFrom(valueClass))
-         {
-            if(fieldType.isArray() && Collection.class.isAssignableFrom(valueClass))
-            {
-               Collection col = (Collection)value;
-               Class compType = fieldType.getComponentType();
-               value = Array.newInstance(compType, col.size());
-               if(compType.isPrimitive())
-               {
-                  int i = 0;
-                  for(Iterator iter = col.iterator(); iter.hasNext();)
-                  {
-                     Array.set(value, i++, iter.next());
-                  }
-               }
-               else
-               {
-                  value = col.toArray((Object[])value);
-               }
-            }
-            else if(Collection.class.isAssignableFrom(fieldType) && valueClass.isArray())
-            {
-               int length = Array.getLength(value);
-               Collection col = new ArrayList(length);
-               for(int i = 0; i < length; ++i)
-               {
-                  col.add(Array.get(value, i));
-               }
-               value = col;
-            }
-            // else hopefully it's a primitive/wrapper case
-         }
-
-         fieldInfo.setValue(o, value);
-      }
-   }
-
-   public static void set(Object o, QName elementName, Object value, boolean ignoreLowLine)
-   {
-      if(o instanceof Collection)
-      {
-         ((Collection)o).add(value);
-      }
-      else
-      {
-         String fieldName = Util.xmlNameToFieldName(elementName.getLocalPart(), ignoreLowLine);
-         FieldInfo fieldInfo = FieldInfo.getFieldInfo(o.getClass(), fieldName, true);
-         fieldInfo.setValue(o, value);
-      }
-   }
-
-   public static Class loadClass(String clsName, boolean failIfNotFound)
-   {
-      Class cls = null;
-      try
-      {
-         cls = Classes.loadClass(clsName);
-      }
-      catch(ClassNotFoundException e)
-      {
-         if(failIfNotFound)
-         {
-            throw new JBossXBRuntimeException("Failed to load class " + clsName);
-         }
-      }
-      return cls;
-   }
-
-   public static Method getUnmarshalMethod(QName qName, ValueMetaData valueMetaData)
-   {
-      String unmarshalMethod = valueMetaData.getUnmarshalMethod();
-      if(unmarshalMethod == null)
-      {
-         throw new JBossXBRuntimeException(
-            "javaType annotation is specified for " + qName + " but does not contain parseMethod attribute"
-         );
-      }
-
-      int lastDot = unmarshalMethod.lastIndexOf('.');
-      String clsName = unmarshalMethod.substring(0, lastDot);
-      String methodName = unmarshalMethod.substring(lastDot + 1);
-
-      Class cls = RtUtil.loadClass(clsName, true);
-
-      try
-      {
-         return cls.getMethod(methodName, new Class[]{String.class});
-      }
-      catch(NoSuchMethodException e)
-      {
-         try
-         {
-            return cls.getMethod(methodName, new Class[]{String.class, NamespaceContext.class});
-         }
-         catch(NoSuchMethodException e1)
-         {
-            throw new JBossXBRuntimeException("Neither " +
-               methodName +
-               "(" +
-               String.class.getName() +
-               " p) nor " +
-               methodName +
-               "(" +
-               String.class.getName() +
-               " p1, " +
-               NamespaceContext.class.getName() +
-               " p2) were found in " + cls
-            );
-         }
-      }
-   }
-
-   public static Object invokeUnmarshalMethod(Class cls,
-                                              String methodName,
-                                              Object value,
-                                              Class valueType,
-                                              NamespaceContext nsCtx,
-                                              QName qName)
-   {
-      Method method;
-      Object[] args;
-      try
-      {
-         method = cls.getMethod(methodName, new Class[]{valueType});
-         args = new Object[]{value};
-      }
-      catch(NoSuchMethodException e)
-      {
-         try
-         {
-            method = cls.getMethod(methodName, new Class[]{valueType, NamespaceContext.class});
-            args = new Object[]{value, nsCtx};
-         }
-         catch(NoSuchMethodException e1)
-         {
-            throw new JBossXBRuntimeException("Neither " +
-               methodName +
-               "(" +
-               valueType.getName() +
-               " p) nor " +
-               methodName +
-               "(" +
-               valueType.getName() +
-               " p1, " +
-               NamespaceContext.class.getName() +
-               " p2) were found in " + cls
-            );
-         }
-      }
-
-      return invokeUnmarshalMethod(method, args, qName);
-   }
-
-   public static Object invokeUnmarshalMethod(Method method, Object[] args, QName qName)
-   {
-      Object unmarshalled;
-      try
-      {
-         unmarshalled = method.invoke(null, args);
-      }
-      catch(Exception e)
-      {
-         throw new JBossXBRuntimeException("Failed to invoke unmarshalMethod " +
-            method.getDeclaringClass().getName() +
-            "." +
-            method.getName() +
-            " for element " +
-            qName +
-            " and value " +
-            args[0] +
-            ": " +
-            e.getMessage(),
-            e
-         );
-      }
-      return unmarshalled;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtUtil.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/impl/runtime/RtUtil.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/SimpleDataSource.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/SimpleDataSource.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/SimpleDataSource.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,93 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.xop;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import javax.activation.DataSource;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class SimpleDataSource
-   implements DataSource
-{
-   public final byte[] bytes;
-   public final String contentType;
-
-   public SimpleDataSource(Object o, String contentType)
-   {
-      ByteArrayOutputStream baos = new ByteArrayOutputStream();
-      ObjectOutputStream oos = null;
-      try
-      {
-         oos = new ObjectOutputStream(baos);
-         oos.writeObject(o);
-      }
-      catch(IOException e)
-      {
-         throw new JBossXBRuntimeException("XOP failed to serialize object " + o + ": " + e.getMessage());
-      }
-      finally
-      {
-         if(oos != null)
-         {
-            try
-            {
-               oos.close();
-            }
-            catch(IOException e)
-            {
-            }
-         }
-      }
-      bytes = baos.toByteArray();
-
-      this.contentType = contentType;
-   }
-
-   public String getContentType()
-   {
-      return contentType;
-   }
-
-   public InputStream getInputStream() throws IOException
-   {
-      return new ByteArrayInputStream(bytes);
-   }
-
-   public String getName()
-   {
-      throw new UnsupportedOperationException("getName is not implemented.");
-   }
-
-   public OutputStream getOutputStream() throws IOException
-   {
-      throw new UnsupportedOperationException("getOutputStream is not implemented.");
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/SimpleDataSource.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/SimpleDataSource.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPElementHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPElementHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPElementHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,80 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.xop;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultHandlers;
-import org.xml.sax.Attributes;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class XOPElementHandler
-   implements ParticleHandler
-{
-   public Object startParticle(Object parent,
-                               QName elementName,
-                               ParticleBinding particle,
-                               Attributes attrs,
-                               NamespaceContext nsCtx)
-   {
-      ElementBinding element = (ElementBinding)particle.getTerm();
-      XOPUnmarshaller xopUnmarshaller = element.getXopUnmarshaller();
-      if(xopUnmarshaller == null || !xopUnmarshaller.isXOPPackage())
-      {
-         return null;
-      }
-      else
-      {
-         return parent == null ? new XOPElement() : parent;
-      }
-   }
-
-   public Object endParticle(Object o, QName elementName, ParticleBinding particle)
-   {
-      return o instanceof XOPElement ? ((XOPElement)o).value : o;
-   }
-
-   public void setParent(Object parent,
-                         Object o,
-                         QName elementName,
-                         ParticleBinding particle,
-                         ParticleBinding parentParticle)
-   {
-      ElementBinding element = (ElementBinding)particle.getTerm();
-      XOPUnmarshaller xopUnmarshaller = element.getXopUnmarshaller();
-      if(xopUnmarshaller == null || !xopUnmarshaller.isXOPPackage())
-      {
-         DefaultHandlers.ELEMENT_HANDLER.setParent(parent, o, elementName, particle, parentParticle);
-      }
-   }
-
-   public static class XOPElement
-   {
-      public Object value;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPElementHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPElementHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPIncludeHandler.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPIncludeHandler.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPIncludeHandler.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,131 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.xop;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.JBossXBRuntimeException;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultHandlers;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-import org.xml.sax.Attributes;
-
-/**
- * Handler impl for xop:Include type.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class XOPIncludeHandler
-   implements ParticleHandler
-{
-   // type that can be XOP-optimized (should actually be the element)
-   private final TypeBinding type;
-
-   public XOPIncludeHandler(TypeBinding type)
-   {
-      this.type = type;
-   }
-
-   public Object startParticle(Object parent,
-                               QName elementName,
-                               ParticleBinding particle,
-                               Attributes attrs,
-                               NamespaceContext nsCtx)
-   {
-      ElementBinding xopInclude = (ElementBinding)particle.getTerm();
-      if(!Constants.QNAME_XOP_INCLUDE.equals(xopInclude.getQName()))
-      {
-         throw new JBossXBRuntimeException(
-            "Expected " + Constants.QNAME_XOP_INCLUDE + " but got " + xopInclude.getQName()
-         );
-      }
-
-      XOPUnmarshaller xopUnmarshaller = type.getXopUnmarshaller();
-      if(xopUnmarshaller == null)
-      {
-         throw new JBossXBRuntimeException(
-            "Failed to process " + Constants.QNAME_XOP_INCLUDE + ": XOPUnmarshaller is not provided."
-         );
-      }
-
-      String cid = attrs.getValue("href");
-      if(cid == null)
-      {
-         throw new JBossXBRuntimeException(Constants.QNAME_XOP_INCLUDE + " doesn't contain required href attribute");
-      }
-
-      XOPObject xopObject = xopUnmarshaller.getAttachmentAsDataHandler(cid);
-      Object content = xopObject.getContent();
-      if(content == null)
-      {
-         throw new JBossXBRuntimeException("Content is not available for cid '" + cid + "'");
-      }
-
-      if(content instanceof InputStream)
-      {
-         try
-         {
-            ObjectInputStream ois = new ObjectInputStream((InputStream)content);
-            content = ois.readObject();
-         }
-         catch(IOException e)
-         {
-            throw new JBossXBRuntimeException("Failed to deserialize object: " + e.getMessage());
-         }
-         catch(ClassNotFoundException e)
-         {
-            throw new JBossXBRuntimeException("Failed to load the class to deserialize object: " + e.getMessage());
-         }
-      }
-
-      return content;
-   }
-
-   public Object endParticle(Object o, QName elementName, ParticleBinding particle)
-   {
-      return o;
-   }
-
-   public void setParent(Object parent,
-                         Object o,
-                         QName elementName,
-                         ParticleBinding particle,
-                         ParticleBinding parentParticle)
-   {
-      if(parent instanceof XOPElementHandler.XOPElement)
-      {
-         ((XOPElementHandler.XOPElement)parent).value = o;
-      }
-      else
-      {
-         ElementBinding parentElement = (ElementBinding)parentParticle.getTerm();
-         DefaultHandlers.ELEMENT_HANDLER.setParent(parent, o, parentElement.getQName(), particle, parentParticle);
-      }
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPIncludeHandler.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPIncludeHandler.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPMarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPMarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPMarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,38 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.xop;
-
-
-/**
- * This interface is a copy of AttachmentMarshaller from JAXB2.0.
- * It's added to avoid circular module dependecy in the build system.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @author <a href="mailto:heiko.braun at jboss.org">Heiko Braun</a>
- * @version <tt>$Revision$</tt>
- */
-public interface XOPMarshaller
-{
-   boolean isXOPPackage();
-   String addMtomAttachment(XOPObject obj, String elementNamespace, String elementName);
-   String addMtomAttachment(byte[] data, String elementNamespace, String elementName);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPMarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPMarshaller.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPObject.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPObject.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPObject.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,27 +0,0 @@
-package org.jboss.xb.binding.sunday.xop;
-
-/**
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @since Jun 28, 2006
- */
-public class XOPObject {
-
-   private Object content;
-   private String contentType;
-
-   public XOPObject(Object content) {
-      this.content = content;
-   }
-
-   public Object getContent() {
-      return content;
-   }
-
-   public String getContentType() {
-      return contentType;
-   }
-
-   public void setContentType(String contentType) {
-      this.contentType = contentType;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPObject.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPObject.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPUnmarshaller.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPUnmarshaller.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPUnmarshaller.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,38 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.binding.sunday.xop;
-
-
-/**
- * This interface is a copy of AttachmentUnmarshaller from JAXB2.0.
- * It's added to avoid circular module dependecy in the build system.
- *
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @author <a href="mailto:heiko.braun at jboss.org">Heiko Braun</a>
- * @version <tt>$Revision$</tt>
- */
-public interface XOPUnmarshaller
-{
-   boolean isXOPPackage();
-   XOPObject getAttachmentAsDataHandler(String cid);
-   byte[] getAttachmentAsByteArray(String cid);
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPUnmarshaller.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/xop/XOPUnmarshaller.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/util)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/Dom2Sax.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/util/Dom2Sax.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/Dom2Sax.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,225 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.util;
-
-import java.util.List;
-import java.util.Collections;
-import java.util.ArrayList;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision$</tt>
- */
-public class Dom2Sax
-{
-   public static void dom2sax(Element e, ContentHandler ch) throws SAXException
-   {
-      if(e == null)
-      {
-         throw new IllegalArgumentException("The element argument must not be null!");
-      }
-      
-      ch.startDocument();
-
-      process(e, ch, new NamespaceRegistry());
-
-      ch.endDocument();
-   }
-
-   private static void process(Element e, ContentHandler ch, NamespaceRegistry nsReg) throws SAXException
-   {
-      AttributesImpl attrs = new AttributesImpl();
-
-      List startedPrefixes = Collections.EMPTY_LIST;
-
-      NamedNodeMap domAttrs = e.getAttributes();
-      if(domAttrs != null && domAttrs.getLength() > 0)
-      {
-         // run through xmlns first to declare all the namespaces
-         for(int i = 0; i < domAttrs.getLength(); ++i)
-         {
-            Attr attr = (Attr)domAttrs.item(i);
-            String attrNs = attr.getNamespaceURI();
-            String attrLocal = attr.getLocalName();
-            if(attrLocal == null)
-            {
-               attrLocal = attr.getNodeName();
-            }
-
-            if(attrNs != null && isXmlns(attrNs))
-            {
-               String prefix;
-               String attrPrefix;
-               if("xmlns".equals(attrLocal))
-               {
-                  prefix = "";
-                  attrPrefix = "";
-               }
-               else
-               {
-                  prefix = attrLocal;
-                  attrPrefix = "xmlns";
-               }
-
-               String attrVal = attr.getValue();
-               nsReg.addPrefixMapping(prefix, attrVal);
-               ch.startPrefixMapping(prefix, attrVal);
-               startedPrefixes = add(startedPrefixes, prefix);
-
-               attrs.addAttribute(attrNs, attrLocal, buildQName(attrPrefix, attrLocal), null, attrVal);
-            }
-         }
-
-         for(int i = 0; i < domAttrs.getLength(); ++i)
-         {
-            Attr attr = (Attr)domAttrs.item(i);
-            String attrNs = attr.getNamespaceURI();
-            String attrLocal = attr.getLocalName();
-            if(attrLocal == null)
-            {
-               attrLocal = attr.getNodeName();
-            }
-
-            if(attrNs == null)
-            {
-               attrNs = "";
-            }
-
-            if(!isXmlns(attrNs))
-            {
-               String prefix = nsReg.getPrefix(attrNs);
-               if(prefix == null && attrNs.length() > 0)
-               {
-                  prefix = attrLocal + "_ns";
-                  nsReg.addPrefixMapping(prefix, attrNs);
-                  ch.startPrefixMapping(prefix, attrNs);
-                  startedPrefixes = add(startedPrefixes, prefix);
-                  attrs.addAttribute(Constants.NS_XML_SCHEMA, prefix, "xmlns:" + prefix, null, attrNs);
-               }
-
-               attrs.addAttribute(attrNs, attrLocal, buildQName(prefix, attrLocal), null, attr.getValue());
-            }
-         }
-      }
-
-      String localName = e.getLocalName();
-      if(localName == null)
-      {
-         localName = e.getNodeName();
-      }
-
-      String ns = e.getNamespaceURI();
-      if(ns == null)
-      {
-         ns = "";
-      }
-
-      String prefix = nsReg.getPrefix(ns);
-      if(prefix == null && ns.length() > 0)
-      {
-         prefix = localName + "_ns";
-         nsReg.addPrefixMapping(prefix, ns);
-         ch.startPrefixMapping(prefix, ns);
-         startedPrefixes = add(startedPrefixes, prefix);
-         attrs.addAttribute(Constants.NS_XML_SCHEMA, prefix, "xmlns:" + prefix, null, ns);
-      }
-
-      String qName = buildQName(prefix, localName);
-      ch.startElement(ns, localName, qName, attrs);
-
-      NodeList childNodes = e.getChildNodes();
-      if(childNodes != null && childNodes.getLength() > 0)
-      {
-         for(int i = 0; i < childNodes.getLength(); ++i)
-         {
-            Node node = childNodes.item(i);
-            switch(node.getNodeType())
-            {
-               case Node.ELEMENT_NODE:
-                  process((Element)node, ch, nsReg);
-                  break;
-               case Node.CDATA_SECTION_NODE:
-               case Node.TEXT_NODE:
-                  String value = node.getNodeValue();
-                  ch.characters(value.toCharArray(), 0, value.length());
-                  break;
-               case Node.ENTITY_REFERENCE_NODE:
-                  String ref = '&' + node.getNodeName() + ';';
-                  ch.characters(ref.toCharArray(), 0, ref.length());
-                  break;
-               case Node.ENTITY_NODE:
-                  ch.skippedEntity(node.getNodeName());
-                  break;
-            }
-         }
-      }
-
-      ch.endElement(ns, localName, qName);
-
-      if(startedPrefixes.size() > 0)
-      {
-         for(int i = startedPrefixes.size() - 1; i >= 0; --i)
-         {
-           String pref = (String)startedPrefixes.get(i);
-           nsReg.removePrefixMapping(pref);
-           ch.endPrefixMapping(pref);
-         }
-      }
-   }
-
-   private static boolean isXmlns(String ns)
-   {
-      return ns.startsWith("http://www.w3.org/2000/xmlns");
-   }
-
-   private static String buildQName(String prefix, String localName)
-   {
-      return prefix == null || prefix.length() == 0 ?
-         localName :
-         prefix + ':' + localName;
-   }
-
-   private static List add(List list, Object o)
-   {
-      switch(list.size())
-      {
-         case 0:
-            list = Collections.singletonList(o);
-            break;
-         case 1:
-            list = new ArrayList(list);
-         default:
-            list.add(o);
-      }
-      return list;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/Dom2Sax.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/util/Dom2Sax.java)

Deleted: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/NoopMap.java
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/util/NoopMap.java	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/NoopMap.java	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,93 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY 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 along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.xb.util;
-
-import java.util.AbstractMap;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision: $</tt>
- */
-public class NoopMap
-   extends AbstractMap
-{
-   public static final Map INSTANCE = new NoopMap();
-
-   public Object put(Object key, Object value)
-   {
-      return null;
-   }
-
-   public int size()
-   {
-      return 0;
-   }
-
-   public boolean isEmpty()
-   {
-      return true;
-   }
-
-   public boolean containsKey(Object key)
-   {
-      return false;
-   }
-
-   public boolean containsValue(Object value)
-   {
-      return false;
-   }
-
-   public Object get(Object key)
-   {
-      return null;
-   }
-
-   public Set keySet()
-   {
-      return Collections.EMPTY_SET;
-   }
-
-   public Collection values()
-   {
-      return Collections.EMPTY_SET;
-   }
-
-   public Set entrySet()
-   {
-      return Collections.EMPTY_SET;
-   }
-
-   public boolean equals(Object o)
-   {
-      return (o instanceof Map) && ((Map)o).size() == 0;
-   }
-
-   public int hashCode()
-   {
-      return 0;
-   }
-}

Copied: branches/refactor-test-branch/jbossxb/trunk/src/main/java/org/jboss/xb/util/NoopMap.java (from rev 1956, branches/logging_refactoring/jbossxb/trunk/src/main/java/org/jboss/xb/util/NoopMap.java)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/.project
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/.project	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/.project	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>tools</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/.project (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/.project)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/bin (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/bin)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/bin/ant	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,299 +0,0 @@
-#! /bin/sh
-
-#   Copyright 2001-2005 The Apache Software Foundation
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-# Extract launch and ant arguments, (see details below).
-ant_exec_args=
-no_config=false
-use_jikes_default=false
-ant_exec_debug=false
-show_help=false
-for arg in "$@" ; do
-  if [ "$arg" = "--noconfig" ] ; then
-    no_config=true
-  elif [ "$arg" = "--usejikes" ] ; then
-    use_jikes_default=true
-  elif [ "$arg" = "--execdebug" ] ; then
-    ant_exec_debug=true
-  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
-    show_help=true
-    ant_exec_args="$ant_exec_args -h"
-  else
-    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
-      show_help=true
-    fi
-    ant_exec_args="$ant_exec_args \"$arg\""
-  fi
-done
-
-# Source/default ant configuration
-if $no_config ; then
-  rpm_mode=false
-  usejikes=$use_jikes_default
-else
-  # load system-wide ant configuration
-  if [ -f "/etc/ant.conf" ] ; then
-    . /etc/ant.conf
-  fi
-
-  # load user ant configuration
-  if [ -f "$HOME/.ant/ant.conf" ] ; then
-    . $HOME/.ant/ant.conf
-  fi
-  if [ -f "$HOME/.antrc" ] ; then
-    . "$HOME/.antrc"
-  fi
-
-  # provide default configuration values
-  if [ -z "$rpm_mode" ] ; then
-    rpm_mode=false
-  fi
-  if [ -z "$usejikes" ] ; then
-    usejikes=$use_jikes_default
-  fi
-fi
-
-# Setup Java environment in rpm mode
-if $rpm_mode ; then
-  if [ -f /usr/share/java-utils/java-functions ] ; then
-    . /usr/share/java-utils/java-functions
-    set_jvm
-    set_javacmd
-  fi
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
-  ## resolve links - $0 may be a link to ant's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ANT_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ANT_HOME" ] &&
-    ANT_HOME=`cygpath --unix "$ANT_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# Build local classpath using just the launcher in non-rpm mode or
-# use the Jpackage helper in rpm mode with basic and default jars
-# specified in the ant.conf configuration. Because the launcher is
-# used, libraries linked in ANT_HOME will also be include, but this
-# is discouraged as it is not java-version safe. A user should
-# request optional jars and their dependencies via the OPT_JAR_LIST
-# variable
-if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
-  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
-  # If the user requested to try to add some other jars to the classpath
-  if [ -n "$OPT_JAR_LIST" ] ; then
-    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
-    if [ -n "$_OPTCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
-    fi
-  fi
-
-  # Explicitly add javac path to classpath, assume JAVA_HOME set
-  # properly in rpm mode
-  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
-  fi
-  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
-  fi
-
-  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-  # user CLASSPATH first and ant-found jars after.
-  # In that case, the user CLASSPATH will override ant-found jars
-  #
-  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-  # with ant-found jars first and user CLASSPATH after
-  if [ -n "$CLASSPATH" ] ; then
-    # merge local and specified classpath 
-    if [ -z "$LOCALCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$CLASSPATH"
-    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-    else
-      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-    fi
-
-    # remove class path from launcher -cp option
-    CLASSPATH=""
-  fi
-else
-  # not using rpm_mode; use launcher to determine classpaths
-  if [ -z "$LOCALCLASSPATH" ] ; then
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
-  else
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
-  fi
-fi
-
-if [ -n "$JAVA_HOME" ] ; then
-  # OSX hack to make Ant work with jikes
-  if $darwin ; then
-    OSXHACK="${JAVA_HOME}/../Classes"
-    if [ -d "${OSXHACK}" ] ; then
-      for i in "${OSXHACK}"/*.jar
-      do
-        JIKESPATH="$JIKESPATH:$i"
-      done
-    fi
-  fi
-fi
-
-# Allow Jikes support (off by default)
-if $usejikes; then
-  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  ANT_HOME=`cygpath --$format "$ANT_HOME"`
-  ANT_LIB=`cygpath --$format "$ANT_LIB"`
-  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# Show script help if requested
-if $show_help ; then
-  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
-  echo 'Script Options:'
-  echo '  --help, --h            print this message and ant help'
-  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
-  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
-  echo '                         configuration files'
-  echo '  --usejikes             enable use of jikes by default, unless'
-  echo '                         set explicitly in configuration files'
-  echo '  --execdebug            print ant exec line generated by this'
-  echo '                         launch script'
-  echo '  '
-fi
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$ANT_HOME" in
-    *\\ )
-    ANT_HOME="$ANT_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$JIKESPATH" in
-    *\\ )
-    JIKESPATH="$JIKESPATH\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-# Execute ant using eval/exec to preserve spaces in paths,
-# java options, and ant args
-ant_sys_opts=
-if [ -n "$CYGHOME" ]; then
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
-  else
-    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
-  fi
-else
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
-  fi
-fi
-ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
-if $ant_exec_debug ; then
-    echo $ant_exec_command
-fi
-eval $ant_exec_command

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/bin/ant)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant.bat
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/bin/ant.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,126 +0,0 @@
- at echo off
-
-REM  Copyright 2001,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-
-if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ANT_HOME=%~dp0..
-
-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
-
-set _USE_CLASSPATH=yes
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of arguments (up to the command line limit, anyway).
-set ANT_CMD_LINE_ARGS=%1
-if ""%1""=="""" goto doneStart
-shift
-:setupArgs
-if ""%1""=="""" goto doneStart
-if ""%1""==""-noclasspath"" goto clearclasspath
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
-shift
-goto setupArgs
-
-rem here is there is a -noclasspath in the options
-:clearclasspath
-set _USE_CLASSPATH=no
-shift
-goto setupArgs
-
-rem This label provides a place for the argument list loop to break out
-rem and for NT handling to skip to.
-
-:doneStart
-rem find ANT_HOME if it does not exist due to either an invalid value passed
-rem by the user or the %0 problem on Windows 9x
-if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
-
-rem check for ant in Program Files
-if not exist "%ProgramFiles%\ant" goto checkSystemDrive
-set ANT_HOME=%ProgramFiles%\ant
-goto checkJava
-
-:checkSystemDrive
-rem check for ant in root directory of system drive
-if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
-set ANT_HOME=%SystemDrive%\ant
-goto checkJava
-
-:checkCDrive
-rem check for ant in C:\ant for Win9X users
-if not exist C:\ant\lib\ant.jar goto noAntHome
-set ANT_HOME=C:\ant
-goto checkJava
-
-:noAntHome
-echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
-goto end
-
-:checkJava
-set _JAVACMD=%JAVACMD%
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
-goto checkJikes
-
-:noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=java.exe
-
-:checkJikes
-if not "%JIKESPATH%"=="" goto runAntWithJikes
-
-:runAnt
-if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikes
-if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
-
-:runAntWithJikesNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikesAndClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
-goto end
-
-:end
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-
-:mainEnd
-if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/bin/ant.bat (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/bin/ant.bat)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/bin/antRun	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#
-#  Copyright  2001-2002,2004 The Apache Software Foundation
-# 
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-# 
-#       http://www.apache.org/licenses/LICENSE-2.0
-# 
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# 
-#
-
-# Args: DIR command
-cd "$1"
-CMD="$2"
-shift
-shift
-
-exec "$CMD" "$@"

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/bin/antRun)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun.bat
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/bin/antRun.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,47 +0,0 @@
- at echo off
-
-REM
-REM Copyright  2001-2002,2004-2005 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-if ""%1""=="""" goto runCommand
-
-rem Change drive and directory to %1
-if "%OS%"=="Windows_NT" cd /d ""%1""
-if not "%OS%"=="Windows_NT" cd ""%1""
-shift
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of agruments (up to the command line limit, anyway).
-set ANT_RUN_CMD=%1
-if ""%1""=="""" goto runCommand
-shift
-:loop
-if ""%1""=="""" goto runCommand
-set ANT_RUN_CMD=%ANT_RUN_CMD% %1
-shift
-goto loop
-
-:runCommand
-rem echo %ANT_RUN_CMD%
-%ANT_RUN_CMD%
-
-if "%OS%"=="Windows_NT" @endlocal
-if "%OS%"=="WINNT" @endlocal
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/bin/antRun.bat (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/bin/antRun.bat)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/bin/antx.bat
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/bin/antx.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/bin/antx.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,6 +0,0 @@
- at echo off
- at setlocal
-set CLASSPATH=%~dp0..\lib\ant.jar;%CLASSPATH%
-java org.apache.tools.ant.Launcher %*
-rem java -jar %ANT_HOME%\lib\ant.jar org.apache.tools.ant.Launcher
- at endlocal

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/bin/antx.bat (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/bin/antx.bat)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/bin/lcp.bat
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/bin/lcp.bat	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/bin/lcp.bat	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,30 +0,0 @@
-REM
-REM Copyright  2001-2004 The Apache Software Foundation
-REM
-REM  Licensed under the Apache License, Version 2.0 (the "License");
-REM  you may not use this file except in compliance with the License.
-REM  You may obtain a copy of the License at
-REM
-REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM  Unless required by applicable law or agreed to in writing, software
-REM  distributed under the License is distributed on an "AS IS" BASIS,
-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-REM  See the License for the specific language governing permissions and
-REM  limitations under the License.
-REM
-REM
-
-set _CLASSPATHCOMPONENT=%1
-if ""%1""=="""" goto gotAllArgs
-shift
-
-:argCheck
-if ""%1""=="""" goto gotAllArgs
-set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
-shift
-goto argCheck
-
-:gotAllArgs
-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/bin/lcp.bat (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/bin/lcp.bat)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildfragments (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildfragments)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/aliases.ent
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/aliases.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,98 +0,0 @@
-<!-- list of aliases used to bridge gap between buildmagic defs and jbossbuild -->
-
-
-<path id="apache.commons.classpath">
-  <pathelement path="${apache.collections.lib}/commons-collections.jar"/>
-  <pathelement path="${apache.logging.lib}/commons-logging.jar"/>
-  <pathelement path="${apache.httpclient.lib}/commons-httpclient.jar"/>
-  <pathelement path="${apache.pool.lib}/commons-pool.jar"/>
-  <pathelement path="${apache.discovery.lib}/commons-discovery.jar"/>
-  <pathelement path="${apache.fileupload.lib}/commons-fileupload.jar"/>
-  <pathelement path="${apache.lang.lib}/commons-lang-2.0.jar"/>  
-</path>
-
-<path id="sax.classpath">
-  <pathelement path="${xml-sax.classpath}"/>
-</path>
- 
-<property name="xdoclet-xdoclet.lib" value="${xdoclet.xdoclet.lib}"/>
-<path id="xdoclet.task.classpath">
-  <path refid="xdoclet.xdoclet.classpath"/>
-</path>
-   
-<property name="gjt.jpl-util.lib" value="${gjt.jpl.util.lib}"/>   
-<path id="gjt.jpl-util.classpath">
-   <path refid="gjt.jpl.util.classpath"/>
-</path>   
-
-<property name="opennms.joesnmp.lib" value="${joesnmp.joesnmp.lib}"/>   
-<path id="opennms.joesnmp.classpath">
-   <path refid="joesnmp.joesnmp.classpath"/>
-</path>   
-
-<path id="jacorb.idl.classpath">
-   <path refid="apache.avalon.logkit.classpath"/>
-   <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-</path>
-
-<property name="jacorb.idl.include" value="${jacorb.jacorb.resources}"/>
-<property name="jacorb.jacorb.properties" value="${jacorb.jacorb.resources}"/>
-  
-<property name="sleepycat.lib" value="${sleepycat.sleepycat.lib}"/>
-<path id="sleepycat.classpath">
-   <path refid="sleepycat.sleepycat.classpath"/>
-</path>
-  
-<property name="apache.tomcat55.root" value="${apache.tomcat.root}"/>
-<property name="apache.tomcat55.lib" value="${apache.tomcat.lib}"/>
-<path id="apache.tomcat55.classpath">
-   <path refid="apache.tomcat.classpath"/>
-</path>
-  
-<property name="trove.lib" value="${trove.trove.lib}"/>  
-<path id="trove.classpath">
-   <path refid="trove.trove.classpath"/>
-</path>
-  
-<path id="qdox.classpath">
-   <path refid="qdox.qdox.classpath"/>
-</path>
-  
-<property name="javassist.lib" value="${javassist.javassist.lib}"/>
-<path id="javassist.classpath">
-  <path refid="javassist.javassist.classpath"/>
-</path>
-  
-<property name="hibernate.lib" value="${hibernate.hibernate.lib}"/>  
-<path id="hibernate3.classpath">
-  <path refid="hibernate.hibernate.classpath"/>
-</path>
-
-<property name="odmg.lib" value="${odmg.odmg.lib}"/>
-<path id="odmg.classpath">
-  <path refid="odmg.odmg.classpath"/>
-</path>
-
-<property name="cglib.lib" value="${cglib.cglib.lib}"/>
-<path id="cglib.classpath">
-  <path refid="cglib.cglib.classpath"/>  
-</path>
-
-<path id="ejb3-persistence.classpath">
-   <path refid="hibernate.annotations.classpath"/>
-   <path refid="hibernate.entitymanager.classpath"/>
-</path>
-
-<property name="spring.lib" value="${spring.spring.lib}"/>
-<path id="spring.classpath">
-  <path refid="spring.spring.classpath"/>  
-</path>
-
-<!-- Ant -->
-<property name="apache.ant.root" value="${project.tools}"/>
-<property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-<path id="apache.ant.classpath">
-  <pathelement path="${apache.ant.lib}/ant.jar"/>
-</path>
-  
- 
\ No newline at end of file

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/aliases.ent (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/aliases.ent)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/autoload.properties
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/autoload.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,42 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  BuildMagic tasks which will be autoloaded.                              ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: autoload.properties,v 1.8 2004/11/24 02:07:35 starksm Exp $ ###
-
-### Stuff that glues things together  ###
-
-resolveproperties=org.jboss.tools.buildmagic.task.ResolveProperties
-resolver=org.jboss.tools.buildmagic.task.ResolveProperties
-propertyfilter=org.jboss.tools.buildmagic.task.PropertyFilter
-require=org.jboss.tools.buildmagic.task.Require
-call=org.jboss.tools.buildmagic.task.CallTarget
-Ant=org.jboss.tools.buildmagic.task.Ant
-
-### Project/Module tasks ###
-
-execmodules=org.jboss.tools.buildmagic.task.module.ExecuteModules
-projectinfo=org.jboss.tools.buildmagic.task.module.ProjectInfo
-moduleinfo=org.jboss.tools.buildmagic.task.module.ModuleInfo
-moduleconfig=org.jboss.tools.buildmagic.task.module.ModuleConfig
-moduleinit=org.jboss.tools.buildmagic.task.module.ModuleInit
-
-### Configuration Helpers ###
-library=org.jboss.tools.buildmagic.task.config.Library
-modulelibrary=org.jboss.tools.buildmagic.task.config.ModuleLibrary
-libraryset=org.jboss.tools.buildmagic.task.config.LibrarySet
-
-### Misc ###
-
-projecthelp=org.jboss.tools.buildmagic.task.ProjectHelp
-_puke=org.jboss.tools.buildmagic.task.util.Puke
-_dump=org.jboss.tools.buildmagic.task.util.Dump
-
-### Unused ??? ###
-
-#set=org.jboss.tools.buildmagic.task.Set
-#unset=org.jboss.tools.buildmagic.task.Unset
-#appendpath=org.jboss.tools.buildmagic.task.AppendPath
-#findroot=org.jboss.tools.buildmagic.task.FindRoot

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/autoload.properties (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/autoload.properties)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/build-common.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/build-common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,905 +0,0 @@
-<project name="common tasks">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}" 
-	        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-  Unsupported Ant version:
-    ${ant.version}
-  Please install a version which is compatible with Ant ${buildmagic.ant16.baseversion}.
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Define the environment varaible. This needs to be first. -->
-  <property environment="env"/>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-  <property name="project.build" value="${project.root}/build"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-
-  <!-- Include user and project property overrides. -->
-  <import file="version-info.xml" />
-  <property file="${project.build}/local.properties"/>
-
-    <available file="${module.root}/etc/local.properties-example"
-	       property="init.have-local-properties"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" unless="build-bypass.disabled">
-
-   <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="**/*"/>
-      <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-      <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-      <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-      <srcfiles dir="${project.tools}" includes="**/*"/>
-   </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-   <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-   </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean">
-   <available file="${module.output}" property="module.output.present"/>  
-   <antcall target="_buildmagic:clean-internal"/>
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal" if="module.output.present">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes/**"/>
-      </fileset>
-    </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-	zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-    <!-- Where source files live -->
-    <property name="source.java" value="${module.source}/main"/>
-    <property name="source.etc" value="${module.source}/etc"/>
-    <property name="source.bin" value="${module.source}/bin"/>
-    <property name="source.docs" value="${module.source}/docs"/>
-    <property name="source.resources" value="${module.source}/resources"/>
-    <property name="source.examples" value="${module.source}/examples"/>
-
-    <!-- Where build generated files will go -->
-    <property name="build.classes" value="${module.output}/classes"/>
-    <property name="build.lib" value="${module.output}/lib"/>
-    <property name="build.api" value="${module.output}/api"/>
-    <property name="build.etc" value="${module.output}/etc"/>
-    <property name="build.bin" value="${module.output}/bin"/>
-    <property name="build.docs" value="${module.output}/docs"/>
-    <property name="build.parsers" value="${module.output}/gen-parsers"/>
-    <property name="build.resources" value="${module.output}/resources"/>
-    <property name="build.examples" value="${module.output}/examples"/>
-    <property name="build.reports" value="${module.output}/reports"/>
-    <property name="build.gen" value="${module.output}/gen"/>
-    <property name="build.gen-src" value="${module.output}/gen-src"/>
-    <property name="build.todo" value="${module.output}/todo"/>
-
-    <!-- Install/Release structure -->
-    <property name="install.id" value="${module.name}-${module.version}"/>
-    <property name="release.id" value="${install.id}"/>
-    <property name="install.root" value="${module.output}/${install.id}"/>
-
-    <!-- The combined thirdparty classpath -->
-    <path id="thirdparty.classpath">
-      <path refid="library.classpath"/>
-      <path refid="dependentmodule.classpath"/>
-    </path>
-
-    <!-- This module is based on Java 1.4 -->
-    <property name="javac.target" value="1.4"/>
-    <property name="javac.source" value="1.4"/>
-
-    <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-    <property name="rmic.stubVersion" value="1.2"/>
-
-    <!-- classpath and local.classpath must have a value using with a path -->
-    <property name="classpath" value=""/>
-    <property name="local.classpath" value=""/>
-
-    <!-- The classpath required to build classes. -->
-    <path id="javac.classpath">
-      <pathelement path="${classpath}"/>
-      <pathelement path="${local.classpath}"/>
-      <path refid="thirdparty.classpath"/>
-    </path>
-
-    <!-- The classpath required to build javadocs. -->
-    <path id="javadoc.classpath">
-      <path refid="javac.classpath"/>
-    </path>
-
-    <!-- The default prefix -->
-    <property name="jar.prefix" value="jboss-${module.name}"/>
-
-    <!-- The default server and client jar name -->
-    <property name="jar.server.name" value="${jar.prefix}.jar"/>
-    <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-    <!-- Packages to include when generating api documentation -->
-    <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <javac destdir="${build.classes}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-         depend="${javac.depend}"
-         verbose="${javac.verbose}"
-         deprecation="${javac.deprecation}"
-         includeAntRuntime="${javac.include.ant.runtime}"
-         includeJavaRuntime="${javac.include.java.runtime}"
-         failonerror="${javac.fail.onerror}">
-     <src path="${source.java}:${build.gen-src}"/>
-     <classpath refid="javac.classpath"/>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" unless="mbean-bypass.disabled">
-
-   <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-      <srcfiles dir="${module.source}" includes="${mbean.includes}"/>
-   </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-        depends="_buildmagic:mbean-bypass-checker" 
-        unless="mbean-bypass.on">
-
-    <taskdef name="jmxdoclet"
-             classname="xdoclet.modules.jmx.JMXDocletTask"
-             classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.gen-src}"/>
-    
-    <jmxdoclet destdir="${build.gen-src}"
-               excludedtags="@version, at author">
-      <fileset dir="${source.java}" 
-               includes="${mbean.includes}"/>
-      <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    </jmxdoclet>
-    
-    <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <javac destdir="${build.test}"
-         optimize="${javac.optimize}"
-         target="${javac.target}"
-         source="${javac.source}"
-         debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    failonerror="${javac.fail.onerror}">
-     <src path="${source.test}:${build.gen.test}"/>
-     <classpath>
-       <path refid="javac.classpath"/>
-       <pathelement location="${build.classes}"/>
-     </classpath>
-     <include name="${javac.includes}"/>
-     <exclude name="${javac.excludes}"/>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-       <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-       <include name="**/*"/>
-    </fileset>
-  </copy>
-
-</target>
-
-<target name="_default:fix-bin">
-  <fixcrlf srcdir="${build.bin}"
-        eol="lf" eof="remove"
-        includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}" 
-        eol="crlf" eof="remove"
-        includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-       <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" unless="compile.disable">
-  <rmic base="${build.classes}"
-        verify="${rmic.verify}"
-   iiop="${rmic.iiop}"
-   iiopopts="${rmic.iiopops}"
-   idl="${rmic.idl}"
-   idlopts="${rmic.idlops}"
-   debug="${rmic.debug}"
-        stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-    <!-- Build the server jar -->
-    <jar jarfile="${build.lib}/${jar.server.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.server.includes}"/>
-    </jar>
-
-    <!-- Build jbossmq-client.jar -->
-    <jar jarfile="${build.lib}/${jar.client.name}"
-         manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}"
-               includes="${jar.client.includes}"/>
-    </jar>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-   depends="docs-api, docs-todo"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-
-<target name="docs-javadocs-check">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-         targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-  <!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs" 
-     depends="docs-javadocs-check" 
-     unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="${javadoc.packages}"
-             sourcepath="${source.java}:${module.output}/gen-src"
-             destdir="${build.api}"
-             classpathref="javadoc.classpath"
-             windowtitle="${javadoc.windowtitle}"
-        splitindex="${javadoc.splitindex}"
-             author="${javadoc.author}"
-             version="${javadoc.version}"
-             public="${javadoc.public}"
-             package="${javadoc.package}"
-             protected="${javadoc.protected}"
-             private="${javadoc.private}"
-             use="${javadoc.use}"
-        verbose="${javadoc.verbose}"> 
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2002 JBoss Group, LLC. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-    
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-      
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false" />
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false" />
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false" />
-    <tag name="ejb.pk" description="ejb" enabled="false" />
-    <tag name="ejb.bean" description="ejb" enabled="false" />
-    <tag name="ejb.transaction" description="ejb" enabled="false" />
-    <tag name="ejb.finder" description="ejb" enabled="false" />
-    <tag name="ejb.relation" description="ejb" enabled="false" />
-    <tag name="ejb.create-method" description="ejb" enabled="false" />
-    
-    <tag name="jboss.query" description="jboss" enabled="false" />
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false" />
-    <tag name="jboss.load-group" description="jboss" enabled="false" />
-    <tag name="jboss.persistence" description="jboss" enabled="false" />
-    <tag name="jboss.entity-command" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation" description="jboss" enabled="false" />
-    <tag name="jboss.method-attribute" description="jboss" enabled="false" />
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false" />
-    <tag name="jboss.relation-table" description="jboss" enabled="false" />
-    <tag name="jboss.table-attribute" description="jboss" enabled="false" />
-    
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false" />
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false" />
-    <tag name="jboss.method-attributes" description="jboss" enabled="false" />
-    
-  </javadoc>
-</target>
-
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-<target name="xdoclet-task-classpath-check" unless="xdoclet.task.classpath">
-    <path id="xdoclet.task.classpath">
-      <path refid="xdoclet.base.classpath"/>
-      <path refid="apache.commons.classpath"/>
-      <path refid="javac.classpath" />
-    </path>
-    <property name="xdoclet.task.classpath" 
-	      refid="xdoclet.task.classpath"/>
-</target>
-
-<target name="docs-todo-check">
-      <!-- if index.html is newer than the sources we are up to date -->
-      <uptodate property="docs-todo.disable"
-         targetfile="${build.todo}/index.html">
-         <srcfiles dir="${source.java}" includes="**/*.java"/>
-      </uptodate>
-  </target>
-
-  <!-- Generate TODO list from @todo tags -->
-  <target name="docs-todo" 
-     depends="docs-todo-check" 
-     unless="docs-todo.disable">
-
-  <taskdef name="todo"
-               classname="xdoclet.modules.doc.DocumentDocletTask"
-               classpath="${xdoclet.task.classpath}"/>
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-
-    <info/>
-  </todo>
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-  <target name="jmx-docs">
-    <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-    <mkdir dir="${build.jmx-doc}"/>
-    <jmxdoclet
-        destdir="${build.jmx-doc}"
-             force="false"
-        excludedtags="@version, at author">
-      <fileset dir="${source.java}">
-        <include name="**/*.java"/>
-      </fileset>
-      <jbossXmlDoc/>
-    </jmxdoclet>
-
-  </target>
-
-  <!-- Generate the plain HTML jmx docs -->
-  <target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-    <!-- Force the use of SAXON XSLT -->
-    <property system="true" 
-         name="javax.xml.transform.TransformerFactory"
-         value="com.icl.saxon.TransformerFactoryImpl"/>
-
-    <mkdir dir="${build.jmx-api}"/>
-    <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-      processor="trax"
-      extension=".html"
-      basedir="${build.jmx-doc}"
-      destdir="${build.jmx-api}">
-       <include name="**/*.xml"/>
-       <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-       <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-    </style>
-
-  </target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean" 
-     depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber" 
-     depends="_buildmagic:clobber, clean">
-</target>
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-  <!-- ================================================================== -->
-  <!-- Project (build module) Targets                                     -->
-  <!-- ================================================================== -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-    <!-- Skip any missing modules and issue a warning -->
-    <property name="executemodules.skipmissing" value="true"/>
-
-    <!-- The header and footer displayed during each module execution -->
-    <property name="executemodules.header"><![CDATA[
- ============================================================== 
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-    <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-    ]]></property>
-
-    <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag, 
-       version.name, 
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-    </property>
-
-    <!-- Show the module configuration -->
-    <echo>groups:  ${groups}</echo>
-    <echo>modules: ${modules}</echo>
-
-    <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean">
-  <execmodules target="clean" 
-          modules="${modules}" 
-          root="${project.root}/@MODULE@"
-          skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/@MODULE@"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-</project>
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/build-common.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/build-common.xml)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1135 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-  <property name="javac.debug" value="true"/>
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent~
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent~	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1134 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent~ (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/buildmagic.ent~)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.properties
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,36 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Copyright (c) 1998-2000 by Jason Dillon <jason at planet57.com>            ##
-##                                                                          ##
-##  This file is part of BuildMagic; an extension to Ant.                   ##
-##                                                                          ##
-##  This library is free software; you can redistribute it and/or modify    ##
-##  it under the terms of the GNU Lesser General Public License as          ##
-##  published by the Free Software Foundation; either version 2 of the      ##
-##  License, or (at your option) any later version.                         ##
-##                                                                          ##
-##  This library is distributed in the hope that it will be useful, but     ##
-##  WITHOUT ANY WARRANTY; without even the implied warranty of              ##
-##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       ##
-##  Lesser General Public License for more details.                         ##
-##                                                                          ##
-### ====================================================================== ###
-##                                                                          ##
-##  Common Properties                                                       ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: common.properties,v 1.4 2004/11/24 02:07:36 starksm Exp $ ###
-
-buildmagic.resolveproperties.force=false
-buildmagic.propertyfilter.all=true
-
-### Jython Support ###
-
-true=1
-false=0
-
-### Misc ###
-
-/=${file.separator}
-sun.boot.classpath=${sun.boot.class.path}

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.properties (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/common.properties)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,324 +0,0 @@
-<!-- $Id: common.xml,v 1.7 2004/11/24 02:07:36 starksm Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Load Buildmagic extention tasks. -->
-<taskdef resource="org/jboss/tools/buildmagic/task/autoload.properties"/>
-<taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"/>
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init">
-  <!-- fail unless we have been started from the build script -->
-  <require property="build.script">
-
-    The build system MUST be executed with one of the provided build scripts.
-
-  </require>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.Void" property="HAVE_JDK_1.1"/>
-  <available classname="java.lang.ThreadLocal" property="HAVE_JDK_1.2"/>
-  <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-
-  <!-- Setup the basic project roots. -->
-  <property name="_project.root" value=".."/>
-  <path id="project.root"><pathelement location="${_project.root}"/></path>
-  <property name="project.root" refid="project.root"/> 
-  <property name="project.build" value="${project.root}/build"/>
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the project environment. -->
-  <property file="${project.build}/local.properties"/>
-  <property name="project.tools" value="${project.root}/tools"/>
-  <property name="project.thirdparty" value="${project.root}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-
-  <available file="${module.root}/etc/local.properties-example"
-        property="init.have-local-properties"/>
-  <call target="_buildmagic:init:local-properties" if="init.have-local-properties"/>
-
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property resource="org/jboss/tools/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property resource="org/jboss/tools/buildmagic/task.properties"/>
-
-  <!-- Late bind properties & install filters -->
-  <resolver force="${buildmagic.resolveproperties.force}"/>
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-        tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <record name="${basedir}/build.log" append="no"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-]]></echo>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-  <delete dir="${module.output}"/>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-
-  <!-- 
-     | Try to stop the build log before we delete the file.
-   -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!-- 
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-      <header><![CDATA[
-  The ${module.Name} module.
-]]></header>
-      <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-       basedir="${module.output}"
-       includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-   zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-       <include name="**/*"/>
-       <exclude name="${install.id}/**"/>
-    </fileset>
-  </copy>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}"
-                 exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module-${module}-${target}-prepare"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests" 
-          modules="${modules}" 
-          root="${project.root}/${module}"
-          skipmissing="${executemodules.skipmissing}"
-          exportproperties="${executemodules.exportproperties}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber" 
-       modules="${modules}" 
-       root="${project.root}/${module}"
-       skipmissing="${executemodules.skipmissing}">
-    <before target="_module-${module}-${target}-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module-${module}-${target}"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/common.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/common.xml)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/libraries.ent
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/libraries.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,633 +0,0 @@
-<!-- $Id: libraries.ent,v 1.79 2005/11/04 15:36:44 alesj Exp $ -->
-
-  <!-- Spring -->
-  <property name="spring.root" value="${project.thirdparty}/spring"/>
-  <property name="spring.lib" value="${spring.root}/lib"/>
-  <path id="spring.classpath">
-     <pathelement path="${spring.lib}/spring-beans.jar"/>
-     <pathelement path="${spring.lib}/spring-core.jar"/>
-     <pathelement path="${spring.lib}/spring-context.jar"/>
-  </path>
-  <path id="spring-example.classpath">
-     <pathelement path="${spring.lib}/spring-aop.jar"/>
-     <pathelement path="${spring.lib}/spring-web.jar"/>
-     <pathelement path="${spring.lib}/spring-webmvc.jar"/>
-   </path>
-
-  <!-- Dom4j -->
-  <property name="dom4j.dom4j.root" value="${project.thirdparty}/dom4j-dom4j"/>
-  <property name="dom4j.dom4j.lib" value="${dom4j.dom4j.root}/lib"/>
-  <path id="dom4j.dom4j.classpath">
-    <pathelement path="${dom4j.dom4j.lib}/dom4j.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="jaxen.jaxen.lib" value="${dom4j.dom4j.root}/lib"/>  
-
-  <!-- Javassist -->
-  <property name="javassist.root" value="${project.thirdparty}/javassist"/>
-  <property name="javassist.lib" value="${javassist.root}/lib"/>
-  <path id="javassist.classpath">
-    <pathelement path="${javassist.lib}/javassist.jar"/>
-  </path>
-
-  <!-- qdox -->
-  <property name="qdox.root" value="${project.thirdparty}/qdox"/>
-  <property name="qdox.lib" value="${qdox.root}/lib"/>
-  <path id="qdox.classpath">
-    <pathelement path="${qdox.lib}/qdox.jar"/>
-  </path>
-
-  <!-- hibernate3 -->
-  <property name="hibernate.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.lib" value="${hibernate.root}/lib"/>
-  <path id="hibernate3.classpath">
-    <pathelement path="${hibernate.lib}/hibernate3.jar"/>
-    <pathelement path="${hibernate.lib}/asm.jar"/>
-    <pathelement path="${hibernate.lib}/asm-attrs.jar"/>
-    <pathelement path="${hibernate.lib}/antlr*.jar"/>
-  </path>
-  
-  <!-- hibernate entity manager -->
-  <property name="hibernate.entitymanager.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.entitymanager.lib" value="${hibernate.entitymanager.root}/lib"/>
-  <path id="hibernate.entitymanager.classpath">
-    <pathelement path="${hibernate.entitymanager.lib}/ejb3-persistence.jar"/>
-    <pathelement path="${hibernate.entitymanager.lib}/hibernate-entitymanager.jar"/>
-  </path>
-  
-  <!-- hibernate annotations manager -->
-  <property name="hibernate.annotations.root" value="${project.thirdparty}/hibernate"/>
-  <property name="hibernate.annotations.lib" value="${hibernate.annotations.root}/lib"/>
-  <path id="hibernate.annotations.classpath">
-    <pathelement path="${hibernate.annotations.lib}/hibernate-annotations.jar"/>
-  </path>  
-  
-  <!-- asm alias used for bridging to thirdparty build-->
-  <property name="asm.asm.root" value="${project.thirdparty}/hibernate"/>
-  <property name="asm.asm.lib" value="${asm.asm.root}/lib/"/>
-  <property name="asm.asm.resources" value="${asm.asm.root}/resources/"/>
-  <path id="asm.asm.classpath">
-     <pathelement path="${asm.asm.lib}/asm.jar"/>
-     <pathelement path="${asm.asm.lib}/asm-attrs.jar"/>
-  </path>
-  
-
-  <!-- ejb3-persistence -->
-  <path id="ejb3-persistence.classpath">
-    <pathelement path="${hibernate.lib}/hibernate-annotations.jar"/>
-    <pathelement path="${hibernate.lib}/hibernate-entitymanager.jar"/>
-    <pathelement path="${hibernate.lib}/ejb3-persistence.jar"/>
-  </path>
-
-  <!-- ODMG (needed for Hibernate) -->
-  <property name="odmg.root" value="${project.thirdparty}/odmg"/>
-  <property name="odmg.lib" value="${odmg.root}/lib"/>
-  <path id="odmg.classpath">
-    <pathelement path="${odmg.lib}/odmg-3.0.jar"/>
-  </path>
-
-  <!-- CGLIB (needed for Hibernate) -->
-  <property name="cglib.root" value="${project.thirdparty}/cglib"/>
-  <property name="cglib.lib" value="${cglib.root}/lib"/>
-  <path id="cglib.classpath">
-    <pathelement path="${cglib.lib}/cglib-2.1.1.jar"/>
-  </path>
-
-
-  <!-- Trove -->
-  <property name="trove.root" value="${project.thirdparty}/trove"/>
-  <property name="trove.lib" value="${trove.root}/lib"/>
-  <path id="trove.classpath">
-    <pathelement path="${trove.lib}/trove.jar"/>
-  </path>
-
-  <!-- Ant -->
-  <property name="apache.ant.root" value="${project.tools}"/>
-  <property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
-  <path id="apache.ant.classpath">
-    <pathelement path="${apache.ant.lib}/ant.jar"/>
-  </path>
-
-  <!-- Apache Avalon -->
-  <property name="apache.avalon.root" value="${project.thirdparty}/apache-avalon"/>
-  <property name="apache.avalon.lib" value="${apache.avalon.root}/lib"/>
-  <path id="apache.avalon.classpath">
-    <pathelement path="${apache.avalon.lib}/avalon-framework.jar"/>
-  </path>
-  <property name="apache.avalon.logkit.lib" value="${apache.avalon.lib}"/>  
-  <path id="apache.avalon.logkit.classpath">
-    <pathelement path="${apache.avalon.logkit.lib}/logkit.jar"/>
-  </path>
-
-  <!-- Apache BCEL -->
-  <property name="apache.bcel.root" value="${project.thirdparty}/apache-bcel"/>
-  <property name="apache.bcel.lib" value="${apache.bcel.root}/lib"/>
-  <path id="apache.bcel.classpath">
-    <pathelement path="${apache.bcel.lib}/bcel.jar"/>
-  </path>
-
-  <!-- Apache Commons -->
-  <property name="apache.commons.root" value="${project.thirdparty}/apache-commons"/>
-  <property name="apache.commons.lib" value="${apache.commons.root}/lib"/>
-  <path id="apache.commons.classpath">
-    <pathelement path="${apache.commons.lib}/commons-collections.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-pool.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-discovery.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-fileupload.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-lang-2.0.jar"/>
-    <pathelement path="${apache.commons.lib}/commons-vfs.jar"/>
-  </path>
-  
-  <!-- Properties used for transtion to thirdparty build -->
-  <property name="apache.collections.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.codec.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.beanutils.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.digester.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.httpclient.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.logging.lib" value="${apache.commons.root}/lib"/>
-  <property name="apache.pool.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.fileupload.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.lang.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.vfs.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.discovery.lib" value="${apache.commons.root}/lib"/>  
-  <property name="apache.validator.lib" value="${apache.commons.root}/lib"/>    
-  <property name="apache.logging.api.lib" value="${apache.commons.root}/lib"/>
-  
-  <path id="apache.httpclient.classpath">
-     <pathelement path="${apache.commons.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <path id="apache.logging.classpath">
-     <pathelement path="${apache.commons.lib}/commons-logging.jar"/>
-  </path>
-  
-  <path id="apache.beanutils.classpath">
-     <pathelement path="${apache.commons.lib}/commons-beanutils.jar"/>
-  </path>
-  
-  <path id="apache.validator.classpath">
-       <pathelement path="${apache.commons.lib}/commons-validator-1.1.3.jar"/>
-  </path>
-
-  <!-- Apache Log4j -->
-  <property name="apache.log4j.root" value="${project.thirdparty}/apache-log4j"/>
-  <property name="apache.log4j.lib" value="${apache.log4j.root}/lib"/>
-  <path id="apache.log4j.classpath">
-    <pathelement path="${apache.log4j.lib}/log4j.jar"/>
-  </path>
-
-  <!-- Apache Lucene -->
-  <property name="apache.lucene.root"
-    value="${project.thirdparty}/apache-lucene"/>
-  <property name="apache.lucene.lib" value="${apache.lucene.root}/lib"/>
-  <path id="apache.lucene.classpath">
-    <pathelement path="${apache.lucene.lib}/lucene.jar"/>
-  </path>
-
-   <!-- Apache Myfaces -->
-   <property name="apache.myfaces.root"
-     value="${project.thirdparty}/apache-myfaces"/>
-   <property name="apache.myfaces.lib" value="${apache.myfaces.root}/lib"/>
-
-  <!-- Apache Tomcat 5.5.x -->
-  <property name="apache.tomcat55.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.tomcat55.lib" value="${apache.tomcat55.root}"/>  
-  <path id="apache.tomcat55.classpath">
-    <fileset dir="${apache.tomcat55.root}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-  
-  <!-- Apache commons-el -->
-  <property name="commons.el.root" value="${apache.tomcat55.root}"/>
-  <property name="commons.el.lib" value="${apache.tomcat55.root}"/>
-  <path id="commons.el.classpath">
-     <pathelement path="${commons.el.lib}/commons-el.jar"/>
-  </path> 
-  
-  <!-- Apache Modeler -->
-  <property name="apache.modeler.root" value="${project.thirdparty}/apache-tomcat55"/>
-  <property name="apache.modeler.lib" value="${apache.modeler.root}"/>
-  <path id="apache.modeler.classpath">
-    <fileset dir="${apache.modeler.root}">
-      <include name="commons-modeler.jar" />
-    </fileset>
-  </path>
-
-  <!-- Apache Velocity -->
-  <property name="apache.velocity.root" value="${project.thirdparty}/apache-velocity"/>
-  <property name="apache.velocity.lib" value="${apache.velocity.root}/lib"/>
-  <path id="apache.velocity.classpath">
-    <pathelement path="${apache.velocity.lib}/velocity.jar"/>
-  </path>
-
-  <!-- Apache Xerces -->
-  <property name="apache.xerces.root" value="${project.thirdparty}/apache-xerces"/>
-  <property name="apache.xerces.lib" value="${apache.xerces.root}/lib"/>
-  <path id="apache.xerces.classpath">
-    <pathelement path="${apache.xerces.lib}/xml-apis.jar"/>
-    <pathelement path="${apache.xerces.lib}/xercesImpl.jar"/>
-    <pathelement path="${apache.xerces.lib}/resolver.jar"/>
-  </path>
-
-  <!-- Apache Xalan -->
-  <property name="apache.xalan.root" value="${project.thirdparty}/apache-xalan"/>
-  <property name="apache.xalan.lib" value="${apache.xalan.root}/lib"/>
-  <path id="apache.xalan.classpath">
-    <pathelement path="${apache.xalan.lib}/xalan.jar"/>
-    <path refid="apache.xerces.classpath"/>
-  </path>
-
-   <!-- Apache Scout -->
-    <property name="apache.scout.root" value="${project.thirdparty}/apache-scout"/>
-    <property name="apache.scout.lib" value="${apache.scout.root}/lib"/>
-    <path id="apache.scout.classpath">
-      <pathelement path="${apache.scout.lib}/scout.jar"/>
-    </path>
-
-  <!-- Apache Slide -->
-  <property name="apache.slide.root" value="${project.thirdparty}/apache-slide"/>
-  <property name="apache.slide.lib" value="${apache.slide.root}/client/lib"/>
-  <path id="apache.slide.classpath">
-    <pathelement path="${apache.slide.lib}/webdavlib.jar"/>
-    <pathelement path="${apache.slide.lib}/commons-httpclient.jar"/>
-  </path>
-
-  <!-- Apache JaxMe2 -->
-  <property name="apache.jaxme.root" value="${project.thirdparty}/apache-jaxme"/>
-  <property name="apache.jaxme.lib" value="${apache.jaxme.root}/lib"/>
-  <path id="apache.jaxme.classpath">
-    <pathelement path="${apache.jaxme.lib}/jaxmexs.jar"/>
-  </path>
-
-  <!-- Apache WSS4J -->
-  <property name="apache.wss4j.root" value="${project.thirdparty}/apache-wss4j"/>
-  <property name="apache.wss4j.lib" value="${apache.wss4j.root}/lib"/>
-  <path id="apache.wss4j.classpath">
-    <pathelement path="${apache.wss4j.lib}/wss4j.jar"/>
-  </path>
-
-  <!-- Apache XMLSec -->
-  <property name="apache.xmlsec.root" value="${project.thirdparty}/apache-xmlsec"/>
-  <property name="apache.xmlsec.lib" value="${apache.xmlsec.root}/lib"/>
-  <path id="apache.xmlsec.classpath">
-    <pathelement path="${apache.xmlsec.lib}/xmlsec.jar"/>
-  </path>
-
-  <!-- Bouncy Castle JCE Provider -->
-  <property name="bouncycastle.root" value="${project.thirdparty}/bouncycastle"/>
-  <property name="bouncycastle.lib" value="${bouncycastle.root}/lib"/>
-  <path id="bouncycastle.classpath">
-    <pathelement path="${bouncycastle.lib}/bcprov-jdk14-122.jar"/>
-  </path>
-
-  <!-- OpenSAML -->
-  <property name="opensaml.root" value="${project.thirdparty}/opensaml"/>
-  <property name="opensaml.lib" value="${opensaml.root}/lib"/>
-  <path id="opensaml.classpath">
-    <pathelement path="${opensaml.lib}/opensaml.jar"/>
-  </path>
-
-  <!-- GNU Regex -->
-  <property name="gnu.regexp.root" value="${project.thirdparty}/gnu-regexp"/>
-  <property name="gnu.regexp.lib" value="${gnu.regexp.root}/lib"/>
-  <path id="gnu.regexp.classpath">
-    <pathelement path="${gnu.regexp.lib}/gnu-regexp.jar"/>
-  </path>
-
-  <!-- GNU Getopt -->
-  <property name="gnu.getopt.root" value="${project.thirdparty}/gnu-getopt"/>
-  <property name="gnu.getopt.lib" value="${gnu.getopt.root}/lib"/>
-  <path id="gnu.getopt.classpath">
-    <pathelement path="${gnu.getopt.lib}/getopt.jar"/>
-  </path>
-
-  <!-- org.jdom -->
-  <property name="jdom.root" value="${project.thirdparty}/jdom-beta-7"/>
-  <property name="jdom.lib" value="${jdom.root}/lib"/>
-  <path id="jdom.classpath">
-    <pathelement path="${jdom.lib}/jdom.jar"/>
-  </path>
-
-  <!-- JBoss -->
-  <property name="jboss.external.root" value="${project.thirdparty}/jboss"/>
-  <property name="jboss.remoting.root" value="${jboss.external.root}/remoting"/>
-  <property name="jboss.remoting.lib" value="${jboss.remoting.root}/lib"/>
-  <path id="jboss.remoting.classpath">
-    <pathelement path="${jboss.remoting.lib}/jboss-remoting.jar"/>
-  </path>
-  <property name="jboss.serialization.root" value="${jboss.external.root}/serialization"/>
-  <property name="jboss.serialization.lib" value="${jboss.serialization.root}/lib"/>
-  <path id="jboss.serialization.classpath">
-    <pathelement path="${jboss.serialization.lib}/jboss-serialization.jar"/>
-  </path>
-  <property name="jboss.axis.root" value="${jboss.external.root}/axis"/>
-  <property name="jboss.axis.lib" value="${jboss.axis.root}/lib"/>
-  <path id="jboss.axis.classpath">
-    <pathelement path="${jboss.axis.lib}/axis-ws4ee.jar"/>
-  </path>
-
-  <!-- JUnit -->
-  <property name="junit.junit.root" value="${project.thirdparty}/junit-junit"/>
-  <property name="junit.junit.lib" value="${junit.junit.root}/lib"/>
-  <path id="junit.junit.classpath">
-    <pathelement path="${junit.junit.lib}/junit.jar"/>
-  </path>
-
-  <!-- EDU.oswego.cs.dl.util.concurrent -->
-  <property name="oswego.concurrent.root" value="${project.thirdparty}/oswego-concurrent"/>
-  <property name="oswego.concurrent.lib" value="${oswego.concurrent.root}/lib"/>
-  <path id="oswego.concurrent.classpath">
-    <pathelement path="${oswego.concurrent.lib}/concurrent.jar"/>
-  </path>
-
-  <!-- org.xml.sax (SAX2 & SAX2 Extensions) -->
-  <property name="sax.root" value="${project.thirdparty}/xml-sax"/>
-  <property name="sax.lib" value="${sax.root}/lib"/>
-  <path id="sax.classpath">
-    <pathelement path="${sax.lib}/sax2.jar"/>
-    <pathelement path="${sax.lib}/sax2-ext.jar"/>
-  </path>
-
-  <!-- IBM WSDL4j -->
-  <property name="ibm.wsdl4j.root" value="${project.thirdparty}/ibm-wsdl4j"/>
-  <property name="ibm.wsdl4j.lib" value="${ibm.wsdl4j.root}/lib"/>
-  <path id="ibm.wsdl4j.classpath">
-    <pathelement path="${ibm.wsdl4j.lib}/wsdl4j.jar"/>
-  </path>
-
-  <!-- GJT JPL-Util -->
-  <property name="gjt.jpl-util.root" value="${project.thirdparty}/gjt-jpl-util"/>
-  <property name="gjt.jpl-util.lib" value="${gjt.jpl-util.root}/lib"/>
-  <path id="gjt.jpl-util.classpath">
-    <pathelement path="${gjt.jpl-util.lib}/jpl-util.jar"/>
-    <pathelement path="${gjt.jpl-util.lib}/jpl-pattern.jar"/>
-  </path>
-
-  <!-- Hypersonic SQL -->
-  <property name="hsqldb.hsqldb.root" value="${project.thirdparty}/hsqldb-hsqldb"/>
-  <property name="hsqldb.hsqldb.lib" value="${hsqldb.hsqldb.root}/lib"/>
-  <path id="hsqldb.hsqldb.classpath">
-    <pathelement path="${hsqldb.hsqldb.lib}/hsqldb.jar"/>
-  </path>
-
-  <!-- JacORB -->
-  <property name="jacorb.jacorb.root" value="${project.thirdparty}/jacorb-jacorb"/>
-  <property name="jacorb.jacorb.lib" value="${jacorb.jacorb.root}/lib"/>
-  <path id="jacorb.jacorb.classpath">
-    <pathelement path="${jacorb.jacorb.lib}/jacorb.jar"/>
-  </path>
-  <path id="jacorb.idl.classpath">
-    <path refid="apache.avalon.logkit.classpath"/>
-    <pathelement path="${jacorb.jacorb.lib}/idl.jar"/>
-  </path>
-  <property name="jacorb.idl.include" value="${jacorb.jacorb.root}/idl"/>
-  <property name="jacorb.jacorb.resources" value="${jacorb.jacorb.root}/conf/default"/>
-
-  <!-- JGroups -->
-  <property name="jgroups.jgroups.root" value="${project.thirdparty}/javagroups-javagroups"/>
-  <property name="jgroups.jgroups.lib" value="${jgroups.jgroups.root}/lib"/>
-  <path id="jgroups.jgroups.classpath">
-    <pathelement path="${jgroups.jgroups.lib}/jgroups.jar"/>
-  </path>
-
-  <!-- Sleepycat -->
-  <property name="sleepycat.root" value="${project.thirdparty}/sleepycat"/>
-  <property name="sleepycat.lib" value="${sleepycat.root}/lib"/>
-  <path id="sleepycat.classpath">
-     <pathelement path="${sleepycat.lib}/je.jar"/>
-  </path>
-
-
-  <!-- jUDDI -->
-  <property name="juddi.juddi.root" value="${project.thirdparty}/juddi-juddi"/>
-  <property name="juddi.juddi.lib" value="${juddi.juddi.root}/lib"/>
-  <path id="juddi.juddi.classpath">
-    <pathelement path="${juddi.juddi.lib}/juddi.jar"/>
-  </path>
-
-  <!-- JUnitEJB -->
-  <property name="junitejb.junitejb.root" value="${project.thirdparty}/junitejb/junitejb"/>
-  <property name="junitejb.junitejb.lib" value="${junitejb.junitejb.root}/lib"/>
-  <path id="junitejb.junitejb.classpath">
-    <pathelement path="${junitejb.junitejb.lib}/junitejb.jar"/>
-  </path>
-
-  <!-- Sun JavaBeans Activation Framework (JAF) -->
-  <property name="sun.jaf.root" value="${project.thirdparty}/sun-jaf"/>
-  <property name="sun.jaf.lib" value="${sun.jaf.root}/lib"/>
-  <path id="sun.jaf.classpath">
-    <pathelement path="${sun.jaf.lib}/activation.jar"/>
-  </path>
-
-   <!-- Sun JavaMail -->
-   <property name="sun.javamail.root" value="${project.thirdparty}/sun-javamail"/>
-   <property name="sun.javamail.lib" value="${sun.javamail.root}/lib"/>
-   <path id="sun.javamail.classpath">
-     <pathelement path="${sun.javamail.lib}/mail.jar"/>
-   </path>
-
-  <!-- Sun Java XML Parser (JAXP) -->
-  <property name="sun.jaxp.root" value="${project.thirdparty}/sun-jaxp"/>
-  <property name="sun.jaxp.lib" value="${sun.jaxp.root}/lib"/>
-  <path id="sun.jaxp.classpath">
-    <pathelement path="${sun.jaxp.lib}/jaxp.jar"/>
-    <pathelement path="${sun.jaxp.lib}/crimson.jar"/>
-    <pathelement path="${sun.jaxp.lib}/xalan.jar"/>
-  </path>
-
-  <!-- Sun Java Media Framework (JMF) -->
-  <property name="sun.jmf.root" value="${project.thirdparty}/sun-jmf"/>
-  <property name="sun.jmf.lib" value="${sun.jmf.root}/lib"/>
-  <path id="sun.jmf.classpath">
-    <pathelement path="${sun.jmf.lib}/jmf.jar"/>
-  </path>
-
-  <!-- Sun Java Management Extensions (JMX) -->
-  <property name="sun.jmx.root" value="${project.thirdparty}/sun-jmx"/>
-  <property name="sun.jmx.lib" value="${sun.jmx.root}/lib"/>
-  <path id="sun.jmx.classpath">
-    <pathelement path="${sun.jmx.lib}/jmxri.jar"/>
-    <pathelement path="${sun.jmx.lib}/jmxtools.jar"/>
-  </path>
-
-  <!-- Sun Java Servlet Technology  -->
-  <property name="sun.servlet.root" value="${project.thirdparty}/sun-servlet"/>
-  <property name="sun.servlet.lib" value="${sun.servlet.root}/lib"/>
-  <path id="sun.servlet.classpath">
-    <pathelement path="${sun.servlet.lib}/servlet-api.jar"/>
-    <pathelement path="${sun.servlet.lib}/jsp-api.jar"/>
-  </path>
-
-  <!-- JavaCC -->
-  <property name="sun.javacc.root" value="${project.thirdparty}/sun-javacc"/>
-  <property name="sun.javacc.lib" value="${sun.javacc.root}/lib"/>
-
-  <!-- BeanShell -->
-  <property name="beanshell.beanshell.root" value="${project.thirdparty}/beanshell-beanshell"/>
-  <property name="beanshell.beanshell.lib" value="${beanshell.beanshell.root}/lib"/>
-  <path id="beanshell.beanshell.classpath">
-    <fileset dir="${beanshell.beanshell.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
-  <!-- Joe SNMP lib -->
-  <property name="opennms.joesnmp.root" value="${project.thirdparty}/opennms/joesnmp"/>
-  <property name="opennms.joesnmp.lib" value="${opennms.joesnmp.root}/lib"/>
-  <path id="opennms.joesnmp.classpath">
-    <pathelement path="${opennms.joesnmp.lib}/joesnmp.jar"/>
-  </path>
-
-  <!-- XDoclet -->
-
-  <!--
-     | xdoclet has appended a version string to all their jars.
-     | I'm using jb4 so we don't have to track them so carefully
-   -->
-  <property name="xdoclet.version" value="jb4"/>
-
-  <!--
-
-  jason: it seems like this hack is better defaulting to the default in thirdparty, if you
-         want to build from CVS then change this to the value below in build/local.properties.
-
-  <!- - this may be overridden by the build/local.properties file to use version from cvs- ->
-  <property name="xdoclet.xdoclet.root" value="${project.root}/xdoclet/output"/>
-
-  -->
-  <property name="xdoclet.xdoclet.root" value="${project.thirdparty}/xdoclet-xdoclet"/>
-
-  <property name="xdoclet.xdoclet.lib" value="${xdoclet.xdoclet.root}/lib"/>
-  <path id="xdoclet.xdoclet.classpath">
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xjavadoc-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-bea-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-ejb-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-java-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jboss-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jdo-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-jmx-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-web-module-${xdoclet.version}.jar"/>
-    <pathelement path="${xdoclet.xdoclet.lib}/xdoclet-xdoclet-module-${xdoclet.version}.jar"/>
-    <path refid="apache.commons.classpath"/>
-    <path refid="sun.servlet.classpath"/>
-  </path>
-  <path id="xdoclet.task.classpath">
-    <path refid="xdoclet.xdoclet.classpath"/>
-  </path>
-
-  <!-- Informa RSS -->
-  <property name="informa.rss.root" value="${project.thirdparty}/informa-rss"/>
-  <property name="informa.rss.lib" value="${informa.rss.root}/lib"/>
-  <path id="informa.rss.classpath">
-    <pathelement path="${informa.rss.lib}/informa.jar"/>
-  </path>
-
-  <!-- JRegex -->
-  <property name="jregex.jregex.root" value="${project.thirdparty}/jregex-jregex"/>
-  <property name="jregex.jregex.lib" value="${jregex.jregex.root}/lib"/>
-  <path id="jregex.jregex.classpath">
-    <pathelement path="${jregex.jregex.lib}/jregex.jar"/>
-  </path>
-
-  <!-- DNSJava -->
-  <property name="sourceforge.dnsjava.root" value="${project.thirdparty}/sourceforge-dnsjava"/>
-  <property name="sourceforge.dnsjava.lib" value="${sourceforge.dnsjava.root}/lib"/>
-  <path id="sourceforge.dnsjava.classpath">
-    <pathelement path="${sourceforge.dnsjava.lib}/dnsjava-1.4.3.jar"/>
-  </path>
-
-  <!-- M.Wutka's DTD parser -->
-  <property name="wutka.dtdparser.root" value="${project.thirdparty}/wutka-dtdparser"/>
-  <property name="wutka.dtdparser.lib" value="${wutka.dtdparser.root}/lib"/>
-  <path id="wutka.dtdparser.classpath">
-    <pathelement path="${wutka.dtdparser.lib}/dtdparser121.jar"/>
-  </path>
-
-  <!-- JFreeChart -->
-  <property name="jfreechart.jfreechart.root" value="${project.thirdparty}/jfreechart"/>
-  <property name="jfreechart.jfreechart.lib" value="${jfreechart.jfreechart.root}/lib"/>
-  <path id="jfreechart.jfreechart.classpath">
-    <fileset dir="${jfreechart.jfreechart.lib}">
-      <include name="*.jar" />
-    </fileset>
-  </path>
-
- <!-- ebxmlrr -->
-  <property name="ebxmlrr.ebxmlrr.root" value="${project.thirdparty}/sun-ebxmlrr"/>
-  <property name="ebxmlrr.ebxmlrr.lib" value="${ebxmlrr.ebxmlrr.root}/lib"/>
-  <path id="ebxmlrr.ebxmlrr.classpath">
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/ebxmlrr.jar"/>
-    <pathelement path="${ebxmlrr.ebxmlrr.lib}/jaxr-client.jar"/>
-  </path>
-
-  <!-- ANTLR -->
-  <property name="antlr.antlr.root" value="${project.thirdparty}/antlr"/>
-  <property name="antlr.antlr.lib" value="${antlr.antlr.root}/lib"/>
-  <path id="antlr.antlr.classpath">
-    <pathelement path="${antlr.antlr.lib}/antlr-2.7.5H3.jar"/>
-  </path>
-
-  <!-- Apache Taglibs -->
-  <property name="apache.taglibs.root" value="${project.thirdparty}/apache-taglibs"/>
-  <property name="apache.taglibs.lib" value="${apache.taglibs.root}/lib"/>
-  <path id="apache.taglibs.classpath">
-    <pathelement path="${apache.taglibs.lib}/jstl-1.1.2.jar"/>
-    <pathelement path="${apache.taglibs.lib}/standard-1.1.2.jar"/>
-  </path>
-
-  <!-- Apache ORO -->
-  <property name="apache.oro.root" value="${project.thirdparty}/apache-oro"/>
-  <property name="apache.oro.lib" value="${apache.oro.root}/lib"/>
-  <path id="apache.oro.classpath">
-    <pathelement path="${apache.oro.lib}/jakarta-oro-2.0.8.jar"/>
-  </path>
-
-  <!-- Apache Struts -->
-  <property name="apache.struts.root" value="${project.thirdparty}/apache-struts"/>
-  <property name="apache.struts.lib" value="${apache.struts.root}/lib"/>
-  <path id="apache.struts.classpath">
-    <pathelement path="${apache.struts.lib}/struts-1.2.6.jar"/>
-  </path>
-
-  <!-- StAX -->
-  <property name="codehaus.stax.root" value="${project.thirdparty}/codehaus-stax"/>
-  <property name="codehaus.stax.lib" value="${codehaus.stax.root}/lib"/>
-  <path id="codehaus.stax.classpath">
-    <pathelement path="${codehaus.stax.lib}/stax-1.1.1.jar"/>
-  </path>
-
-  <!-- XMLUnit -->
-  <property name="xmlunit.xmlunit.root" value="${project.thirdparty}/xmlunit-xmlunit"/>
-  <property name="xmlunit.xmlunit.lib" value="${xmlunit.xmlunit.root}/lib"/>
-  <path id="xmlunit.xmlunit.classpath">
-    <pathelement path="${xmlunit.xmlunit.lib}/xmlunit1.0.jar"/>
-  </path>
-  
-  <!-- easymock -->
-  <property name="easymock.easymock.root" value="${project.thirdparty}/easymock"/>
-  <property name="easymock.easymock.lib" value="${easymock.easymock.root}/lib/"/>
-  <property name="easymock.easymock.resources" value="${easymock.easymock.root}/resources/"/>
-  <path id="easymock.easymock.classpath">
-     <pathelement path="${easymock.easymock.lib}/easymockclassextension.jar"/>
-     <pathelement path="${easymock.easymock.lib}/easymock-1.1.jar"/>
-  </path>
-  
-  <!-- struts-test-case -->
-  <property name="struts.test.case.root" value="${project.thirdparty}/struts-test-case"/>
-  <property name="struts.test.case.lib" value="${struts.test.case.root}/lib/"/>
-  <property name="struts.test.case.resources" value="${struts.test.case.root}/resources/"/>
-  <path id="struts.test.case.classpath">
-     <pathelement path="${struts.test.case.lib}/strutstest-2.1.3.jar"/>
-  </path>  
-  
-  <!-- cache -->
-  <property name="jboss.cache.root" value="${project.thirdparty}/jboss/cache"/>
-  <property name="jboss.cache.lib" value="${jboss.cache.root}/lib"/>
-  <path id="jboss.cache.classpath">
-    <pathelement path="${jboss.cache.lib}/jboss-cache.jar"/>
-  </path>  

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/libraries.ent (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/libraries.ent)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/modules.ent
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/modules.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,305 +0,0 @@
-<!-- $Id: modules.ent,v 1.56 2006/05/23 20:20:41 asaldhana Exp $ -->
-
-<!-- AOP -->
-<property name="jboss.aop.root" value="${project.root}/aop/output"/>
-<property name="jboss.aop.lib" value="${jboss.aop.root}/lib"/>
-<path id="jboss.aop.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop.jar"/>
-</path>
-<path id="jboss.aop50.classpath">
-  <pathelement path="${jboss.aop.lib}/jboss-aop-jdk50.jar"/>
-</path>
-
-<property name="jboss.aspects.root" value="${project.root}/aspects/output"/>
-<property name="jboss.aspects.lib" value="${jboss.aspects.root}/lib"/>
-<path id="jboss.aspects.classpath">
-  <pathelement path="${jboss.aspects.lib}/jboss-aspect-library.jar"/>
-</path>
-
-<!-- tomcat -->
-<property name="jboss.tomcat.root" value="${project.root}/tomcat/output"/>
-  <property name="jboss.tomcat.lib" value="${jboss.tomcat.root}/lib"/>
-<path id="jboss.tomcat.classpath">
-  <pathelement path="${jboss.tomcat.lib}/tc5-cluster.aop"/>
-  <pathelement path="${jboss.tomcat.root}/resource"/>
-</path>
-
-<!-- Cluster -->
-<property name="jboss.cluster.root" value="${project.root}/cluster/output"/>
-<property name="jboss.cluster.lib" value="${jboss.cluster.root}/lib"/>
-<path id="jboss.cluster.classpath">
-  <pathelement path="${jboss.cluster.lib}/jbossha.jar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-httpsession.sar"/>
-  <pathelement path="${jboss.cluster.lib}/jbossha-singleton.jar"/>
-</path>
-
-<!-- Common -->
-<property name="jboss.common.root" value="${project.root}/common/output"/>
-<property name="jboss.common.lib" value="${jboss.common.root}/lib"/>
-<path id="jboss.common.classpath">
-  <pathelement path="${jboss.common.lib}/jboss-common.jar"/>
-  <pathelement path="${jboss.common.lib}/jboss-xml-binding.jar"/>
-  <pathelement path="${jboss.common.lib}/namespace.jar"/>
-</path>
-
-<!-- Compatibility -->
-<property name="jboss.compatibility.root" value="${project.root}/compatibility/output"/>
-<property name="jboss.compatibility.lib" value="${jboss.compatibility.root}/lib"/>
-<path id="jboss.compatibility.classpath">
-</path>
-
-<!-- Iiop -->
-<property name="jboss.iiop.root" value="${project.root}/iiop/output"/>
-<property name="jboss.iiop.lib" value="${jboss.iiop.root}/lib"/>
-<path id="jboss.iiop.classpath">
-  <pathelement path="${jboss.iiop.lib}/jboss-iiop.jar"/>
-</path>
-
-<!-- J2EE -->
-<property name="jboss.j2ee.root" value="${project.root}/j2ee/output"/>
-<property name="jboss.j2ee.lib" value="${jboss.j2ee.root}/lib"/>
-<path id="jboss.j2ee.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-j2ee.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-jaxrpc.jar"/>
-  <pathelement path="${jboss.j2ee.lib}/jboss-saaj.jar"/>
-</path>
-
-<!-- J2EE Extensions-->
-<path id="jboss.j2ee.ext.classpath">
-  <pathelement path="${jboss.j2ee.lib}/jboss-auth.jar"/>
-</path>
-
-<!-- J2SE -->
-<property name="jboss.j2se.root" value="${project.root}/j2se/output"/>
-<property name="jboss.j2se.lib" value="${jboss.j2se.root}/lib"/>
-<path id="jboss.j2se.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-j2se.jar"/>
-</path>
-<path id="jboss.jmxcompliance.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-jmx-compliance.jar"/>
-</path>
-
-<!-- Deployment -->
-<property name="jboss.deployment.root" value="${project.root}/deployment/output"/>
-<property name="jboss.deployment.lib" value="${jboss.deployment.root}/lib"/>
-<path id="jboss.deployment.classpath">
-  <pathelement path="${jboss.deployment.lib}/jboss-deployment.jar"/>
-</path>
-
-<!-- EJB3 -->
-<property name="jboss.ejb3.root" value="${project.root}/ejb3/output"/>
-<property name="jboss.ejb3.lib" value="${jboss.ejb3.root}/lib"/>
-<path id="jboss.ejb3.classpath">
-  <pathelement path="${jboss.ejb3.lib}/jboss-ejb3.jar"/>
-  <pathelement path="${jboss.ejb3.lib}/jboss-annotations-ejb3.jar"/>
-</path>
-
-<!-- EJB3X -->
-<property name="jboss.ejb3x.root" value="${project.root}/ejb3x/output"/>
-<property name="jboss.ejb3x.lib" value="${jboss.ejb3x.root}/lib"/>
-<path id="jboss.ejb3x.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x.jar"/>
-</path>
-<path id="jboss.ejb3x.jdk14.classpath">
-  <pathelement path="${jboss.ejb3x.lib}/jboss-ejb3x-jdk14.jar"/>
-</path>
-
-<!-- JCA -->
-<property name="jboss.jca.root" value="${project.root}/connector/output"/>
-<property name="jboss.jca.lib" value="${jboss.jca.root}/lib"/>
-<path id="jboss.jca.classpath">
-  <pathelement path="${jboss.jca.lib}/jboss-jca.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-local-jdbc.jar"/>
-    <pathelement path="${jboss.jca.lib}/jboss-ha-local-jdbc.jar"/>
-  <pathelement path="${jboss.jca.lib}/jboss-common-jdbc-wrapper.jar"/>
-</path>
-
-<!-- JMX -->
-<property name="jboss.jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.jmx.lib" value="${jboss.jmx.root}/lib"/>
-<path id="jboss.jmx.classpath">
-  <pathelement path="${jboss.jmx.lib}/jboss-jmx.jar"/>
-</path>
-
-<!-- JMX Remoting -->
-<property name="jboss.jmx-remoting.root" value="${project.root}/jmx-remoting/output"/>
-<property name="jboss.jmx-remoting.lib" value="${jboss.jmx-remoting.root}/lib"/>
-<path id="jboss.jmx-remoting.classpath">
-  <pathelement path="${jboss.jmx-remoting.lib}/jboss-jmx-remoting.jar"/>
-</path>
-
-<!-- Management -->
-<property name="jboss.management.root" value="${project.root}/management/output"/>
-<property name="jboss.management.lib" value="${jboss.management.root}/lib"/>
-<path id="jboss.management.classpath">
-  <pathelement path="${jboss.management.lib}/jboss-jsr77-client.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-jsr77.jar"/>
-  <pathelement path="${jboss.management.lib}/jboss-management.jar"/>
-</path>
-
-<!-- MBeans -->
-<property name="jboss.mbeans.root" value="${project.root}/mbeans/output"/>
-<property name="jboss.mbeans.lib" value="${jboss.mbeans.root}/lib"/>
-<path id="jboss.mbeans.classpath">
-  <pathelement path="${jboss.mbeans.lib}/jboss-mbeans.jar"/>
-</path>
-
-<!-- Messaging -->
-<property name="jboss.messaging.root" value="${project.root}/messaging/output"/>
-<property name="jboss.messaging.lib" value="${jboss.messaging.root}/lib"/>
-<path id="jboss.messaging.classpath">
-  <pathelement path="${jboss.messaging.lib}/jbossmq.jar"/>
-</path>
-
-<!-- Messaging 5 -->
-<property name="jboss.jms.root" value="${project.root}/jms/output"/>
-<property name="jboss.jms.lib" value="${jboss.jms.root}/lib"/>
-<path id="jboss.jms.classpath">
-  <pathelement path="${jboss.jms.lib}/jboss-messaging.jar"/>
-</path>
-
-<!-- Naming -->
-<property name="jboss.naming.root" value="${project.root}/naming/output"/>
-<property name="jboss.naming.lib" value="${jboss.naming.root}/lib"/>
-<path id="jboss.naming.classpath">
-  <pathelement path="${jboss.naming.lib}/jnpserver.jar"/>
-</path>
-
-<!-- Security -->
-<property name="jboss.security.root" value="${project.root}/security/output"/>
-<property name="jboss.security.lib" value="${jboss.security.root}/lib"/>
-<path id="jboss.security.classpath">
-  <pathelement path="${jboss.security.lib}/jbosssx.jar"/>
-</path>
-
-<!-- Server -->
-<property name="jboss.server.root" value="${project.root}/server/output"/>
-<property name="jboss.server.lib" value="${jboss.server.root}/lib"/>
-<path id="jboss.server.classpath">
-  <pathelement path="${jboss.server.lib}/jboss.jar"/>
-  <pathelement path="${jboss.server.lib}/jmx-adaptor-plugin.jar"/>
-</path>
-
-<!-- Spring -->
-<property name="jboss.spring.root" value="${project.root}/spring-int/output"/>
-<property name="jboss.spring.lib" value="${jboss.spring.root}/lib"/>
-
-<!-- System -->
-<property name="jboss.system.root" value="${project.root}/system/output"/>
-<property name="jboss.system.lib" value="${jboss.system.root}/lib"/>
-<path id="jboss.system.classpath">
-  <pathelement path="${jboss.system.lib}/jboss-system.jar"/>
-</path>
-<property name="jboss.system.xdocletpath"
-  value="${project.root}/system/src/main"/>
-
-<!-- Test -->
-<property name="jboss.test.root" value="${project.root}/test/output"/>
-<property name="jboss.test.lib" value="${jboss.test.root}/lib"/>
-<path id="jboss.test.classpath">
-  <pathelement path="${jboss.test.lib}/jboss-test.jar"/>
-</path>
-
-<!-- Transaction -->
-<property name="jboss.transaction.root" value="${project.root}/transaction/output"/>
-<property name="jboss.transaction.lib" value="${jboss.transaction.root}/lib"/>
-<path id="jboss.transaction.classpath">
-  <pathelement path="${jboss.transaction.lib}/jboss-transaction.jar"/>
-</path>
-
-<!-- Varia -->
-<property name="jboss.varia.root" value="${project.root}/varia/output"/>
-<property name="jboss.varia.lib" value="${jboss.varia.root}/lib"/>
-<path id="jboss.varia.classpath">
-  <pathelement path="${jboss.varia.root}/classes"/>
-</path>
-
-<!-- Hibernate2 integration module -->
-<property name="jboss.hibernate.root" value="${project.root}/hibernate-int/output"/>
-<property name="jboss.hibernate.lib" value="${jboss.hibernate.root}/lib"/>
-<path id="jboss.hibernate.classpath">
-  <pathelement path="${jboss.hibernate.lib}/jboss-hibernate.jar"/>
-</path>
-
-
-<!-- below this line starts the kingdom of nukes ***************************************************************** -->
-
-<!-- Nukes on JBoss -->
-<property name="jboss.nukes.root" value="${project.root}/nukes/output"/>
-<property name="jboss.nukes.lib" value="${jboss.nukes.root}/lib"/>
-<path id="jboss.nukes.classpath">
-  <pathelement path="${jboss.nukes.lib}/nukes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss adminmessages -->
-<property name="jboss.nukes-adminmessages.root" value="${project.root}/adminmessages/output"/>
-<property name="jboss.nukes-adminmessages.lib" value="${jboss.nukes-adminmessages.root}/lib"/>
-<path id="jboss.nukes-adminmessages.classpath">
-  <pathelement path="${jboss.nukes-adminmessages.lib}/nukes-adminmessages-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss faq -->
-<property name="jboss.nukes-faq.root" value="${project.root}/faq/output"/>
-<property name="jboss.nukes-faq.lib" value="${jboss.nukes-faq.root}/lib"/>
-<path id="jboss.nukes-faq.classpath">
-  <pathelement path="${jboss.nukes-faq.lib}/nukes-faq-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss jmx -->
-<property name="jboss.nukes-jmx.root" value="${project.root}/jmx/output"/>
-<property name="jboss.nukes-jmx.lib" value="${jboss.nukes-jmx.root}/lib"/>
-<path id="jboss.nukes-jmx.classpath">
-  <pathelement path="${jboss.nukes-jmx.lib}/nukes-jmx-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss journal -->
-<property name="jboss.nukes-journal.root" value="${project.root}/journal/output"/>
-<property name="jboss.nukes-journal.lib" value="${jboss.nukes-journal.root}/lib"/>
-<path id="jboss.nukes-journal.classpath">
-  <pathelement path="${jboss.nukes-journal.lib}/nukes-journal-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss mp3player -->
-<property name="jboss.nukes-mp3player.root" value="${project.root}/mp3player/output"/>
-<property name="jboss.nukes-mp3player.lib" value="${jboss.nukes-mp3player.root}/lib"/>
-<path id="jboss.nukes-mp3player.classpath">
-  <pathelement path="${jboss.nukes-mp3player.lib}/nukes-mp3player-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss news -->
-<property name="jboss.nukes-news.root" value="${project.root}/news/output"/>
-<property name="jboss.nukes-news.lib" value="${jboss.nukes-news.root}/lib"/>
-<path id="jboss.nukes-news.classpath">
-  <pathelement path="${jboss.nukes-news.lib}/nukes-news-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss quotes -->
-<property name="jboss.nukes-quotes.root" value="${project.root}/quotes/output"/>
-<property name="jboss.nukes-quotes.lib" value="${jboss.nukes-quotes.root}/lib"/>
-<path id="jboss.nukes-quotes.classpath">
-  <pathelement path="${jboss.nukes-quotes.lib}/nukes-quotes-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss list -->
-<property name="jboss.nukes-list.root" value="${project.root}/list/output"/>
-<property name="jboss.nukes-list.lib" value="${jboss.nukes-list.root}/lib"/>
-<path id="jboss.nukes-list.classpath">
-  <pathelement path="${jboss.nukes-list.lib}/nukes-list-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss script -->
-<property name="jboss.nukes-script.root" value="${project.root}/script/output"/>
-<property name="jboss.nukes-script.lib" value="${jboss.nukes-script.root}/lib"/>
-<path id="jboss.nukes-script.classpath">
-  <pathelement path="${jboss.nukes-script.lib}/nukes-script-lib.jar"/>
-</path>
-
-<!-- Nukes on JBoss sections -->
-<property name="jboss.nukes-sections.root" value="${project.root}/sections/output"/>
-<property name="jboss.nukes-sections.lib" value="${jboss.nukes-sections.root}/lib"/>
-<path id="jboss.nukes-sections.classpath">
-  <pathelement path="${jboss.nukes-sections.lib}/nukes-sections-lib.jar"/>
-</path>
-
-
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/modules.ent (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/modules.ent)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/targets.ent
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/targets.ent	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,116 +0,0 @@
-<!-- $Id: targets.ent,v 1.5 2004/11/24 02:07:36 starksm Exp $ -->
-<!--
-   $Log: targets.ent,v $
-   Revision 1.5  2004/11/24 02:07:36  starksm
-   Restore the tools module content after the errant removal
-
-   Revision 1.3  2004/03/29 19:49:17  ejort
-   Bring build into line with jboss-3.2
-
-   Revision 1.1.2.2  2003/12/07 22:12:53  ejort
-   Make a start on simplifying the build,
-   including incremental xdoclet MBean generation
-
-   Revision 1.1.2.1  2003/05/18 06:24:13  starksm
-   
-   Standard targets
--->
-
-  <!-- ================================================================== -->
-  <!-- Initialization                                                     -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Initialize the build system.  Must depend on '_buildmagic:init'.  
-     | Other targets should depend on 'init' or things will mysteriously fail.
-   -->
-
-  <target name="init" unless="init.disable" depends="_buildmagic:init">
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="jars" 
-	  description="Builds all jar files."
-     depends="_buildmagic:build-bypass-check"
-	  unless="build-bypass.on">
-
-    <call target="compile"/>
-
-    <mkdir dir="${build.lib}"/>
-
-    <call target="module-jars"/>
-
-    <!-- Update the build marker to allow bypassing -->
-    <touch file="${build-bypass.marker}"/>
-
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Install & Release                                                  -->
-  <!-- ================================================================== -->
-
-  <target name="install" 
-	  description="Install the structure for a release."
-	  depends="all, _buildmagic:install:default"/>
-
-  <target name="release" depends="install"/>
-
-  <target name="release-zip" 
-	  description="Builds a ZIP distribution."
-	  depends="release, _buildmagic:release:zip"/>
-
-  <target name="release-tar" 
-	  description="Builds a TAR distribution."
-	  depends="release, _buildmagic:release:tar"/>
-
-  <target name="release-tgz" 
-	  description="Builds a TAR-GZ distribution."
-	  depends="release, _buildmagic:release:tgz"/>
-
-  <target name="release-all"
-	  description="Builds a distribution for each archive type."
-	  depends="release-zip, release-tgz"/>
-
-
-  <!-- ================================================================== -->
-  <!-- Cleaning                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- Clean up all build output -->
-  <target name="clean" 
-	  description="Cleans up most generated files."
-	  depends="_buildmagic:clean">
-  </target>
-
-  <!-- Clean up all generated files -->
-  <target name="clobber" 
-	  description="Cleans up all generated files."
-	  depends="_buildmagic:clobber, clean">
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Misc.                                                              -->
-  <!-- ================================================================== -->
-
-  <target name="main"
-	  description="Executes the default target (most)."
-	  depends="most"/>
-    
-  <target name="all"
-	  description="Builds everything."
-	  depends="jars, docs"/>
-
-  <target name="most" 
-	  description="Builds almost everything."
-	  depends="jars"/>
-
-  <target name="help" 
-          description="Show this help message."
-	  depends="_buildmagic:help:standard"/>

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/targets.ent (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/targets.ent)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/task.properties
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/task.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,91 +0,0 @@
-### ====================================================================== ###
-##                                                                          ##
-##  Default Task Properties                                                 ##
-##                                                                          ##
-### ====================================================================== ###
-
-###  $Id: task.properties,v 1.8 2005/10/05 18:45:32 rloehr Exp $ ###
-
-### Javac Defaults ###
-
-javac.includes=**/*.java
-javac.excludes=
-javac.defaultexcludes=yes
-
-javac.boot.classpath=${sun.boot.classpath}
-javac.classpath=${classpath}
-
-javac.debug=off
-javac.optimize=on
-javac.deprecation=on
-javac.target=1.4
-javac.verbose=off
-javac.depend=off
-javac.source=1.4
-
-javac.include.ant.runtime=no
-javac.include.java.runtime=no
-javac.fail.onerror=true
-
-classpath=
-classpath.local=
-classpath.thirdparty=
-
-### Javadoc Defaults ###
-
-javadoc.classpath=${javac.classpath}
-javadoc.sourcepath=
-javadoc.source.path=
-javadoc.source.files=
-
-javadoc.public=false
-javadoc.package=false
-javadoc.protected=true
-javadoc.private=false
-javadoc.version=true
-javadoc.author=true
-javadoc.use=true
-javadoc.verbose=false
-
-javadoc.windowtitle=${module.Name} API
-javadoc.doctitle=${module.Name}
-javadoc.splitindex=no
-
-### MBean Defaults ###
-mbean.includes=
-mbean.excludes=
-
-### Jar Defaults ###
-jar.server.includes=
-jar.client.includes=
-
-### RMIC Defaults ###
-
-rmic.base=${build.classes}
-rmic.stubVersion=${javac.target}
-rmic.verify=true
-rmic.sourcebase=
-rmic.debug=false
-rmic.iiop=false
-rmic.iiopopts=
-rmic.idl=false
-rmic.idlopts=
-rmic.includes=
-rmic.excludes=
-
-### JUnit Defaults ###
-
-junit.printsummary=true
-junit.haltonerror=false
-junit.haltonfailure=false
-junit.fork=true
-junit.timeout=300000
-junit.jvm=java
-junit.jvm.options=-Dnone
-
-junit.formatter.type=xml
-junit.formatter.usefile=true
-
-junit.batchtest.fork=${junit.fork}
-junit.batchtest.haltonerror=${junit.haltonerror}
-junit.batchtest.haltonfailure=${junit.haltonfailure}

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/task.properties (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/task.properties)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/version-info.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/version-info.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,56 +0,0 @@
-<!-- $Id: version-info.xml,v 1.8 2006/02/23 15:07:21 dimitris Exp $ -->
-
-<project name="Common Build Defs">
-
-  <!-- Include user and project property overrides. -->
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-    <!-- Version identifiers for the server. -->
-    <property name="version.major" value="5"/>
-    <property name="version.minor" value="0"/>
-    <property name="version.revision" value="0"/>
-    <property name="version.tag" value="Alpha"/>
-    <property name="version.name" value="Morpheus"/>
-    <!-- This must be set to the CVS tag for any release -->
-    <property name="version.cvstag" value="HEAD"/>
-
-    <!-- Manifest version info -->
-    <property name="specification.title" value="JBoss"/>
-    <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-    <property name="implementation.title" value="JBoss [${version.name}]"/>
-    <property name="implementation.url" value="http://www.jboss.org/"/>
-    <property name="implementation.version" 
-         value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-    <property name="implementation.vendor" value="JBoss Inc."/>
-    <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-    <target name="print-version-info">
-      <echo>
-    version.major=${version.major}
-    version.minor=${version.minor}
-    version.revision=${version.revision}
-    version.tag=${version.tag}
-    version.name=${version.name}
-    version.cvstag=${version.cvstag}
-    specification.title=${specification.title}
-    specification.version=${specification.version}
-    specification.vendor=${specification.vendor}
-    implementation.title=${implementation.title}
-    implementation.url=${implementation.url}
-    implementation.version=${implementation.version} 
-    implementation.vendor=${implementation.vendor}
-    implementation.vendor.id=${implementation.vendor.id}
-      </echo>
-    </target>
-</project>
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/buildmagic/version-info.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/buildmagic/version-info.xml)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/jbossbuild)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/jbossbuild.properties
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/jbossbuild.properties	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,11 +0,0 @@
-
-# The location of the thirdparty (prebuilt artifacts) directory relative to the project root
-jbossbuild.thirdparty.dir=thirdparty
-
-# The name of the component info file
-jbossbuild.component.info=component-info.xml
-
-# The targetdefs to use
-jbossbuild.targetdefs.refid=targets
-
-external.project=true;
\ No newline at end of file

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/jbossbuild.properties (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/jbossbuild/jbossbuild.properties)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/release.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/release.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,152 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-
-<!-- ================================================================== -->
-<!-- JBoss AOP release build definition                                 -->
-<!-- ================================================================== -->
-
-<project name="main.build"
-         default="build" 
-         basedir="."
->
-   <!-- Import the types -->
-   <import file="../tools/etc/jbossbuild/tasks.xml"/>
-
-   <!-- =============================================================== -->
-   <!-- The Main project definition                                     -->
-   <!-- =============================================================== -->
-
-   <build id="jboss-aop"
-          impltitle="JBoss AOP"
-          implversion="1.0.0-FINAL"
-          implvendor="JBoss Inc."
-          implurl="http://www.jboss.com/products/aop"
-          description="JBoss Aspect Oriented Programming Framewoork"
-          cvsroot="cvs.sourceforge.net:/cvsroot/jboss"
-          thirdpartypath="../thirdparty/"
-          location="http://cruisecontrol.jboss.com/repository/"
-          targetdefs="targets">
-
-      <!-- ============================================================ -->
-      <!-- Common utilities                                             -->
-      <!-- ============================================================ -->
-
-      <component id="common"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-common.jar" release="lib"/>
-         <artifact id="jboss-common-client.jar"/>
-         <artifact id="namespace.jar"/>
-      </component>
-
-      <includes id="common-project">
-         <include input="jboss-common.jar"/>
-         <include input="namespace.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Container                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="container"
-                 version="5.0-SNAPSHOT"
-      >
-         <artifact id="jboss-container.jar"/>
-      </component>
-
-      <includes id="container-project">
-         <include input="jboss-container.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- AOP                                                          -->
-      <!-- ============================================================ -->
-
-      <component id="aop"
-                 module="jboss-aop"
-                 version="1.0.0-FINAL"
-      >
-         <artifact id="jboss-aop.jar" release="lib"/>
-      </component>
-
-      <includes id="aop-project">
-         <include input="jboss-aop.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- QDox                                                         -->
-      <!-- ============================================================ -->
-
-      <component id="qdox"
-                 version="1.4">
-         <artifact id="qdox.jar" release="lib"/>
-      </component>
-
-      <includes id="qdox-lib">
-         <include input="qdox.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Javassist                                                    -->
-      <!-- ============================================================ -->
-
-      <component id="javassist"
-                 version="3.0beta">
-         <artifact id="javassist.jar" release="lib"/>
-      </component>
-
-      <includes id="javassist-lib">
-         <include input="javassist.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Trove                                                        -->
-      <!-- ============================================================ -->
-      
-      <component id="trove"
-                 version="2.1.1">
-         <artifact id="trove.jar" release="lib"/>
-      </component>
-
-      <includes id="trove-lib">
-         <include input="trove.jar"/>
-      </includes>
-
-      <!-- ============================================================ -->
-      <!-- Oswego Concurrent Library                                    -->
-      <!-- ============================================================ -->
-
-      <component id="oswego-concurrent"
-                 version="1.0">
-         <artifact id="concurrent.jar" release="lib"/>
-      </component>
-
-      <includes id="concurrent">
-         <include input="concurrent.jar"/>
-      </includes>
-
-
-      <!-- ============================================================ -->
-      <!-- JUnit                                                        -->
-      <!-- ============================================================ -->
-
-      <component id="junit-junit"
-                 version="3.8.1">
-         <artifact id="junit.jar" release="lib"/>
-      </component>
-
-      <includes id="junit">
-         <include input="junit.jar"/>
-      </includes>
-   </build>
-
-   <!-- Generate the targets -->
-   <generate generate="jboss-aop"/>
-   
-</project>

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/release.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/jbossbuild/release.xml)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/tasks.xml
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/tasks.xml	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,1023 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- JBoss, the OpenSource J2EE webOS
- 
- Distributable under LGPL license.
- See terms of license at gnu.org.
--->
-<project name="jboss.ant.tasks"
-         default="help-fragment"
->
-<!-- ================================================================== -->
-<!-- Properties                                                         -->
-<!-- ================================================================== -->
-
-   <!-- because this file may be imported from various locations
-     locations must be referenced in an absolute fashion   -->
-   <dirname property="imported.basedir" file="${ant.file.jboss.ant.tasks}"/>
-
-
-   <property file="${imported.basedir}/jbossbuild.properties"/>
-
-   <property name="jboss.tasks.path" 
-      value="${imported.basedir}/../../../tools/lib/jbossbuild.jar"   />
-
-   <!-- items required for javcc task --> 
-   <property name="sun.javacc.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/sun-javacc/lib/"/>
-             
-   <property name="jacorb.root"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/jacorb"/> 
-
-   <property name="apache.logkit.lib"
-      value="${imported.basedir}/../../../${jbossbuild.thirdparty.dir}/apache-avalon-logkit/lib"/>              
-
-      
-    <path id="jacorb.idl.classpath">
-       <pathelement path="${jacorb.root}/lib/idl.jar"/>
-       <pathelement path="${apache.logkit.lib}/logkit.jar"/>
-    </path>
-
-
-<!-- ================================================================== -->
-<!-- Type Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- The generate type -->
-   <typedef name="generate"
-            classname="org.jboss.ant.types.Generate" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build type -->
-   <typedef name="build"
-            classname="org.jboss.ant.types.build.Build" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The artifact type definition type -->
-   <typedef name="artifacttype"
-            classname="org.jboss.ant.types.build.ArtifactType" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component definition type -->
-   <typedef name="componentdef"
-            classname="org.jboss.ant.types.component.ComponentDefinition" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The component type -->
-   <typedef name="component"
-            classname="org.jboss.ant.types.build.Component" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The includes type -->
-   <typedef name="includes"
-            classname="org.jboss.ant.types.Includes" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- The build targets type -->
-   <typedef name="targets"
-            classname="org.jboss.ant.types.target.TargetDefinitions" 
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-<!-- ================================================================== -->
-<!-- Task Definitions                                                   -->
-<!-- ================================================================== -->
-
-   <!-- Update ide info for the main build -->
-   <taskdef name="idemain"
-            classname="org.jboss.ant.tasks.build.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-
-   <!-- Update ide info for the component -->
-   <taskdef name="idecomponent"
-            classname="org.jboss.ant.tasks.component.IDETask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- Generate a componentref graph and resolve the dependencies -->
-   <taskdef name="synchronizeinfo"
-            classname="org.jboss.ant.tasks.build.SynchronizeComponentsTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />
-   
-   <!-- A task which allows a visitor to visit the graph -->
-   <taskdef name="visit-componentref-graph"
-            classname="org.jboss.ant.tasks.build.VisitComponentRefGraphTask"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />   
-   
-   <!-- Generate libraries.ent with version number in paths -->
-   <taskdef name="gen-lib-file"
-            classname="org.jboss.ant.tasks.build.GenerateLibrariesFile"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-     
-   <!-- RMIC compilation logic -->
-   <taskdef name="rmic-helper"
-            classname="org.jboss.ant.tasks.build.RMICHelper"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />     
-
-   <!-- Executes a given target without reparsing the project file -->
-   <taskdef name="execute-target"
-            classname="org.jboss.ant.tasks.build.TargetExecutor"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-  
-   <!-- Copy with support for zipfile sets -->
-   <taskdef name="copy-zfs"
-            classname="org.jboss.ant.tasks.build.CopyWithZipFileSetSupport"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   /> 
-   
-   <!-- File release task -->
-   <taskdef name="copy-release"
-            classname="org.jboss.ant.tasks.build.CopyRelease"
-            loaderRef="jboss.tasks.path"
-            classpath="${jboss.tasks.path}"
-   />  
-   
-  
-   
-
-   
-
-<!-- ================================================================== -->
-<!-- Artifact Definitions                                               -->
-<!-- ================================================================== -->
-
-   <artifacttype type="jar" outputtype="lib"/>
-   <artifacttype type="zip" outputtype="lib"/>
-   <artifacttype type="sar" outputtype="lib"/>
-   <artifacttype type="rar" outputtype="lib"/>
-   <artifacttype type="war" outputtype="lib"/>
-   <artifacttype type="deployer" outputtype="lib"/>   
-   <artifacttype type="api" outputtype="api"/>
-   <artifacttype type="xml" outputtype="resource"/>
-   <artifacttype type="policy" outputtype="resource"/>
-   <artifacttype type="properties" outputtype="resource"/>
-   <artifacttype type="sh" outputtype="bin"/>
-   <artifacttype type="bat" outputtype="bin"/>
-   <artifacttype type="conf" outputtype="bin"/>
-   <artifacttype type="dtd" outputtype="dtd"/>
-   <artifacttype type="xsd" outputtype="schema"/>
-   <artifacttype type="aop" outputtype="resource"/>
-   <artifacttype type="idl" outputtype="resource"/>   
-   <artifacttype type="md5" outputtype="bin"/>      
-   <artifacttype type="dir" outputtype="lib"/>
-   <artifacttype type="ddl" outputtype="resource"/>
-   
-<!-- ================================================================== -->
-<!-- Target Definitions                                                 -->
-<!-- ================================================================== -->
-
-   <targets id="targets">
-
-      <!-- ============================================================ -->
-      <!-- Build All                                                    -->
-      <!-- Builds everything (build, docs, tests and release archives)  -->
-      <!-- ============================================================ -->
-
-      <targetdef target="all" description="Build All">
-         <main depends="build, doc, test, archives" components="none"/>
-         <component depends="build, doc, test"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!--  Init                                                        -->
-      <!--  Basic initilization tasks and property setup                -->
-      <!-- ============================================================ -->      
-      <targetdef target="build.init" description="initilization tasks and property setup">
-
-         <!-- for each componentdef in jbossbuild file, setup properties 
-              in case a use wishes to access them    
-         -->
-         <component>
-            <property name="build.module" value="@{parentDir}"/>
-            <property name="build.module.src" value="${build.module}/src"/>
-            <property name="build.module.resources" value="${build.module}/src/resources"/>
-            <property name="build.module.etc" value="${build.module}/src/etc"/>
-            <property name="build.module.output" value="@{output}"/>
-            <property name="build.module.output.gen-src" value="${build.module.output}/gen-src"/>            
-            <property name="build.module.dir" value="@{output}"/>
-            <property name="build.module.output.resources" value="${build.module.output}/resources"/>                        
-            <property name="build.module.output.lib" value="${build.module.output}/lib"/>                                    
-            <property name="build.module.output.classes" value="${build.module.output}/classes"/> 
-         </component>
-      </targetdef>      
-
-      <!-- ============================================================ -->
-      <!-- Build                                                        -->
-      <!-- Builds the artifacts and compiles all source                 -->
-      <!-- ============================================================ -->
-
-      <targetdef target="build" description="Build" >
-
-         <!-- Build the main release
-              Creates the main release directory and copies artifacts
-              to the specified location
-         -->
-         <main>
-            <mkdir dir="@{releaseDir}"/>
-            <antCall target="release"/>
-         </main>
-
-
-         <!-- 
-         Build the component
-              Just makes the output folder
-         -->         
-         <component depends="build.init, build.etc">
-            <mkdir dir="@{output}/etc"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-            </copy>
-         </component>
-
-         <!-- Build resources if the component has a 
-              resource node -->
-         <resource depends="build.resources"/>
-         
-         <!-- JTREE-JAVACC source generation  -->
-         <generatedsource when="@{jtree-javacc}">
-
-            <dirname file="/@{jtree-javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-            <jjtree
-               target="src/@{srcdir}/@{jtree-javacc}"
-               outputdirectory="${@{id}.output.path}"
-               javacchome="${sun.javacc.lib}"/>
-
-            <basename file="@{jtree-javacc}" 
-               property="@{id}.basename"
-               suffix="jjt"/>
-
-            <javacc
-               target="${@{id}.output.path}/${@{id}.basename}.jj"
-               javacchome="${sun.javacc.lib}"/>
-
-         </generatedsource>
-
-         <!-- JAVACC source generation -->
-         <generatedsource when="@{javacc}">
-
-            <dirname file="/@{javacc}" property="@{id}.path"/>
-            <property name="@{id}.output.path" value="@{output}/${@{id}.path}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <javacc
-               target="src/@{srcdir}/@{javacc}"
-               javacchome="${sun.javacc.lib}"
-               static="@{static}"
-               outputdirectory="${@{id}.output.path}"/>
-
-         </generatedsource>
-
-         <!-- IDL compilation -->         
-         <generatedsource when="@{idl}">
-
-            <!-- Task to compile idl files required by jacorb -->
-            <taskdef name="jacidl"
-               classname="org.jacorb.idl.JacIDL"
-               classpathref="jacorb.idl.classpath"
-            />             
-            
-            <property name="@{id}.output.path" value="@{output}/@{id}"/>
-
-            <mkdir dir="${@{id}.output.path}"/>
-
-            <jacidl
-               srcdir ="src/@{idl}"
-               destdir="${@{id}.output.path}"
-               includes="*.idl"
-               includepath="${jacorb.root}/resources/"
-             />
-         
-         </generatedsource> 
-         
- 
-         <!-- Compile the source
-              Runs depend on the source output then compiles the source
-         -->
-         <source if="@{compileable}">
-             
-            <mkdir dir="@{output}"/>
-            <depend srcdir="@{sourcePath}"
-                    destdir="@{output}"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-            </depend>
-            <javac srcdir="@{sourcePath}" 
-                   destdir="@{output}"
-                   debug="true"
-                   deprecation="true"
-                   excludes="@{excludes}"
-                   target="@{jvmTarget}"
-                   source="@{jvmSource}"
-                   fork="true"
-                   memoryMaximumSize="512M"
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               <src path="@{sourcePath}"/>
-               <!-- allow multiple sources to be compiled at once to handle circular references -->
-               <srcelements/>
-            </javac>
-
-           <copy toDir="@{output}">
-               <fileset dir="@{sourcePath}">
-                <include name="**/*.properties"/>
-              </fileset>
-           </copy>
-         </source>
-         
-        <source when="@{stubversion}">
-	    <property name="jb.stubversion" value="@{stubversion}"/>
-        </source>         
-         
-
-         <!-- Remote method call compilation.   -->
-         <source when="@{rmic}">
-            <rmic-helper
-                  base="@{output}"
-                  includes="@{rmic}"
-                  verify="true"
-                  debug="false"
-                  iiop="@{iiop}"
-                  idl="false"
-                  external="@{external}"
-                  stubversion="${jb.stubversion}"
-                  
-            >
-               <classpath>
-                  <buildpathelements/>
-               </classpath>
-               </rmic-helper>
-         </source>
-
-         <!-- Create a jar archive
-              Jars the inputs of the jar artifact
-         -->
-         <jar null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </jar>
-
-         <!-- Create an aop archive
-              Jars the inputs of the aop artifact
-         -->
-         <aop  if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-                <filesets/>
-            </jar>
-         </aop>         
-
-         <jar when="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}"
-                 manifest="@{component.output}/etc/manifest/@{manifest}">
-               <filesets/>
-            </jar>
-         </jar>
-         
-         
-
-         <!-- Create a sar archive
-              Jars the inputs of the sar artifact
-         -->
-         <sar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </sar>
-
-
-         <!-- Create a rar archive
-              Jars the inputs of the rar artifact
-         -->
-         <rar null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </rar>
-
-         <!-- Create a war archive
-              Jars the inputs of the war artifact
-         -->
-         <war null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by"               value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title"      value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version"    value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor"     value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title"     value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL"       value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version"   value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor"    value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path"               value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </war>
-         
-         <!-- Create a deployer archive
-              Jars the inputs of the war artifact
-         -->
-         <deployer null="@{manifest}" if="@{buildable}">
-            <mkdir dir="@{parentDir}"/>
-            <jar destfile="@{output}">
-               <manifest>
-                  <attribute name="Created-by" value="@{component.VMVersion} @{component.VMVendor}"/>
-                  <attribute name="Specification-Title" value="@{component.specTitle}"/>
-                  <attribute name="Specification-Version" value="@{component.specVersion}"/>
-                  <attribute name="Specification-Vendor" value="@{component.specVendor}"/>
-                  <attribute name="Implementation-Title" value="@{component.implTitle}"/>
-                  <attribute name="Implementation-URL" value="@{component.implURL}"/>
-                  <attribute name="Implementation-Version" value="@{component.implVersion}"/>
-                  <attribute name="Implementation-Vendor" value="@{component.implVendor}"/>
-                  <attribute name="Implementation-Vendor-Id" value="@{component.implURL}"/>
-                  <attribute name="Class-Path" value="@{classpath}"/>
-               </manifest>
-               <filesets/>
-            </jar>
-         </deployer>       
-         
-         <!-- Create a md5 checksumarchive  -->
-         <md5 null="@{manifest}">
-            <mkdir dir="@{parentDir}"/>
-            <checksum>
-              <filesets/>
-            </checksum>
-         </md5>         
-         
-         <!-- create a directory and copy into it all of the filesets or zipfilesets -->
-         <dir if="@{buildable}">
-            <mkdir dir="@{output}"/>
-            <copy-zfs todir="@{output}">
-               <filesets/>
-            </copy-zfs>
-         </dir>
-         
-         
-         <!-- this is a hack.  jbbuild will not allow artifacts with same id
-            varia requires a dir to be created called kernel, but cannot be created
-            because kernel already exists as a component.  Only option is to create the dir
-            and rename it to kernel -->
-         <dir if="@{buildable}" when="@{rename}">
-            <mkdir dir="@{parentDir}/@{rename}"/>
-            <copy-zfs todir="@{parentDir}/@{rename}">
-               <filesets/>
-            </copy-zfs>
-         </dir>     
-      
-         <!-- copying of artifacts to new name -->         
-         <artifactdef when="@{toname}">
-            <mkdir dir="@{parentDir}"/>
-            <copy toFile="@{parentDir}/@{toname}">
-               <filesets/>
-            </copy>
-         </artifactdef>
-         
-         <sh depends="build.bin"/>
-         <bat depends="build.bin"/>
-      </targetdef>
-
-      <!-- Copy the etc -->
-      <targetdef target="build.etc">
-
-         <component>
-              
-            <mkdir dir="@{output}/etc"/>
-            <mkdir dir="@{component.dir}/src/etc/"/>
-            <copy todir="@{output}/etc" filtering="yes">
-               
-               <fileset dir="@{component.dir}/src/etc/" includes="**"/>
-               <filterset>
-                  <filter token="java.vm.version"           value="@{component.VMVersion}"/>
-                  <filter token="java.vm.vendor"            value="@{component.VMVendor}"/>
-                  <filter token="specification.title"       value="@{component.specTitle}"/>
-                  <filter token="specification.version"     value="@{component.specVersion}"/>
-                  <filter token="specification.vendor"      value="@{component.specVendor}"/>
-                  <filter token="implementation.title"      value="@{component.implTitle}"/>
-                  <filter token="implementation.url"        value="@{component.implURL}"/>
-                  <filter token="implementation.version"    value="@{component.implVersion}"/>
-                  <filter token="implementation.vendor"     value="@{component.implVendor}"/>
-                  <filter token="implementation.vendor.id"  value="@{component.implURL}"/>
-               </filterset>
-            </copy>
-         </component>
-
-      </targetdef>
-
-      <targetdef target="build.resources">
-     
-         <component>
-            <mkdir dir="@{output}/resources"/>
-            <copy todir="@{output}" filtering="yes">
-               <fileset dir="@{component.dir}/src" includes="resources/**"/>
-            </copy>
-         </component>
-      </targetdef>
-      
-
-
-      <targetdef target="build.bin">
-         <component>
-            <mkdir dir="@{output}/bin"/>
-            <copy todir="@{output}/bin" filtering="yes">
-              <fileset dir="@{component.dir}/src/bin">
-                <include name="**/*"/>
-              </fileset>
-            </copy>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="lf" eof="remove"
-              includes="**/*.sh"/>
-
-            <fixcrlf srcdir="@{output}/bin"
-              eol="crlf" eof="remove"
-              includes="**/*.bat, **/*.cmd"/>
-
-            <chmod perm="+x">
-              <fileset dir="@{output}/bin">
-                <include name="**/*.sh"/>
-              </fileset>
-            </chmod>
-
-         </component>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Release                                                      -->
-      <!-- Create the release by copying all artifacts that have a      -->
-      <!-- release tag to that specified location.                      -->
-      <!-- ============================================================ -->
-
-      <targetdef target="release">
-      
-
-          <!-- Copy the artifact into the release -->
-         <artifact when="@{tofile}">
-             <copy-release release="@{release}" tofile="@{tofile}" requiredJDK="@{requiredJDK}"
-             exploded="@{exploded}" overwrite="@{overwrite}">
-                <output/>
-             </copy-release>
-         </artifact>
-         
-       <artifact null="@{tofile}" when="@{release}" >
-            <copy-release release="@{release}"
-              exploded="@{exploded}"
-              requiredJDK="@{requiredJDK}"
-              overwrite="@{overwrite}"
-              >
-               <output/>
-            </copy-release>
-         </artifact>         
-
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Publish                                                      -->
-      <!-- Copy an artifact to the location specified by                -->
-      <!-- ${jbossbuild.repository.root}                                -->
-      <!-- Used by the continous build to publish to the repository.    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="publish" if="@{local}">
-
-         <!-- copy the component-info.xml into the repository -->
-         <componentmain if="@{local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy failonerror="false" file="@{dir}/${jbossbuild.component.info}"
-                  todir="${repository.root}/@{relativePath}"
-            />
-
-         </componentmain>
-
-         <!-- Copy the artifact into the release -->
-         <artifact if="@{component.local}">
-            <fail unless="repository.root">
-              The publish target requires repository.root to be set.
-            </fail>
-            <mkdir dir="${repository.root}/@{relativePath}"/>
-            <copy todir="${repository.root}/@{relativePath}">
-               <output/>
-            </copy>
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Archives                                                     -->
-      <!-- Builds the release archive(s)                                -->
-      <!-- ============================================================ -->
-
-      <!-- Build the release archives -->
-      <targetdef target="archives" description="Build the release archives">
-
-         <!-- Make the archives -->
-         <main>
-         
-            <!-- Create the zip file -->
-            <zip destfile="@{output}/@{releaseName}.zip"
-                 basedir="@{releaseDir}"
-            />
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Doc                                                          -->
-      <!-- Creates the documentation.                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="doc" description="Documentation">
-
-         <!-- Generate the documentation -->
-         <component depends="api"/>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- API                                                          -->
-      <!-- Creates the javadoc                                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="api" description="Javadoc">
-
-         <!-- Generate the javadoc -->
-         <component/>
-         <api>
-            <mkdir dir="@{output}"/>
-            <javadoc packagenames="*"
-                     destdir="@{output}"
-            >
-               <doctitle>
-                  <![CDATA[<h1>@{description} API Documentation</h1>]]>
-               </doctitle>
-               <bottom>
-                  <![CDATA[
-                     <i>
-                        <div align="center">
-                           <font size="-1">
-                              Copyright &#169; 2005 JBoss Inc. All Rights Reservered.
-                           </font>
-                        </div>
-                     </i>
-                  ]]>
-               </bottom>
-               <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
-               <sourcepath>
-                  <sourcepaths/>
-               </sourcepath>
-               <classpath>
-                  <sourcepathelements/>
-               </classpath>
-            </javadoc>
-         </api>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clean                                                        -->
-      <!-- Deletes the output folder                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clean" description="Clean">
-         <common>
-            <delete dir="@{output}" failonerror="false"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Clobber                                                      -->
-      <!-- Deletes the output folder and removes thirdparty             -->
-      <!-- ============================================================ -->
-
-      <targetdef target="clobber" description="Clobber">
-         <main depends="clean">
-            <delete dir="@{thirdparty}"/>
-         </main>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize                                                  -->
-      <!-- Resynchronizes the project with cvs                          -->
-      <!-- ============================================================ -->
-
-      <targetdef target="synchronize" description="Synchronize">
-
-         <!-- Update the main build folder and tools from cvs
-              then do the same for the components before running
-              the after synchronization processing
-              NOTE: Does not automatically invoke component builds
-              as the list of components maybe out-of-date at this point
-              and we need to conditionally do cvs co/update
-         -->
-         <main components="none">
-            <!-- cvs command="update -dP" failonerror="true"/-->
-            <!--invoke target="synchronize" dir="../tools"/-->
-            <execute-target target="synchronize.components" />
-            <!-- execant target="synchronize.after.main"/-->
-         </main>
-
-         <componentmain unless="@{local}">
-            <mkdir dir="thirdparty"/>
-            <get src="@{location}/${jbossbuild.component.info}"
-                 dest="@{thirdpartyDir}/${jbossbuild.component.info}"
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </componentmain>
-
-         <!-- If the component exists we just do a cvs update -->
-         <componentmain if="@{exists}">
-           <cvs dest="@{dir}" command="update"/>
-            <!-- NOTE: unable to delegate to component until JBBUILD-62 is resolved -->
-            <!--invoke target="synchronize" dir="@{dir}"/--> 
-            <!--execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- If the component doesn't exist and we want to
-              get the source build check it out from cvs
-         -->
-         <componentmain unless="@{exists}" if="@{local}">
-            <cvs dest="@{dir.parent}">
-               <commandline>
-                  <argument value="-d"/>
-                  <argument value="@{build.cvsroot}"/>
-                  <argument value="co"/>
-                  <argument value="-d"/>
-                  <argument value="@{id}"/>
-                  <argument value="@{module}"/>
-               </commandline>
-            </cvs>
-            <!-- execant target="synchronize.after" dir="@{dir}"/--> 
-         </componentmain>
-
-         <!-- The component already exists do a cvs update
-              and run the after synchronization
-         -->
-         <component nomain="true">
-            <cvs command="update -dP" failonerror="true"/>
-            <!--execant target="synchronize.after"/-->
-         </component>
-
-         <!-- If we are not doing a source checkout of this
-              component, download the artifacts to thirdparty
-         -->
-         <artifact unless="@{component.local}">
-            <mkdir dir="@{parentDir}"/>
-            <get src="@{location}" 
-                 dest="@{output}" 
-                 useTimestamp="true"
-                 verbose="true"
-            />
-         </artifact>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Commit                                                       -->
-      <!-- Commits the changes to cvs                                   -->
-      <!-- ============================================================ -->
-
-      <targetdef target="commit" description="Commit">
-         <!-- Commit the main build and tools -->
-         <main>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-            <invoke target="commit" dir="../tools"/>
-         </main>
-         <!-- Commit the component -->
-         <component>
-            <fail message="Use -Dm=&quot;xxx&quot; to specify the commit message" unless="m"/>
-            <cvs failonerror="true">
-               <commandline>
-                  <argument value="commit"/>
-                  <argument value="-m"/>
-                  <argument value="${m}"/>
-               </commandline>
-            </cvs>
-         </component>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Test                                                         -->
-      <!-- Builds and runs the tests                                    -->
-      <!-- ============================================================ -->
-
-      <targetdef target="test" description="Build and run the tests">
-         <component depends="build, runtest"/>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RunTest                                                      -->
-      <!-- Runs the tests for sources marked with a test attribute      -->
-      <!-- ============================================================ -->
-      
-      <!-- Run the Test -->
-      <targetdef target="runtest" description="Run tests">
-         <component/>
-         <source when="@{test}">
-            <mkdir dir="@{testDir}"/>
-            <delete file="@{testDir}/test.log"/>
-            <junit fork="true"
-                   printSummary="true">
-               <sysproperty key="org.jboss.test.logfile" value="@{testDir}/test.log"/>
-               <formatter type="plain"/>
-               <classpath>
-                  <pathElements/>
-               </classpath>
-               <batchtest todir="@{testDir}">
-                  <fileset dir="@{sourceDir}" includes="@{test}"/>
-               </batchtest>
-            </junit>
-         </source>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- Rebuild                                                      -->
-      <!-- Synchronizes then builds                                     -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild -->
-      <targetdef target="rebuild" description="Synchronize then build">
-         <common depends="synchronize">
-            <execant target="build"/>
-         </common>
-      </targetdef>
-      
-      <!-- ============================================================ -->
-      <!-- RebuildAll                                                   -->
-      <!-- Synchronizes then builds all                                 -->
-      <!-- ============================================================ -->
-      
-      <!-- Rebuild all -->
-      <targetdef target="rebuildall" description="Synchronize then build all">
-         <common depends="synchronize">
-            <execant target="all"/>
-         </common>
-      </targetdef>
-
-      <!-- ============================================================ -->
-      <!-- Synchronize.After                                            -->
-      <!-- After synchronization processing                             -->
-      <!-- ============================================================ -->
-
-      <!-- After synchronization processing -->
-      <targetdef target="synchronize.after" description="After synchronization processing">
-              <main>
-                 <idemain/>
-              </main>
-              <component>
-                 <idecomponent/>
-              </component>
-      </targetdef>
-      
-
-      
- </targets>   
-
-<!-- ================================================================== -->
-<!-- Macro Definitions                                                  -->
-<!-- ================================================================== -->
-
-   <condition property="execant-executable" value="cmd.exe">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-executable" value="ant"/>
-   <condition property="execant-prefix" value="/c ant">
-     <os family="windows"/>
-   </condition>
-   <property name="execant-prefix" value=""/>
-   <!-- Set the execant.args to empty unless it already exists -->
-   <condition property="execant.args" value="">
-      <not><isset property="execant.args"/></not>
-   </condition>
-
-   <!-- The execant macro -->
-   <macrodef name="execant">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <attribute name="filename"
-                 default="jbossbuild.xml"
-                 description="The ant file to execute"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <exec dir="@{dir}" 
-               executable="${execant-executable}"
-         >
-            <arg line="${execant-prefix} ${execant.args} -f @{filename} @{target}"/>
-         </exec>
-      </sequential>
-   </macrodef>
-
-   <!-- The invoke macro -->
-   <macrodef name="invoke">
-      <attribute name="dir"
-                 default="${basedir}"
-                 description="The directory"
-      />
-      <attribute name="target"
-                 description="The target"
-      />
-      <sequential>
-         <!-- Invoke using a new ant -->
-         <ant antfile="jbossbuild.xml" dir="@{dir}" target="@{target}"/>
-      </sequential>
-   </macrodef>
-
-<!-- ================================================================== -->
-<!-- Targets                                                            -->
-<!-- ================================================================== -->
-
-   <target name="help-fragment">
-      <fail message="Do not execute this build fragment directly!"/>
-   </target>
-   
-</project>
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/etc/jbossbuild/tasks.xml (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/etc/jbossbuild/tasks.xml)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/README
===================================================================
--- branches/logging_refactoring/jbossxb/trunk/tools/lib/README	2006-08-15 19:14:57 UTC (rev 1956)
+++ branches/refactor-test-branch/jbossxb/trunk/tools/lib/README	2006-08-15 19:54:07 UTC (rev 1957)
@@ -1,14 +0,0 @@
-Please refer to the Ant manual under Installing Ant / Library
-Dependencies for a list of the jar requirements for various optional
-tasks and features.
-
-This directory contains xercesImpl.jar from the 2.6.1 release of
-Apache Xerces.  For more information or newer releases see
-<http://xml.apache.org/xerces2-j/>.  See the file LICENSE.xerces for
-the terms of distribution.
-
-It also contains xml-apis.jar from the 2.6.1 release of Apache Xerces.
-For more information or newer releases see
-<http://xml.apache.org/commons/>.  See the files LICENSE.dom and
-LICENSE.sax for the terms of distribution.
-

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/README (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/README)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-javamail.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-javamail.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/ant-javamail.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-junit.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/ant-junit.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-launcher.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-launcher.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/ant-launcher.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-nodeps.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-nodeps.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/ant-nodeps.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-trax.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-trax.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/ant-trax.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-xslp.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant-xslp.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/ant-xslp.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/ant.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/ant.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/bsf.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/bsf.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/bsf.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/buildmagic-tasks.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/buildmagic-tasks.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/buildmagic-tasks.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/jbossbuild.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/jbossbuild.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/jbossbuild.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/jdtCompilerAdapter.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/jdtCompilerAdapter.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/jdtCompilerAdapter.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/junit.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/junit.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/junit.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/org.eclipse.jdt.core_3.1.0.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/pretty.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/pretty.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/pretty.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/resolver.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/resolver.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/resolver.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/xalan.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/xalan.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/xalan.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/xercesImpl.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/xercesImpl.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/xercesImpl.jar)

Deleted: branches/refactor-test-branch/jbossxb/trunk/tools/lib/xml-apis.jar
===================================================================
(Binary files differ)

Copied: branches/refactor-test-branch/jbossxb/trunk/tools/lib/xml-apis.jar (from rev 1956, branches/logging_refactoring/jbossxb/trunk/tools/lib/xml-apis.jar)




More information about the jboss-svn-commits mailing list