db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r577824 - in /db/jdo/trunk/api2: API2.MF project.xml src/java/javax/jdo/JDOEntityManager.java src/java/javax/jdo/JDOEntityManagerFactory.java
Date Thu, 20 Sep 2007 17:26:11 GMT
Author: clr
Date: Thu Sep 20 10:26:11 2007
New Revision: 577824

URL: http://svn.apache.org/viewvc?rev=577824&view=rev
Log:
JDO-452 Add JDOEntityManager and JDOEntityManagerFactory

Added:
    db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManager.java   (with props)
    db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManagerFactory.java   (with props)
Modified:
    db/jdo/trunk/api2/API2.MF   (contents, props changed)
    db/jdo/trunk/api2/project.xml

Modified: db/jdo/trunk/api2/API2.MF
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/API2.MF?rev=577824&r1=577823&r2=577824&view=diff
==============================================================================
--- db/jdo/trunk/api2/API2.MF (original)
+++ db/jdo/trunk/api2/API2.MF Thu Sep 20 10:26:11 2007
@@ -1,15 +1,16 @@
-Manifest-Version: 1.0 
-Specification-Version: JDO 2.1
-Bundle-ManifestVersion: 2 
-Bundle-Name: Java Data Objects 
-Bundle-SymbolicName: javax.jdo 
-Bundle-Version: 2.1
-Bundle-Localization: plugin 
-Export-Package: javax.jdo, 
- javax.jdo.annotations, 
- javax.jdo.datastore, 
- javax.jdo.identity, 
- javax.jdo.listener, 
- javax.jdo.spi 
-Bundle-Vendor: Apache 
-Import-Package: javax.transaction;resolution:=optional
+Manifest-Version: 1.0 
+Specification-Version: JDO 2.1
+Bundle-ManifestVersion: 2 
+Bundle-Name: Java Data Objects 
+Bundle-SymbolicName: javax.jdo 
+Bundle-Version: 2.1
+Bundle-Localization: plugin 
+Export-Package: javax.jdo, 
+ javax.jdo.annotations, 
+ javax.jdo.datastore, 
+ javax.jdo.identity, 
+ javax.jdo.listener, 
+ javax.jdo.spi 
+Bundle-Vendor: Apache 
+Import-Package: javax.transaction;resolution:=optional,
+ javax.persistence;resolution:=optional

Propchange: db/jdo/trunk/api2/API2.MF
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: db/jdo/trunk/api2/project.xml
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/project.xml?rev=577824&r1=577823&r2=577824&view=diff
==============================================================================
--- db/jdo/trunk/api2/project.xml (original)
+++ db/jdo/trunk/api2/project.xml Thu Sep 20 10:26:11 2007
@@ -50,6 +50,12 @@
             <artifactId>junit</artifactId>
             <version>3.8.1</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jpa_3.0_spec</artifactId>
+            <version>1.0</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
     <!-- =================== -->
     <!-- Build Specification -->

Added: db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManager.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManager.java?rev=577824&view=auto
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManager.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManager.java Thu Sep 20 10:26:11 2007
@@ -0,0 +1,37 @@
+/*
+ * 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 javax.jdo;
+
+import javax.persistence.EntityManager;
+
+/*
+ * JDOEntityManager.java
+ *
+ * @since 2.1
+ */
+public interface JDOEntityManager extends EntityManager, PersistenceManager {
+
+    /** This method returns the <code>JDOEntityManagerFactory</code> used to

+     * create this <code>JDOEntityManager</code>. It overrides the
+     * getPersistenceManagerFactory method in PersistenceManager.
+     * @return the <code>JDOEntityManagerFactory</code> that created
+     * this <code>JDOEntityManager</code>
+     */
+    JDOEntityManagerFactory getPersistenceManagerFactory();
+
+}

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManager.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManagerFactory.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManagerFactory.java?rev=577824&view=auto
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManagerFactory.java (added)
+++ db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManagerFactory.java Thu Sep 20 10:26:11
2007
@@ -0,0 +1,79 @@
+/*
+ * 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 javax.jdo;
+
+import javax.persistence.EntityManagerFactory;
+
+/*
+ * JDOEntityManagerFactory.java
+ *
+ * @since 2.1
+ *
+ */
+public interface JDOEntityManagerFactory 
+    extends EntityManagerFactory, PersistenceManagerFactory {
+
+    /** Get an instance of <code>JDOEntityManager</code> from this factory. 

+     * The instance has default values for options. This method overrides
+     * the getPersistenceManager method from PersistenceManagerFactory.
+     *
+     * <P>After the first use of <code>getPersistenceManager</code>, no
"set" 
+     * methods will succeed.
+     *
+     * @return a <code>JDOEntityManager</code> instance with default options.
+     */
+    JDOEntityManager getPersistenceManager();
+
+    /** Get a thread-safe instance of a proxy that dynamically binds 
+     * on each method call to an instance of <code>JDOEntityManager</code>.
+     * <P>When used with a <code>JDOEntityManagerFactory</code>
+     * that uses TransactionType JTA,
+     * the proxy can be used in a server to dynamically bind to an instance 
+     * from this factory associated with the thread's current transaction.
+     * In this case, the close method is ignored, as the 
+     * <code>PersistenceManager</code> is automatically closed when the
+     * transaction completes.
+     * <P>When used with a <code>JDOEntityManagerFactory</code>
+     * that uses TransactionType RESOURCE_LOCAL, the proxy uses an inheritable
+     * ThreadLocal to bind to an instance of <code>JDOEntityManager</code>
+     * associated with the thread. In this case, the close method executed
+     * on the proxy closes the <code>JDOEntityManager</code> and then
+     * clears the ThreadLocal.
+     * Use of this method does not affect the configurability of the
+     * <code>JDOEntityManagerFactory</code>.
+     *
+     * @since 2.1
+     * @return a <code>PersistenceManager</code> proxy.
+     */
+    JDOEntityManager getPersistenceManagerProxy();
+
+    /** Get an instance of <code>JDOEntityManager</code> from this factory. 

+     * The instance has default values for options.  
+     * The parameters <code>userid</code> and <code>password</code>
are used 
+     * when obtaining datastore connections from the connection pool.
+     *
+     * <P>After the first use of <code>getPersistenceManager</code>, no
"set" 
+     * methods will succeed.
+     *
+     * @return a <code>JDOEntityManager</code> instance with default options.
+     * @param userid the userid for the connection
+     * @param password the password for the connection
+     */
+    JDOEntityManager getPersistenceManager(String userid, String password);
+
+}

Propchange: db/jdo/trunk/api2/src/java/javax/jdo/JDOEntityManagerFactory.java
------------------------------------------------------------------------------
    svn:eol-style = LF



Mime
View raw message