Suresh Khant

Ranch Hand
+ Follow
since Feb 27, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Suresh Khant

Hi Pai , Thanks for your reply ,

How are you testing that the connections aren't released?


By listing the number of database connections using the mysql command
show processlist;

executing this command after deploying of the application( and running it ) and after undeploy of the application


The file you posted looks like a hibernate configuration file. Is that right? If yes, how are you using Hibernate in your application?


yes it is hibernate configuration file along with C3P0 configuration ,

part of Hibernate configuration file :



I am using hibernate as the following

Hibernateutil class



Example to save entity




Are you setting up the entitymanagers yourself


Frankly i dont know what do you mean by entitymanagers , but i ll check that
5 years ago
Hi All,

I am using c3p0 with the hibernate for connection pooling ,

I have noticed that when i undeploy the application the database connections are not released , to release them i need to restart the application server which is jboss 7

here is my C3P0 configuration




my pom file contains




Are my settings are right ? is there any property to release the created database connections , is C3P0 the best choice to manage the connection pool ?
5 years ago
Hi All,
I am developing web java application with help of Hibernate ,



To interact with DB , some cases I need only a single operation and in some cases I need a transaction (multiple operations)
currently I have the following DAO which works only for a single operation but it fails in case of transaction because am commiting the transaction in DAO

is there any way to modify the DAO code so that it can work in both cases (transation and non transaction cases) and what is the best way to do that so it suits all the cases.





AbstractDao.java





UserDAO
Hi All,

According to my humble experience I have noticed the following related to database while creating an application :

1 . Most of the applications have a table called "user table"
2. Application should have audit or log table which contains all the actions done by the users ,
3. Delete operations should not really happened to keep in the integrity of the system but instead of that we have to keep a flag


my question what is the best practices to have a user table : is like


Method 1 :


Method 2



Method 3
we will use the audit table which contains all the actions and the ids of the users ad the following





or all above 3 methods are not the best approach .

Please guide me for the best database design


I am using Mysql and java
Hi All,
I have code which works in non maven environment , I converted the project to maven (maven2) but I am getting some errors














Hi All,
could any one provide me examples for DAO testing unit ,
it should include hibernate with maven2 structure
Hi All ,

I am newbie , I want some one to explain to me the main differences/advantages/disadvantages of JSF vs JQuery ?
7 years ago
JSF
Hi All,

I am trying to run one of my simple applications StudentsApp (developed by jsf 1.2) using Hudson , I have found the following tutorial http://htmlunit.sourceforge.net/gettingStarted.html

but am getting error

BTW am using jboss 4.2.1 , hudson 1.398






7 years ago
JSF
Thanks Jaikiran Pai for you reply,

What command do you use to start the server and please post the entire exception stacktrace that you see after copying that driver jar to that location.




I am starting jboss server from eclipse ,

Everything goes correctly after copying that driver jar to that location.(no error)

the error will be generated after long time of deploying (sometimes after one hour of deployment)

I have already post the stacktrace in my first post

Thaking you in advance
7 years ago
All the suggestions are appreciated
7 years ago
JSF
All the suggestions are appreciated
7 years ago
All the suggestions are appreciated
7 years ago
JSF
Thanks James Boswell for your reply,

This snippet means there needs to be a setSelectedSubjects(List<Integer>) method in your UpdateStudentInfoBean class. I cannot see such a method.

There is a method called setSelectedSubjectsInfo(List<Integer>). Should this be renamed to setSelectedSubjects?



I have renamed it , but still getting the same error
7 years ago
JSF
Thanks Jaikiran Pai for your reply,
I have copied mysql jar file into JBOSS_HOME/server/messaging/lib but am still getting the same error
7 years ago