• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Axis2 - Hibernate problem: cannot handle large pojo

 
Syed Ali
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building a webservice in eclipse using Axis2-1.4. the webservice works fine if the POJO is at a certain number of fields, but if i increase
the number of fields in my POJO, it kills my eclipse while i am testing and running my webservice in Eclipse.
I tried my webservice with 40 fields in my POJO , the webservice works perfectly excellent but when i increased the
number of fields in my POJO to 95 then my webservice kills the eclipse. There fore even when I generate the client and call the client it gives
java Memory heap error. As we know the webserrvice only use Array and cannot handle List, there for I convert the ArrayList returned
by the hibernate to an array before sending it back to webservice. The following is the code


========== Hibernate DAO code called by the web service ============================
public PositionView[] getPositionList() throws DataAccessException {

HibernateUtil util = new HibernateUtil();
Session session = util.getSessionFactory().getCurrentSession();
session.beginTransaction();
ArrayList<PositionView> resultList = (ArrayList<PositionView>) session.createQuery("from PositionView").list();
PositionView[] dataArray = (PositionView[]) resultList.toArray(new PositionView[resultList.size()]);

session.getTransaction().commit();
return dataArray;

}

========================= the following code is the webservice getting data from the DAO ================

public PositionView[] getData() {

private PositionView[] dataArray;

RiskDao rd = new RiskDAOImpl();
dataArray = rd.getPositionList();
return dataArray;
}
===================================================================================


Please help me this is an urgent requirement. client need a Large POJOwith 100 fields to be passed from the webservice
but for some reason axis2-eclipse cannot handle large POJO and gives a Java Memory Heap Error and kills the Ecliipse while
testing and running the webservice in eclipse....... I tried every thing increasing heap size in Tomcat but nothing seems to help.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please void posting in uppercase; read this for more information.

I have removed the all-uppercase from your subject.
 
Syed Ali
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help me with the above problem , is very urgent production issue...... thanks
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic