And Derby doe snot have a similar parameter ?

Werner

Stephen Ince wrote:
Just a guess. My thinking was that maybe postgres got a connection out of the pool that was initially read-only and didn't set it read/write.

Steve
----- Original Message ----- From: "Werner Guttmann" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, January 25, 2008 4:30 PM
Subject: Re: [castor-user] read-only connection for generating keys for postgres.


Interesting, indeed. How did you come about this solution for postgreSQL, if I may ask ?

Werner

Stephen Ince wrote:
Werner,
    I think I solved the problem for postgres but not derby.
 <mapping>
<key-generator name="HIGH-LOW" alias="keygen">
:
<param name="same-connection" value="false"/>
</key-generator>
</mapping>
This seemed to worked for postgres. With derby I get a similiar error.
Nested error: java.sql.SQLException: An SQL data change is not permitted for a read-only connection, user or database.: An SQL data change is not permitted for a read-only connection, user or database.
 Steve
----- Original Message -----
From: "Werner Guttmann" <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
To: <[email protected] <mailto:[email protected]>>
Sent: Friday, January 25, 2008 3:48 PM
Subject: Re: [castor-user] read-only connection for generating keys for postgres.

 > Stephen,
 >
> can you supply me with a test case (packaged as part of a Jira issue) so
 > that I could easily replay this problem ?
 >
 > Regards
 > Werner
 >
 > Stephen Ince wrote:
>> I am getting the following error when I try to save an object using a
 >> key sequence.
 >> This works fine for oracle, sqlserver, hsqldb and db2.
 >>
>> Here is my database.xml. Is there something I can do it to force castor >> to use a different connection to get the keys or change connection from
 >> read-only to non read-only?
 >>
 >> org.exolab.castor.jdo.keygen.MaxKeyGenerator:
 >> org.postgresql.util.PSQLException: ERROR: transaction is read-only.:
 >> ERROR: transaction is read-only
 >>
>> <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
 >> "http://castor.exolab.org/mapping.dtd";>
 >> <mapping>
 >> <key-generator name="HIGH-LOW" alias="keygen">
 >> <param name="table" value="seq"/>
 >> <param name="key-column" value="seq_table_name"/>
 >> <param name="value-column" value="max_pk_value"/>
 >> <param name="grab-size" value="50"/>
 >> <param name="same-connection" value="true"/>
 >> </key-generator>
 >> </mapping>
 >>
 >> Steve
 >>
>> ---------------------------------------------------------------------
 >> To unsubscribe from this list please visit:
 >>
 >>    http://xircles.codehaus.org/manage_email
 >>
 >>
 >
 >
 > ---------------------------------------------------------------------
 > To unsubscribe from this list please visit:
 >
 >    http://xircles.codehaus.org/manage_email
 >
 >


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to