File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Ibatis + SQLMAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Ibatis + SQLMAP" Watch "Ibatis + SQLMAP" New topic
Author

Ibatis + SQLMAP

Tushar Kherde
Ranch Hand

Joined: Apr 28, 2006
Posts: 56
Hi Clinton Begin, Brandon Goodin & Larry Meadors,


I am using iBatis + JSF + Portlet and i am facing serious performance problem.
In my application there are around 150 tables. So there are 150 sqlmap.xml files. So when ever i am starting the system and accessing first time any data. All the sqlmap files are getting loaded into memory. As a result system takes 15 - 30 minute to retrive the data. Is there any solution for this?

Can I covert xml files into class files?

I tried lazy loading but it is not working.

Please Let me know if any information is needed from system side.

Any


Tushar
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10290
    
168

So when ever i am starting the system and accessing first time any data. All the sqlmap files are getting loaded into memory


I guess, you are talking about the mapping files that are being parsed. If yes, then its the expected behaviour. iBatis (or for that matter any ORM tool) needs to know which objects have been mapped to which tables. This will be a one time activity.

As a result system takes 15 - 30 minute to retrive the data


15-30 minutes is too huge a time to parse those files. Are you sure it takes so long?

I tried lazy loading but it is not working.


Lazy loading comes into picture when you are loading the persistent objects and not when the mapping files are being parsed.


[My Blog] [JavaRanch Journal]
Brandon Goodin
author
Greenhorn

Joined: Nov 08, 2006
Posts: 14
I would encourage you to subscribe to the ibatis list and post this issue there. We have users that have more tables than 150 and they have no problems loading sqlmaps. When you post to the ibatis list provide the version of ibatis you are using, the code that you use to initialize your sqlmap.


Brandon Goodin<br />Independent Consultant<br /><a href="http://www.silvermindsoftware.com" target="_blank" rel="nofollow">http://www.silvermindsoftware.com</a>
Brandon Goodin
author
Greenhorn

Joined: Nov 08, 2006
Posts: 14
FYI... the mailing list can be subscribed to here... user-java-subscribe@ibatis.apache.org
Tushar Kherde
Ranch Hand

Joined: Apr 28, 2006
Posts: 56
HI Jaikiran,

Thanks for reply, Yes you are right i was talking about mapping files. And system talking 15-30 minute first time when i am accessing it. If ram is increased time is cut down to 10 minutes. Problems is when sometimes i even lost the JNDI connection.

If this not the problem of parsing mapping files, can you please give me possible reasons?

Or any Idea how to trace the cause of the problem?
Tushar Kherde
Ranch Hand

Joined: Apr 28, 2006
Posts: 56
Hi Brandon,

Thanks Brandon, I will follow the same.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ibatis + SQLMAP