<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    How to do jboss caching
</h3>
<span style="margin-bottom: 10px;">
    reply from <a href="http://community.jboss.org/people/navssurtani">Navin Surtani</a> in <i>JBoss Cache</i> - <a href="http://community.jboss.org/message/558733#558733">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hey Amol,</p><blockquote class="jive-quote"><p><span style="font-family: arial, helvetica, sans-serif;"><br/></span></p><p>1) I am going through <a class="" href="http://community.jboss.org/wiki/5minutetutorialonInfinispan">http://community.jboss.org/wiki/5minutetutorialonInfinispan</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have download infinispan-4.1.0.CR3-all.zip from their site.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I want to see how object caching is done by infinispan.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>bcoz of am new to caching can u tell me how to deploy this tutorial?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have tried GUI Demo of Infinispan but not getting enough idea of object caching.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min- padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; "><br/></span></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><br/>What do you mean by Object caching? Do you mean actually how you put stuff into the cache and making use of it?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If so you can just do something like: - </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">CacheManager cm = <font color="navy"><b>new</b></font> DefaultCacheManager();
Cache&lt;MySpecialKey, MySpecialValue&gt; c = cm.getCache();
&#160;
&#160;
<font color="darkgreen">// Put some stuff into the cache</font>
c.put(k1, v1);
&#160;
<font color="darkgreen">//etc etc</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Now I want to get the stuff out of the cache using a different app on a different JVM even. {Note that this will only work if the Caches are in DIST or REPL configuration and have the SAME configuration. Also note that the caches have the same String name in both cases}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">CacheManager cm2 = <font color="navy"><b>new</b></font> DefaultCacheManager();
Cache&lt;MySpecialKey, MySpecialValue&gt; c = cm2.getCache();
&#160;
<font color="darkgreen">// Get my stuff out of the cache: - </font>
&#160;
MySpecialValue specialValue = c.get(k1);
&#160;
<font color="darkgreen">// etc etc</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Obviously if that's not what you want and have a more complex problem then please let me know and I'll see if I can help.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>With respect to the configuration file, as long as it's somewhere in your project directory it should be fine. Generally a good idea to keep it with your maven/ant build file or a config directory if you have one. Make sure you use the appropriate API on CacheManager though.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Hope that helps,</p><p>Navs.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/558733#558733">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Cache at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>