Subject | Re: Transactions |
---|---|
Author | rrokytskyy |
Post date | 2002-07-15T17:44:38Z |
Hi,
In general - no, this is not possible in JDBC driver. Embedded SQL
Guide applies to C/C++ preprocessor (gpre), and converts all the stuff
you find there into API calls. So, named transaction, etc. are not
available in JDBC SQL.
have complete access to TPB (Transaction Parameters Block) through
FBWrappingDataSource class.
directly (org.firebirdsql.gds.* and org.firebirdsql.jgds.* packages).
talk to database server directly. API is very similar to one described
in API Guide (it was adapted to Java, for example, if C code passes
pointer + length, we pass only array of bytes). This code was created
by Alejandro Alberola Arias and is the cornerstone of our driver.
Note, you can do this in Java, but not through JDBC interfaces. Also,
you cannot mix the code, you either go low-level and use API, or JDBC,
because JDBC driver will not provide you access to its DPB, TPB and
statement handles.
Connection.setReadOnly(true) instead.
Best regards,
Roman Rokytskyy
In general - no, this is not possible in JDBC driver. Embedded SQL
Guide applies to C/C++ preprocessor (gpre), and converts all the stuff
you find there into API calls. So, named transaction, etc. are not
available in JDBC SQL.
> If you read the Interbase Embedded SQLGuide, you see it's possible toThis is available through java.sql.Connection interface. Also, you
> set transaction isolation level and other things like only allowing
> it to read.
have complete access to TPB (Transaction Parameters Block) through
FBWrappingDataSource class.
> Moreover there are lots of examples that use multipe transactionsMultiple transactions per connection are available only when using API
> with names an everything. I believe all the examples are based in
> some preprocessor that allows you to put sql statements between C
> code, and it requires declaring the names as C pointers...
directly (org.firebirdsql.gds.* and org.firebirdsql.jgds.* packages).
> Is ther a way to change the default behavior of the defaultYes, you can go low level and use org.firebirdsql.jgds.GDS_Impl to
> transaction o to create multiple transactions per connection using
> Java?
talk to database server directly. API is very similar to one described
in API Guide (it was adapted to Java, for example, if C code passes
pointer + length, we pass only array of bytes). This code was created
by Alejandro Alberola Arias and is the cornerstone of our driver.
Note, you can do this in Java, but not through JDBC interfaces. Also,
you cannot mix the code, you either go low-level and use API, or JDBC,
because JDBC driver will not provide you access to its DPB, TPB and
statement handles.
> does this require support from the Driver implementation? is itNo, you cannot execute such statement. Use
> possible to call SET TRANSACTION READ ONLY;?
Connection.setReadOnly(true) instead.
Best regards,
Roman Rokytskyy