Hi
I want use an O/R in a long-transactional application (multitier) that
concur
with another application that makes direct access on my db. I'm tring
Castor
that matches all requirements but I found that id does not manage a
situation
as I want; this is the code

        db = _jdo.getDatabase();

  // First transaction: I read the value object

        db.begin();
          TestataOrdineVO to= (TestataOrdineVO) db.load(
TestataOrdineVO.class, new Integer(1) );
        db.commit();

  // Second transaction: I read the same value object

  // In the next row I put a breakpoint and before resume I modify the
  // field Codice_Ordine on my db

        db.begin();
          TestataOrdineVO t0= (TestataOrdineVO) db.load(
TestataOrdineVO.class, new Integer(1) );
          System.out.println(t0.getCodiceOrdine());
        db.commit();

The value printed is the old value! Infact the object loaded in the second
transaction comes from the cache.
Is there a solution to have the real value? May I "bypass" the cache system
in any way?
DB: Sql Server 2000
Follow the mapping for TestataOrdineVO.

<mapping>
  <class name="vo.TestataOrdineVO" access="shared" identity="id" >
    <description>Testata Ordine</description>
    <map-to table="aTOrd" />
    <field name="id" type="integer">
      <sql name="id" type="integer"/>
    </field>
    <field name="codiceOrdine" type="string">
      <sql name="Codice_Ordine" type="char" />
    </field>
    <field name="data" type="date">
      <sql name="data" type="integer" />
    </field>
    <field name="codiceAnagrafico" type="string">
      <sql name="Codice_Anagrafico" type="char" />
    </field>
    <field name="importo" type="big-decimal"  required="true">
      <sql name="importo" type="numeric" />
    </field>
  </class>
</mapping>


AMInformatica S.r.l.
L.go Giovanni Falcone, 4
00045 Genzano di Roma
Tel.: +39 06.9391360
Fax.: +39 06.93956017
Sales: [EMAIL PROTECTED]
Support: [EMAIL PROTECTED]
Web Site: http://www.aminformatica.it

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Questo messaggio e i relativi allegati contengono informazioni
confidenziali.
Se hai ricevuto questo messaggio e non sei il diretto interessato ti
preghiamo di inviare una notifica dell'errore al mittente e di non
distribuire n� riprodurre questo messaggio ma di distruggerlo
immediatamente.

This message and any attachments contain privileged and confidential
information.
If you are not the intended recipient of this message, you are hereby
notified that any use, dissemination, distribution or reproduction of this
message is prohibited.  If you have received this message in error please
notify the sender immediately via email and then destroy this message and
any attachments.

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

Reply via email to