-->
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.  [ 3 posts ] 
Author Message
 Post subject: Second Level Cache Disabled problem
PostPosted: Fri Nov 14, 2008 4:15 am 
Newbie

Joined: Thu Nov 13, 2008 4:38 am
Posts: 4
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

I have set the second level cache false by using the following code, But JBOSS still shows that second level cache is enable in application. How to overcome this problem.

<session-factory>
<!-- Data Source Name -->
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jcomply</property>
<property name="hibernate.connection.username">test</property>
<property name="hibernate.connection.password">test</property>

<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<!-- Debug logging of SQL statements -->
<property name="show_sql">false</property>

<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>

<!-- Mapping Files -->

</session-factory>
</hibernate-configuration>

Following is log of JBOSS..

02:53:44,609 INFO [SettingsFactory] JDBC batch size: 15
02:53:44,609 INFO [SettingsFactory] JDBC batch updates for versioned data: disa
bled
02:53:44,609 INFO [SettingsFactory] Scrollable result sets: enabled
02:53:44,609 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
02:53:44,609 INFO [SettingsFactory] Connection release mode: auto
02:53:44,609 INFO [SettingsFactory] Maximum outer join fetch depth: 2
02:53:44,609 INFO [SettingsFactory] Default batch fetch size: 1
02:53:44,609 INFO [SettingsFactory] Generate SQL with comments: disabled
02:53:44,609 INFO [SettingsFactory] Order SQL updates by primary key: disabled
02:53:44,609 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.AST
QueryTranslatorFactory
02:53:44,609 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
02:53:44,609 INFO [SettingsFactory] Query language substitutions: {}
02:53:44,609 INFO [SettingsFactory] JPA-QL strict compliance: disabled
02:53:44,609 INFO [SettingsFactory] Second-level cache: enabled
02:53:44,609 INFO [SettingsFactory] Query cache: disabled
02:53:44,609 INFO [SettingsFactory] Cache provider: org.hibernate.cache.NoCache
Provider
02:53:44,609 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
02:53:44,609 INFO [SettingsFactory] Structured second-level cache entries: disa
bled
02:53:44,625 INFO [SettingsFactory] Statistics: disabled
02:53:44,625 INFO [SettingsFactory] Deleted entity synthetic identifier rollbac
k: disabled
02:53:44,625 INFO [SettingsFactory] Default entity-mode: pojo
02:53:44,625 INFO [SettingsFactory] Named query checking : enabled
02:53:44,640 INFO [SessionFactoryImpl] building session factory
02:53:45,437 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no
JNDI name configured


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2008 7:58 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
In the log there is also:

Code:
Cache provider: org.hibernate.cache.NoCacheProvider


It seems like a disabled cache is implemented as a cache that does nothing.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2008 9:05 am 
Newbie

Joined: Thu Nov 13, 2008 4:38 am
Posts: 4
Hi Dear,

But some time I got the old values... (May be fetching from cache)

Can you tell me from where the jboss is getting these configuration, even I didn't specifed cache enable in any of my configuration file.

Thanks,
Adnan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.