Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ibatis + SQLMAP

 
Tushar Kherde
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brandon Goodin
author
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI... the mailing list can be subscribed to here... user-java-subscribe@ibatis.apache.org
 
Tushar Kherde
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brandon,

Thanks Brandon, I will follow the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic