JBoss Cache SVN: r7348 - in core/tags/1.4.1.SP11: src/org/jboss/cache and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2009-01-04 04:35:48 -0500 (Sun, 04 Jan 2009)
New Revision: 7348
Modified:
core/tags/1.4.1.SP11/build.xml
core/tags/1.4.1.SP11/src/org/jboss/cache/Version.java
Log:
Set version details
Modified: core/tags/1.4.1.SP11/build.xml
===================================================================
--- core/tags/1.4.1.SP11/build.xml 2009-01-04 09:15:22 UTC (rev 7347)
+++ core/tags/1.4.1.SP11/build.xml 2009-01-04 09:35:48 UTC (rev 7348)
@@ -6,7 +6,7 @@
<property name="module.name" value="JBossCache"/>
<!--We now requires version to have no white space since Ant+JBossAop will sometime choke. -->
- <property name="module.version" value="1.4.1.SP8"/>
+ <property name="module.version" value="1.4.1.SP11"/>
<property name="implementation.url" value="http://www.jboss.com/products/jbosscache"/>
<property file="build.properties"/>
<property name="root.dir" value="${basedir}"/>
Modified: core/tags/1.4.1.SP11/src/org/jboss/cache/Version.java
===================================================================
--- core/tags/1.4.1.SP11/src/org/jboss/cache/Version.java 2009-01-04 09:15:22 UTC (rev 7347)
+++ core/tags/1.4.1.SP11/src/org/jboss/cache/Version.java 2009-01-04 09:35:48 UTC (rev 7348)
@@ -10,9 +10,9 @@
*/
public class Version
{
- public static final String version = "1.4.1.SP8";
+ public static final String version = "1.4.1.SP11";
public static final String codename = "Cayenne";
- public static byte[] version_id = {'0', '1', '4', '1', 'S', 'P', '8'};
+ public static byte[] version_id = {'0', '1', '4', '1', 'S', 'P', '1', '1'};
public static final String cvs = "$Id$";
private static final int MAJOR_SHIFT = 11;
@@ -31,7 +31,7 @@
{
System.out.println("\nVersion: \t" + version);
System.out.println("Codename: \t" + codename);
- System.out.println("CVS: \t" + cvs);
+ //System.out.println("CVS: \t" + cvs);
System.out.println("History: \t(see http://jira.jboss.com/jira/browse/JBCACHE for details)\n");
}
@@ -39,7 +39,7 @@
* Returns version information as a string.
*/
public static String printVersion() {
- return "JBossCache '" + codename + "' " + version + "[ " + cvs + "]";
+ return "JBossCache '" + codename + "' " + version;// + "[ " + cvs + "]";
}
public static String printVersionId(byte[] v, int len)
15 years, 12 months
JBoss Cache SVN: r7347 - core/tags.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2009-01-04 04:15:22 -0500 (Sun, 04 Jan 2009)
New Revision: 7347
Added:
core/tags/1.4.1.SP11/
Log:
Tagging 1.4.1.SP11
Copied: core/tags/1.4.1.SP11 (from rev 7346, core/branches/1.4.X)
15 years, 12 months
JBoss Cache SVN: r7346 - core/trunk/src/main/java/org/jboss/cache/loader.
by jbosscache-commits@lists.jboss.org
Author: jiwils
Date: 2009-01-03 23:01:22 -0500 (Sat, 03 Jan 2009)
New Revision: 7346
Modified:
core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
Log:
Fix for JBCACHE-1452.
Modified: core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2009-01-04 03:59:48 UTC (rev 7345)
+++ core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2009-01-04 04:01:22 UTC (rev 7346)
@@ -538,7 +538,8 @@
{
// a hack to handles the incomp. of SQL server jdbc driver prior to SQL SERVER 2005
if (driverName != null && (driverName.contains("SQLSERVER")
- || driverName.contains("POSTGRESQL")))
+ || driverName.contains("POSTGRESQL")
+ || driverName.contains("JCONNECT")))
{
ps.setNull(2, Types.LONGVARBINARY);
}
15 years, 12 months
JBoss Cache SVN: r7345 - core/branches/2.2.X/src/main/java/org/jboss/cache/loader.
by jbosscache-commits@lists.jboss.org
Author: jiwils
Date: 2009-01-03 22:59:48 -0500 (Sat, 03 Jan 2009)
New Revision: 7345
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
Log:
Fix for JBCACHE-1452 in branch 2.2.x.
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2009-01-04 03:21:39 UTC (rev 7344)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2009-01-04 03:59:48 UTC (rev 7345)
@@ -493,7 +493,8 @@
{
// a hack to handles the incomp. of SQL server jdbc driver prior to SQL SERVER 2005
if (driverName != null && (driverName.contains("SQLSERVER")
- || driverName.contains("POSTGRESQL")))
+ || driverName.contains("POSTGRESQL")
+ || driverName.contains("JCONNECT")))
{
ps.setNull(2, Types.LONGVARBINARY);
}
15 years, 12 months
JBoss Cache SVN: r7344 - core/branches/1.4.X/src/org/jboss/cache/loader.
by jbosscache-commits@lists.jboss.org
Author: jiwils
Date: 2009-01-03 22:21:39 -0500 (Sat, 03 Jan 2009)
New Revision: 7344
Modified:
core/branches/1.4.X/src/org/jboss/cache/loader/JDBCExtendedCacheLoader.java
Log:
Fix for JBCACHE-1453. Persistent state transfer now loops using the ByteArrayInputStream's available method rather than the wrapper MarshalledValueInputStream.
Modified: core/branches/1.4.X/src/org/jboss/cache/loader/JDBCExtendedCacheLoader.java
===================================================================
--- core/branches/1.4.X/src/org/jboss/cache/loader/JDBCExtendedCacheLoader.java 2009-01-04 03:17:17 UTC (rev 7343)
+++ core/branches/1.4.X/src/org/jboss/cache/loader/JDBCExtendedCacheLoader.java 2009-01-04 03:21:39 UTC (rev 7344)
@@ -18,23 +18,23 @@
import org.jboss.invocation.MarshalledValueOutputStream;
/**
- * A A <code>JDBCCacheLoader</code> that implements
+ * A A <code>JDBCCacheLoader</code> that implements
* <code>ExtendedCacheLoader</code>.
- *
+ *
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
* @version $Id$
*/
public class JDBCExtendedCacheLoader extends JDBCCacheLoader implements ExtendedCacheLoader
{
// -------------------------------------------------------- Instance Fields
-
+
private RegionManager manager_;
-
+
// ----------------------------------------------------------- Constructors
/**
* Create a new JDBCExtendedCacheLoader.
- *
+ *
*/
public JDBCExtendedCacheLoader()
{
@@ -50,7 +50,7 @@
{
// Set the TCCL to any classloader registered for subtree
setUnmarshallingClassLoader(subtree);
-
+
ByteArrayOutputStream out_stream=new ByteArrayOutputStream(1024);
ObjectOutputStream out=new MarshalledValueOutputStream(out_stream);
loadState(subtree, out);
@@ -71,28 +71,28 @@
{
// Set the TCCL to any classloader registered for subtree
setUnmarshallingClassLoader(subtree);
-
+
ByteArrayInputStream in_stream=new ByteArrayInputStream(state);
MarshalledValueInputStream in=new MarshalledValueInputStream(in_stream);
NodeData nd;
-
+
// remove entire existing state
this.remove(subtree);
-
- boolean moveToBuddy =
+
+ boolean moveToBuddy =
subtree.isChildOf(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN) && subtree.size() > 1;
-
+
// store new state
Fqn fqn = null;
- while(in.available() > 0)
+ while(in_stream.available() > 0)
{
nd=(NodeData)in.readObject();
-
+
if (moveToBuddy)
fqn = BuddyManager.getBackupFqn(subtree, nd.fqn);
else
fqn = nd.fqn;
-
+
if(nd.attrs != null)
this.put(fqn, nd.attrs, true); // creates a node with 0 or more attributes
else
@@ -132,16 +132,16 @@
{
storeState(state, Fqn.fromString("/"));
}
-
+
// ------------------------------------------------------- Private Methods
/**
- * Checks the RegionManager for a classloader registered for the
+ * Checks the RegionManager for a classloader registered for the
* given, and if found sets it as the TCCL
- *
+ *
* @param subtree
*/
private void setUnmarshallingClassLoader(Fqn subtree)
15 years, 12 months
JBoss Cache SVN: r7343 - core/branches/1.4.X/src/org/jboss/cache/loader.
by jbosscache-commits@lists.jboss.org
Author: jiwils
Date: 2009-01-03 22:17:17 -0500 (Sat, 03 Jan 2009)
New Revision: 7343
Modified:
core/branches/1.4.X/src/org/jboss/cache/loader/JDBCCacheLoader.java
Log:
Fix for JBCACHE-1452. Use of Sybase Driver sets null as LONGVARBINARY rather than BLOB.
Modified: core/branches/1.4.X/src/org/jboss/cache/loader/JDBCCacheLoader.java
===================================================================
--- core/branches/1.4.X/src/org/jboss/cache/loader/JDBCCacheLoader.java 2009-01-02 17:01:44 UTC (rev 7342)
+++ core/branches/1.4.X/src/org/jboss/cache/loader/JDBCCacheLoader.java 2009-01-04 03:17:17 UTC (rev 7343)
@@ -72,7 +72,7 @@
private static final Log log=LogFactory.getLog(JDBCCacheLoader.class);
private static final ThreadLocal connection = new ThreadLocal();
-
+
private String driverName;
private String drv;
@@ -271,7 +271,7 @@
}
finally
{
- lock.releaseLock(name);
+ lock.releaseLock(name);
}
}
@@ -293,7 +293,7 @@
finally
{
lock.releaseLock(name);
- }
+ }
}
/**
@@ -352,7 +352,7 @@
finally
{
lock.releaseLock(name);
- }
+ }
}
/**
@@ -431,7 +431,7 @@
finally
{
lock.releaseLock(name);
- }
+ }
}
/**
@@ -553,7 +553,7 @@
{
log.trace("openned tx connection: tx=" + tx + ", con=" + con);
}
- }
+ }
try
{
@@ -744,10 +744,10 @@
}
}
}
-
+
Connection con = null;
Statement st = null;
-
+
try
{
con = cf.getConnection();
@@ -1000,11 +1000,14 @@
else
{
// a hack to handles the incomp. of SQL server jdbc driver prior to SQL SERVER 2005
- if( driverName != null && (driverName.indexOf("SQLSERVER") >= 0
- || driverName.indexOf("POSTGRESQL") >= 0))
- ps.setNull( 2, Types.LONGVARBINARY );
- else
- ps.setNull(2, Types.BLOB);
+ if( driverName != null && (driverName.indexOf("SQLSERVER") >= 0
+ // POSTGRES
+ || driverName.indexOf("POSTGRESQL") >= 0
+ // SYBASE
+ || driverName.indexOf("JCONNECT") >= 0))
+ ps.setNull( 2, Types.LONGVARBINARY );
+ else
+ ps.setNull(2, Types.BLOB);
//ps.setNull(2, Types.LONGVARBINARY);
}
@@ -1250,13 +1253,13 @@
throw new IllegalStateException("Failed to load driver " + drv + ": " + e.getMessage());
}
}
-
+
private static String getDriverName(Connection con)
{
if (con == null) return null;
try{
DatabaseMetaData dmd = con.getMetaData();
- return dmd.getDriverName().toUpperCase();
+ return dmd.getDriverName().toUpperCase();
}
catch(SQLException e)
{
@@ -1264,7 +1267,7 @@
// required to fully support metadata.
throw new IllegalStateException(
"Error while getting the driver name " + ": " + e.getMessage());
- }
+ }
}
private static String getRequiredProperty(Properties props, String name)
@@ -1576,16 +1579,16 @@
// allows a unit test using DummyContext
if (dataSource == null)
throw new IllegalArgumentException("dataSource cannot be null");
-
+
this.dataSource = dataSource;
}
public Connection prepare(Object tx)
{
// we don't need to set autocommit to false beause the DataSource object
- // is almost always has a connection pool associated with it and distributed
+ // is almost always has a connection pool associated with it and distributed
// transaction participation turned on which means autocommit is off by default
-
+
try
{
return getConnection();
15 years, 12 months
JBoss Cache SVN: r7342 - core/trunk/src/main/java/org/jboss/cache/config/parsing.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2009-01-02 12:01:44 -0500 (Fri, 02 Jan 2009)
New Revision: 7342
Modified:
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
Log:
Removed unnecessary logging noise
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2008-12-19 16:10:30 UTC (rev 7341)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2009-01-02 17:01:44 UTC (rev 7342)
@@ -120,7 +120,9 @@
{
org.w3c.dom.Node node = list.item(s);
if (node.getNodeType() != org.w3c.dom.Node.ELEMENT_NODE)
+ {
continue;
+ }
Element element = (Element) node;
String name = element.getAttribute(attributeName);
@@ -165,7 +167,9 @@
{
org.w3c.dom.Node node = list.item(s);
if (node.getNodeType() != org.w3c.dom.Node.ELEMENT_NODE)
+ {
continue;
+ }
Element element = (Element) node;
String value = element.getAttribute(attributeName);
@@ -222,7 +226,9 @@
}
} // end of for ()
if (trim)
+ {
attributeText = attributeText.trim();
+ }
return attributeText;
}
@@ -248,7 +254,9 @@
{
String value = node2.getNodeValue();
if (value == null)
+ {
return "";
+ }
return StringPropertyReplacer.replaceProperties(value.trim());
}
else
@@ -276,7 +284,9 @@
char curr = buf.charAt(looper);
char next = 0;
if (looper + 1 < buf.length())
+ {
next = buf.charAt(looper + 1);
+ }
if (curr == '\\')
{
@@ -418,7 +428,9 @@
{
Node child = element.getFirstChild();
while (child != null && child.getNodeType() != Node.ELEMENT_NODE)
+ {
child = child.getNextSibling();
+ }
return (Element) child;
}
@@ -473,7 +485,7 @@
if (val != null &&
(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("false")))
{
- return Boolean.valueOf(val);
+ return Boolean.valueOf(val);
}
return defaultValue;
@@ -507,9 +519,7 @@
}
catch (NoSuchMethodException me)
{
- // this is ok, but certainly log this as a warning
- // this is hugely noisy!
- if (log.isTraceEnabled()) log.trace("Unrecognised attribute " + propName + ". Please check your configuration. Ignoring!!");
+ // try other setters that may fit later on. Don't throw this exception though.
}
catch (Exception e)
{
@@ -526,7 +536,9 @@
if (paramTypes.length != 1)
{
if (log.isTraceEnabled())
+ {
log.trace("Rejecting setter " + m + " on class " + objectClass + " due to incorrect number of parameters");
+ }
continue; // try another param with the same name.
}
@@ -555,7 +567,9 @@
}
}
if (!setterFound && failOnMissingSetter)
+ {
throw new ConfigurationException("Couldn't find a setter named [" + setter + "] which takes a single parameter, for parameter " + propName + " on class [" + objectClass + "]");
+ }
}
}
16 years