-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: multiple connections problem
PostPosted: Thu Dec 09, 2004 4:01 am 
Newbie

Joined: Sat Dec 04, 2004 10:23 pm
Posts: 13
How to get multiple connections using hibernate and HsqlDB

i am running hsqldb server in my project
using hibernate as ORM
i made static instance of the session factory
If i run 2 instances of my application
for 2nd instance it is saying
can't open connection


why it is not working ??

Do i need to use threads
where to use

How can irun multiple instances of my application


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 8:29 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
do you really think we can help you without informations? ;)

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 1:43 pm 
Newbie

Joined: Sat Dec 04, 2004 10:23 pm
Posts: 13
i running a book store application
application has swing (GUI) and hiberante for accessing database

hiberante version 2.1.6
HsqlDb version 1.7.2


i am running HsqlDb as server

i want to run more than one instance of my application

I am able to run one application perfectly.But i am not able to get conncetion for 2nd instance of application


What do i do to get multiple connection s

i have read that HSQLDB allows multiple connections in server mode


But i am not getting multiple connections even i am running in server mode ???


Do i need to change my application code to allow this?
like threads?>>>>>>>>>>>>>

I am using static session factory.Isn't this enough ??? ??

any suggestions


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 2:03 pm 
Newbie

Joined: Sat Dec 04, 2004 10:23 pm
Posts: 13
java.sql.SQLException: The database is already in use by another process

Not get books.lck file


Do i need to use threads to take care fo this


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 2:12 pm 
Newbie

Joined: Sat Dec 04, 2004 10:23 pm
Posts: 13
i added c3p0 connection pooling properties i added still i am getting same problem

still it is not able to get that .lck file


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 4:50 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Sounds like HSQLDB may not support multiple user connections, at least in your current configuration. I'm not a big HSQLDB user so I can't really say whether it should allow this or not; a great place to ask might just be the HSQLDB user forum/mailing-list.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 4:51 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Have you tried this directly through JDBC? In general, if you can't do it through JDBC, you ain't going to be able to do it through Hibernate...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 10, 2004 1:54 pm 
Newbie

Joined: Fri Dec 10, 2004 1:35 pm
Posts: 1
HSQLDB does not support multiple connections to a database in Embedded mode. You have to run it in server mode. You'll need to run org.hsqldb.Server in the hsqldb.jar. CHeck out the documentation on how to set this up.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 10, 2004 4:35 pm 
Newbie

Joined: Sat Dec 04, 2004 10:23 pm
Posts: 13
i am running HSQLDB sever
in server mode


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.