Removed EclipseLink 2.3.1 SharedLib (not needed given WLS server integration)
- relying on shared library ear
Switched to using NON_JTA_DATASOURCE with BaseTestCase.java overrides for direct access
diff --git a/EclipseLink 2.3.1 SharedLib/.project b/EclipseLink 2.3.1 SharedLib/.project
deleted file mode 100644
index ea2b6cd..0000000
--- a/EclipseLink 2.3.1 SharedLib/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EclipseLink 2.3.1 SharedLib</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>oracle.eclipse.tools.weblogic.sharedLibraryFrameworkValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- </natures>
-</projectDescription>
diff --git a/EclipseLink 2.3.1 SharedLib/.settings/org.eclipse.wst.common.component b/EclipseLink 2.3.1 SharedLib/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index db68f59..0000000
--- a/EclipseLink 2.3.1 SharedLib/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-modules id="moduleCoreId" project-version="1.5.0">
- <wb-module deploy-name="EclipseLink 2.3.1 SharedLib">
- <wb-resource deploy-path="/" source-path="/EarContent" tag="defaultRootSource"/>
- </wb-module>
-</project-modules>
diff --git a/EclipseLink 2.3.1 SharedLib/.settings/org.eclipse.wst.common.project.facet.core.xml b/EclipseLink 2.3.1 SharedLib/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 0096e72..0000000
--- a/EclipseLink 2.3.1 SharedLib/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
- <runtime name="Oracle WebLogic Server 11gR1 (10.3.4)"/>
- <fixed facet="jst.ear"/>
- <installed facet="jst.ear" version="5.0"/>
- <installed facet="wls.ear" version="10.3.4"/>
-</faceted-project>
diff --git a/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/MANIFEST.MF b/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/MANIFEST.MF
deleted file mode 100644
index 9803c3d..0000000
--- a/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Ant-Version: Apache Ant 1.7.1
-Created-By: 20.1-b02 (Sun Microsystems Inc.)
-Extension-Name: org.eclipse.persistence
-Specification-Version: 2.3
-Implementation-Version: 2.3.1.v20111018-r10243
-
diff --git a/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/application.xml b/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/application.xml
deleted file mode 100644
index fc73005..0000000
--- a/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/application.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<application>
- <display-name>org.eclipse.persistence2_3_1_v20111018-r10243-shared-lib</display-name>
- <module>
- <java></java>
- </module>
-</application>
diff --git a/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/weblogic-application.xml b/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/weblogic-application.xml
deleted file mode 100644
index dc8b468..0000000
--- a/EclipseLink 2.3.1 SharedLib/EarContent/META-INF/weblogic-application.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<weblogic-application>
- <prefer-application-packages>
- <package-name>org.eclipse.persistence.*</package-name>
- <package-name>commonj.sdo.*</package-name>
- </prefer-application-packages>
-</weblogic-application>
diff --git a/EclipseLink 2.3.1 SharedLib/EarContent/lib/eclipselink.jar b/EclipseLink 2.3.1 SharedLib/EarContent/lib/eclipselink.jar
deleted file mode 100644
index 233ebc6..0000000
--- a/EclipseLink 2.3.1 SharedLib/EarContent/lib/eclipselink.jar
+++ /dev/null
Binary files differ
diff --git a/Temporal Entity Example/src/META-INF/persistence.xml b/Temporal Entity Example/src/META-INF/persistence.xml
index edcd25c..f636c6e 100644
--- a/Temporal Entity Example/src/META-INF/persistence.xml
+++ b/Temporal Entity Example/src/META-INF/persistence.xml
@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="example" transaction-type="RESOURCE_LOCAL">
+ <non-jta-data-source>jdbc/temporal</non-jta-data-source>
<mapping-file>META-INF/orm.xml</mapping-file>
<class>temporal.EditionSetEntry</class>
<class>temporal.EditionSet</class>
<class>model.PersonHobby</class>
<class>model.Hobby</class>
<properties>
- <!-- Database Connection config -->
+ <!-- Database Connection config
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/test"/>
<property name="javax.persistence.jdbc.user" value="root"/>
<property name="javax.persistence.jdbc.password" value="password"/>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="eclipselink.jdbc.read-connections.min" value="1"/>
<property name="eclipselink.jdbc.write-connections.min" value="1"/>
+ -->
<!-- Logging Config -->
<property name="eclipselink.logging.level" value="FINE"/>
diff --git a/Temporal Tests/src/tests/BaseTestCase.java b/Temporal Tests/src/tests/BaseTestCase.java
index 0b79af1..6fccb5c 100644
--- a/Temporal Tests/src/tests/BaseTestCase.java
+++ b/Temporal Tests/src/tests/BaseTestCase.java
@@ -10,10 +10,14 @@
******************************************************************************/
package tests;
+import java.util.HashMap;
+import java.util.Map;
+
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
+import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.eclipse.persistence.jpa.JpaHelper;
import org.eclipse.persistence.sessions.server.Server;
import org.eclipse.persistence.tools.schemaframework.SchemaManager;
@@ -42,7 +46,16 @@
public EntityManagerFactory getEMF() {
if (emf == null) {
- emf = Persistence.createEntityManagerFactory("example");
+
+ Map<String, Object> properties = new HashMap<String, Object>();
+ properties.put(PersistenceUnitProperties.TRANSACTION_TYPE, "RESOURCE_LOCAL");
+ properties.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, "");
+ properties.put(PersistenceUnitProperties.JDBC_DRIVER, "com.mysql.jdbc.Driver");
+ properties.put(PersistenceUnitProperties.JDBC_URL, "jdbc:mysql://localhost:3306/test");
+ properties.put(PersistenceUnitProperties.JDBC_USER, "root");
+ properties.put(PersistenceUnitProperties.JDBC_PASSWORD, "password");
+
+ emf = Persistence.createEntityManagerFactory("example", properties);
Server session = JpaHelper.getServerSession(emf);
diff --git a/Temporal WAR/.metadata/WebContent/WEB-INF/faces-config.pageflow b/Temporal WAR/.metadata/WebContent/WEB-INF/faces-config.pageflow
new file mode 100644
index 0000000..c3be97b
--- /dev/null
+++ b/Temporal WAR/.metadata/WebContent/WEB-INF/faces-config.pageflow
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pageflow:Pageflow xmlns:pageflow="http://www.sybase.com/suade/pageflow" id="pf13327765718510" configfile="/Temporal WAR/WebContent/WEB-INF/faces-config.xml"/>
diff --git a/Temporal WAR/WebContent/index.xhtml b/Temporal WAR/WebContent/index.xhtml
index 14aa8fe..f2ecc06 100644
--- a/Temporal WAR/WebContent/index.xhtml
+++ b/Temporal WAR/WebContent/index.xhtml
@@ -2,18 +2,22 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
-<f:loadBundle basename="resources.application" var="msg"/>
+<f:loadBundle basename="resources.application" var="msg" />
<head>
- <title>Temporal Example</title>
+<title>Temporal Example</title>
</head>
<body>
-<h1>Temporal Example</h1>
-<p></p>
+ <h1>Temporal Example</h1>
+ <p>
+ <h:form>
+ <h:outputText value="#{persistenceBean.name}" />
+ </h:form>
+ </p>
</body>
</html>
diff --git a/Temporal WAR/src/temporal/web/PersistenceBean.java b/Temporal WAR/src/temporal/web/PersistenceBean.java
new file mode 100644
index 0000000..ad9f506
--- /dev/null
+++ b/Temporal WAR/src/temporal/web/PersistenceBean.java
@@ -0,0 +1,20 @@
+package temporal.web;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+@ManagedBean
+@SessionScoped
+public class PersistenceBean {
+
+ private String name = "Test@" + System.currentTimeMillis();
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+}