Hello werner,
well I read it (quickly :-( ) after having
problems...
But still, if I use transaction demarcation local (which I believe I
should
use for my junit tests..) I am still getting an exception..
>************** TRANSACTION LOCAL *******************
>
>com.myapp.exceptions.PersistenceException:
>org.exolab.castor.jdo.TransactionNotI
>nProgressException: No transaction in progress for the current thread
> at
>com.myapp.castor.CastorPersistenceManager.query(CastorPersistenceMana
>ger.java:155)
> at
>com.myapp.castor.CastorPersistenceManagerTest.testQueryUser(CastorPer
>sistenceManagerTest.java:150)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>java:39)
> at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
>
>
>
so, looks like 'local transaction' is the way to go for me, but could
you
tell me a possible reason for the exception above?
I am stil using the same code for inserting data into database using JDO
Database db = null;
db = _jdo.getDatabase();
db.begin();
CastorEntry entry = (CastorEntry)data;
db.create(data);
db.commit();
log.debug("Entry created..");
db.close();
is that code still valid?
Thanx and regards
marco
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user