hessian
HttpInvoker get choked when trying to return a list with 1000 elements
I wrote a small service class which return a list with 1000 strings. I am using Spring Httpinvoker to get the service and read the list. If the number of the elements in the list is 100 all is going well when I try 1000 it freeze utill there is a connection reset The client side is JUnit 4 class with Spring runner on the same machine by the way the same is happening with Hessian protocol using the Spring Remoting classes. They are both HTML based but this is the only connection I can see RMI and JMS RMI (thorugh Spring remoting) is working fine with the same service The service code public class DateServiceImpl implements DateService { /* (non-Javadoc) * #see com.successcharging.rmiexample.DateService#getDate() */ #Override public Date getDate() { return new Date(); } #Override public List<String> getBigList() { List<String> listData = new ArrayList<String>(); for (int i = 0 ; i < 100;i++) { listData.add(Math.random()+""); } return listData; } } The mapping server side <!-- The service to use this is the server side --> <bean id="dateServiceServer" class="com.successcharging.rmiexample.server.DateServiceImpl" /> <!-- the http invoker protocol --> <bean name="/DateServiceHttpInvoker" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> <property name="service" ref="dateServiceServer" /> <property name="serviceInterface" value="com.successcharging.rmiexample.server.DateService" /> </bean> The client mapping The junit code #RunWith(SpringJUnit4ClassRunner.class) #ContextConfiguration public class DateServiceTest extends BaseTest { #Resource private DateService dateServiceHttpInvokerClient; #Test public void testDateServiceHttpInvoker() { List<String> data = dateServiceHttpInvokerClient.getBigList(); //Here it is get stuck data.add("My test"); System.out.println("HttpInvoker:" + data.size()); } public DateService getDateServiceHttpInvokerClient() { return dateServiceHttpInvokerClient; } public void setDateServiceHttpInvokerClient( DateService dateServiceHttpInvoker) { this.dateServiceHttpInvokerClient = dateServiceHttpInvoker; } } Any ideas ?
Related Links
php long int to java long failed when php call java via hessian
spring-cloud-sleuth trace hessian client
Hessian Spring configuration
HttpInvoker get choked when trying to return a list with 1000 elements
Record Server Interaction of Hessian based Server Communication for VUGen
Getting started with Hessian