Re: {Spam?} RE: DODS problem
David Simón <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <[email protected]> |
Thank you, that worked. Maybe it is not the best solution but it seems
the only one :-(
Regards,
David.
> Hello David
>
> you wrote:
> >
> > Could anyone help me in the use of DODS please? It is very urgent. Below
> > my explanation.
>
> You'll need to rewrite Buffer class too. It's Shark way of holding all
> database writes until end of transaction. Buffer class (in
> SharkUtilities/DODS) filters your TestDO out, and never write it into db :-(
>
> >>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.
>
> regards
>
> plain text document adjunto (message-footer.txt)
>
> --
> 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
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