denis sorn

Ranch Hand
+ Follow
since Apr 30, 2008
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 denis sorn

Akshay Sawalkar wrote:I'm also getting infinite squares and asterisks running along the line before I actually start typing anything. It goes into infinite loop.

I haven't even noticed the previous comment. Maybe I didn't receive the email.

Anyhow, I don't know where did you find the example, but there are better ways to do this. For learning purposes here is an old tutorial explaining the code and some drawbacks:

In my case the problem was a compilation mistake.
You could eventually use Session merge method. I.e. .


Forget it. I have not read what you wrote. Sorry.

Hi both,

first sorry for the misguidance. As Shobhit said you can not reuse same ResultSet Object. What I actually meant you can reuse a reference.

And you don't have to create two Stramenet objects. This works for me:

Well yes. You can also use one ResultSet object with different queries.
Are you trying to do that as root? If yes could be that root doesn't have right to start/run X applications.
Check "Beginning POJO's from Novice to Professional-Apress". It looks nice, I am still reading it.
I never worked with oracle, but maybe I had similar problem with MySQL and INNODB engine. The problem was that innodb logs each insert. Because mysql and innodb support multiple inserts with one command I ended with creating big SQL statement (with StringBuffer) which inserts 30 40k rows at once.
13 years ago
I presume he wants to be able to change parameters dynamically...

If this is what you want Shumani you can do it with PreparedStatement.
Java Server Pages have nothing to do with mysql. You can google for 'jdbc mysql' and you'll find a lot of quick starter tutorials about how to get and use mysql connection from java code.

You can then use the same method to obtain data in your servlet.
Don't know for JPA, I have worked only with jdbc, but for Connection Pooling I suggest you try MiniConnectionPoolManager.
13 years ago
free -m doesn't give data for hard disk but for RAM and swap if you have swap partition or swap file. you need df command.
13 years ago
Something like this? That works with MySQL not sure for other DBMS.
You have to override isCellEditable method in TableModel. If you want to make all cells uneditable this would work:

13 years ago
You can add a MouseAdapter with addMouseListener to the table. In MouseAdapter class implement mousePressed method i.e. like this:

I am not sure if this is what you want but I suppose with selected row and column you should get your cell.


Yes, forgot to say, this method will only work then when you use mouse to select the cells.
13 years ago