• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Suggestion about making entity classes Serializable

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello! I'm integrating JForum into our webapp now and ran over the serious (at least for me) issue.

I'm using JForum 2.1.7 on JBoss 4. I'm required to manage JForum entites from a separate webapp, so I start up separate copy of ForumRepository and friends in it. Because I need repositories (of my & JForum's webapps) to be synchronized, I wrote MBeanTreeCacheEngine that uses tree cache deployed as JBoss service. So I faced the fact that entites from different webapps are loaded by different classloaders. To solve it, I serialize entities before putting them in cache.

Then I encountered terrible bugs when some things just dissapear from forum. I debugged this to reason that when you serialize entitiy with non-serializable fields (other entities), serialization engine just silently skips them!

So I suggest to make all classes in net.jforum.entities serializable to make them really cacheable - you do require it for stand-alone (not embedded) cache (there are other ways, like in Hibernate, but they are way more complicated). Note that for now many of them already are serializable, but some are not.
[originally posted on jforum.net by skoptelov]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Slightly offtopic, but I filed one more of the cache-related bugs in JIRA:

http://www.jforum.net/jira/browse/JF-613
[originally posted on jforum.net by skoptelov]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you're right. In order to send the objects through the network, they need to be serializable.

Please open a Jira issue for that one too.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic