Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3963948
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:16:32+00:00 2026-05-20T03:16:32+00:00

I am sure this is a fairly simple question but I can’t seem to

  • 0

I am sure this is a fairly simple question but I can’t seem to phrase it in a way google can help.

In the hibernate-search docs there is a programmatic API (http://docs.jboss.org/hibernate/search/3.2/reference/en-US/html/search-mapping.html#hsearch-mapping-programmaticapi),

I am trying to create a search mapping as per :
Code:
SearchMapping mapping = new SearchMapping();
[…]
configuration.setProperty( Environment.MODEL_MAPPING, mapping );

But I dont really understand what the configuration object is and how i would obtain it. I am using spring and the org.springframework.orm.hibernate3.support.HibernateDaoSupport package for my DAO so is it something I need to inject somehow in the form of a bean? I will pop this on a spring forum as well as it might be more spring related.

Any help and suggestions would be much appreciated.

Spring setup is here is it is useful, if other code would help just let me know
Code:

     <property name="annotatedClasses">
        <list>

          <value>com.ActivityGB.client.domain.Provider</value>
          <value>com.ActivityGB.client.domain.Activity</value>
          <value>com.ActivityGB.client.domain.Location</value>
          <value>com.ActivityGB.client.domain.Address</value>
          <value>com.ActivityGB.client.domain.Category</value>
        </list>

   </property>

  <property name="mappingResources">

     <list>

        <value>com/ActivityGB/client/domain/Provider.hbm.xml</value>
        ....
        <value>com/ActivityGB/client/domain/UserWall.hbm.xml</value>



     </list>
  </property>
  <property name="hibernateProperties">
     <props>
        <prop key="hibernate.bytecode.provider">cglib</prop>
        <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
        <prop key="hibernate.show_sql">true</prop>
        <prop key="hibernate.format_sql">true</prop>
        <!-- <prop key="hibernate.use_sql_comments">true</prop> -->
        <prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
        <prop key="hibernate.jdbc.batch_size">20</prop>

        <prop key="hibernate.c3p0.min_size">10</prop>
        <prop key="hibernate.c3p0.max_size">100</prop>
        <prop key="hibernate.c3p0.timeout">10</prop>
        <prop key="hibernate.c3p0.acquireRetryAttempts">30</prop>

        <prop key="hibernate.c3p0.acquireIncrement">5</prop>

        <prop key="hibernate.c3p0.idleConnectionTestPeriod">100</prop>

        <prop key="hibernate.c3p0.initialPoolSize">20</prop>
        <prop key="hibernate.c3p0.maxPoolSize">100</prop>
        <prop key="hibernate.c3p0.maxIdleTime">300</prop>
        <prop key="hibernate.c3p0.maxStatements">50</prop>
        <prop key="hibernate.c3p0.minPoolSize">10</prop>

        <prop key="hibernate.c3p0.preferredTestQuery">SELECT 1</prop>


        <prop key="hibernate.c3p0.testConnectionOnCheckout">true</prop>
        <prop key="show_sql">true</prop>

        <prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</prop>

        <prop key="hibernate.search.default.indexBase">d:\luceneFinal\</prop>
     </props>
  </property>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:16:33+00:00Added an answer on May 20, 2026 at 3:16 am

    If you want to customize Configuration when using Spring’s AnnotationSessionFactoryBean, you can subclass it and override postProcessConfiguration().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a fairly simple question, but I can't seem to figure it
I'm sure this question is fairly simple to answer... is there any way to
This seems to me like a very simple question, but I can't seem to
I'm fairly sure this is a template question, since I can't seem to solve
I am sure this is a fairly simple question to answer, but I am
I'm not sure if this possible but probably is fairly simple. I've made a
I think this is fairly simple, but I'm new to Django and I can't
I'm sure this is fairly simple, however I have a major mental block on
I'm sure this is a fairly trivial problem, but I'm not sure what to
I'm still fairly new to Java, but I'm fairly sure this shouldn't happen. There's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.