<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "ping server alive ? how ?"]]></title>
		<link>http://forums.terracotta.org/forums/posts/list/16.page</link>
		<description><![CDATA[Latest messages posted in the topic "ping server alive ? how ?"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>ping server alive ? how ?</title>
				<description><![CDATA[ hello , how can i check server and cache is alive?
    public final boolean ping() {
        Status status = cache.getStatus();
        return status == Status.STATUS_ALIVE;
    }

this can help ?]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7238.page#35784</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7238.page#35784</link>
				<pubDate><![CDATA[Tue, 17 Jul 2012 06:22:01]]> GMT</pubDate>
				<author><![CDATA[ kadirb]]></author>
			</item>
			<item>
				<title>Re:ping server alive ? how ?</title>
				<description><![CDATA[ What is the cache topology you're using ? What's the cache's config ? 
This check above wouldn't tell you anything about any network status. It only says that the Cache is usable, from it's lifecycle perspective.]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7238.page#35787</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7238.page#35787</link>
				<pubDate><![CDATA[Tue, 17 Jul 2012 06:37:13]]> GMT</pubDate>
				<author><![CDATA[ alexsnaps]]></author>
			</item>
			<item>
				<title>Re:ping server alive ? how ?</title>
				<description><![CDATA[ <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="ehcache.xsd"
         updateCheck="true" monitoring="autodetect"
         dynamicConfig="false">
    <diskStore path="java.io.tmpdir"/>
    <terracottaConfig url="localhost:9510" />
    
    <!-- Specify cache storage location -->
    <!-- <diskStore path="/tmp/jprofessional/cache"/> -->
    <cache name="test" maxElementsInMemory="50" maxElementsOnDisk="5000" eternal="false" overflowToDisk="false" diskSpoolBufferSizeMB="20"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           memoryStoreEvictionPolicy="LFU"
           transactionalMode="off"
            >
        <terracotta clustered="true" consistency="eventual"/>
        <cacheWriter writeBatching="true" writeMode="write-behind" writeBehindConcurrency="2" maxWriteDelay="5" rateLimitPerSecond="5" >
            <cacheWriterFactory class="bts.UserTrackWriterFactory"/>
        </cacheWriter>

        <searchable>
            <searchAttribute name="id" expression="value.getId()"/>
            <searchAttribute name="gid" expression="value.getGid()"/>
        </searchable>

    </cache>

</ehcache>
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7238.page#35788</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7238.page#35788</link>
				<pubDate><![CDATA[Tue, 17 Jul 2012 07:38:23]]> GMT</pubDate>
				<author><![CDATA[ kadirb]]></author>
			</item>
			<item>
				<title>Re:ping server alive ? how ?</title>
				<description><![CDATA[ This is my XML file]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7238.page#35789</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7238.page#35789</link>
				<pubDate><![CDATA[Tue, 17 Jul 2012 07:38:45]]> GMT</pubDate>
				<author><![CDATA[ kadirb]]></author>
			</item>
			<item>
				<title>Re:ping server alive ? how ?</title>
				<description><![CDATA[ Hi,

Try using the dev console. If you would like to do it programmatically, use CacheCluster API to check if the cluster is online. 

Cheers
]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7238.page#35927</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7238.page#35927</link>
				<pubDate><![CDATA[Thu, 26 Jul 2012 11:40:58]]> GMT</pubDate>
				<author><![CDATA[ sghose]]></author>
			</item>
			<item>
				<title>Re:ping server alive ? how ?</title>
				<description><![CDATA[ cachecluster api ?
how ?

i've cache object and 1 cachamanager object.
how can i access cachecluster to ping server to check alive?

can you give simple ping code example ?

]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7238.page#36327</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7238.page#36327</link>
				<pubDate><![CDATA[Thu, 23 Aug 2012 05:30:57]]> GMT</pubDate>
				<author><![CDATA[ kadirb]]></author>
			</item>
			<item>
				<title>Re:ping server alive ? how ?</title>
				<description><![CDATA[ I'm confused what you are trying to achieve.
From a high level perspective, if you can interact with the cache, the server should be there... 

Are you trying to do something like :
<span class="genmed"><b>Code:</b></span><br>
		<div>
		<pre bbCodeId="pre-code" style="overflow: auto; width: 95%; max-height: 350px; height:expression(this.scrollHeight > 350 ? '350px' : 'auto');">if&#40;server.ping&#40;&#41;&#41; 
  cache.use&#40;&#41;; 
else
  doSomethingElse&#40;&#41;;</pre>
		</div> ?

Cause that wouldn't make much sense...
If you want resilience, you should look at non-stop caches here: 
http://ehcache.org/documentation/configuration/non-stop-cache

If you want to monitor the cluster, you should probably indeed look into using the dev-console, or use JMX directly...]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/7238.page#36328</guid>
				<link>http://forums.terracotta.org/forums/posts/list/7238.page#36328</link>
				<pubDate><![CDATA[Thu, 23 Aug 2012 05:59:09]]> GMT</pubDate>
				<author><![CDATA[ alexsnaps]]></author>
			</item>
	</channel>
</rss>