Re: {Spam?} RE: DODS problem

David Simón <[email protected]>
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
Hi,


I am using Shark 1.0 and I need to extend audit manager to insert some
stuff in a new table whenever an assignment happens. It is the first
time I am using DODs and I have generated the Java and the SQL
statements thorugh the tool that comes with Shark. I have changed the
event manager in the Shark.conf to call our particular one. In this
class I extend the default DODSManager and I have added the next code:

        super.persist(aea,ti);
        TestDO DOTest;
        try {
            
            DOTest = TestDO.createVirgin
(((SharkDODSTransaction)ti).getDODSTransaction());
        // when these attributes are persisted - they never change
        if (!DOTest.isPersistent()) {
            DOTest.setPackageInstanceId(aea.getPackageId());
            DOTest.setProcessInstanceId(aea.getProcessId());
            DOTest.setVersion(1);
           ((SharkDODSTransaction)ti).store(DOTest);
        }
        } catch (DatabaseManagerException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ObjectIdException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (DataObjectException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (NonUniqueQueryException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

Appareantly all works fine because I get to execute
"((SharkDODSTransaction)ti).store(DOTest)" and no exception is thrown,
but when I go to the table, there is no data in it. This is my unique
interaction with DODS, where have I got wrong? I have to do anything
else?

I would be grateful if someone could help me.

Best regards, 

David.
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.