Sounds to me like its working as it should, but you don’t give a lot of information to work with ;-)
- I can't find the framework you are writing about... could you throw a link? - Is it always 3 triggers fired no matter what object is created? - Did you figure it out already? :)
You are very right, Matrix is a Framework with very little of info on the Internet. I guess it depends on that it is a product that just a few big companies buy.
How ever it looks like we can not get rid of the problem that it executes like this. This might be an inbuilt behaviour or some needed configuration that we just need to have unfortunately. (It is a very big application)
create{ //In this scope two more trigger is fired modify{ } modify{ } //...before the create is terminated. }
There for it seems like we have to build some filtering of our own.
First attempt would be to let the consumer always consume the create messages before modify messages, in this for eg the messages looking like: <xml> <object type="Car" name="Volvo" speed="150"/> </xml>
We are using a Weblogic 8.13 and we tried to do something like: TopicPublisher topicPublisher = topicSession.createPublisher(topic); topicPublisher.publish(CREATEMessage, 2, 7, timeToLive);
In this code we set the priority for create messages higher (7) then for modify messages (2). But this does not seems to work. The modify messages still seems to be consumed before the create messages.
If this would work we solve a big part of this problem.
Secondly, but at least just as important, is to minimize the traffic. That means that we of course would get rid of all modify messages when they take place during a create. I guess this means that the best way is to build some cache-object and some backgroundprocess that filter out all modify messages that in some how is connected to a create. But the problem here is how to understand which modify that is a standalone message - then it should be sent as a update message - and which one is actually connected to a create?
One way might be to timestamp all messages. All messages that is modifiy messages with the timestamp within for eg 2 sec from a create message would be removed. Not so safe I guess.
An other way might be to see if we could find some transaction id for a create. Unfortunately it does not seems like Matrix provide this or even that the create and the inside modify does not executes in the same transaction.
So if you have any idea how to best attck this problem please let me know!
Don't think i can be of much help without knowing the product.
best solution would ofcourse be to not fire the trigger for attributes on a create... i would dig into the source of the framework if possible and change the behavior there. You should try to contact the vendor.
The timestamp is not a good idea. You could create a flag and place it on the message to filter on which is set after create, not pretty and im not sure you would be minimizing traffic.
We needed to create a TimerTask that collects all calls. The timer is set to 5 sec and filter out all calls accept one. Works pretty ok but not the best solution we guess.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.