Tapestry 5
  1. Tapestry 5
  2. TAP5-1178

Tapestry should include a module that automatically configures for Hibernate Search

    Details

      Description

      It's common to use Hibernate Search (based on Lucene) on top of Hibernate itself. To make this work in Tapestry requires some careful overrides in order to create and manage a FullTextSession instance, rather than a standard Session instance. However, its not much code.

      This could be in the form of a code donation from work I'm performing for a client.

        Activity

        Hide
        Jochen Kemnade added a comment -

        We assume this is no longer relevant and therefore close it.
        If you still have this issue in a recent Tapestry version (such as 5.3.8 or the latest 5.4 preview release), feel free to provide the necessary information and reopen.

        Show
        Jochen Kemnade added a comment - We assume this is no longer relevant and therefore close it. If you still have this issue in a recent Tapestry version (such as 5.3.8 or the latest 5.4 preview release), feel free to provide the necessary information and reopen.
        Hide
        Jochen Kemnade added a comment -

        This issue has been last updated about 1.5 years ago, has no assignee, affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future.

        If the issue still persists with the most recent development preview of Tapestry (5.4-beta-6, which is available from Maven Central), please update it as soon as possible. In the case of a feature request, please discuss it with the Tapestry developer community on the dev@tapestry.apache.org mailing list first.

        Show
        Jochen Kemnade added a comment - This issue has been last updated about 1.5 years ago, has no assignee, affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future. If the issue still persists with the most recent development preview of Tapestry (5.4-beta-6, which is available from Maven Central), please update it as soon as possible. In the case of a feature request, please discuss it with the Tapestry developer community on the dev@tapestry.apache.org mailing list first.
        Hide
        Lance added a comment -

        Adding this to your AppModule should allow you to @Inject FullTextSession

        public static FullTextSession buildFullTextSession(final HibernateSessionManager sessionManager, PropertyShadowBuilder propertyShadowBuilder) {
        Object lazyLoader = new Object() {
        public FullTextSession getFullTextSession()

        { /// sessionManager is per thread return Search.getFullTextSession(sessionManager.getSession()); }

        };
        return propertyShadowBuilder.build(lazyLoader, "fullTextSession", FullTextSession.class);
        }

        Show
        Lance added a comment - Adding this to your AppModule should allow you to @Inject FullTextSession public static FullTextSession buildFullTextSession(final HibernateSessionManager sessionManager, PropertyShadowBuilder propertyShadowBuilder) { Object lazyLoader = new Object() { public FullTextSession getFullTextSession() { /// sessionManager is per thread return Search.getFullTextSession(sessionManager.getSession()); } }; return propertyShadowBuilder.build(lazyLoader, "fullTextSession", FullTextSession.class); }
        Hide
        Uday Kari added a comment -

        Perhaps, disambiguate hibernate session generated by services as a tapestry creation..?

        This also would allow co-existence with hibernate core and also avoid users to think they have a hibernate session when in fact they have a tapestry hibernate session.

        Specifically,

        import org.apache.tapestry5.hibernate.Session;

        and, instead, make

        import org.hibernate.Session;

        look for hibernate-core.

        This would relieve Tapestry of the burden to play catch-up with hibernate.

        Show
        Uday Kari added a comment - Perhaps, disambiguate hibernate session generated by services as a tapestry creation..? This also would allow co-existence with hibernate core and also avoid users to think they have a hibernate session when in fact they have a tapestry hibernate session. Specifically, import org.apache.tapestry5.hibernate.Session; and, instead, make import org.hibernate.Session; look for hibernate-core. This would relieve Tapestry of the burden to play catch-up with hibernate.

          People

          • Assignee:
            Unassigned
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development