activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r515606 - in /activemq/trunk/activemq-core/src/main: java/org/apache/activemq/store/jdbc/adapter/ resources/META-INF/services/org/apache/activemq/store/jdbc/
Date Wed, 07 Mar 2007 15:29:01 GMT
Author: jstrachan
Date: Wed Mar  7 07:29:01 2007
New Revision: 515606

URL: http://svn.apache.org/viewvc?view=rev&rev=515606
Log:
fix for AMQ-1191 and AMQ-1109

Added:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
  (with props)
Modified:
    activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/i-net_sprinta_2000
    activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_
    activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jtds_type_4_jdbc_driver_for_ms_sql_server_and_sybase
    activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sqlserver

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java?view=auto&rev=515606
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
(added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
Wed Mar  7 07:29:01 2007
@@ -0,0 +1,39 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.activemq.store.jdbc.adapter;
+
+import org.apache.activemq.store.jdbc.Statements;
+
+/**
+ * A JDBC Adapter for Transact-SQL based databases such as SQL Server or Sybase
+ *
+ * @version $Revision$
+ */
+public class TransactJDBCAdapter extends ImageBasedJDBCAdaptor {
+    public void setStatements(Statements statements) {
+        String lockCreateStatement = "SELECT * FROM " + statements.getFullLockTableName();
+
+        if (statements.isUseLockCreateWhereClause()) {
+            lockCreateStatement += " WHERE ID = 1";
+        }
+        lockCreateStatement += " WITH XLOCK";
+        statements.setLockCreateStatement(lockCreateStatement);
+
+        super.setStatements(statements);
+    }
+}

Propchange: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/i-net_sprinta_2000
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/i-net_sprinta_2000?view=diff&rev=515606&r1=515605&r2=515606
==============================================================================
--- activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/i-net_sprinta_2000
(original)
+++ activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/i-net_sprinta_2000
Wed Mar  7 07:29:01 2007
@@ -1 +1 @@
-class=org.apache.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor
\ No newline at end of file
+class=org.apache.activemq.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file

Modified: activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_?view=diff&rev=515606&r1=515605&r2=515606
==============================================================================
--- activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_
(original)
+++ activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_
Wed Mar  7 07:29:01 2007
@@ -1 +1 @@
-class=org.apache.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor
\ No newline at end of file
+class=org.apache.activemq.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file

Modified: activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jtds_type_4_jdbc_driver_for_ms_sql_server_and_sybase
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jtds_type_4_jdbc_driver_for_ms_sql_server_and_sybase?view=diff&rev=515606&r1=515605&r2=515606
==============================================================================
--- activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jtds_type_4_jdbc_driver_for_ms_sql_server_and_sybase
(original)
+++ activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jtds_type_4_jdbc_driver_for_ms_sql_server_and_sybase
Wed Mar  7 07:29:01 2007
@@ -1 +1 @@
-class=org.apache.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor
\ No newline at end of file
+class=org.apache.activemq.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file

Modified: activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sqlserver
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sqlserver?view=diff&rev=515606&r1=515605&r2=515606
==============================================================================
--- activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sqlserver
(original)
+++ activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/sqlserver
Wed Mar  7 07:29:01 2007
@@ -1 +1 @@
-class=org.apache.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor
\ No newline at end of file
+class=org.apache.activemq.store.jdbc.adapter.TransactJDBCAdapter
\ No newline at end of file



Mime
View raw message