You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2007/07/31 20:23:20 UTC

svn commit: r561424 - in /ode/trunk: Rakefile dao-jpa-ojpa-derby/src/main/descriptors/persistence.oracle.xml dao-jpa-ojpa-derby/src/main/scripts/simplesched-oracle.sql

Author: mriou
Date: Tue Jul 31 11:23:19 2007
New Revision: 561424

URL: http://svn.apache.org/viewvc?view=rev&rev=561424
Log:
Adding schema generation for Oracle.

Added:
    ode/trunk/dao-jpa-ojpa-derby/src/main/descriptors/persistence.oracle.xml
    ode/trunk/dao-jpa-ojpa-derby/src/main/scripts/simplesched-oracle.sql
Modified:
    ode/trunk/Rakefile

Modified: ode/trunk/Rakefile
URL: http://svn.apache.org/viewvc/ode/trunk/Rakefile?view=diff&rev=561424&r1=561423&r2=561424
==============================================================================
--- ode/trunk/Rakefile (original)
+++ ode/trunk/Rakefile Tue Jul 31 11:23:19 2007
@@ -363,7 +363,7 @@
 
   desc "ODE OpenJPA Derby Database"
   define "dao-jpa-ojpa-derby" do
-    %w{ derby mysql }.each do |db|
+    %w{ derby mysql oracle }.each do |db|
       db_xml = _("src/main/descriptors/persistence.#{db}.xml")
       scheduler_sql = _("src/main/scripts/simplesched-#{db}.sql")
       partial_sql = file("target/partial.#{db}.sql"=>db_xml) do |task|

Added: ode/trunk/dao-jpa-ojpa-derby/src/main/descriptors/persistence.oracle.xml
URL: http://svn.apache.org/viewvc/ode/trunk/dao-jpa-ojpa-derby/src/main/descriptors/persistence.oracle.xml?view=auto&rev=561424
==============================================================================
--- ode/trunk/dao-jpa-ojpa-derby/src/main/descriptors/persistence.oracle.xml (added)
+++ ode/trunk/dao-jpa-ojpa-derby/src/main/descriptors/persistence.oracle.xml Tue Jul 31 11:23:19 2007
@@ -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.OracleDictionary"/>
+            <!-- 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>
+

Added: ode/trunk/dao-jpa-ojpa-derby/src/main/scripts/simplesched-oracle.sql
URL: http://svn.apache.org/viewvc/ode/trunk/dao-jpa-ojpa-derby/src/main/scripts/simplesched-oracle.sql?view=auto&rev=561424
==============================================================================
--- ode/trunk/dao-jpa-ojpa-derby/src/main/scripts/simplesched-oracle.sql (added)
+++ ode/trunk/dao-jpa-ojpa-derby/src/main/scripts/simplesched-oracle.sql Tue Jul 31 11:23:19 2007
@@ -0,0 +1,13 @@
+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,
+  details 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);
+
+