Index: project.xml =================================================================== --- project.xml (revision 566777) +++ project.xml (working copy) @@ -50,6 +50,12 @@ junit 3.8.1 + + org.apache.geronimo.specs + geronimo-jpa_3.0_spec + 1.0 + compile + Index: src/java/javax/jdo/JDOEntityManager.java =================================================================== --- src/java/javax/jdo/JDOEntityManager.java (revision 0) +++ src/java/javax/jdo/JDOEntityManager.java (revision 0) @@ -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 JDOEntityManagerFactory used to + * create this JDOEntityManager. It overrides the + * getPersistenceManagerFactory method in PersistenceManager. + * @return the JDOEntityManagerFactory that created + * this JDOEntityManager + */ + JDOEntityManagerFactory getPersistenceManagerFactory(); + +} Property changes on: src/java/javax/jdo/JDOEntityManager.java ___________________________________________________________________ Name: svn:eol-style + LF Index: src/java/javax/jdo/JDOEntityManagerFactory.java =================================================================== --- src/java/javax/jdo/JDOEntityManagerFactory.java (revision 0) +++ src/java/javax/jdo/JDOEntityManagerFactory.java (revision 0) @@ -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 JDOEntityManager from this factory. + * The instance has default values for options. This method overrides + * the getPersistenceManager method from PersistenceManagerFactory. + * + *

After the first use of getPersistenceManager, no "set" + * methods will succeed. + * + * @return a JDOEntityManager 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 JDOEntityManager. + *

When used with a JDOEntityManagerFactory + * 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 + * PersistenceManager is automatically closed when the + * transaction completes. + *

When used with a JDOEntityManagerFactory + * that uses TransactionType RESOURCE_LOCAL, the proxy uses an inheritable + * ThreadLocal to bind to an instance of JDOEntityManager + * associated with the thread. In this case, the close method executed + * on the proxy closes the JDOEntityManager and then + * clears the ThreadLocal. + * Use of this method does not affect the configurability of the + * JDOEntityManagerFactory. + * + * @since 2.1 + * @return a PersistenceManager proxy. + */ + JDOEntityManager getPersistenceManagerProxy(); + + /** Get an instance of JDOEntityManager from this factory. + * The instance has default values for options. + * The parameters userid and password are used + * when obtaining datastore connections from the connection pool. + * + *

After the first use of getPersistenceManager, no "set" + * methods will succeed. + * + * @return a JDOEntityManager instance with default options. + * @param userid the userid for the connection + * @param password the password for the connection + */ + JDOEntityManager getPersistenceManager(String userid, String password); + +} Property changes on: src/java/javax/jdo/JDOEntityManagerFactory.java ___________________________________________________________________ Name: svn:eol-style + LF Index: API2.MF =================================================================== --- API2.MF (revision 566777) +++ API2.MF (working copy) @@ -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 Property changes on: API2.MF ___________________________________________________________________ Name: svn:eol-style + LF