Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7767

Platform code depends on the storage engine being Hibernate based.

    XMLWordPrintable

Details

    • Unknown
    • n/a
    • n/a

    Description

      Search command:

      user@debo8:~/wrk/xwiki.git/xwiki-trunks/xwiki-platform$ find ./ -name '*.java' -exec grep 'getHibernateStore()' {} \; -print
      

      DBListClass uses getHibernateStore() to populate the DBList.
      Effect of no XWikiHibernateStore: DBlists will not be populated, they will remain empty, no explicit error.

                  if (context.getWiki().getHibernateStore() != null) {
      ./xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/DBListClass.java
      

      Stats is more or less irreversably married to XWikiHibernateStore.
      Effect of no XWikiHibernateStore: Enabling stats would cause error? (untested)

              XWikiHibernateStore store = context.getWiki().getHibernateStore();
              XWikiHibernateStore store = context.getWiki().getHibernateStore();
              XWikiHibernateStore store = context.getWiki().getHibernateStore();
              XWikiHibernateStore store = context.getWiki().getHibernateStore();
              XWikiHibernateStore store = context.getWiki().getHibernateStore();
      ./xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/stats/impl/xwiki/XWikiStatsReader.java
              XWikiHibernateStore store = context.getWiki().getHibernateStore();
      ./xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/stats/impl/xwiki/DocumentStatsStoreItem.java
              XWikiHibernateStore store = this.context.getWiki().getHibernateStore();
      ./xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/stats/impl/xwiki/VisitStatsStoreItem.java
              XWikiHibernateStore store = context.getWiki().getHibernateStore();
      ./xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/stats/impl/xwiki/RefererStatsStoreItem.java
              return getContext().getWiki().getHibernateStore();
      ./xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/hibernate/query/HqlQueryExecutor.java
      

      getAllMatchedGroups() and getAllMatchedUsers() call HibernateStore.
      Effect of no Hibernate: Unknown/undocumented. Calls to getAllMatchedGroups() and getAllMatchedUsers() will return null.
      The only major user of these functions seems to be the "rightsmanager" plugin,
      no calls to the plugin seem to be using these functions.
      TODO: test this by making the functions return errors, see what happens.

              if (context.getWiki().getHibernateStore() != null) {
              if (context.getWiki().getHibernateStore() != null) {
      ./xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/XWikiGroupServiceImpl.java
      

      Without Hibernate, XWiki#isMySQL() will always return false.

          public XWikiHibernateStore getHibernateStore()
              if (getHibernateStore() == null) {
              Object dialect = getHibernateStore().getConfiguration().getProperties().get("dialect");
      ./xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
      

      ActivityStream shows a disturbing trend in the direction of stats.
      Since it makes use of search functions and has APIs which accept HQL, it probably cannot be saved without significant refactoring.

                  XWikiHibernateStore localHibernateStore = context.getWiki().getHibernateStore();
                  XWikiHibernateStore mainHibernateStore = context.getWiki().getHibernateStore();
                  XWikiHibernateStore hibstore = context.getWiki().getHibernateStore();
                  XWikiHibernateStore hibstore = context.getWiki().getHibernateStore();
                      hibstore = context.getWiki().getHibernateStore();
                      hibstore = context.getWiki().getHibernateStore();
                  XWikiHibernateStore hibstore = context.getWiki().getHibernateStore();
      ./xwiki-platform-core/xwiki-platform-activitystream/src/main/java/com/xpn/xwiki/plugin/activitystream/impl/ActivityStreamImpl.java
      

      Parts of Filesystem Attachments find to Hibernate in order to store attachment metadata.
      This branch contains refactoring to address the overtight connection between attachment content storage and metadata storage.
      https://github.com/xwiki/xwiki-platform/tree/feature-store-attachments-newstore
      Without hibernate, typical FS attachments do not work but the feature-newstore branch does.

              this.store = context.getWiki().getHibernateStore();
      ./xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-attachments/src/main/java/org/xwiki/store/legacy/store/internal/XWikiHibernateTransaction.java
                  final Session session = this.context.getWiki().getHibernateStore().getSession(this.context);
      ./xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-attachments/src/main/java/org/xwiki/store/legacy/store/internal/FilesystemAttachmentStore.java
                  allowing(mockXWiki).getHibernateStore(); will(returnValue(mockHibernate));
      ./xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-attachments/src/test/java/org/xwiki/store/legacy/store/internal/FilesystemAttachmentStoreTest.java
      

      Attachments

        Activity

          People

            calebjamesdelisle CalebJamesDeLisle
            calebjamesdelisle CalebJamesDeLisle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: