-->
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.  [ 7 posts ] 
Author Message
 Post subject: DeployedTreeCache compile error
PostPosted: Fri Apr 08, 2005 12:13 am 
Newbie

Joined: Sat Apr 02, 2005 10:32 am
Posts: 14
Hi
I downloaded Jboss 4.0.1_Sp1 source code and trying to integrate with hibernate 3.0. Modified build.xml to refer hibernate3.jar and when I compiled Jboss source code, It is prompting with one error.(infact two errors, I resolved one issue).
It is:
^
jboss-4.0.1sp1-src\hibernate\src\main\org\jboss\hibernate\cache\DeployedTreeCa
che.java:22: org.jboss.hibernate.cache.DeployedTreeCache is not abstract and does not override abstr
act method update(java.lang.Object,java.lang.Object) in org.hibernate.cache.Cache
public class DeployedTreeCache
^


Any pointers?

Regards


Read the rules before posting!

http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 12:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
http://forum.hibernate.org/viewtopic.php?t=940501


Top
 Profile  
 
 Post subject: there are two classes
PostPosted: Fri Apr 08, 2005 9:52 am 
Newbie

Joined: Sat Apr 02, 2005 10:32 am
Posts: 14
Hi, There are two classes in cache folder :one is
1.DeployedTreeCache and Provider Class. I resolved the issues with cache provider class but not with DeployTreeCache. And the posting which you sent me is talking abt only CacheProvider. Correct me if I am wrong.

Regards
Nagesh G.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 10:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Ok, give me your hand ;)

Yes, the code is only for DeployedTreeCacheProvider, but notice that there is no mention of DeployedTreeCache. It uses the standard Hibernate TreeCache class.


Top
 Profile  
 
 Post subject: thats the problem now
PostPosted: Fri Apr 08, 2005 10:42 am 
Newbie

Joined: Sat Apr 02, 2005 10:32 am
Posts: 14
Hi,

Now during my integration with hibernate 3.0 with jboss, I modified DeployeeTreeCache to import org.hibernate.cache instead of net.sf.

As Cache.java is interface and having methods like toMap() and update(), my DeployeTreeCache must implement them. Can you send me the file which is compatible with cache of hibernate 3.0

My snippet of code as below.
package org.jboss.hibernate.cache;

import org.hibernate.cache.Cache;
import org.hibernate.cache.CacheException;

import org.jboss.cache.TreeCacheMBean;
import org.jboss.cache.Fqn;
import java.util.Map;
/**
* A Hibernate Cache implementation wraps the passed TreeCache
* (presumably gotten from JNDI).
*
* @author <a href="mailto:steve@hibernate.org">Steve Ebersole</a>
* @version <tt>$Revision: 1.1.2.1 $</tt>
*/
public class DeployedTreeCache
implements Cache
{
private static final String ITEM = "item";

Regards


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 08, 2005 10:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
I think your missing the point. I refactored the org.hibernate.cache package specifically so that custom CacheProviders could return the standard org.hibernate.cache.Cache implementations if the wanted to.

Just get rid of DeployedTreeCache, and have your DeployedTreeCacheProvider return an instance of org.hibernate.cache.TreeCache.

Look at how this is done in the jboss-head module if you are still unclear on this.


Top
 Profile  
 
 Post subject: Thank you.
PostPosted: Fri Apr 08, 2005 10:49 am 
Newbie

Joined: Sat Apr 02, 2005 10:32 am
Posts: 14
Thanks steev,
I will go thru it. I am still unclear of this caching functionality. Let me get some handson.

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.