From commits-return-10195-apmail-openjpa-commits-archive=openjpa.apache.org@openjpa.apache.org Sun Dec 9 13:15:18 2012 Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C661FE0D7 for ; Sun, 9 Dec 2012 13:15:17 +0000 (UTC) Received: (qmail 85380 invoked by uid 500); 9 Dec 2012 13:15:17 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 85337 invoked by uid 500); 9 Dec 2012 13:15:16 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 85313 invoked by uid 99); 9 Dec 2012 13:15:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Dec 2012 13:15:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Dec 2012 13:15:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8F1742388C8A for ; Sun, 9 Dec 2012 13:13:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r841236 [16/35] - in /websites/staging/openjpa/trunk/content: ./ artifacts/ css/ images/ images/datacache-plugin/ Date: Sun, 09 Dec 2012 13:13:50 -0000 To: commits@openjpa.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121209131358.8F1742388C8A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: websites/staging/openjpa/trunk/content/jest-transaction.html ============================================================================== --- websites/staging/openjpa/trunk/content/jest-transaction.html (added) +++ websites/staging/openjpa/trunk/content/jest-transaction.html Sun Dec 9 13:13:35 2012 @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + Apache OpenJPA -- + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + +
+ OpenJPA Logo + +   + + ASF Logo +
+ + +
+ +
+ + + + + + + + + +
+ + +
+

+

We have not figured that out yet!

+
+
+
+
+
+
+
+
+ +
+
+
+ Copyright (C) 2006,2012 The Apache Software Foundation. Licensed under Apache License 2.0.
+ Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation.
+ Other names may be trademarks of their respective owners.
+
+ + + + + + Added: websites/staging/openjpa/trunk/content/jest-usage.html ============================================================================== --- websites/staging/openjpa/trunk/content/jest-usage.html (added) +++ websites/staging/openjpa/trunk/content/jest-usage.html Sun Dec 9 13:13:35 2012 @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + Apache OpenJPA -- + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + +
+ OpenJPA Logo + +   + + ASF Logo +
+ + +
+ +
+ + + + + + + + + +
+ + +
+

+

JEST facilities are available as a HTTP servlet, +org.apache.openjpa.persistence.jest.JESTServlet.

+

JESTServlet can be deployed in a servlet container e.g. Tomcat in two +possible modes: primary or auxiliary.

+

+

Deployment Modes

+

+

In primary mode, the JESTServlet itself instantiates a persistence +unit during initialization.

+

In auxiliary mode, the JESTServlet discovers a persistence unit used +by another component X. +The sibling component X must satisfy the following for JEST to discover +its persistent unit

+
    +
  • The component X and JESTServlet must belong to the same +deployment unit.
  • +
  • The component X must activate OpenJPA's native +EntityManagerFactory pool. The pool is activated by switching on +openjpa.EntityManagerFactoryPool configuration property to true. +This property is available only via runtime configuration. The following +code example ensures that OpenJPA's native EntityManagerFactory pool is +active.
  • +
+

Activation of OpenJPA's native EntityManagerFactory pool

+
Map<String,Object> props = new HashMap<String, Object>();
+props.put("openjpa.EntityManagerFactoryPool", "true");
+EntityManagerFactory emf = Persistence.createEntityManagerFactory("myPU",props);
+
+ + +

JESTServlet accepts following initial configuration parameters

+ + + + + +
PropertyDescription
persistence.unitName of the persistent unit. Must be specified.
standalonetrue implies primary mode. Defaults to false.
debugtrue implies verbose tracing of HTTP requests. Defaults to false.
+ +

The following deployment descriptor WEB-INF/web.xml deploys +JESTServlet in auxiliary mode

+

JEST Deployment Descriptor in Auxiliary Mode

