Hi There,
I have a following code, segment that queries a the database.The database i am using is Mysql 4.0 and Jboss as the application server.
After few consecutive queries. I start getting mysql state exceptions saying the access to database is denied.
I dont have the dump of the exceptions. Could i get any help on what the problem might me. i am using the following code segment to access the database.
Thanks in advance
Code:
FileInputStream inputstream=new FileInputStream(getClass().getResource("hibernate.properties").getFile());
Properties property=new Properties();
property.load(inputstream);
Configuration cfg=new Configuration();
cfg.setProperties(property);
cfg.addClass(Order.class);
cfg.addClass(PurchaseItems.class);
SessionFactory sessionFac=cfg.buildSessionFactory();
Session sess=sessionFac.openSession();
List list=sess.find("from Order as ord where ord.orderid=15");
sess.close();