The DataProvider APIs would be more easily consumed by CCASH and other projects if it were a modular MVN project with the following modules:
With this setup a consumer would only need to depend on the client module and not all of the server implementation as well.
Mavenizing the DataProvider may also facilitate easier implementation of making DP GWT compatible [#11].
Diff:
Diff:
Diff:
DP [r351] [#18]: Updated project to a MVN web project w/ Eclipse support
This is a first step towards [#18].
Configured DataProvider as a MVN web project which caused various other
changes to occur in the Eclipse project settings, especially regarding
project preferences.
Updated web.xml from version 2.5 to version 3.0 to match the dynamic web
module project facet.
Corrected @Path parameter in DataProviderRS from "/" to "" so that the
container would be found by Jetty. I don't know why that worked or why
it was necessary but it worked as suggested at
http://stackoverflow.com/questions/18122336
Updated ResourceGroupType, ResourceType, and Resource JPA queries and
private no-arg constructors to pass JPA validation that was turned on as
part of the project reconfiguration.
Related
Commit: [r351]
Tickets: #18
Last edit: Kevin Black 2014-06-26
[r351] with the changes to pass JPA validation also seems to have made it so DataProviderClientTests all pass when run. Before, testGetRootResourcesWithGroupType failed.
Related
Commit: [r351]
DP [r352] [#18]: Replaced binary libraries with maven dependencies.
Why?: An advantage of using maven dependencies instead of binary
libraries is that binary libraries do not have to stored in the version
control management system taking up space and being hard to diff.
Another advantage is that maven dependencies document their related
dependencies such that they can be retrieved automatically which removes
the burden of manual dependency management from the developer.
Replaced the following binary libraries with appropriate maven
dependency directives:
--- Dependency of hibernate-core.
--- Dependency of cglib, a dependency of hibernate-entitymanager.
--- Dependency of hibernate-c3p0.
--- v1.6.1 dependency of hibernate-core.
--- Dependency of hibernate-core and other hibernate modules.
--- Replaced with hibernate-core, hibernate-entitymanager, and
hibernate-c3p0 all v3.6.4.Final
--- Now using v1.1.1 since maven's v1.1 didn't have the ApplicationPath
annotation.
Removed the following unused binary libraries:
Updated the eclipse .classpath file to not require the binary libraries.
Updated persistence.xml to specify the persistence provider as
org.hibernate.ejb.HibernatePersistence which was necessary after
switching to the maven hibernate dependencies (I don't know why it
was not required before).
Corrected the testGetRootResourcesWithGroupType test in DataProvider-
ClientTests to do a set comparison instead of an ordered list
comparison.
Added messages to testResourceLinks tests in DataProviderClientTests to
try to determine why and when errors occur with this test. However,
after adding the messages I cannot get the error to occur (see [#19]).
I did add the testResourceRelinking tests to verify that the error
doesn't seem to be with relinking.
Related
Commit: [r352]
Tickets: #18
Tickets: #19
DP [r353] [#18]: Initial split into modular maven project.
The modules are dataprovider-core, dataprovider-server, and
dataprovider-client.
The core project produces a jar artifact. For now it includes the java
packages: base, orm, orm.graphutils, util (all), and orm.testutils.
The server project produces a war artifact. It depends on the core
module. For now it includes just the rs package and c3p0.properties. It
includes the web.xml definition.
The client project produces a jar artifact. It depends on the core
module. For now it includes just the client package.
For now, the core module defines all of the external dependencies, both
common ones and web-specific ones.
Related
Commit: [r353]
Tickets: #18
DP [r354] [#18]: Added the files that were not committed in r353.
This includes the web.xml and DataProviderClient.java files.
Related
Commit: [r354]
Tickets: #18
DP [r355] [#18]: Moved Jackson dependency management to the core module.
Related
Commit: [r355]
Tickets: #18
DP [r356] [#18]: Made smaller set of tests to validate the restful
service is properly initialized.
Related
Commit: [r356]
Tickets: #18
DP [r357] [#18]: Moved dependencies from base project to core and
server modules.
Related
Commit: [r357]
Tickets: #18
A further step not specified in the original spec is that the Resource modeling classes (Resource, ResourceGroupType, ResourceType) should be made interfaces and then there should be server and client implementations of the interface. The interface is what will likely make GWT compatibility possible.
DP [r358] [#18]: Updated DataProvider version from 0.0.1 to 0.0.2.
Related
Commit: [r358]
Tickets: #18
DP [r359] [#18]: Restored java files that had been lost in factoring
the project into maven modules.
The dataprovider-core and dataprovider-server java classes had been lost
in the refactoring but fortunately I had a local working copy still so
that I can restore them now. In future, don't use Eclipse's drag and
drop to move svn-controlled files around.
Related
Commit: [r359]
Tickets: #18
DP [r360] [#18]: Breaking change. Working on subclassing Resource with
PersistetResource.
Updated ResourceTests to create PersistentResource where appropriate.
Changed the testLazyLoadSuperResources because PersistentResource now
annotated the getId property instead of the id field so the lazy loading
of super resources works differently now.
Related
Commit: [r360]
Tickets: #18
DP [r361] [#18]: Working again. Updated necessary files to use
Persisten[t]Resource instead of Resource; now all tests pass.
Updated resource utilities and tests to do the following where necessary
to get the tests to run:
Updated the persistent.xml file in dataprovider-server to reference
PersistentResource instead of Resource.
Related
Commit: [r361]
Tickets: #18
Last edit: Kevin Black 2014-09-04