[jboss-dev-forums] [Design of JBossCache] - Re: Listener Notifications to happen asyncronously?

bstansberry@jboss.com do-not-reply at jboss.com
Mon Jun 25 18:36:17 EDT 2007


Thanks for the link Jason. That thread happened when was out and when I read it last Tue AM it didn't sink in.

When we think about these notifications, we shouldn't assume people necessarily want to misbehave and call back into the cache. I used to have to make get calls into the cache to do what I needed, but that's no longer needed w/ the new API that provides the data. But, I still need dependable timing and dependable locking semantics.

I'll be specific about AS use cases:

1) For EJB3 SFSB, I get nodePassivated/nodeActivated notfications.  I get the target bean from the notification-provided Map and invoke any @PrePassivate/@PostActivate methods.  This *must* be done synchronously, before the bean is serialized.  (There's no tx involved here.)

2) For web sessions, notifications tell me that a session has been modified remotely.  The session manager needs to know this, and the notification needs to arrive in a timely manner, with the WL on the cache nodes serving as a nice concurrency guard for the session.  Getting the notifications at tx commit would be fine, as long as the WL is still held.

#2 will likely someday be redesigned, but I'd prefer not to have to do that now.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057517#4057517

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057517



More information about the jboss-dev-forums mailing list