ola gerchikov

+ Follow
since Nov 04, 2006
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ola gerchikov

I am trying to build a dataScroller with page number like it here:


Here is my code, but when I test it, I can only see the buttons not the page numbers in the above links. I think I have followed what is done in the example as close as possible. Can you please tel me what am I missing?

Thank you.

16 years ago
Before JEE 5, people said EJB is too complicated, a lot of times, we can achieve thing using Servlet/JSP (or any java web framework) + hibernate (for database stuff).

But with Hibernate 3.2 and EJB 3.0,is it true that the line between lightweight architecture (java web framework + hibernate) and EJB is blurred.

Is that true?

And with EJB 3.0, does that mean JDO has becomes obsolete?

Thank you.
I use hibernate in my webapp on tomcat.

I notice that it takes a lot time to setup my webapp (when i first hit my servlet). It takes about 4 seconds to start tomcat, but it takes 14 seconds to initialize my webapp.

Can you please tell me how can I speed up the init time of my web app?

Here is my hibernate.cfg.xml file, I think it is very simple.

If you have any idea about how to speed up the init time of my web app, please let me know.
Thank you.
Thanks for your help. Add "<cache usage="read-only>" to my mapping file works.

However, there is a case where I expect hibernate to execute the query from the database instead of pull from the query cache, it does not work.

Here is the situation
1. execute a query
2. execute the same query again with no update to the database (expected)
3. add a row in the database via a legarcy application (non hibernate application).
4. execute a query (expected to re-execute the query instead of pulling the result from the database) This part does not work.

In the hiberante-in-action book, it talks about 'timestamp cache' on page 291. But I can't an example about that. I appreciate if you can help me.

Thank you.

I have setup ehcache as hibernate query cache. But when I execute the
same query multiple times, it still go and query the database (from
the hibernate sql out, it still executes mysql query). Can you please
tell me what am i missing?

Here is why I did in my hibernate.cfg.xml file:
Add these:
<property name="cache.provider_class">
<property name="hibernate.cache.use_query_cache">true</property>

And then, here is my query:
Query query = session
"from Country as country where country.language= :language and
country.phone.id = honeid");

query.setString("language", language).setLong("phoneid",

// uncomment this still does not work.
// query.setCacheRegion("query.Builds");

List result = query.list();

Can you please tell my how to get ehcache to work as hibernate query cache.
I think I have followed what the documentation said.

Thank you.