Hello,

Castor Database use JNDI DataSource as generic JDBC DataSource, e.q.
call to getConnection
http://java.sun.com/j2se/1.4.1/docs/api/javax/sql/DataSource.html#getCon
nection()

So, Castor use external implementation and it every time call
getConnection. But that you question about is?
If you use your ouwn implementation - try debug it and all will be clean
:))

Good luck!


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 20, 2003 10:32 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] database connections - how do they work?


I have posted this question two times and have not yet  received an
answer. I realize that perhaps I am ignorant as to the inner workings of
Castor, but I would still appreciate a reply.

I use a JNDI DataSource that implements a connection pool and I specify
it like this in the database.xml:

<database name="cudd_nic_dev2" engine="sql-server">
   <jndi name="java:comp/env/jdbc/esub2"/>
   <mapping href="mapping.xml"/>
</database>

Now my question is:  what does the org.exolab.castor.jdo.Database object
represent?  In other words, if I have one instance of a database and two
threads try to use it at the same time, will they be using the same
physical database connection, or does database give each a connection
from the pool?

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to