[JBossCache] - How TreeCacheListener works
by spennec
Hello,
I'm trying to use a TreeCacheListener in the following situation:
- TreeCache version: 1.4.1 SP4
- There is a cluster with two members
- TreeCache is in mode INVALIDATION_SYNC and OPTIMISTIC locking scheme
When a piece of data is modified, I remove it from the cache. I expect the corresponding data to be invalidated in the other cluster member.
What I would like to do is recieve a call in the listener on cluster member A (and optionnaly B) when some piece of data is removed from cluster member B. Is that possible?
To register the listener, I've just created a subclass of AbstractTreeCacheListener, and called the following method, before calling the start() method:
treeCache.addTreeCacheListener(listener);
At this point, I've added logs in several methods, and some of them, that I expect to be called, remain silent. Here are the methods I've implemented, and only filled with logs:
| nodeRemoved
| nodeRemove
| cacheStarted
| cacheStopped
| nodeEvict
| nodeEvicted
|
|
| The methods cacheStarted and cacheStopped are called. But the other are never called, on any cluster member, even when I call remove() on the treeCache to invalidate some data.
|
| Am I not understanding the goal of the TreeCacheListener? Or did I do something wrong with the setup?
|
| Thanks a lot for your help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078755#4078755
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078755
18Â years, 8Â months
[Persistence, JBoss/CMP, Hibernate, Database] - [SessionFactoryObjectFactory] Not found:
by ssuyamboo
Hi
I am using hibernate 3 with jboss 4.0.3 .
In the start of application I am able to get connection to database.
When I tried to execute again database operations again in a while , I am getting hibernate not bound exception with message as below,
14:55:31,439 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/SessionFactory]
14:55:52,099 INFO [STDOUT] Inside doGet
14:55:52,099 INFO [STDOUT] POSTED ORDERS ARE IN GETW0111|POSOrder|Customer1|CustomerName|OrderDate|EMPTY
14:55:52,099 INFO [STDOUT] orderNumber W01115
14:55:52,099 INFO [STDOUT] posPOSOrder
14:55:52,099 INFO [STDOUT] order number and pos are not null
14:55:52,099 INFO [STDOUT] prev key nullcurr Key W0111
14:55:52,099 INFO [STDOUT] filled orders0
14:55:52,099 INFO [STDOUT] Constructing success and fail email messages
14:55:52,099 INFO [STDOUT] OrderUpdateServlet :: Begin
14:55:52,099 INFO [STDOUT] Number of success orders received 1
14:55:52,099 INFO [STDOUT] Key received inside construct SuccessEmail is W0111|POSOrder|Customer1|CustomerName|OrderDate|E
TY
14:55:52,099 INFO [STDOUT] OrderUpdateServlet :: splitSuccessOrderKey : Begin
14:55:52,099 INFO [STDOUT] OrderUpdateServlet :: splitSuccessOrderKey : End W0111 Customer1 CustomerName Ord
Date POSOrder
14:55:52,099 INFO [STDOUT] OrderUpdateServlet :: End
14:55:52,099 INFO [STDOUT] OrderUpdateServlet :: constructRejectedOrderEmail : Begin
14:55:52,099 INFO [STDOUT] OrderUpdateServlet :: constructRejectedOrderEmail : End
14:55:52,099 INFO [STDOUT] filled success orders6
14:55:52,099 INFO [STDOUT] OrderUpdateServlet :: updateOrders : Begin
14:55:52,099 INFO [STDOUT] order received inside updateOrders of OrderUpdateServlet is W0111
14:55:52,099 INFO [STDOUT] order received inside updateOrders of OrderUpdateServlet is POSOrder
14:55:52,099 INFO [STDOUT] order received inside updateOrders of OrderUpdateServlet is Customer1
14:55:52,099 INFO [STDOUT] order received inside updateOrders of OrderUpdateServlet is CustomerName
14:55:52,099 INFO [STDOUT] order received inside updateOrders of OrderUpdateServlet is OrderDate
14:55:52,099 INFO [STDOUT] order received inside updateOrders of OrderUpdateServlet is EMPTY
14:55:52,099 INFO [STDOUT] order being passed to retrieve batch idW0111
14:55:52,099 INFO [STDOUT] OrderUpdateServlet :: getBatchId : Begin
14:55:52,099 INFO [BaseDAO] BaseDAO :: findByProperty1 : Begin
14:55:52,099 INFO [BaseDAO] query passed select batchId from com.xpedx.ecommerce.order.model.OrderDTO order where order.or
rStatus = 1 and order.orderId = :PARAMand the property passed is W0111
14:55:52,099 INFO [BaseDAO] Session is null ? true
14:55:52,099 INFO [BaseDAO] Session is null
14:55:52,109 WARN [SessionFactoryObjectFactory] Not found: 2c98b24214a8e4a70114a8e4a8ef0000
14:55:52,109 ERROR [BaseDAO] Session factory itself is null. Establish session factory first
14:55:52,109 INFO [STDOUT] 1W0111
14:55:52,109 ERROR [[OrderUpdateServlet]] Servlet.service() for servlet OrderUpdateServlet threw exception
java.lang.NullPointerException
at com.xpedx.ecommerce.BaseDAO.findByProperty1
Is this something related to cache / jboss settings/ hibernate?
Have any one else experienced this?
Sun
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078748#4078748
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078748
18Â years, 8Â months
[JBoss Seam] - Re: impossible usecase?
by obfuscator
"matt.drees" wrote : No, you can't start multiple conversations in one request. And I'm pretty sure you wouldn't want to; that's not what they're designed for.
|
| As far as the post-it scenario, I don't think you want a separate backing bean for each post-it. Wouldn't it make more sense to have a single PostItController that contains a list of PostIt objects?
@Matt: thanks for your suggestions. I actually didn't think of that solution,
but while a list seems to be a good solutions in most usecases, I'm dealing with
setting up a portal-like environment. Users can select from many different
cells, mixing and matching. This means that the different
post-its can be spread out over several different fragments of the page.
I guess I could have a cell-local variable that identifies the post-it and
then all post-its share the same controller, having a list of post-its.
This has one major drawback as I see it. I must always plan for
having several components, making all my backing beans contain collections.
This is not very productive, and forces another layer upon the design.
All I want to acheive is a contextual separation of cells, so that several
instances of the same cell can coexist, with the same business logic, but
with different state. Is the "one common backing bean" pattern the only
viable solution?
Thanks
PS. Thanks ellen for the tips. I appriciate your effort and I'm sure that
I'll use your tips in a later stage. DS.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078740#4078740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078740
18Â years, 8Â months