Abubacker Siddik

Ranch Hand
+ Follow
since Aug 12, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abubacker Siddik

Hey i have the same problem now. But hopefully you gave the clue to solve this. Thanks David.
12 years ago

Hey there is a thread already discussing this. You can take a look at this.


https://coderanch.com/t/532012/ORM/java/Hibernate-Books
You want to create something like this??

12 years ago
Thanks Paul.. You showed some light on my understanding of Hibernate cache...
Hi,
Hibernate.hbm2ddl.auto is a property which you can set in hibernate configuration. This will run DDL for the Database. The values for this property are
validate | update | create | create-drop


Validate = will validate the schema that you have, and makes no changes to the database.
Update = will update the database if the schema is already there in the database.
Create = will create new database, removing existing schema if any
Create-drop = will create new database and drops it when the sessionFactory is destroyed.



Abu.A
hey, you can read Hibernate in Action Manning publication. Thats wonderful book for beginners to start with. It gives you the overall picture and makes you move ahead.


Abu.A
Mathew,
Cache is an inconsistent store of information that can be used for scalability and to improve performance. Hibernate provides three kinds of Cache mechanism.

1. Session ( By Default, cannot be turned off).
2. SessionFactory ( Second level cache).
3. Query cache.


First level of cache is nothing but org.hibernate.Session. This will track all the dirty states of POJOs being done when you open a session and also will hinder to many SQL queries hitting at Database.

Second level cache is SessionFactory which is an immutable object holding information about everything from the configuration file and helps to create multiple Session objects for the application to use. When you create multiple Session objects from the SessionFactory, it will track all the session objects and queries made out of it. So it will help caching queries created across Session objects and reduce multiple trips to DB. This type of cache is provided many third party providers.

Third level cache is Query cache. When you enable second level cache in the configuration, you are good to get query cache also. All you have to do is, just enable the query cache in the configuration. This will save the fields and values retrieved from each query in cache.

I have given a very little info about hibernate cache as i am not well versed. There is a lot more about it. You can get it from so many sources available in the net. but this will give you a start, i hope.



Thanks,
Abu.A


Hi
I am trying to write a framework class which can be used by our applications. This class provides methods to create hibernate session and ways to commit and rollback the transaction. I have designed in such a way that there will be always two methods to do commit, rollback and creating sessions. To put it clearly, to create session, one method will give default session by calling openSession on SessionFactory, second method will get a parameter from the user to create new session rather than to return session created by default. Likewise to commit, i will have commit method which will commit default session transaction, but for second commit method, i will get parameter that will accept session object and commit on that particular session. Same applies to rollback method also.

My question is, When user gets session and works on it, an exception occurs that will be caught by my framework class. Now how will i identify which session the user was using and which transaction should i rollback in my catch block? It can be default session or new session created by the customized method. How to know the origin of the exception or from which session the exception was thrown?


Kindly help me guys..


Thanks in Advance.
Abu.A
Hi all,

I am new to JQuery. Can i please tell me is there any jquery plugin to dynamically extend table column width. If so, How should i do that?


Thanks,
Abu
Hi all,

Nina Anderson wrote:Bear ....you are the beST!!! I was able to view the generated js files by typing the path on the browser.

Apparently DWRUtil.setValues has deprecated. The new function from util.js is dwr.util.setValues().

However, when I change my jsp to 'dwr.util.setValues()', I'm get a javascript an error stating "'dwr' is undefined". The dwr.util.setValue() is defined in the util.js file, which the source included in my jsp file.

So, I'm wondering why the application can find the 'dwr' object.

Please...HelP.



I encounter a same problem which Nina has said. Can anybody please tell me how to rectify javascript error that dwr is undefined? I can see the generated .js files but when i run it says dwr is undefined. Help me guys.

Thanks for all


ABU
14 years ago
So i can use util.Timer. Thats fine. Where can i write my task? I guess it must be in servlet context listener.
Guide me..
14 years ago

Thanks buddy, i was sprinting around answers like this. Before i am cleared up.. How can i run the every-minute-or-so job in web app ( I mean standard way of doing this). I am wondering how can i run a code that's routinely checking for a particular interval. It must sound like Servlet Listeners....
14 years ago
Guys, I got the idea of Paul. But I am asking you some of the ways to implement.

If i am going to use Paul guidelines, then each and every request is going to be checked before it serves its original purpose. That's what i was thinking about. For example,

An authenticated user is displayed online because he is constantly making requests. But when suddenly he clicks a link to some other profile. This request has to bring all the details about the other person's details like his name, profession, location etc. All the details can be fetched from database. Now I must also store the info about the person is online or offline. So that i can fetch the message whether he is online or offline to the viewing user.

I am asking the way to implement these. I think i am making my point here.


Abu.A
14 years ago