Andrus: Thank you for the quick response.
I'm getting strange issues with the sequence. Also, this is always in the log file after each DB access (probably correct):
2004-08-23 18:03:10,305 INFO [org.objectstyle.cayenne.access.QueryLogger] +++ no commit - transaction controlled externally.
I'm getting table updates ok, (ie, the table gets the row) but the Oracle sequence doesn't seem to be incrementing. So when I enter another row, I get a pk unique violation, and it's because the sequence hasn't been incremented. If I then force several updates, even though I get an error each time, the sequence increments, and eventually the table will accept the row.
?????
More of the log file:
2004-08-23 18:03:10,475 INFO [org.objectstyle.cayenne.access.QueryLogger] +++ no commit - transaction controlled externally.
2004-08-23 18:03:10,525 INFO [org.objectstyle.cayenne.access.QueryLogger] SELECT package_SEQ.nextval FROM DUAL
2004-08-23 18:03:10,525 INFO [org.objectstyle.cayenne.access.QueryLogger] SELECT packageproduct_SEQ.nextval FROM DUAL
2004-08-23 18:03:10,626 DEBUG [org.objectstyle.cayenne.access.ContextCommit] Creating InsertBatchQuery for DbEntity PACKAGE
2004-08-23 18:03:10,626 DEBUG [org.objectstyle.cayenne.access.ContextCommit] Creating InsertBatchQuery for DbEntity PACKAGEPRODUCT
2004-08-23 18:03:10,636 INFO [org.objectstyle.cayenne.access.QueryLogger] --- will run 2 queries.
2004-08-23 18:03:10,646 INFO [org.objectstyle.cayenne.access.QueryLogger] INSERT INTO PACKAGE (CREATEDBY, DATETIME, EDITEDBY, ENTITYID, ID, ISCOMPLETE, ISDELETED, LOCATIONID, NAME, PACKAGETYPEID, PARENTID, REASONID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2004-08-23 18:03:10,646 INFO [org.objectstyle.cayenne.access.QueryLogger] [batch bind: 'Bill Smith', '2004-08-23 18:02:00.0', NULL, 23, 172, 0, 0, 8, 'D|082304 18:02', 1, NULL, 0]
2004-08-23 18:03:10,656 INFO [org.objectstyle.cayenne.access.QueryLogger] *** error.
java.sql.SQLException: ORA-00001: unique constraint (HACCP.PK_PACKAGE) violated
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321)
at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java:1741)
.. more output
2004-08-23 18:03:10,676 INFO [org.objectstyle.cayenne.access.QueryLogger] *** no rollback - transaction controlled externally.
2004-08-23 18:03:10,686 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract void com.virtuant.mobilitee.ehc.ejb.PackageBrokerLocal.update(com.virtuant.mobilitee.ehc.soapclasses.PackageExt) throws org.objectstyle.cayenne.CayenneRuntimeException,java.lang.Exception, causedBy:
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1-dev July 22 2004] Commit Exception
at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1226)
at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1187)
---------- Original Message -------------
Subject: Re: JBoss transactions
Date: Tue, 24 Aug 2004 12:56:09 -0400
From: Andrus Adamchik <andru..bjectstyle.org>
To: cayenne-use..bjectstyle.org
Hi David,
Normally all that is needed is checking "Container-Managed
Transactions" checkbox for the domain in the Modeler. For example
"ejb-facade" Cayenne example works with JBoss without any extra
configuration beyond this checkbox.
Andrus
On Aug 23, 2004, at 9:28 PM, David Norwood wrote:
> I know I've seen it somewhere, but after trolling the archives I can't
> locate the answer to this, but
>
> does anyone have an example of how to configure JBoss to manage
> Cayenne transactions? It seems that it'll be different from CMP 2.0,
> but I can't see how it's done.
>
> Reason is: I'm losing transactions in JBoss (getting the 'no commit --
> transaction managed externally' message with missing DB rows).
>
> TIA,
>
> -david
>
This archive was generated by hypermail 2.0.0 : Tue Aug 24 2004 - 13:31:02 EDT