Transaction Isolation level in EJB 2.0


EJB programming & troubleshooting: Transaction Isolation level in EJB 2.0

  1. Transaction Isolation level in EJB 2.0 (4 messages)

    Does anyone know how the isolation levels are set in EJB2.0? Is this done in the deployment descriptor?
  2. Transaction isolations levels are set using a resource-dependent API. You can only do this in a BMP bean. For instance, to set the isolation level of a DB connection simply use the java.sql.Connection API.
    The only way to do this is programmatic (i.e, can't use deployment descriptor) because the meaning and values of isolation levels are resource specific.

  3. I read that you can't use the deployment descriptors to set isolation levels as of EJB1.1(I think). The hope at that time was that this would be corrected by EJB2.0. So my question really was, has anything been done?
  4. Some may argue, but I don't think it is EJB's responsibillity to make progress in this direction.
    The problem that stops EJB from defining a standard declarative format for isolation levels is that there is no standard for isolation level types. SQL defines it's own 4 levels, and different resources use other "levels". I doubt a standard for isolation levels can be defined, but anyway it is not EJBs responsibillity, IMHO. If a standard is defined, then DTP protocols should be updated to support it. And then JTA can support the standard, and EJB can use it.
    I don't see that happening in the next 5 years, atleast... So don't hold your breath :)

  5. Transaction Isolation level in EJB 2.0[ Go to top ]

    Weblogic allows it in the vendor-specific part of the deployment descriptor.