diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java index 7e0ce58841..8f279d17bd 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/derby/DerbySQLProvider.java @@ -35,7 +35,7 @@ public class DerbySQLProvider extends GenericSQLProvider { } @Override - public int getMaxBlobSize() { + public long getMaxBlobSize() { return MAX_BLOB_SIZE; } diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java index a538ebd1b6..6e01c45938 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/mysql/MySQLSQLProvider.java @@ -21,7 +21,7 @@ import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider; public class MySQLSQLProvider extends GenericSQLProvider { - private static final int MAX_BLOB_SIZE = 4 * 1024 * 1024 * 1024; // 4GB + private static final long MAX_BLOB_SIZE = 4 * 1024 * 1024 * 1024; // 4GB private final String createFileTableSQL; @@ -46,7 +46,7 @@ public class MySQLSQLProvider extends GenericSQLProvider { } @Override - public int getMaxBlobSize() { + public long getMaxBlobSize() { return MAX_BLOB_SIZE; } diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java index 1baccaeaf0..6deaf6486c 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/postgres/PostgresSQLProvider.java @@ -22,7 +22,7 @@ import org.apache.activemq.artemis.jdbc.store.sql.SQLProvider; public class PostgresSQLProvider extends GenericSQLProvider { // BYTEA Size used in Journal - private static final int MAX_BLOB_SIZE = 1024 * 1024 * 1024; // 1GB + private static final long MAX_BLOB_SIZE = 1024 * 1024 * 1024; // 1GB private final String createFileTableSQL; @@ -50,7 +50,7 @@ public class PostgresSQLProvider extends GenericSQLProvider { } @Override - public int getMaxBlobSize() { + public long getMaxBlobSize() { return MAX_BLOB_SIZE; } diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java index b773cd9f7c..90be5ff25b 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactoryDriver.java @@ -342,7 +342,7 @@ public class JDBCSequentialFileFactoryDriver extends AbstractJDBCDriver { } } - public int getMaxSize() { + public long getMaxSize() { return sqlProvider.getMaxBlobSize(); } } diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java index 1d9b829352..3b452cdfdb 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/GenericSQLProvider.java @@ -19,7 +19,7 @@ package org.apache.activemq.artemis.jdbc.store.sql; public class GenericSQLProvider implements SQLProvider { // Default to lowest (MYSQL = 64k) - private static final int MAX_BLOB_SIZE = 64512; + private static final long MAX_BLOB_SIZE = 64512; protected final String tableName; @@ -101,7 +101,7 @@ public class GenericSQLProvider implements SQLProvider { } @Override - public int getMaxBlobSize() { + public long getMaxBlobSize() { return MAX_BLOB_SIZE; } diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java index 21561ffaa4..8d828832d4 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/sql/SQLProvider.java @@ -18,7 +18,7 @@ package org.apache.activemq.artemis.jdbc.store.sql; public interface SQLProvider { - int getMaxBlobSize(); + long getMaxBlobSize(); String[] getCreateJournalTableSQL();