Hi,
i'm currently facing a problem with a trigger.
I created 2 tables:
-communication
-communication_data
The trigger i created for communication is of type ( after insert or update on status for each row)
whenever an insert is done in communication the trigger is raised and a dbms_alert is raised. The coding that listens to this alert does a read from the 2 tables and starts up a webservice communication.
So far so good but whenever this webservice has retrieved some data it's sending a reply (insert in the data table and an update of the status in the communication table)
After this status update i am intrepreting/converting the reply and doing inserts in other tables.
But when i try this its always throwing me this trigger mutating error.
I googled a bit and understand that this error is thrown when a trigger references the table that owns the trigger. But at the moment that the reply is coming back, everything is committed so i would assume that the 2nd raise of the trigger is a completely different action, no?
I found that it could be a help to start using autonomous transactions. I could also do the data conversion later on and triggered by other coding but than this increases the total execution time and i could be impacting endusers.
i am doing this on a oracle 11g database and for simulating the webservice communication i am using a stored procedure which is listening to this alert and providing the reply.
should i reconsider this way of working or are there any alternatives that can make this work?
thanks in advance.
Koen
i'm currently facing a problem with a trigger.
I created 2 tables:
-communication
-communication_data
The trigger i created for communication is of type ( after insert or update on status for each row)
whenever an insert is done in communication the trigger is raised and a dbms_alert is raised. The coding that listens to this alert does a read from the 2 tables and starts up a webservice communication.
So far so good but whenever this webservice has retrieved some data it's sending a reply (insert in the data table and an update of the status in the communication table)
After this status update i am intrepreting/converting the reply and doing inserts in other tables.
But when i try this its always throwing me this trigger mutating error.
I googled a bit and understand that this error is thrown when a trigger references the table that owns the trigger. But at the moment that the reply is coming back, everything is committed so i would assume that the 2nd raise of the trigger is a completely different action, no?
I found that it could be a help to start using autonomous transactions. I could also do the data conversion later on and triggered by other coding but than this increases the total execution time and i could be impacting endusers.
i am doing this on a oracle 11g database and for simulating the webservice communication i am using a stored procedure which is listening to this alert and providing the reply.
should i reconsider this way of working or are there any alternatives that can make this work?
thanks in advance.
Koen