Yes, any non-primitive backed object needs to implement Serializable (or Externalizable) in order to serialize.<br><br>gw<br><br><div class="gmail_quote">On Sun, Feb 24, 2008 at 6:25 PM, William Chu &lt;<a href="mailto:willchu@gmail.com">willchu@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thank you so much for the help. <br><br>I did not try any other object other than Strings. <br>
<br>Does each object need to implement the serializable interface in order to be stored by memcached?<br><br>i.e. mc.set(key, someObject);<br>
<br>ie:<br>class SomeObject implements Serializable {<br>...<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Sun, Feb 24, 2008 at 3:06 PM, Dustin Sallings &lt;<a href="mailto:dustin@spy.net" target="_blank">dustin@spy.net</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br><div><div><div>On Feb 24, 2008, at 14:48, William Chu wrote:</div><br><blockquote type="cite"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">I think you are correct ... I can set a &quot;String&quot; but not any other object.</span></blockquote>

<div><br></div></div><div><span style="white-space: pre;">        </span>None? &nbsp;What other kinds of objects did you try?</div><div><div><br></div><blockquote type="cite"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Why?<br>

<br><i>boolean isSet &nbsp;= mc.set(key, &quot;Some String&quot;);</i><br><br>isSet = true and thus everything works correctly.<span>&nbsp;</span><br><br><br>I need to be able to cache any object....What is going wrong? Why is my client failing?<br>

</span></blockquote></div></div><div><br></div><span style="white-space: pre;">        </span>client implies there&#39;s a server. &nbsp;client &lt;-&gt; server communication requires the two to agree on how to represent data being passed around. &nbsp;Java does that using its serialization mechanism.<div>

<br></div><div><span style="white-space: pre;">        </span>If you don&#39;t have any kind of external encoding for a particular object, it can&#39;t be sent to the server.</div><div><br></div><div><span style="white-space: pre;">        </span>It may be that you just want your object to implement Serializable, but it&#39;s not always that simple.<br>

<div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>

<br>--&nbsp;</div><div>Dustin Sallings</div><div><br></div></span><br> </div><br></div></div></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Greg Whalin