Issue Details (XML | Word | Printable)

Key: OPENJPA-24
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Kevin Sutter
Reporter: Kevin Sutter
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenJPA

Allow OpenJPA to be extensible

Created: 21/Aug/06 01:27 PM   Updated: 01/Mar/07 02:20 AM
Return to search
Component/s: kernel
Affects Version/s: None
Fix Version/s: 0.9.7

Time Tracking:
Not Specified

Resolution Date: 01/Mar/07 02:20 AM


 Description  « Hide
The current OpenJPA architecture is not extendable to other implementations. For example, if somebody wanted to provide their own PersistenceProvider implementation, simply extending the org.apache.openjpa.PersistenceProviderImpl would not suffice due to the dependencies in the ConfigurationProviderImpl. The discussion for this improvement was started on the dev mailing list. Once it was determined that there was more to this request than a simple conditional or two, we decided to open a JIRA report.

The complete history of this request can be found in the OpenJPA dev mailing list. The first message was posted by me (Kevin Sutter) on August 14, titled "Extending the OpenJPA Implementation". I will attempt to paraphrase the current state of the problem...

We have three main players in this issue. The PersistenceProvider, the ConfigurationProvider, and the ProductDerivation (along with the various implementations of these interfaces). Currently, the ConfigurationProvider is in the lib and is unaware of any specific persistence requirements. The ProductDerivation is in the kernel and, unfortunately, is aware of persistence requirements, specifically the spec and store types. Abe's postings have indicated that we need to make these two interfaces more aware of each other and work with each other. We need to start with either making ConfigurationProvider more persistence-aware and move it into kernel, or make ProductDerivations less persistence-aware and move it into lib. The latter approach is preferred.

After we get this re-organization of the base framework complete, we still have a couple of other issues ot resolve:

    * Still need the ability to extend EMF's through a ProductDerivation. This should be doable by adding a new PluginValue to indicate what class of EMF to load.

    * There is still a question as to whether we will need to provide a custom PersistenceProviderImpl and ConfigurationProviderImpl pair. I still think this will be necessary. And, one of Abe's posts indicated that this might help with class loading issues when multiple versions of OpenJPA-based implementations are available in the same system.

I also posted these questions last Friday. (Abe has responded with some answers, but I wanted to get this JIRA report created before trying to paraphrase his answers.)

    * You mention in several places about separating away the notion of specs and stores. In a general sense, I understand what these are. But, can you elaborate on how these types are used in the ConfigurationProvider and ProductDerivation interfaces?

    * I've moved the ProductDerivation interface to the lib and added the "load" methods from the ConfigurationProvider (as described in your previous notes). And, I've started to clean up the implementations that depend on these interfaces. But, concerning the implementation of the load methods... Now that we need to return a ConfigurationProvider, would you expect that we just new up a ConfigurationProviderImpl and then just call across to the "load" methods on the implementation? Since we want to keep the ProductDerivations stateless, I'm not sure how else you were expecting to create a ConfigurationProvider to return on these "load" methods.

    * Now that ConfigurationProvider is bare, the ConfigurationTestConfigurationProvider doesn't have much function. I'll need to take a look to see if this is even required any longer.

    * Can you shed a bit more light on the Configurations class? It doesn't implement nor extend any interfaces or classes, but it seems to provide many of the same methods as ConfigurationProvider, but as statics. And, it's dependent on having a Provider. Can you explain the relationship of this class in the bigger picture and how you think it might be affected by thes changes?

That's enough for the initial JIRA report. We will now track this problem here instead of the dev mailing list. Thanks.

Kevin


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #433715 Tue Aug 22 18:28:29 UTC 2006 kwsutter Creating a branch for working on OPENJPA-24 (extending the OpenJPA implementation).
Files Changed
ADD /incubator/openjpa/OPENJPA-24 (from /incubator/openjpa/trunk)

Repository Revision Date User Message
ASF #438938 Thu Aug 31 14:26:11 UTC 2006 kwsutter Creating a branch for working on OPENJPA-24 (extending the OpenJPA implementation).
Files Changed
ADD /incubator/openjpa/sandboxes/OPENJPA-24 (from /incubator/openjpa/trunk)

Repository Revision Date User Message
ASF #440775 Wed Sep 06 16:35:03 UTC 2006 kwsutter Merge with changes from HEAD as of 09/06/2006 to get SVN sandbox OPENJPA-24 up-to-date.
Files Changed
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_caching.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InheritanceComparator.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_emfactory.xml
ADD /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InterfaceImplGenerator.java (from /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/InterfaceImplGenerator.java)
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_pc.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_pc.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java
ADD /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderExtension.java (from /incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderExtension.java)
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_trans.xml
ADD /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java (from /incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java)
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_sqlquery.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCPersistenceProductDerivation.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_mapping.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/util/StoreFacadeTypeRegistry.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_integration.xml
ADD /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java (from /incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java)
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_meta.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_meta.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_remote.xml
ADD /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/GeneratorImpl.java (from /incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/GeneratorImpl.java)
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_runtime.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_logging.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_tutorials.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java
ADD /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java (from /incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java)
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_arch.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_query.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_why.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
ADD /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ExtentImpl.java (from /incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ExtentImpl.java)
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/openjpa_intro.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_mapping.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataInheritanceComparator.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_conf.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/supported_databases.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_deploy.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
ADD /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java (from /incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java)
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_em.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractMetaDataDefaults.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataDefaults.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_optimization.xml
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-kernel/src/main/java/org/apache/openjpa/meta/NoneMetaDataFactory.java
MODIFY /incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_persistence.xml

Repository Revision Date User Message
ASF #454741 Tue Oct 10 13:56:00 UTC 2006 kwsutter No longer require this Sandbox for OPENJPA-24 development, so I am deleting it.
Files Changed
DEL /incubator/openjpa/sandboxes/OPENJPA-24

Repository Revision Date User Message
ASF #576582 Mon Sep 17 20:47:52 UTC 2007 ppoddar OPENJPA-24: Relaxing access to connect() for extensibility.
Files Changed
MODIFY /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/event/JMSRemoteCommitProvider.java