From b72c28b8a61704db654cae5aada163645a78101f Mon Sep 17 00:00:00 2001 From: James Strachan Date: Wed, 14 Mar 2007 19:58:31 +0000 Subject: [PATCH] added JDBC driver for Sybase for AMQ-1204 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@518296 13f79535-47bb-0310-9956-ffa450edef68 --- .../store/jdbc/adapter/SybaseDBCAdapter.java | 34 +++++++++++++++++++ .../store/jdbc/jconnect__tm__for_jdbc__tm_ | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/SybaseDBCAdapter.java diff --git a/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/SybaseDBCAdapter.java b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/SybaseDBCAdapter.java new file mode 100644 index 0000000000..e22032776a --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/SybaseDBCAdapter.java @@ -0,0 +1,34 @@ +/** + * + * 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 Sybase databases + * + * @version $Revision$ + */ +public class SybaseDBCAdapter extends ImageBasedJDBCAdaptor { + public void setStatements(Statements statements) { + statements.setLockCreateStatement("LOCK TABLE " + statements.getFullLockTableName() + " IN EXCLUSIVE MODE"); + + statements.setLongDataType("DECIMAL"); + super.setStatements(statements); + } +} diff --git a/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_ b/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_ index fb484bfa15..d449ef7f02 100644 --- a/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_ +++ b/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/jconnect__tm__for_jdbc__tm_ @@ -1 +1 @@ -class=org.apache.activemq.store.jdbc.adapter.TransactJDBCAdapter \ No newline at end of file +class=org.apache.activemq.store.jdbc.adapter.SybaseJDBCAdapter \ No newline at end of file