| Author |
Axis2 - Hibernate problem: cannot handle large pojo
|
Syed Ali
Greenhorn
Joined: Oct 08, 2008
Posts: 29
|
|
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
Joined: Jan 10, 2002
Posts: 56204
|
|
Please void posting in uppercase; read this for more information.
I have removed the all-uppercase from your subject.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Syed Ali
Greenhorn
Joined: Oct 08, 2008
Posts: 29
|
|
|
please help me with the above problem , is very urgent production issue...... thanks
|
 |
 |
|
|
subject: Axis2 - Hibernate problem: cannot handle large pojo
|
|
|