-
1. Re: How can i track which cmp beans changed when a transacti
dsundstrom Jun 24, 2002 3:53 PM (in response to panosk)That is an interesting idea. I was acutally thinking about adding a feature where the database can inform JBoss that a row has changed, which would cause a cache flush on that entity.
I never thought that someone would want the same notifications from JBoss. I will defiantely put this in the requirements for the new JBoss cache.
In the mean time, you could add JMX notifications to the JDBCStoreEntityCommand. If you do go this route, can you post a patch at sf; I would really like to get this in. -
2. Re: How can i track which cmp beans changed when a transacti
panosk Jun 25, 2002 4:38 AM (in response to panosk)Thanks for you reply.
I don't have much experience with JBoss. I am willing to make these changes to JDBCStoreEntityCommand but i will need some guidance.
JDBCStoreEntityCommand is not a MBean so how can i post notifications?
Another issue is that i have to track when the transaction completes and then send a javagroups message to the distributed cache.
Any ideas about that? -
3. Re: How can i track which cmp beans changed when a transacti
jurrien Jun 25, 2002 8:39 AM (in response to panosk)I am very interested in this feature where the database informs Jboss that a row has changed. Can you tell me where I can find more info on this and when this feature will be available?
Thank's, great job! -
4. Re: How can i track which cmp beans changed when a transacti
dsundstrom Jun 25, 2002 1:07 PM (in response to panosk)EntityContainer is an MBean and you can get a handle to the container from JDBCStoreManager.
As for wanting transaction complete event, that is very simple, see the ApplicationTxDataSynchronization class in JDBCStoreManager. -
5. Re: How can i track which cmp beans changed when a transacti
dsundstrom Jun 25, 2002 1:17 PM (in response to panosk)> I am very interested in this feature where the
> database informs Jboss that a row has changed. Can
> you tell me where I can find more info on this and
> when this feature will be available?
It is planed for the new cache in JBoss 4.0, but you can do it today. From what I understand, all you need is for your database to send a message to JBoss when a row changes (in an update triger). It doesn't matter how the message gets to the server (a simple servlet will work). You catch the message and then invoke the flush operation on the EntityInstanceCache with JMX.
There are some companies using this strategy in production today. -
6. Re: How can i track which cmp beans changed when a transacti
panosk Jun 26, 2002 11:44 AM (in response to panosk)Thank you for your suggestions.
I made an implementation of what you suggested. I made some tests and seemed to work.
there are 3 files changed. -
7. Re: How can i track which cmp beans changed when a transacti
dsundstrom Jun 26, 2002 2:14 PM (in response to panosk)Can you generate a diff and post it as a patch on soruce forge?
-
8. Re: How can i track which cmp beans changed when a transacti
panosk Jun 28, 2002 3:41 AM (in response to panosk)Sorry but i don't know how to do that.
-
9. Re: How can i track which cmp beans changed when a transacti
dsundstrom Jun 30, 2002 2:12 PM (in response to panosk)Patches can be submitted at
http://sourceforge.net/tracker/?group_id=22866&atid=376687
You will need to get a login at sourceforge to post files, but I get the feeling this won't be the last time you submit a patch to us.
To generate a patch execute the following command from the org/jboss/ejb directory:
cvs diff -u > patch.txt
This assumes you got the source from cvs. If you did not, then just post the three files and I'll figure out the difference.
Thanks for the good work. -
10. Re: How can i track which cmp beans changed when a transacti
panosk Jul 1, 2002 4:08 AM (in response to panosk)i got the source file from sourceforge cause my company doen't allow me cvs access.
So you will have to make tha patch for me.
Tha files are attached with a previous post i made in this topic.
Thanks in advance! -
11. Re: How can i track which cmp beans changed when a transacti
dsundstrom Jul 1, 2002 12:01 PM (in response to panosk)Sourceforge has setup a hack to get around firewalls. Here is the link.
https://sourceforge.net/docman/display_doc.php?docid=768&group_id=1#firewall
Can you post the files? I'll work out the diff. -
12. Re: How can i track which cmp beans changed when a transacti
panosk Jul 3, 2002 3:35 AM (in response to panosk)I am sending the files...
-
13. Re: How can i track which cmp beans changed when a transacti
dsundstrom Jul 3, 2002 3:51 PM (in response to panosk)Create a new patch at http://sourceforge.net/tracker/?group_id=22866&atid=376687
After your second patch you get RW for the JBoss source. Yes, I can get the files from your post here, but the point is to get you used to using the regular tools. This is realy good work; now take the last step and create an official patch request at sourceforge.
If you decide not to create a patch, that is fine. We'll still patch the code. Actally, I think Sacha is going to apply this patch, because he is working on a distributed cache.