You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by sa...@apache.org on 2015/08/06 11:55:56 UTC

ode git commit: ODE-1036: Auto generated SQLServer database script during the build

Repository: ode
Updated Branches:
  refs/heads/ode-1.3.x 37e7297da -> d156f9689


ODE-1036: Auto generated SQLServer database script during the build


Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/d156f968
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/d156f968
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/d156f968

Branch: refs/heads/ode-1.3.x
Commit: d156f9689f1d27a47057cb34f5e7b72778d0beac
Parents: 37e7297
Author: sathwik <sa...@apache.org>
Authored: Thu Aug 6 15:25:25 2015 +0530
Committer: sathwik <sa...@apache.org>
Committed: Thu Aug 6 15:25:25 2015 +0530

----------------------------------------------------------------------
 Rakefile                                        |  2 +-
 .../main/descriptors/persistence.sqlserver.xml  | 55 ++++++++++++++++++++
 .../src/main/scripts/simplesched-sqlserver.sql  | 30 +++++++++++
 3 files changed, 86 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/d156f968/Rakefile
----------------------------------------------------------------------
diff --git a/Rakefile b/Rakefile
index d28c18f..df97c13 100644
--- a/Rakefile
+++ b/Rakefile
@@ -372,7 +372,7 @@ define "ode" do
 
   desc "ODE OpenJPA Derby Database"
   define "dao-jpa-ojpa-derby" do
-    %w{ derby mysql oracle postgres h2 }.each do |db|
+    %w{ derby mysql oracle postgres h2 sqlserver}.each do |db|
       db_xml = _("src/main/descriptors/persistence.#{db}.xml")
       scheduler_sql = _("src/main/scripts/simplesched-#{db}.sql")
       common_sql = _("src/main/scripts/common.sql")

http://git-wip-us.apache.org/repos/asf/ode/blob/d156f968/dao-jpa-ojpa-derby/src/main/descriptors/persistence.sqlserver.xml
----------------------------------------------------------------------
diff --git a/dao-jpa-ojpa-derby/src/main/descriptors/persistence.sqlserver.xml b/dao-jpa-ojpa-derby/src/main/descriptors/persistence.sqlserver.xml
new file mode 100644
index 0000000..e96094f
--- /dev/null
+++ b/dao-jpa-ojpa-derby/src/main/descriptors/persistence.sqlserver.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ 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.
+  -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
+    <persistence-unit name="ode-unit-test-embedded">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+        <class>org.apache.ode.dao.jpa.ActivityRecoveryDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.CorrelationSetDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.CorrelatorDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.EventDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.FaultDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.MessageDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.MessageExchangeDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.MessageRouteDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.PartnerLinkDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.ProcessDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.ProcessInstanceDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.ScopeDAOImpl</class>
+        <class>org.apache.ode.dao.jpa.XmlDataDAOImpl</class>
+
+        <class>org.apache.ode.store.jpa.ProcessConfDaoImpl</class>
+        <class>org.apache.ode.store.jpa.ProcessConfPropertyDaoImpl</class>
+        <class>org.apache.ode.store.jpa.DeploymentUnitDaoImpl</class>
+        <class>org.apache.ode.store.jpa.VersionTrackerDAOImpl</class>
+
+        <properties>
+            <!-- Properties for an embedded Derby connection -->
+            <property name="openjpa.ConnectionDriverName" value="org.apache.commons.dbcp.BasicDataSource"/>
+            <property name="openjpa.jdbc.DBDictionary" value="org.apache.openjpa.jdbc.sql.SQLServerDictionary"/>
+            <!-- To validate DBSchema and create DDL at runtime - use this property. Currently the DDL is created at build time -->
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+
+            <property name="openjpa.ConnectionProperties"
+                      value="DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:target/database/openjpa-test-database;create=true,MaxActive=100,MaxWait=10000,TestOnBorrow=true"/>
+
+        </properties>
+    </persistence-unit>
+</persistence>
+

http://git-wip-us.apache.org/repos/asf/ode/blob/d156f968/dao-jpa-ojpa-derby/src/main/scripts/simplesched-sqlserver.sql
----------------------------------------------------------------------
diff --git a/dao-jpa-ojpa-derby/src/main/scripts/simplesched-sqlserver.sql b/dao-jpa-ojpa-derby/src/main/scripts/simplesched-sqlserver.sql
new file mode 100644
index 0000000..abe97f9
--- /dev/null
+++ b/dao-jpa-ojpa-derby/src/main/scripts/simplesched-sqlserver.sql
@@ -0,0 +1,30 @@
+-- Apache ODE - SimpleScheduler Database Schema
+-- 
+-- Apache Derby scripts by Maciej Szefler.
+-- 
+-- 
+
+CREATE TABLE ode_job (
+  jobid CHAR(64)  NOT NULL DEFAULT '',
+  ts BIGINT  NOT NULL DEFAULT 0,
+  nodeid char(64),
+  scheduled int  NOT NULL DEFAULT 0,
+  transacted int  NOT NULL DEFAULT 0,
+
+  instanceId BIGINT,
+  mexId varchar(255),
+  processId varchar(255),
+  type varchar(255),
+  channel varchar(255),
+  correlatorId varchar(255),
+  correlationKeySet varchar(255),
+  retryCount int,
+  inMem int,
+  detailsExt blob(4096),
+
+  PRIMARY KEY(jobid));
+
+CREATE INDEX IDX_ODE_JOB_TS ON ode_job(ts);
+CREATE INDEX IDX_ODE_JOB_NODEID ON ode_job(nodeid);
+
+