> 1) I understood that every Application Server (especially Websphere)
> supports Connection Pooling for only some databases like Sybase, Oracle or
> DB2

AFIK, Application Servers use transactional systems of the database as
such, transactioonal support of App Servers depends on wether or not
your database supports transactions.

>
>
> 2) I understood also that we have problem with transactions if we don't
> obtain a datasource from a connection pooling.
> The problem is the following : if you access directly JDBC (without using
> Datasources) than every sqlstatement is commited at the time you close your
> connection. Or, if every bean commit its statements than transaction don't
> have any sense (how can roolback the whole transaction?)

JDBC supports transactions in the same way, more or less, as the
applications server:
Connection conn = getConnection(); // begin an new transaction..
conn.setAutoCommit(false); // no automatic commit
<snip>
conn.commit(); // transaction is commited, and a new transaction is begun
<snip>
smt2.execute(q1);
int i = smt.executeUpdate(query);
if (i < 5) conn.rollback(); // transaction is being rolled back.

if autocommit is true, all sql statements are executed as single
transaction. (This is the default). Otherwise transactions are
demarcated by commit() and rollback().

> If so, how can i manage transactions in the case Connection Pooling is not
> supported for my database (datacom, IDMS, ..)?

How so, connection pooling not being supported by your database?? Or do
you mean connection pooling as in JDBC2 by use of the DataSource?? AFIK
this is not the way connection pooling is implemented in most AppServers
they have their own implementations of connection pools. Transactions do
not depend on this.

>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to