| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/04/2011 01:57:24
|
chenshu
journeyman
Joined: 04/23/2011 02:55:21
Messages: 13
Offline
|
Share my some experience about Ehcache sever here:
Why compile the source codes instead of using the binary?
Because I want to upgrade ehcache core to 2.4.2
You need download source codes of Ehcahe server and build it.Unofortunatelly,I can't build it successfully at first,I think this project is too old.It uses one library for soap security,but this library is deprecated.Finally,I have to delete soap folder from src/main/java,also delete src/test/java folder.
I also modified pom.xml to use the newest jersey-server library,list some changes here:
<parent>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-parent</artifactId>
<version>2.2</version>
</parent>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<scope>compile</scope>
<version>1.6</version>
</dependency>
Also,we can add some restful web methods to support batch query.I mean get several objects one time by passing a few key parameters.We can bind the database table with Ehcache server too.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/04/2011 02:08:32
|
chenshu
journeyman
Joined: 04/23/2011 02:55:21
Messages: 13
Offline
|
I don't suggest passing an Object which implements Serializable interface.Java standard serialization algorithm is complex and slow,the result char array is too large.I implement my own serialization algorithm,it is 2x faster than standard way,and save 2/3 memory.
In my client,just passes the byte array as value to cache server.
This is good idea,because I can compress the byte array before sending it to cache server.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/04/2011 02:11:25
|
chenshu
journeyman
Joined: 04/23/2011 02:55:21
Messages: 13
Offline
|
One guy reported a bug for Ehcache server.I tried ,he was right.
Add service.init() in the following method:
public void contextInitialized(ServletContextEvent sce) {
System.setProperty("com.sun.management.jmxremote", "");
LOG.info("Starting JMS MBeanServer");
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
ManagementService service = new ManagementService(CacheManager.getInstance(), mBeanServer,true,true,true,true);
service.init();
}
After that,I can monitor the MBeans in EhCache using JConsole.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/10/2011 09:02:48
|
ari
seraphim
Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA
Offline
|
Wow. These are helpful suggestiong. Thank you :)
Can you please file JIRAs suggesting making these changes part of the code base for everyone?
Cheers!
--Ari
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 06/11/2011 02:49:07
|
chenshu
journeyman
Joined: 04/23/2011 02:55:21
Messages: 13
Offline
|
I tried to log in your issue site: https://jira.terracotta.org/jira/login.jsp,but failed.
Get this response:
Sorry, your username and password are incorrect - please try again.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 07/22/2011 07:48:36
|
rajoshi
seraphim
Joined: 07/04/2011 04:36:10
Messages: 1465
Offline
|
Issue seems to be resolved.Please let us know if more information is required.
|
Rakesh Joshi
Terracotta. |
|
|
 |
|
|