Why don't you do this:
public void dumbStoreTest() {
try {
org.odmg.Transaction tx = odmg.newTransaction();
tx.begin();
@[email protected] club = new
@[email protected]();
tx.lock( club, org.odmg.Transaction.WRITE );
club.setName( "Howard" );
club.setLabel( "Mr. Howard" );
tx.commit( );
System.err.println( "club id: " + club.getId() );
} catch( Exception e ) {
e.printStackTrace();
System.exit(1);
}
}
I don't understand this either but it seem that you must show some changes
to the object after you've locked it.
Hope this helps,
-----Original Message-----
From: Chris Rossi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 9:06 AM
To: [EMAIL PROTECTED]
Subject: ODMG problem with 0.9.8
Hello, I am in the middle of upgrading from OJB 0.9.7 to 0.9.8. I am
using the ODMG interface. What I've found is that the method I was
using to store objects no longer works. The following test method works
with 0.9.7 but not with 0.9.8:
public void dumbStoreTest() {
try {
org.odmg.Transaction tx = odmg.newTransaction();
tx.begin();
@[email protected] club = new
@[email protected]();
club.setName( "Howard" );
club.setLabel( "Mr. Howard" );
tx.lock( club, org.odmg.Transaction.WRITE );
tx.commit( );
System.err.println( "club id: " + club.getId() );
} catch( Exception e ) {
e.printStackTrace();
System.exit(1);
}
}
An exception is not thrown. The commit() just quietly does nothing.
Any ideas?
chris rossi
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
_________________________________________________________________________
Introducing the all new and improved continental.com. With a totally new
personalized design, it's the best place to go. Before you go.
Continental Airlines. Work Hard. Fly Right.
http://www.continental.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>