Subject Re: [Firebird-Java] Re: Non-numeric primary key
Author Roman Rokytskyy
> With Firebird on JBoss, I understand that the transaction isolation
> is set on the firebird-ds.xml file (which is placed in the deploy
> directory for the JBoss server, in my case it is default).

I think firebird-ds.xml is the wrong place for this.

I mark my entity bean transaction modes as Requires New and use a statefull
session bean facade. This is the EJB-server neutral way - any operation on
your sequence bean will be executed in separate transaction context and will
be committed afterwards. No database-specific tuning is needed.

> If I were to set TransactionIsolationName to
> TRANSACTION_SERIALIZABLE would that apply to all entity beans for my
> deployment?

I do not know whether JBoss changes the transaction isolation of the JDBC
connection. This property tells only that all connections returned from the
pool will have TRANSACTION_SERIALIZABLE. Though the container can set
different isolation mode. This also has nothing to do with the transaction
properties of the EJB.

> Also, what is the default locking behaviour in Firebird,
> optimistic/pessimistic etc (any links on documentation pertaining to
> this would be appreciated).

Optimistic via multi-generational architecture. The SELECT FOR UPDATE will
also result in optimistic locking. I doubt that application servers know
about SELECT FOR UPDATE WITH LOCK (true pessimistic locking in Firebird).
See http://ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_bill_todd_mga , but
you do not need to care of this in your J2EE - Firebird guarantees that
database will be in consistent state. How it manages this is the problem of
Firebird.

Roman