-->
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.  [ 5 posts ] 
Author Message
 Post subject: cache on the client side
PostPosted: Sat Feb 21, 2004 10:12 am 
Pro
Pro

Joined: Mon Sep 08, 2003 4:30 pm
Posts: 203
I am using hibernate behind a J2EE session beans layer and the hibernate session lives for the duration of the session bean call.

I was wondering how can I use a caching mechanism on the (J2EE)client side such that I minimize the RMI calls?

TIA,

--steve p.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 21, 2004 1:34 pm 
Beginner
Beginner

Joined: Sun Oct 26, 2003 11:21 pm
Posts: 27
What's the client? What are you returning from the session beans that you want to cache?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 21, 2004 5:45 pm 
Pro
Pro

Joined: Mon Sep 08, 2003 4:30 pm
Posts: 203
hgilde wrote:
What's the client? What are you returning from the session beans that you want to cache?


I return Hibernate POJOs and want to cache this objects so that when I want to get a domain object I could get it from the cache instead of doing the RMI to the JBoss server (which deals with the db)

thx.
--steve p.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 21, 2004 7:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well you can do any kind of caching, keep a reference to previously loaded objects, plug in OSCache or whatever. Actually whenever you just display something to the user you are in practice allready doing "caching".

Be aware however that by doing such things you will run into really ugly data staleness problems in a multi-user environment. Doing cache invaldiation is allready ugly enough when using server-side caching, and becomes even more ugly when having caches on the client.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2004 11:08 pm 
Beginner
Beginner

Joined: Sun Oct 26, 2003 11:21 pm
Posts: 27
Yeah, if you cache on the client, you must use optimistic locking. See section 17.3.2 of the hibernate reference.

And if your client is a Servlet running in Tomcat, definitely use the Tomcat/JBoss combo. There's no RMI involved in making an in-JVM call to a JBoss session bean.


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