JBoss Developer: Message List - Serializable is neededMost recent forum messageshttps://developer.jboss.org/community/seam?view=discussionsJive Engage2007-01-31T09:30:14Z2007-01-31T09:30:14ZenRe: Serializable is neededDavid G./people/dgallegodo-not-reply@jboss.com2007-01-31T09:30:14Z2007-01-31T09:30:14Z<!-- [DocumentBodyStart:e4a8cab1-ea04-463d-b72c-8b856d74bc92] --><div class="jive-rendered-content"><p>I'm trying to outject a new "Category" instance from a method markes as a factory method.<br/><br/>"Category" is my entity POJO.<br/><br/></p><!--[CodeBlockStart:75846c3f-d474-4f6e-8b61-ac438507c200][excluded]--><pre class="java" name="code">
@Out(scope=ScopeType.CONVERSATION,required=false)
Category selectedCategory;
</pre><!--[CodeBlockEnd:75846c3f-d474-4f6e-8b61-ac438507c200]--><div style="display:none;"></div><br/><br/>This is my factory method: <br/><br/><!--[CodeBlockStart:cf427c51-927c-441f-b726-41abcd806072][excluded]--><pre class="java" name="code">
@Factory("categoryArticles")
public void CategoryViewer() {
selectedCategory = (Category)em.createQuery("from Category c where id = :categoryId").setParameter("categoryId", categoryId).getSingleResult();
}
</pre><!--[CodeBlockEnd:cf427c51-927c-441f-b726-41abcd806072]--><div style="display:none;"></div><br/><br/><br/>So whenever I want to write an object to a Seam context, it has to be Serializable... <br/><br/> Thanks Norman! <br/><br/><br/></div><!-- [DocumentBodyEnd:e4a8cab1-ea04-463d-b72c-8b856d74bc92] --><img src='/beacon?t=1521468535612' />2007-01-31T09:30:14Z11 years 2 months ago0Re: Serializable is neededNorman Richards/people/norman.richardsdo-not-reply@jboss.com2007-01-31T02:43:41Z2007-01-31T02:43:41Z<!-- [DocumentBodyStart:f06036b2-a8c5-4497-8330-5de20717a444] --><div class="jive-rendered-content"><p>Well, you need to implement Serializable when you want to use them in a context that requires serialization. :)<br/><br/>There are a few places you could potentially need a serializable object. What exactly are you doing that causes you to run into the exception.</p></div><!-- [DocumentBodyEnd:f06036b2-a8c5-4497-8330-5de20717a444] -->2007-01-31T02:43:41Z11 years 2 months ago0Serializable is neededDavid G./people/dgallegodo-not-reply@jboss.com2007-01-30T16:47:42Z2007-01-30T16:47:42Z<!-- [DocumentBodyStart:1a3e605c-f311-4c2e-a3d8-1082ab1ed469] --><div class="jive-rendered-content"><p>Hi all, I have a question about JPA's entities (with hibernate as JPA provider)<br/>Why do they need to implement Serializable interface?<br/><br/>I'm getting a "NoSerializableException" when working with some entities (not all, unfortunately)<br/><br/>Thanks :)</p></div><!-- [DocumentBodyEnd:1a3e605c-f311-4c2e-a3d8-1082ab1ed469] -->2007-01-30T16:47:42Z11 years 2 months ago20