+
<web-app version="2.4" 
+        xmlns="http://java.sun.com/xml/ns/j2ee" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+    <display-name>Demo Application with JEST Servlet</display-name>  
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+    <description>
+        An example of deploying a simple web application with JEST servlet.
+        This descriptor specifies the Demo Application servlet as well as JEST servlet.
+    </description>
+
+    <servlet>
+        <description> 
+            This is the Demo Application Servlet.
+            The servlet is mapped to URL pattern /app/* so this servlet can be accessed as
+                 http://host:port/demo/app/ 
+            where "demo" is the name of the deployed web application.
+
+            Assume that the Demo Application Servlet is using a persistence unit named 
+            'jestdemo'. The JEST Servlet will require the persistence unit name to
+            browse the Demo Application.              
+        </description>
+
+        <servlet-name>demo</servlet-name>
+        <servlet-class>demo.SimpleApp</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>demo</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+
+    <!-- Deployment descriptor for JESTServlet.     -->
+    <servlet>
+        <description>
+            This is the JEST servlet. 
+            JEST Servlet needs to know the name of the persistence unit used by the 
+            Demo Application. The unit name is specified by mandatory "persistence.unit" 
+            parameter during initialization.
+
+            The JEST servlet is mapped to URL pattern /jest/* in servlet mapping section. 
+            So to access JEST servlet, use the following URI
+                http://host:port/demo/jest/
+            Notice the trailing forward slash character is significant. 
+        </description>
+        <servlet-name>jest</servlet-name>
+
+        <servlet-class>org.apache.openjpa.persistence.jest.JESTServlet</servlet-class>
+        <init-param>
+            <param-name>persistence.unit</param-name>
+            <param-value>jestdemo</param-value>
+        </init-param>
+        <init-param>
+            <param-name>debug</param-name>
+            <param-value>true</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>jest</servlet-name>
+        <url-pattern>/jest/*</url-pattern>
+    </servlet-mapping>
+</web-app>
+
+
+
+
+
+
+
+
+
+ +
+
+
+ Copyright (C) 2006,2012 The Apache Software Foundation. Licensed under Apache License 2.0.
+ Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation.
+ Other names may be trademarks of their respective owners.
+
+ + + + + + Added: websites/staging/openjpa/trunk/content/jpa-2.0-development-process.html ============================================================================== --- websites/staging/openjpa/trunk/content/jpa-2.0-development-process.html (added) +++ websites/staging/openjpa/trunk/content/jpa-2.0-development-process.html Sun Dec 9 13:13:35 2012 @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + Apache OpenJPA -- + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + +
+ OpenJPA Logo + +   + + ASF Logo +
+ + +
+ +
+ + + + + + + + + +
+ + +
+

+

JPA 2.0 Development Process

+

+

JPA 2.0 Roadmap

+

The OpenJPA roadmap and iteration detail for developing JPA 2.0 +functionality is documented here +. The process to be used for this development effort will be documented on +this Development Process page.

+

+

Overview

+

JPA 2.0 is currently being defined by the Java Community Process under JSR-317 +. The most recent public draft is dated 03/13/2009. Members of the Apache +OpenJPA project continue to monitor and actively participate in JSR-317. +OpenJPA has recently branched off its 1.x efforts and is targeting its next +release, OpenJPA 2.0, to in addition to providing new features, be fully +spec compliant with JPA 2.0. While the JPA 2.0 spec is still in the review +process, the OpenJPA project will begin implementing JPA 2.0 capabilities +as defined by the draft specification. This will help to ensure a timely +delivery of JPA 2.0 functionality in addition to providing experience-based +feedback to the JPA committee.

+

+

JPA 2.0 Highlights

+

The latest draft of the JPA 2.0 specification includes many updates to JPA, +from minor updates to major functional enhancements. Some of these updates +and enhancements include:

+
    +
  • Collections of embeddables and basic types
  • +
  • Derived Identity support
  • +
  • Relationship support within embeddables
  • +
  • Enhancements to persistent map collection support
  • +
  • Standard properties for query timeout and persistence configuration
  • +
  • Lock mode configuration on entity manager and query
  • +
  • Cache interface to access L2 cache
  • +
  • Criteria API for programmatic query definition
  • +
  • Many JPQL enhancements
  • +
+

+

Contributions

+

The OpenJPA 2.0 release needs contributions in the areas of development, +testing, and documentation. If you are simply interested in trying out new +capabilities of JPA 2.0, contributing to the test suite is a great way to +do that; while making a significant contribution to the project.

+

+

Process

+
    +
  • All new features, spec related or other improvements must have an +corresponding JIRA. Large items should be broken down into manageable +sub-tasks. The JIRA should include design details, decision rationality, +and testing information.
  • +
  • Use test driven development + (write tests before code). Test driven development can be extremely +beneficial for gaining an initial understanding the requirements of the +feature and will help ensure that the feature is adequately tested. Too +often, tests are the last thing to be written so they can end up incomplete +or worse yet, forgotten. Test driven development in OpenJPA is now more +feasible with the recent enhancement in OPENJPA-766 +.
  • +
  • Documentation updates/additions, when necessary, must accompany new +function.
  • +
  • As of iteration 5, OpenJPA 2.0 development will be based on four week +iterations (or sprints). Each iteration will include a set of new features +and enhancements. Features must have accompanying tests and documentation +and go through a code review. A feature must fit within the iteration +period. Larger and/or complex tasks may need to be broken down such that +they can be contributed as individual, consumable features. For example, +JPA 2.0 defines relationship support within an embedded. If this task is +deemed complex due to the need to support multiple relationship types, +relationship type one-to-one could be made available in one iteration and +the many-to-one relationship type could be added in subsequent iteration.
  • +
  • A call for participation will be posted prior to the start of each +iteration. An iteration plan will be composed based on who can participate +and what they plan to contribute.
  • +
  • Code reviews will be conducted using the standard Commit-Then-Review +(CTR) process (for OpenJPA committers), unless a pre-commit code review is +specifically requested. Artifacts submitted by non-committers must be +reviewed before they are committed.
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ Copyright (C) 2006,2012 The Apache Software Foundation. Licensed under Apache License 2.0.
+ Apache, the Apache feather logo and OpenJPA are trademarks of The Apache Software Foundation.
+ Other names may be trademarks of their respective owners.
+
+ + + + + +