Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIVO 3828: Remove SDB in preparation to moving to new Jena. #374

Open
wants to merge 4 commits into
base: jena4-upgrade
Choose a base branch
from

Commits on Mar 6, 2023

  1. VIVO 3828: Remove SDB in preparation to moving to new Jena.

    The Jena version being switched to (Jena 4) has removed support for SDB.
    
    The current forms of `DatasetWrapperFactory` and `StaticDatasetFactory` should no longer be needed.
    
    The SDB related code has been stripped out.
    Many of the classes with "SDB" in the name that actually provide more than just SDB have been re-created.
    These recreations are generally child classes of a similarly named Jena class.
    These recreates have "DB" in their name rather than "SDB".
    
    The `DatasetFactory.createMem()` is deprecated and may not be available in Jena 4.
    Attempts to replace this with `createTxnMem()` have revealed problems that are potentially transaction related.
    Replacing with `createGeneral()` might be possible but this is not done to avoid introducing more potential problems.
    
    Notable points in regards to replacing `DatasetFactory.createMem()`:
    1) The method is deprecated.
    2) The `DatasetFactory.createGeneral()` is the compatible equivalent.
    3) The `DatasetFactory.createGeneral()` better supports TDB (which is the main reason for including in this commit set).
    4) The `DatasetFactory.createTxnMem()` is the more recommended alternative and is transactional.
    5) This better prepares the code for the upcoming Jena upgrade changes.
    
    There are some serious existing problems with closing dataset connections (and related).
    The (now removed) `DatasetWrapperFactory` probably should be rewritten to provide a new dataset each time rather than copying an existing one.
    The `close()` functionality appears to not be being called for TDB due to the SDB conditions.
    With this SDB condition the connections are now being closed.
    This has exposed several problems that both tests and runtime expose.
    This problem is considered out of scope for the changes and the close code is commented out with a FIXME statement.
    
    The documentation for `example.runtime.properties` refers to `VitroConnection.DataSource.*` only being used by SDB but this is incorrect.
    The OpenSocial code appears to talk directly to an SQL database using these properties.
    Update the documentation in this regard and replace the references to SDB with OpenSocial.
    
    Remove no longer necessary SDB helper code that is added to TDB as well because it "shouldn't hurt".
    
    Remove much of the documentation and installation functionality using or referencing SDB.
    
    The `IndividualDaoSDB.java` file is implemting `getAllIndividualUris()` and `getUpdatedSinceIterator()` via the now removed `IndivdiualSDB` class.
    This functionality is used by `RebuildIndexTask` and `UpdateUrisTask` classes.
    
    The new *DB classes now have java docs.
    These java docs have a bare-bones level of detail.
    kaladay committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    d43a2fe View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2023

  1. Configuration menu
    Copy the full SHA
    416aadd View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. Update api/src/main/java/edu/cornell/mannlib/vitro/webapp/dao/ObjectP…

    …ropertyStatementDao.java
    
    Co-authored-by: Dragan Ivanovic <[email protected]>
    kaladay and chenejac authored Mar 9, 2023
    Configuration menu
    Copy the full SHA
    d954651 View commit details
    Browse the repository at this point in the history
  2. Update api/src/main/java/edu/cornell/mannlib/vitro/webapp/dao/jena/In…

    …dividualDaoJena.java
    
    Co-authored-by: Dragan Ivanovic <[email protected]>
    kaladay and chenejac authored Mar 9, 2023
    Configuration menu
    Copy the full SHA
    10a359c View commit details
    Browse the repository at this point in the history