-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: RAMDirectoryProvider still creates index file/directory?
PostPosted: Wed Jun 09, 2010 9:28 am 
Newbie

Joined: Mon Aug 31, 2009 6:46 am
Posts: 11
Hi,

I'm using a RAMDirectoryProvider, however when I start my app I get the following log message:

DirectoryProviderHelper - Index directory not found, creating: (Path ommitted)'

However, I assumed that a physical file on disk would not be required?

Maybe I'm not understanding this correctly & that the index directory is still required regardless of the directory provider used.

Hope somebody can clarify this,

Thanks in advance,

Kevin.


Top
 Profile  
 
 Post subject: Re: RAMDirectoryProvider still creates index file/directory?
PostPosted: Thu Jun 10, 2010 6:53 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
RAMDirectoryProvider should not create any files on disk. Are you sure you have the right configuration and it is properly picked up?

--Hardy


Top
 Profile  
 
 Post subject: Re: RAMDirectoryProvider still creates index file/directory?
PostPosted: Thu Jun 10, 2010 7:41 am 
Newbie

Joined: Mon Aug 31, 2009 6:46 am
Posts: 11
Hi,

Thanks for your reply, here is the configuration I am using (it is Spring based):

Code:
<!-- Hibernate properties for building SessionFactory. -->
   <bean id="hibernateProperties"
      class="org.springframework.beans.factory.config.PropertiesFactoryBean">
      <property name="properties">
         <props>
             <!-- Enable Hibernate's automatic session context management -->
                <prop key="current_session_context_class">thread</prop>         
            <prop key="hibernate.jdbc.batch_size">${hibernate.jdbc.batch_size}</prop>
            <prop key="hibernate.connection.driver_class">${hibernate.connection.driver_class}</prop>
            <prop key="hibernate.dialect">${hibernate.dialect}</prop>
            <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
            <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
            <prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
            <prop key="hibernate.use_sql_comments">${hibernate.use_sql_comments}</prop>
            <prop key="hibernate.generate_statistics">${hibernate.generate_statistics}</prop>
            <prop key="hibernate.transaction.factory_class">${hibernate.transaction.factory_class}</prop>
            <prop key="hibernate.search.analyzer">${hibernate.search.analyzer}</prop>
            <prop key="hibernate.search.default.directory_provider">${hibernate.search.default.directory_provider}</prop>
            <!--  prop key="hibernate.search.default.indexBase">${hibernate.search.default.indexBase}</prop --> <!-- Un-comment this when using a FSDirectoryProvider (in jdbc.properties) -->
            <prop key="hibernate.search.default.optimizer.operation_limit.max">${hibernate.search.default.optimizer.operation_limit.max}</prop>
            <prop key="hibernate.search.default.optimizer.transaction_limit.max">${hibernate.search.default.optimizer.transaction_limit.max}
            </prop>
         </props>
      </property>
   </bean>


Then in my properties file:
Code:
hibernate.search.default.directory_provider=org.hibernate.search.store.RAMDirectoryProvider


Can you confirm this is ok?

Thanks in advance,

Kevin.


Top
 Profile  
 
 Post subject: Re: RAMDirectoryProvider still creates index file/directory?
PostPosted: Fri Jun 11, 2010 10:58 am 
Newbie

Joined: Mon Aug 31, 2009 6:46 am
Posts: 11
Hi,

Thanks for putting me on the right track, there was some programmatic changing of the hibernate properties which resulted in the provider being overridden so the default one is the FSDirectoryProvider which is why the files were appearing.

Thanks again,

Kevin.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.