This one time, at band camp, Fabio Andr�s Zorzan said:
FAZ> I send you the transactioon code:
FAZ>
FAZ>
FAZ> db=this.getConnection();
FAZ> db.begin();
FAZ> oql=db.getOQLQuery("select a from
FAZ>domain.metaSystem.style.PLColor a ");
FAZ> results=oql.execute();
FAZ> Object o;
FAZ> while(results.hasMoreElements())
FAZ> {
FAZ> o=((Object)results.next());
FAZ> v.add(o);
FAZ> }
FAZ> db.commit();
FAZ> return v;
So what exactly does does the getConnection() method do?
Bruce
FAZ> --- Bruce Snyder <[EMAIL PROTECTED]> escribi�: > This
FAZ>one time, at band camp, Fabio Andr�s Zorzan
FAZ>> said:
FAZ>>
FAZ>> FAZ>Hi,
FAZ>> FAZ> I am having problems when a OQLQuery gives as
FAZ>> a
FAZ>> FAZ>result more than 20 Objects, the exception is:
FAZ>> FAZ>"java.lang.IllegalStateException: Transaction
FAZ>>
FAZ>FAZ>org.exolab.castor.jdo.engine.TransactionContextImpl@60877b
FAZ>> FAZ>does not hold the read lock:
FAZ>> FAZ>domain.metaSystem.style.PLColor/21/40 -/-!"
FAZ>> FAZ>This exception is genereted in the Commit
FAZ>> trasaction.
FAZ>> FAZ>
FAZ>> FAZ>What can be happening?
FAZ>> FAZ>Thanks for your help.
FAZ>> FAZ>Fabio.
FAZ>> FAZ>
FAZ>> FAZ>mapping file of class PLColor
FAZ>> FAZ>
FAZ>> FAZ>
FAZ>> FAZ>
FAZ>> FAZ><?xml version="1.0" encoding="UTF-8"?>
FAZ>> FAZ><!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor
FAZ>> Object
FAZ>> FAZ>Mapping DTD Version 1.0//EN"
FAZ>> FAZ>"http://castor.exolab.org/mapping.dtd">
FAZ>> FAZ><mapping>
FAZ>> FAZ>
FAZ>> FAZ> <class
FAZ>> name="domain.metaSystem.style.PLColor"
FAZ>> FAZ>identity="id" key-generator="MAX"
FAZ>> access="shared"
FAZ>> FAZ>auto-complete="false">
FAZ>> FAZ> <cache-type type="unlimited"/>
FAZ>> FAZ><description>PLColor definition</description>
FAZ>> FAZ> <map-to table="pl_color" xml="pl_color"
FAZ>> />
FAZ>> FAZ> <field name="id" type="long"
FAZ>> required="false"
FAZ>> FAZ>direct="false" lazy="false" transient="false">
FAZ>> FAZ> <sql name="id" type="bigint"
FAZ>> FAZ>read-only="false" dirty="check" />
FAZ>> FAZ> <xml name="id" node="attribute" />
FAZ>> FAZ> </field>
FAZ>> FAZ> <field name="r" type="integer"
FAZ>> FAZ>required="false" direct="false" lazy="false"
FAZ>> FAZ>transient="false">
FAZ>> FAZ> <sql name="r" type="tinyint"
FAZ>> FAZ>read-only="false" dirty="check" />
FAZ>> FAZ> <xml name="r" node="element" />
FAZ>> FAZ> </field>
FAZ>> FAZ> <field name="g" type="integer"
FAZ>> FAZ>required="false" direct="false" lazy="false"
FAZ>> FAZ>transient="false">
FAZ>> FAZ> <sql name="g" type="tinyint"
FAZ>> FAZ>read-only="false" dirty="check" />
FAZ>> FAZ> <xml name="g" node="element" />
FAZ>> FAZ> </field>
FAZ>> FAZ> <field name="b" type="integer"
FAZ>> FAZ>required="false" direct="false" lazy="false"
FAZ>> FAZ>transient="false">
FAZ>> FAZ> <sql name="b" type="tinyint"
FAZ>> FAZ>read-only="false" dirty="check" />
FAZ>> FAZ> <xml name="b" node="element" />
FAZ>> FAZ> </field>
FAZ>> FAZ> <!-- PLColor has reference to many
FAZ>> FAZ>GenericPanelConfig 1 to N-->
FAZ>> FAZ> <field name="genericPanelConfigs"
FAZ>>
FAZ>FAZ>type="domain.metaSystem.style.GenericPanelConfig"
FAZ>> FAZ>required="false" direct="false" lazy="false"
FAZ>> FAZ>collection="vector" transient="false">
FAZ>> FAZ> <sql
FAZ>> many-key="back_ground_pl_color_id"
FAZ>> FAZ>read-only="false" dirty="check" />
FAZ>> FAZ> <xml name="genericPanelConfigs"
FAZ>> FAZ>node="element" />
FAZ>> FAZ> </field>
FAZ>> FAZ> <!-- PLColor back ground has reference
FAZ>> to many
FAZ>> FAZ>ComponentConfig 1 to N-->
FAZ>> FAZ> <field
FAZ>> name="componentConfigBackgrounds"
FAZ>> FAZ>type="domain.metaSystem.style.ComponentConfig"
FAZ>> FAZ>required="true" direct="false" lazy="false"
FAZ>> FAZ>collection="vector" transient="false">
FAZ>> FAZ> <sql
FAZ>> many-key="back_ground_pl_color_id"
FAZ>> FAZ>read-only="false" dirty="check" />
FAZ>> FAZ> <xml
FAZ>> name="componentConfigBackgrounds"
FAZ>> FAZ>node="element" />
FAZ>> FAZ> </field>
FAZ>> FAZ>
FAZ>> FAZ>
FAZ>> FAZ> <!-- PLColor font color has reference to
FAZ>> many
FAZ>> FAZ>ComponentConfig 1 to N-->
FAZ>> FAZ> <field name="componentConfigFonts"
FAZ>> FAZ>type="domain.metaSystem.style.ComponentConfig"
FAZ>> FAZ>required="false" direct="false" lazy="false"
FAZ>> FAZ>collection="vector" transient="false">
FAZ>> FAZ> <sql
FAZ>> many-key="font_color_pl_color_id"
FAZ>> FAZ>read-only="false" dirty="check" />
FAZ>> FAZ> <xml name="componentConfigFonts"
FAZ>> FAZ>node="element" />
FAZ>> FAZ> </field>
FAZ>> FAZ>
FAZ>> FAZ> </class>
FAZ>> FAZ></mapping>
FAZ>>
FAZ>> Fabio,
FAZ>>
FAZ>> Please post the OQL query that is being used. Also,
FAZ>> please post the
FAZ>> relevant code from where the transactions and the
FAZ>> OQL query are employed.
FAZ>>
FAZ>> Bruce
FAZ>> --
FAZ>> perl -e 'print
FAZ>>
FAZ>unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
FAZ>>
FAZ>>
FAZ>-----------------------------------------------------------
FAZ>>
FAZ>> If you wish to unsubscribe from this mailing, send
FAZ>> mail to
FAZ>> [EMAIL PROTECTED] with a subject of:
FAZ>> unsubscribe castor-dev
FAZ>>
FAZ>
FAZ>_________________________________________________________
FAZ>Do You Yahoo!?
FAZ>Informaci�n de Estados Unidos y Am�rica Latina, en Yahoo! Noticias.
FAZ>Vis�tanos en http://noticias.espanol.yahoo.com
FAZ>
FAZ>-----------------------------------------------------------
FAZ>If you wish to unsubscribe from this mailing, send mail to
FAZ>[EMAIL PROTECTED] with a subject of:
FAZ> unsubscribe castor-dev
FAZ>
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev