You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pc...@apache.org on 2006/06/28 21:34:40 UTC

svn commit: r417856 [22/22] - in /incubator/openjpa/trunk/openjpa-lib: java/ main/ main/java/ main/java/org/apache/openjpa/lib/ant/ main/java/org/apache/openjpa/lib/conf/ main/java/org/apache/openjpa/lib/jdbc/ main/java/org/apache/openjpa/lib/log/ main...

Modified: incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/Commentable.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/Commentable.java?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/Commentable.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/Commentable.java Wed Jun 28 12:34:33 2006
@@ -17,24 +17,20 @@
 
 
 /**
- *	Implementations of this interface can be adorned with comments.
+ *  Implementations of this interface can be adorned with comments.
  *
- *	@since 3.3
- *	@nojavadoc
- */
-public interface Commentable
-{
-	public static final String[] EMPTY_COMMENTS = new String[0];
+ *  @since 3.3
+ *  @nojavadoc */
+public interface Commentable {
+    public static final String[] EMPTY_COMMENTS = new String[0];
 
+    /**
+     *  Set comments.
+     */
+    public void setComments(String[] comments);
 
-	/**
-	 *	Set comments.
-	 */
-	public void setComments (String[] comments);
-
-
-	/**
-	 *	Return comments, or empty array if none.
-	 */
-	public String[] getComments ();
+    /**
+     *  Return comments, or empty array if none.
+     */
+    public String[] getComments();
 }

Modified: incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/DocTypeReader.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/DocTypeReader.java?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/DocTypeReader.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/DocTypeReader.java Wed Jun 28 12:34:33 2006
@@ -15,314 +15,300 @@
  */
 package org.apache.openjpa.lib.xml;
 
-
 import java.io.*;
 
 
 /**
- *	<p>The DocTypeReader can be used to dynamically include a 
- *	<code>DOCTYPE</code> declaration in an XML stream.  Often it is 
- *	inconvenient to specify a <code>DOCTYPE</code> in XML files -- you many 
- *	want the option of parsing the files without reading the DTD, the files 
- *	may move around, making placing a <code>DOCTYPE</code> path to the DTD in 
- *	them unattractive, and you may have many files, making an in-line include 
- *	of the DTD unattractive as well.  This class makes
- *	it possible to maintain XML files without any <code>DOCTYPE</code>
- *	declaration, then dynamically include the <code>DOCTYPE</code> information
- *	at runtime.</p>
+ *  <p>The DocTypeReader can be used to dynamically include a
+ *  <code>DOCTYPE</code> declaration in an XML stream.  Often it is
+ *  inconvenient to specify a <code>DOCTYPE</code> in XML files -- you many
+ *  want the option of parsing the files without reading the DTD, the files
+ *  may move around, making placing a <code>DOCTYPE</code> path to the DTD in
+ *  them unattractive, and you may have many files, making an in-line include
+ *  of the DTD unattractive as well.  This class makes
+ *  it possible to maintain XML files without any <code>DOCTYPE</code>
+ *  declaration, then dynamically include the <code>DOCTYPE</code> information
+ *  at runtime.</p>
  *
- *	<p>If the XML stream already contains a <code>DOCTYPE</code> declaration,
- *	the reader will not add an additional one.</p>
+ *  <p>If the XML stream already contains a <code>DOCTYPE</code> declaration,
+ *  the reader will not add an additional one.</p>
  *
- *	<p>The <code>DOCTYPE</code> information given to the reader will be placed
- *	in the XML stream it wraps just before the root element of the document.</p>
+ *  <p>The <code>DOCTYPE</code> information given to the reader will be placed
+ *  in the XML stream it wraps just before the root element of the document.</p>
  *
- *	<p>Note that all methods other than the various forms of <code>read</code>
- *	apply onto the underlying XML stream and should not be used until the 
- *	header and doc type have been read.</p>
+ *  <p>Note that all methods other than the various forms of <code>read</code>
+ *  apply onto the underlying XML stream and should not be used until the
+ *  header and doc type have been read.</p>
  *
- *	@author		Abe White
- *	@nojavadoc
- */	
-public class DocTypeReader
-	extends Reader
-{
-	private Reader 	_xml		= null;
-	private Reader	_docType	= null;
-
-	// use to hold all header information until the doctype dec should be 
-	// inserted
-	private char[]	_header 	= null;
-	private int		_headerPos	= 0;
-
-
-	/**
-	 *	Construct the reader with an XML stream, and set the 
-	 *	<code>DOCTYPE</code> information to be included.  The given
-	 *	reader should access an input source containing the exact declaration
-	 *	to include, such as:<br />
-	 *	<code>&lt;DOCTYPE schedule SYSTEM "schedule.dtd"&gt;</code><br />
-	 *	<code>&lt;DOCTYPE html PUBLIC "-//W3C//DTD XHTML ...&gt;</code><br />
-	 *	<code>&lt;DOCTYPE stock-price [ &lt;ELEMENT symb ... ]&gt;</code><br />
- 	 *	If the reader is null, no <code>DOCTYPE</code> information will be
- 	 *	included in the stream.
-	 */
-	public DocTypeReader (Reader xml, Reader docType)
-		throws IOException
-	{
-		_docType = docType;
-		_xml = bufferHeader (xml);
-	}
-
-
-	public int read ()
-		throws IOException
-	{
-		int ch = readHeader ();
-		if (ch != -1)
-			return ch;
-
-		ch = readDocType ();
-		if (ch != -1)
-			return ch;
-
-		return _xml.read ();
-	}
-
-
-	public int read (char[] buf)
-		throws IOException
-	{
-		return read (buf, 0, buf.length);
-	}
-
-
-	public int read (char[] buf, int off, int len)
-		throws IOException
-	{
-		int headerRead = readHeader (buf, off, len);
-		off += headerRead;
-		len -= headerRead;
-
-		int docRead = readDocType (buf, off, len);
-		off += docRead;
-		len -= docRead;
-
-		return headerRead + docRead + _xml.read (buf, off, len);
-	}
-
-
-	public long skip (long len)
-		throws IOException
-	{
-		return _xml.skip (len);
-	}
-
-
-	public boolean ready ()
-		throws IOException
-	{
-		return _xml.ready ();
-	}
-
-
-	public boolean markSupported ()
-	{
-		return _xml.markSupported ();
-	}
-
-
-	public void mark (int readAheadLimit)
-		throws IOException
-	{
-		_xml.mark (readAheadLimit);
-	}
-
-
-	public void reset ()
-		throws IOException
-	{
-		_xml.reset ();
-	}
-
-
-	public void close ()
-		throws IOException
-	{
-		_xml.close ();
-		if (_docType != null)
-			_docType.close ();
-	}
-
-
-	/**
-	 *	Buffer all text until the doc type declaration should be inserted.
-	 */
-	private Reader bufferHeader (Reader origXML)
-		throws IOException
-	{
-		// don't bother if no doc type declaration
-		if (_docType == null)
-		{
-			_header = new char[0];
-			return origXML;
-		}
-
-		// create buffer
-		StringWriter writer = new StringWriter ();
-		PushbackReader xml = new PushbackReader (origXML, 3);
-		int ch, ch2, ch3;
-		boolean comment;
-
-		while (true)
-		{
-			// read leading space
-			for (ch = xml.read (); ch != -1 
-				&& Character.isWhitespace ((char) ch); ch = xml.read ())
-				writer.write (ch);
-			if (ch == -1)
-				return headerOnly (writer.toString ());
-
-			// if not XML, finish
-			if (ch != '<')
-			{
-				xml.unread (ch);
-				_header = writer.toString ().toCharArray ();
-				return xml;
-			}
-		
-			// if the root element, finish
-			ch = xml.read ();
-			if (ch != '?' && ch != '!')
-			{
-				xml.unread (ch);
-				xml.unread ('<');
-				_header = writer.toString ().toCharArray ();
-				return xml;
-			}
-
-			// if a doc type element, finish
-			ch2 = xml.read ();
-			if (ch == '!' && ch2 == 'D')
-			{
-				xml.unread (ch2);	
-				xml.unread (ch);	
-				xml.unread ('<');	
-				_header = writer.toString ().toCharArray ();
-				_docType = null;	// make sure doc type not included
-				return xml;
-			}
-		
-			// is this a comment?
-			ch3 = xml.read ();
-			comment = ch == '!' && ch2 == '-' && ch3 == '-';
-
-			// place everything read into the header material
-			writer.write ('<');
-			writer.write (ch);
-			writer.write (ch2);
-			writer.write (ch3);
-
-			// read until the next '>' or '-->' if a comment
-			ch2 = 0;
-			ch3 = 0;
-			while ((ch = xml.read ()) != -1)
-			{
-				writer.write (ch);
-
-				if ((!comment && ch == '>')
-					|| (comment && ch == '>' && ch2 == '-' && ch3 == '-'))
-					break;
-			
-				// track last two chars so we can tell if comment is ending
-				ch3 = ch2;
-				ch2 = ch;
-			}
-			if (ch == -1)
-				return headerOnly (writer.toString ());
-
-			// read the space after the declaration
-			for (ch = xml.read (); ch != -1 
-				&& Character.isWhitespace ((char) ch); ch = xml.read ())
-				writer.write (ch);
-			if (ch == -1)
-				return headerOnly (writer.toString ());
-			xml.unread (ch);
-		}
-	}
-
-
-	/**
-	 *	If the stream contained only space, think of it as pure XML with no
-	 *	header for consistency with the other methods.
-	 */
-	private Reader headerOnly (String header)
-	{
-		_header = new char[0];
-		_docType = null;
-		return new StringReader (header);
-	}
-
-
-	/**
-	 *	Return a single character from the buffered header, or -1 if none.
-	 */
-	private int readHeader ()
-	{
-		if (_headerPos == _header.length)
-			return -1;
-		return _header[_headerPos++];
-	}
-
-
-	/**
-	 *	Read from the buffered header to the given array, returning the
-	 *	number of characters read.
-	 */
-	private int readHeader (char[] buf, int off, int len)
-	{
-		int read = 0;
-		for (; len > 0 && _headerPos < _header.length; read++, off++, len--)
-			buf[off] = _header[_headerPos++];
-
-		return read;
-	}
-
-
-	/**
-	 *	Return a single character from the doc type declaration, or -1
-	 *	if none.
-	 */
-	private int readDocType ()
-		throws IOException
-	{
-		if (_docType == null)
-			return -1;
-
-		int ch = _docType.read ();
-		if (ch == -1)
-			_docType = null;
-
-		return ch;
-	}
-
-
-	/**
-	 *	Read from the doc type declaration to the given array, returning the
-	 *	number of characters read.
-	 */
-	private int readDocType (char[] buf, int off, int len)
-		throws IOException
-	{
-		if (_docType == null)
-			return 0;
-
-		int read = _docType.read (buf, off, len);
-		if (read < len)
-			_docType = null;
-		if (read == -1)
-			read = 0;
+ *  @author Abe White
+ *  @nojavadoc */
+public class DocTypeReader extends Reader {
+    private Reader _xml = null;
+    private Reader _docType = null;
+
+    // use to hold all header information until the doctype dec should be 
+    // inserted
+    private char[] _header = null;
+    private int _headerPos = 0;
+
+    /**
+     *  Construct the reader with an XML stream, and set the
+     *  <code>DOCTYPE</code> information to be included.  The given
+     *  reader should access an input source containing the exact declaration
+     *  to include, such as:<br />
+     *  <code>&lt;DOCTYPE schedule SYSTEM "schedule.dtd"&gt;</code><br />
+     *  <code>&lt;DOCTYPE html PUBLIC "-//W3C//DTD XHTML ...&gt;</code><br />
+     *  <code>&lt;DOCTYPE stock-price [ &lt;ELEMENT symb ... ]&gt;</code><br />
+      *  If the reader is null, no <code>DOCTYPE</code> information will be
+      *  included in the stream.
+     */
+    public DocTypeReader(Reader xml, Reader docType) throws IOException {
+        _docType = docType;
+        _xml = bufferHeader(xml);
+    }
+
+    public int read() throws IOException {
+        int ch = readHeader();
+
+        if (ch != -1) {
+            return ch;
+        }
+
+        ch = readDocType();
+
+        if (ch != -1) {
+            return ch;
+        }
+
+        return _xml.read();
+    }
+
+    public int read(char[] buf) throws IOException {
+        return read(buf, 0, buf.length);
+    }
+
+    public int read(char[] buf, int off, int len) throws IOException {
+        int headerRead = readHeader(buf, off, len);
+        off += headerRead;
+        len -= headerRead;
+
+        int docRead = readDocType(buf, off, len);
+        off += docRead;
+        len -= docRead;
+
+        return headerRead + docRead + _xml.read(buf, off, len);
+    }
+
+    public long skip(long len) throws IOException {
+        return _xml.skip(len);
+    }
+
+    public boolean ready() throws IOException {
+        return _xml.ready();
+    }
+
+    public boolean markSupported() {
+        return _xml.markSupported();
+    }
+
+    public void mark(int readAheadLimit) throws IOException {
+        _xml.mark(readAheadLimit);
+    }
+
+    public void reset() throws IOException {
+        _xml.reset();
+    }
+
+    public void close() throws IOException {
+        _xml.close();
+
+        if (_docType != null) {
+            _docType.close();
+        }
+    }
+
+    /**
+     *  Buffer all text until the doc type declaration should be inserted.
+     */
+    private Reader bufferHeader(Reader origXML) throws IOException {
+        // don't bother if no doc type declaration
+        if (_docType == null) {
+            _header = new char[0];
+
+            return origXML;
+        }
+
+        // create buffer
+        StringWriter writer = new StringWriter();
+        PushbackReader xml = new PushbackReader(origXML, 3);
+        int ch;
+        int ch2;
+        int ch3;
+        boolean comment;
+
+        while (true) {
+            // read leading space
+            for (ch = xml.read();
+                    (ch != -1) && Character.isWhitespace((char) ch);
+                    ch = xml.read())
+                writer.write(ch);
+
+            if (ch == -1) {
+                return headerOnly(writer.toString());
+            }
+
+            // if not XML, finish
+            if (ch != '<') {
+                xml.unread(ch);
+                _header = writer.toString().toCharArray();
+
+                return xml;
+            }
+
+            // if the root element, finish
+            ch = xml.read();
+
+            if ((ch != '?') && (ch != '!')) {
+                xml.unread(ch);
+                xml.unread('<');
+                _header = writer.toString().toCharArray();
+
+                return xml;
+            }
+
+            // if a doc type element, finish
+            ch2 = xml.read();
+
+            if ((ch == '!') && (ch2 == 'D')) {
+                xml.unread(ch2);
+                xml.unread(ch);
+                xml.unread('<');
+                _header = writer.toString().toCharArray();
+                _docType = null; // make sure doc type not included
+
+                return xml;
+            }
+
+            // is this a comment?
+            ch3 = xml.read();
+            comment = (ch == '!') && (ch2 == '-') && (ch3 == '-');
+
+            // place everything read into the header material
+            writer.write('<');
+            writer.write(ch);
+            writer.write(ch2);
+            writer.write(ch3);
+
+            // read until the next '>' or '-->' if a comment
+            ch2 = 0;
+            ch3 = 0;
+
+            while ((ch = xml.read()) != -1) {
+                writer.write(ch);
+
+                if ((!comment && (ch == '>')) ||
+                        (comment && (ch == '>') && (ch2 == '-') &&
+                        (ch3 == '-'))) {
+                    break;
+                }
+
+                // track last two chars so we can tell if comment is ending
+                ch3 = ch2;
+                ch2 = ch;
+            }
+
+            if (ch == -1) {
+                return headerOnly(writer.toString());
+            }
+
+            // read the space after the declaration
+            for (ch = xml.read();
+                    (ch != -1) && Character.isWhitespace((char) ch);
+                    ch = xml.read())
+                writer.write(ch);
+
+            if (ch == -1) {
+                return headerOnly(writer.toString());
+            }
+
+            xml.unread(ch);
+        }
+    }
+
+    /**
+     *  If the stream contained only space, think of it as pure XML with no
+     *  header for consistency with the other methods.
+     */
+    private Reader headerOnly(String header) {
+        _header = new char[0];
+        _docType = null;
+
+        return new StringReader(header);
+    }
+
+    /**
+     *  Return a single character from the buffered header, or -1 if none.
+     */
+    private int readHeader() {
+        if (_headerPos == _header.length) {
+            return -1;
+        }
+
+        return _header[_headerPos++];
+    }
+
+    /**
+     *  Read from the buffered header to the given array, returning the
+     *  number of characters read.
+     */
+    private int readHeader(char[] buf, int off, int len) {
+        int read = 0;
+
+        for (; (len > 0) && (_headerPos < _header.length);
+                read++, off++, len--)
+            buf[off] = _header[_headerPos++];
+
+        return read;
+    }
+
+    /**
+     *  Return a single character from the doc type declaration, or -1
+     *  if none.
+     */
+    private int readDocType() throws IOException {
+        if (_docType == null) {
+            return -1;
+        }
+
+        int ch = _docType.read();
+
+        if (ch == -1) {
+            _docType = null;
+        }
+
+        return ch;
+    }
+
+    /**
+     *  Read from the doc type declaration to the given array, returning the
+     *  number of characters read.
+     */
+    private int readDocType(char[] buf, int off, int len)
+        throws IOException {
+        if (_docType == null) {
+            return 0;
+        }
+
+        int read = _docType.read(buf, off, len);
+
+        if (read < len) {
+            _docType = null;
+        }
+
+        if (read == -1) {
+            read = 0;
+        }
 
-		return read;
-	}
+        return read;
+    }
 }

Modified: incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/Location.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/Location.java?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/Location.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/Location.java Wed Jun 28 12:34:33 2006
@@ -15,76 +15,70 @@
  */
 package org.apache.openjpa.lib.xml;
 
-import java.text.*;
-import org.xml.sax.*;
-
 import org.apache.openjpa.lib.util.*;
 
+import org.xml.sax.*;
+
 import serp.util.*;
 
+import java.text.*;
+
 
 /**
- *	@author		Stephen Kim
- *	@nojavadoc
- */
-public class Location
-{
-	private static final Localizer _loc = Localizer.forPackage (Location.class);
-	
-	private boolean _nullOnNoLocator = false;
-	private Locator	_locator	= null;
-
-	public Location ()
-	{
-		this (false);
-	}
-	
-	public Location (boolean nullOnNoLocator)
-	{
-		_nullOnNoLocator = nullOnNoLocator;
-	}
-
-	/**
-	 * for customized responses
-	 */ 
-	public String getLocation (String format)
-	{
-		if (_locator == null)
-		{
-			if (_nullOnNoLocator)
-				return null;
-			return _loc.get ("no-locator");
-		}
-		String forma = MessageFormat.format (format, new Object [] {
-			Numbers.valueOf (_locator.getLineNumber ()),
-			Numbers.valueOf (_locator.getColumnNumber ()),
-			_locator.getPublicId (),
-			_locator.getSystemId ()});
-		return forma;
-	}
-
-	public String getLocation ()
-	{
-		return getLocation (_loc.get ("location-format"));
-	}
-
-	public void setLocator (Locator locator)
-	{
-		_locator = locator;
-	}
-
-	public Locator getLocator ()
-	{
-		return _locator;
-	}
-
-	public void setNullOnNoLocator (boolean val)
-	{
-		_nullOnNoLocator = val;
-	}
-
-	public boolean isNullOnNoLocator ()
-	{
-		return _nullOnNoLocator;
-	}
+ *  @author Stephen Kim
+ *  @nojavadoc */
+public class Location {
+    private static final Localizer _loc = Localizer.forPackage(Location.class);
+    private boolean _nullOnNoLocator = false;
+    private Locator _locator = null;
+
+    public Location() {
+        this(false);
+    }
+
+    public Location(boolean nullOnNoLocator) {
+        _nullOnNoLocator = nullOnNoLocator;
+    }
+
+    /**
+     * for customized responses
+     */
+    public String getLocation(String format) {
+        if (_locator == null) {
+            if (_nullOnNoLocator) {
+                return null;
+            }
+
+            return _loc.get("no-locator");
+        }
+
+        String forma = MessageFormat.format(format,
+                new Object[] {
+                    Numbers.valueOf(_locator.getLineNumber()),
+                    Numbers.valueOf(_locator.getColumnNumber()),
+                    _locator.getPublicId(), _locator.getSystemId()
+                });
+
+        return forma;
+    }
+
+    public String getLocation() {
+        return getLocation(_loc.get("location-format"));
+    }
+
+    public void setLocator(Locator locator) {
+        _locator = locator;
+    }
+
+    public Locator getLocator() {
+        return _locator;
+    }
+
+    public void setNullOnNoLocator(boolean val) {
+        _nullOnNoLocator = val;
+    }
+
+    public boolean isNullOnNoLocator() {
+        return _nullOnNoLocator;
+    }
 }

Modified: incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/ValidatingErrorHandler.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/ValidatingErrorHandler.java?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/ValidatingErrorHandler.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/ValidatingErrorHandler.java Wed Jun 28 12:34:33 2006
@@ -15,39 +15,27 @@
  */
 package org.apache.openjpa.lib.xml;
 
-
 import org.xml.sax.*;
 
 
 /**
- *	<p>ErrorHandler implementation which overrides the default 
- *	behavior of ignoring parse errors to throw a {@link SAXException} instead.
- *	This handler is used by the validating parsers of the 
- *	{@link XMLFactory}.</p>
+ *  <p>ErrorHandler implementation which overrides the default
+ *  behavior of ignoring parse errors to throw a {@link SAXException} instead.
+ *  This handler is used by the validating parsers of the
+ *  {@link XMLFactory}.</p>
  *
- *	@author		Abe White
- *	@nojavadoc
- */
-public class ValidatingErrorHandler
-	implements ErrorHandler
-{
-	public void warning (SAXParseException e)
-		throws SAXException
-	{
-		throw e;
-	}
-
-
-	public void error (SAXParseException e)
-		throws SAXException
-	{
-		throw e;
-	}
-
-
-	public void fatalError (SAXParseException e)
-		throws SAXException
-	{
-		throw e;
-	}
+ *  @author Abe White
+ *  @nojavadoc */
+public class ValidatingErrorHandler implements ErrorHandler {
+    public void warning(SAXParseException e) throws SAXException {
+        throw e;
+    }
+
+    public void error(SAXParseException e) throws SAXException {
+        throw e;
+    }
+
+    public void fatalError(SAXParseException e) throws SAXException {
+        throw e;
+    }
 }

Modified: incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/XMLFactory.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/XMLFactory.java?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/XMLFactory.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/XMLFactory.java Wed Jun 28 12:34:33 2006
@@ -15,236 +15,173 @@
  */
 package org.apache.openjpa.lib.xml;
 
+import org.apache.commons.lang.exception.*;
+
+import org.w3c.dom.*;
+
+import org.xml.sax.*;
 
 import javax.xml.parsers.*;
 import javax.xml.transform.*;
 import javax.xml.transform.sax.*;
 
-import org.apache.commons.lang.exception.*;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-
 
 /**
- *	<p>The XMLFactory produces validating and non-validating DOM level 2
- *	and SAX level 2 parsers and XSL transformers through JAXP.  It uses 
- *	caching to avoid repeatedly paying the relatively expensive runtime costs
- *	associated with resolving the correct XML implementation through the
- *	JAXP configuration mechanisms.</p>
- *	
- *	@author		Abe White
- *	@nojavadoc
- */
-public class XMLFactory
-{
-	// cache parsers and transformers in all possible configurations
-	private static SAXParserFactory[] 		_saxFactories	= null;
-	private static DocumentBuilderFactory[]	_domFactories 	= null;
-	private static TransformerFactory		_transFactory	= null;
-	private static ErrorHandler				_validating;
-	static
-	{
-		_saxFactories = new SAXParserFactory[4];
-		_domFactories = new DocumentBuilderFactory[4];
-		_validating = new ValidatingErrorHandler ();
-	}
-
-
-	/**
-	 *	Return a DocumentBuilder with the specified configuration.
-	 */
-	public static DocumentBuilder getDOMParser (boolean validating, 
-		boolean namespaceAware)
-	{
-		DocumentBuilder db = checkDOMCache (validating, namespaceAware);
-		if (validating)
-			db.setErrorHandler (_validating);
-
-		return db;
-	}
-
-
-	/**
-	 *	Return a new DOM Document.
-	 */
-	public static Document getDocument ()
-	{
-		DocumentBuilder db = checkDOMCache (false, false);
-		return db.newDocument ();
-	}
-
-
-	/**
-	 *	Return a SAXParser with the specified configuration.
-	 */
-	public static SAXParser getSAXParser (boolean validating, 
-		boolean namespaceAware)
-	{
-		SAXParser sp = checkSAXCache (validating, namespaceAware);
-		if (validating)
-		{
-			try
-			{
-				sp.getXMLReader ().setErrorHandler (_validating);
-			}
-			catch (SAXException se)
-			{
-				throw new NestableRuntimeException (se);
-			}
-		}
-
-		return sp;
-	}
-
-
-	/**
-	 *	Return a Transformer that will apply the XSL transformation
-	 *	from the given source.  If the source is null,
-	 *	no transformation will be applied.
-	 */
-	public static Transformer getTransformer (Source source)
-	{
-		TransformerFactory fact = checkTransCache ();
-		try
-		{
-			if (source == null)
-				return fact.newTransformer ();
-
-			return fact.newTransformer (source);
-		}
-		catch (TransformerConfigurationException tfce)
-		{
-			throw new NestableRuntimeException (tfce);
-		}
-	}
-
-
-	/**
-	 *	Return a Templates for the given XSL source.
-	 */
-	public static Templates getTemplates (Source source)
-	{
-		TransformerFactory fact = checkTransCache ();
-		try
-		{
-			return fact.newTemplates (source);
-		}
-		catch (TransformerConfigurationException tfce)
-		{
-			throw new NestableRuntimeException (tfce);
-		}
-	}
-
-
-	/**
-	 *	Return a TransformerHandler for transforming SAX events, applying the
-	 *	XSL transform from the given source.  If the source is null, no
-	 *	transform will be applied.  
-	 */
-	public static TransformerHandler getTransformerHandler (Source source)
-	{
-		SAXTransformerFactory fact = (SAXTransformerFactory) checkTransCache ();
-		try
-		{
-			if (source == null)
-				return fact.newTransformerHandler ();
-
-			return fact.newTransformerHandler (source);
-		}
-		catch (TransformerConfigurationException tfce)
-		{
-			throw new NestableRuntimeException (tfce);
-		}
-	}
-
-
-	/**
-	 *	Returns the cached TransformerFactory, creating it if necessary.
-	 */
-	private static TransformerFactory checkTransCache ()
-	{
-		// no synchronization necessary; multiple assignments OK
-		if (_transFactory == null)
-			_transFactory = TransformerFactory.newInstance ();
-
-		return _transFactory;	
-	}
-
- 
-	/**
-	 *	Returns the cached DocumentBuilder matching the given configuration, 
-	 *	creating it if necessary.
-	 */
-	private static DocumentBuilder checkDOMCache (boolean validating, 
-		boolean namespaceAware)
-	{
-		// calculate where the factory with the correct config should
-		// be in our array cache
-		int arrayIndex = 0;
-		if (validating)
-			arrayIndex += 2;
-		if (namespaceAware)
-			arrayIndex += 1;
-
-		try
-		{
-			DocumentBuilderFactory factory = null;
-			factory = _domFactories[arrayIndex];
-
-			// no synchronization necessary; multiple assignments OK
-			if (factory == null)
-			{
-				factory = DocumentBuilderFactory.newInstance ();
-				factory.setValidating (validating);
-				factory.setNamespaceAware (namespaceAware);
-				_domFactories[arrayIndex] = factory;	
-			}
-			return factory.newDocumentBuilder ();
-		}
-		catch (ParserConfigurationException pce)
-		{
-			throw new NestableRuntimeException (pce);
-		}
-	}
-
-
-	/**
-	 *	Returns the cached SAXParser matching the given configuration, 
-	 *	creating it if necessary.
-	 */
-	private static SAXParser checkSAXCache (boolean validating,
-		boolean namespaceAware)
-	{
-		// calculate where the factory with the correct config should
-		// be in our array cache
-		int arrayIndex = 0;
-		if (validating)
-			arrayIndex += 2;
-		if (namespaceAware)
-			arrayIndex += 1;
-
-		try
-		{
-			SAXParserFactory factory = null;
-			factory = _saxFactories[arrayIndex];
-
-			// no synchronization necessary; multiple assignments OK
-			if (factory == null)
-			{
-				factory = SAXParserFactory.newInstance ();
-				factory.setValidating (validating);
-				factory.setNamespaceAware (namespaceAware);
-				_saxFactories[arrayIndex] = factory;	
-			}
-			return factory.newSAXParser ();
-		}
-		catch (ParserConfigurationException pce)
-		{
-			throw new NestableRuntimeException (pce);
-		}
-		catch (SAXException se)
-		{
-			throw new NestableRuntimeException (se);
-		}
-	}
+ *  <p>The XMLFactory produces validating and non-validating DOM level 2
+ *  and SAX level 2 parsers and XSL transformers through JAXP.  It uses
+ *  caching to avoid repeatedly paying the relatively expensive runtime costs
+ *  associated with resolving the correct XML implementation through the
+ *  JAXP configuration mechanisms.</p>
+ *
+ *  @author Abe White
+ *  @nojavadoc */
+public class XMLFactory {
+    // cache parsers and transformers in all possible configurations
+    private static SAXParserFactory[] _saxFactories = null;
+    private static DocumentBuilderFactory[] _domFactories = null;
+    private static SAXTransformerFactory _transFactory = null;
+    private static ErrorHandler _validating;
+
+    static {
+        _saxFactories = new SAXParserFactory[4];
+        _domFactories = new DocumentBuilderFactory[4];
+
+        SAXParserFactory saxFactory;
+        DocumentBuilderFactory domFactory;
+        int arrIdx;
+
+        for (int validating = 0; validating < 2; validating++) {
+            for (int namespace = 0; namespace < 2; namespace++) {
+                arrIdx = factoryIndex(validating == 1, namespace == 1);
+
+                saxFactory = SAXParserFactory.newInstance();
+                saxFactory.setValidating(validating == 1);
+                saxFactory.setNamespaceAware(namespace == 1);
+                _saxFactories[arrIdx] = saxFactory;
+
+                domFactory = DocumentBuilderFactory.newInstance();
+                domFactory.setValidating(validating == 1);
+                domFactory.setNamespaceAware(namespace == 1);
+                _domFactories[arrIdx] = domFactory;
+            }
+        }
+
+        _transFactory = (SAXTransformerFactory) TransformerFactory.newInstance();
+        _validating = new ValidatingErrorHandler();
+    }
+
+    /**
+     *  Return a SAXParser with the specified configuration.
+     */
+    public static SAXParser getSAXParser(boolean validating,
+        boolean namespaceAware) {
+        SAXParser sp;
+
+        try {
+            sp = _saxFactories[factoryIndex(validating, namespaceAware)].newSAXParser();
+        } catch (ParserConfigurationException pce) {
+            throw new NestableRuntimeException(pce);
+        } catch (SAXException se) {
+            throw new NestableRuntimeException(se);
+        }
+
+        if (validating) {
+            try {
+                sp.getXMLReader().setErrorHandler(_validating);
+            } catch (SAXException se) {
+                throw new NestableRuntimeException(se);
+            }
+        }
+
+        return sp;
+    }
+
+    /**
+     *  Return a DocumentBuilder with the specified configuration.
+     */
+    public static DocumentBuilder getDOMParser(boolean validating,
+        boolean namespaceAware) {
+        DocumentBuilder db;
+
+        try {
+            db = _domFactories[factoryIndex(validating, namespaceAware)].newDocumentBuilder();
+        } catch (ParserConfigurationException pce) {
+            throw new NestableRuntimeException(pce);
+        }
+
+        if (validating) {
+            db.setErrorHandler(_validating);
+        }
+
+        return db;
+    }
+
+    /**
+     *  Return a new DOM Document.
+     */
+    public static Document getDocument() {
+        return getDOMParser(false, false).newDocument();
+    }
+
+    /**
+     *  Return a Transformer that will apply the XSL transformation
+     *  from the given source.  If the source is null,
+     *  no transformation will be applied.
+     */
+    public static Transformer getTransformer(Source source) {
+        try {
+            if (source == null) {
+                return _transFactory.newTransformer();
+            }
+
+            return _transFactory.newTransformer(source);
+        } catch (TransformerConfigurationException tfce) {
+            throw new NestableRuntimeException(tfce);
+        }
+    }
+
+    /**
+     *  Return a Templates for the given XSL source.
+     */
+    public static Templates getTemplates(Source source) {
+        try {
+            return _transFactory.newTemplates(source);
+        } catch (TransformerConfigurationException tfce) {
+            throw new NestableRuntimeException(tfce);
+        }
+    }
+
+    /**
+     *  Return a TransformerHandler for transforming SAX events, applying the
+     *  XSL transform from the given source.  If the source is null, no
+     *  transform will be applied.
+     */
+    public static TransformerHandler getTransformerHandler(Source source) {
+        try {
+            if (source == null) {
+                return _transFactory.newTransformerHandler();
+            }
+
+            return _transFactory.newTransformerHandler(source);
+        } catch (TransformerConfigurationException tfce) {
+            throw new NestableRuntimeException(tfce);
+        }
+    }
+
+    /**
+     *  Return the array index of the factory with the given properties.
+     */
+    private static int factoryIndex(boolean validating, boolean namespaceAware) {
+        int arrayIndex = 0;
+
+        if (validating) {
+            arrayIndex += 2;
+        }
+
+        if (namespaceAware) {
+            arrayIndex += 1;
+        }
+
+        return arrayIndex;
+    }
 }

Modified: incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/XMLWriter.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/XMLWriter.java?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/XMLWriter.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/XMLWriter.java Wed Jun 28 12:34:33 2006
@@ -15,144 +15,119 @@
  */
 package org.apache.openjpa.lib.xml;
 
-
 import java.io.*;
 
 
 /**
- *	<p>The XMLWriter is a writer type for pretty-printing XML.
- *	It assumes that the streamed XML will be given without any whitespace,
- *	other than the space within text blocks.</p>
+ *  <p>The XMLWriter is a writer type for pretty-printing XML.
+ *  It assumes that the streamed XML will be given without any whitespace,
+ *  other than the space within text blocks.</p>
  *
- *	@author		Abe White
- *	@nojavadoc
- */	
-public class XMLWriter
-	extends FilterWriter
-{
-	private static String _endl	= System.getProperty ("line.separator");
-
-	private int	_lastChar 	= ' ';
-	private int	_lastChar2 	= ' ';
-	private int	_lastChar3 	= ' ';
-	private int	_depth		= 0;
-
-
-	/**
-	 *	Construct an XMLWriter that will write to the given stream.
-	 */
-	public XMLWriter (Writer out)
-	{
-		super (out);
-	}
-
-
-	public void write (char[] cbuf, int off, int len)
-		throws IOException
-	{
-		for (int i = 0; i < len; i++)
-			write (cbuf[off + i]);
-	}
-
-
-	public void write (String str, int off, int len)
-		throws IOException
-	{
-		for (int i = 0; i < len; i++)
-			write (str.charAt (off + i));
-	}
-
-
-	public void write (int c)
-		throws IOException
-	{
-		// the basic idea of this method is to make sure that when a tag
-		// or a text block starts, it is placed on a separate line and 
-		// indented an amount appropriate to the XML tree depth
-
-		if (_lastChar == '<')
-		{
-			// tag or processing instruction?
-			if (c != '?' && c != '!')
-			{
-				// end tag; decrease depth before writing spaces
-				if (c == '/')
-					_depth--;
-			
-				// tags are always on separate lines
-				out.write (_endl);
-				writeSpaces ();
-
-				// beginning tag; increase depth for tag body
-				if (c != '/')
-					_depth++;
-			}
-
-			// if this is not a processing instruction / comment,
-			// write the chars
-			if (c != '!')
-			{
-				out.write ('<');
-				out.write (c);
-			}
-		}
-		else if (c == '>')
-		{
-			// if unary tag decrease depth to undo the increase at tag start
-			if (_lastChar == '/')
-				_depth--;
-
-			// check for the comment-processing conditions
-			if (_lastChar2 == '<' && _lastChar == '!')
-				out.write ("<!");
-			else if (_lastChar3 == '<' && _lastChar2 == '!' && _lastChar == '-')
-				out.write ("<!-");
-
-			out.write ('>');
-		}
-		else if (c != '<')
-		{
-			// if we're at "<!--", indent and put in the beginning of
-			// the comment. if it's "<!-?" where ? is something other
-			// than -, dump what we've gotten so far
-			if (_lastChar3 == '<' && _lastChar2 == '!' && _lastChar == '-')
-			{
-				if (c == '-')
-				{
-					out.write (_endl);
-					writeSpaces ();
-					out.write ("<!--");
-				}
-				else
-				{
-					out.write ("<!-");
-					out.write (c);
-				}
-			}
-			// if we're at "<!-", keep on not writing data
-			else if (!(_lastChar2 == '<' && _lastChar == '!' && c == '-'))
-			{
-				// if just ended a tag and about to print text, put on
-				// separate line
-				if (_lastChar == '>' && _lastChar2 != '?' && _lastChar2 != '!')
-				{
-					out.write (_endl);
-					writeSpaces ();
-				}
-				out.write (c);
-			}
-		}
-
-		_lastChar3 = _lastChar2;
-		_lastChar2 = _lastChar;
-		_lastChar = c;
-	}
-
-
-	private void writeSpaces ()
-		throws IOException
-	{
-		for (int i = 0; i < _depth; i++)
-			out.write ("    ");
-	}
+ *  @author Abe White
+ *  @nojavadoc */
+public class XMLWriter extends FilterWriter {
+    private static String _endl = System.getProperty("line.separator");
+    private int _lastChar = ' ';
+    private int _lastChar2 = ' ';
+    private int _lastChar3 = ' ';
+    private int _depth = 0;
+
+    /**
+     *  Construct an XMLWriter that will write to the given stream.
+     */
+    public XMLWriter(Writer out) {
+        super(out);
+    }
+
+    public void write(char[] cbuf, int off, int len) throws IOException {
+        for (int i = 0; i < len; i++)
+            write(cbuf[off + i]);
+    }
+
+    public void write(String str, int off, int len) throws IOException {
+        for (int i = 0; i < len; i++)
+            write(str.charAt(off + i));
+    }
+
+    public void write(int c) throws IOException {
+        // the basic idea of this method is to make sure that when a tag
+        // or a text block starts, it is placed on a separate line and 
+        // indented an amount appropriate to the XML tree depth
+        if (_lastChar == '<') {
+            // tag or processing instruction?
+            if ((c != '?') && (c != '!')) {
+                // end tag; decrease depth before writing spaces
+                if (c == '/') {
+                    _depth--;
+                }
+
+                // tags are always on separate lines
+                out.write(_endl);
+                writeSpaces();
+
+                // beginning tag; increase depth for tag body
+                if (c != '/') {
+                    _depth++;
+                }
+            }
+
+            // if this is not a processing instruction / comment,
+            // write the chars
+            if (c != '!') {
+                out.write('<');
+                out.write(c);
+            }
+        } else if (c == '>') {
+            // if unary tag decrease depth to undo the increase at tag start
+            if (_lastChar == '/') {
+                _depth--;
+            }
+
+            // check for the comment-processing conditions
+            if ((_lastChar2 == '<') && (_lastChar == '!')) {
+                out.write("<!");
+            } else if ((_lastChar3 == '<') && (_lastChar2 == '!') &&
+                    (_lastChar == '-')) {
+                out.write("<!-");
+            }
+
+            out.write('>');
+        } else if (c != '<') {
+            // if we're at "<!--", indent and put in the beginning of
+            // the comment. if it's "<!-?" where ? is something other
+            // than -, dump what we've gotten so far
+            if ((_lastChar3 == '<') && (_lastChar2 == '!') &&
+                    (_lastChar == '-')) {
+                if (c == '-') {
+                    out.write(_endl);
+                    writeSpaces();
+                    out.write("<!--");
+                } else {
+                    out.write("<!-");
+                    out.write(c);
+                }
+            }
+            // if we're at "<!-", keep on not writing data
+            else if (!((_lastChar2 == '<') && (_lastChar == '!') && (c == '-'))) {
+                // if just ended a tag and about to print text, put on
+                // separate line
+                if ((_lastChar == '>') && (_lastChar2 != '?') &&
+                        (_lastChar2 != '!')) {
+                    out.write(_endl);
+                    writeSpaces();
+                }
+
+                out.write(c);
+            }
+        }
+
+        _lastChar3 = _lastChar2;
+        _lastChar2 = _lastChar;
+        _lastChar = c;
+    }
+
+    private void writeSpaces() throws IOException {
+        for (int i = 0; i < _depth; i++)
+            out.write("    ");
+    }
 }

Modified: incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/package.html
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/package.html?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/package.html (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/java/org/apache/openjpa/lib/xml/package.html Wed Jun 28 12:34:33 2006
@@ -1,18 +1,3 @@
-<!--
-  Copyright 2006 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.
--->
 <html>
 <body>
 	<p><strong>XML Handling</strong></p>

Added: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/ant/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/ant/localizer.properties?rev=417856&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/ant/localizer.properties (added)
+++ incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/ant/localizer.properties Wed Jun 28 12:34:33 2006
@@ -0,0 +1 @@
+no-filesets: No filesets specified.

Propchange: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/ant/localizer.properties
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/conf/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/conf/localizer.properties?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/conf/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/conf/localizer.properties Wed Jun 28 12:34:33 2006
@@ -1,19 +1,4 @@
-#
-# Copyright 2006 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.
-#
-conf-load: Setting the given properties into configuration: {0}
+get-prop-errs: There were errors initializing your configuration: {0}
 read-only: The configuration is read only; it cannot be modified.
 obj-create: An instance of the class "{0}" could not be instantiated.  Make \
 	sure the class has a public no-args constructor.
@@ -60,6 +45,12 @@
 loaded-via-provider: Configuration information loaded via "{0}".
 no-providers: Default configuration information couldn''t be loaded from any \
 	provider.
+hook-before: An exception occurred while invoking beforeConfigurationLoad() \
+	on "{0}". This exception will be consumed.
+hook-after: An exception occurred while invoking afterConfigurationLoad() \
+	on "{0}". This exception will be consumed.
+closeable-ex: An exception occurred while invoking close() on "{0}". This \
+	exception will be consumed.
 
 Log-name: Log factory
 Log-desc: LogFactory and configuration

Modified: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/jdbc/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/jdbc/localizer.properties?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/jdbc/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/jdbc/localizer.properties Wed Jun 28 12:34:33 2006
@@ -1,19 +1,86 @@
-#
-# Copyright 2006 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.
-#
 not-jdbc3: Attempted to call JDBC 3 method on a non-JDBC 3 JVM.
 invoke-jdbc3: An error occurred attempting to invoke JDBC 3 method.  Your \
 	driver or database may not support JDBC 3 features.
 error-jdbc3: Error loading JDBC 3 method.
+wait-on-conn: Waited {0} milliseconds for connection {1}.  This might indicate \
+	that you need to increase your connection pool size.
+ps-overflow: The prepared statement cache has overflowed. "{0}" was removed. \
+	You may want to increase your prepared statement cache size.  The maximum \
+	number of cached statements is currently set to {1}.
+tracker-executestmnt: Statement execution
+tracker-executeprepstmnt: PreparedStatement execution
+tracker-commit: Commit execution
+tracker-rollback: Rollback execution
+tracker-connection: Connection opening
+tracker-resultSet: ResultSet closing
+tracker-min: min
+tracker-total: total
+tracker-max: max
+tracker-average: average
+tracker-ms: ms
+tracker-occurances: occurances
+tracker-slowest-statements: slowest statements
+rsrc-closed: The connection "{0}" has already been closed.  The embedded \
+	stack trace for this exception details the closure point.
+not-active: Attempt to operate on connection "{0}" that has already been \
+	returned to the connection pool.
+poolds-null: A connection could not be obtained for driver class "{0}" \
+	and URL "{1}".  You may have specified an invalid URL.
+get-conn-exception:	An unexpected exception of type "{0}" occurred while \
+	getting a connection. This exception will be re-thrown as a SQLException.
+conn-pool-exhausted: The maximum number of connections ({0}) for the \
+	connection pool have been exhausted.
+pscache.stat.requests.name: Requests
+pscache.stat.requests.desc: Cache requests
+pscache.stat.requests.ord: Count
+pscache.stat.leaked.name: Leaked
+pscache.stat.leaked.desc: Leaked statements
+pscache.stat.leaked.ord: Statements
+pscache.stat.hits.name: Hits
+pscache.stat.hits.desc: Cache hits
+pscache.stat.hits.ord: Count
+pscache.stat.created.name: Created
+pscache.stat.created.desc: Created statements
+pscache.stat.created.ord: Statements
+pscache.stat.redundant.name: Redundant
+pscache.stat.redundant.desc: Redundant statements
+pscache.stat.redundant.ord: Statements
+pscache.stat.overflow.name: Overflow
+pscache.stat.overflow.desc: Cache overflows
+pscache.stat.overflow.ord: Count
+pscache.stat.size.name: Size
+pscache.stat.size.desc: Cached statements
+pscache.stat.size.ord: Size
+validationsql-desc:  SQL used to validate connections
+validation-timeout-desc:  The minimum number of milliseconds that must elapse \
+	before a connection will ever be re-validated.
+rollback-on-return-desc:  Force all connections to be rolled back when they \
+	are returned to the pool.
+max-active-desc:  The maximum number of database connections in use at one time.
+max-idle-desc:  The maximum number of idle database connections to keep in the \
+	pool.
+max-wait-desc:  The maximum number of milliseconds to wait for a free database \
+	connection to become available before giving up.
+test-on-borrow-desc:  Whether to validate database connections before \
+	obtaining them from the pool.
+test-on-return-desc:  Whether to validate database connections before \
+	returning them to the pool.
+time-between-eviction-runs-millis-desc:  The number of milliseconds between \
+	runs of the eviction thread.  -1 indicates that the thread will never run.
+num-tests-per-eviction-run-desc:  Number of connections tested per eviction run.
+min-evictable-idle-time-millis-desc:  The minimum number of milliseconds that \
+	a database connection can sit idle before it becomes a candidate for \
+	eviction from the pool.
+test-while-idle-desc:  Whether to periodically validate idle database \
+	connections.
+num-active-desc:  Number of active connections in pool.
+num-idle-desc:  Number of idle connections in pool.
+connection-user-name-desc:  The JDBC user name for connecting to the database.
+connection-url-desc:  The JDBC URL for the database.
+connection-properties-desc:  Properties applied to the JDBC driver or \
+	datasource.
+connection-driver-name-desc:  The JDBC driver.
+login-timeout-desc:  The maximum number of milliseconds to block for database \
+	login.
+close-pool: Shutting down connection pool.
+close-pool-fail: Error caught when issuing close pool SQL: {0}

Modified: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/log/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/log/localizer.properties?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/log/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/log/localizer.properties Wed Jun 28 12:34:33 2006
@@ -1,18 +1,3 @@
-#
-# Copyright 2006 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.
-#
 log-trace: TRACE
 log-debug: DEBUG
 log-info: INFO

Modified: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/meta/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/meta/localizer.properties?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/meta/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/meta/localizer.properties Wed Jun 28 12:34:33 2006
@@ -1,18 +1,3 @@
-#
-# Copyright 2006 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.
-#
 loc-prefix: Location: 
 start-parse: Parsing resource "{0}".
 end-parse: Finished parsing metadata resource "{0}".
@@ -36,3 +21,5 @@
 source-trackers-location-header: Source file locations:
 source-trackers-location-line-item: {0}: {1}
 source-tracker-file-unknown: <file location unknown>
+parser-schema-bug: XML schema validation is disabled due to bugs detected \
+	in the SAX parser.

Modified: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/rop/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/rop/localizer.properties?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/rop/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/rop/localizer.properties Wed Jun 28 12:34:33 2006
@@ -1,18 +1,3 @@
-#
-# Copyright 2006 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.
-#
 closed: The result list has been closed.
 read-only: Result lists are read-only.
 range-too-high: The RangeResultObjectProvider can only be used for ranges that \

Modified: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/util/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/util/localizer.properties?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/util/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/util/localizer.properties Wed Jun 28 12:34:33 2006
@@ -1,18 +1,3 @@
-#
-# Copyright 2006 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.
-#
 dup-key: Duplicate keys are not allowed in this properties file. Key: {0}, \
 	first value: {1}, second value: {2}.
 concurrent-initial: Illegal initial value of {0} specified.

Modified: incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/xml/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/xml/localizer.properties?rev=417856&r1=415364&r2=417856&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/xml/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-lib/main/resources/org/apache/openjpa/lib/xml/localizer.properties Wed Jun 28 12:34:33 2006
@@ -1,17 +1,2 @@
-#
-# Copyright 2006 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.
-#
 no-locator: Unknown
 location-format: Line: {0}, C: {1}