[Design of JBoss ESB] - Re: Design of a Content Based Routing Service
by ddunkin
anonymous wrote : I think the first question to ask is: why multiple destinations? The answer to that will impact the rest.
I have a ProcessPurchaseOrder document that comes into the system. That document is routed to the order management system for the supplier identified in the document. Now what I want to do is send a copy of all ProcessPurchaseOrder documents to a component that will extract certain information and store it for statistical analysis. It's a separation of concerns. The listener doesn't need to know anything about the statistical analysis. Neither does the order management system.
Another example is a document that contains hours worked on a case where the employee working the case is paid billable time. That document should go to both receivables, so that the client can be billed, and to payroll, so the employee can be paid.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980756#3980756
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980756
19 years, 5 months
[Design of JBossCache] - Re: Eviction thread behaviour
by bstansberry@jboss.com
"ben.wang(a)jboss.com" wrote :
| I don't think it is necessarily true that if a node has a read/write lock, it should not be evicted. Take for example the eivction policy of FIFO or policy with a node max age. Both will evict the corresponding node even when it just has been accessed.
|
I understand what you mean about FIFO or max age, but if eviction doesn't respect locks that can lead to serious problems; i.e. user thread doing a get acquires a lock in PessimisticLockInterceptor, then eviction thread evicts node, then user thread reaches TreeCache._get, which does a findNode, gets nothing and returns null. No chance to reload from the cache loader as the user thread is already past the interceptor.
Writing the above sparked a tangential thought; may be terrible, haven't thought about implications, etc. When an interceptor finds a node, why not throw it in the InvocationContext or something similar and pass it through the stack that way? Subsequently calls to find the node can check the context first before walking the cache tree. Saves redundant walking of the tree.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980728#3980728
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980728
19 years, 5 months