Author |
Message |
04/30/2007 03:03:30
|
vijay
journeyman
Joined: 03/02/2007 06:07:24
Messages: 22
Offline
|
Hi all,
If I need to add some new member to an instrumented class then do I have to specify the change somewhere else?
I tried to add a new method to com.tc.object.bytecode.ManagerUtil class but when I executed it, a NoSuchMethodError is thrown. Do I need to provide some more specifications?
|
|
|
04/30/2007 07:04:52
|
ovoid
journeyman
Joined: 05/24/2006 15:10:00
Messages: 11
Offline
|
Could you provide a little more context? What are you trying to add to ManagerUtil and why?
|
|
|
04/30/2007 07:29:58
|
ovoid
journeyman
Joined: 05/24/2006 15:10:00
Messages: 11
Offline
|
If all you want to do is add a field to the class of a shared object, you probably don't need to do anything other than add the field to the class. New fields on already shared objects will be null or default value if those fields are not initialized in the default constructor of the class.
|
|
|
04/30/2007 11:36:46
|
Tim Eck
journeyman
Joined: 01/25/2007 08:57:02
Messages: 47
Location: San Mateo, CA
Offline
|
I second the question on the need to modify ManagerUtil, very curious :-)
I'm guessing here, but if you're putting a modified ManagerUtil class anywhere besides the dso boot jar, a NoSuchMethodError is bound to happen. Updated the copy in tc.jar, or trying add to your own in CLASSPATH or something will not override the one in the boot jar.
|
|
|
04/30/2007 17:08:10
|
kbhasin
consul
Joined: 12/04/2006 13:08:21
Messages: 340
Offline
|
If I need to add some new member to an instrumented class
It will also be helpful to know the class you are talking about. Is it one of the JDK Runtime Classes (pre-instrumented in the Terracotta boot-jar) or some Class which is a part of your application?
Thanks!
~ Kunal.
|
Regards,
Kunal Bhasin,
Terracotta, Inc.
Be a part of the Terracotta community: Join now! |
|
|
05/06/2007 23:00:28
|
vijay
journeyman
Joined: 03/02/2007 06:07:24
Messages: 22
Offline
|
Hi all,
Actually I am trying to publish an event on a single context that is the intended reciever of the event. For that I had to make some changes in the ManagerUtil, ManagerImpl & DistributedMethodCallManagerImpl classes.
Are there any works going on this particular context?
|
|
|
05/07/2007 23:28:06
|
ekulesho
master
Joined: 12/04/2006 08:49:08
Messages: 57
Offline
|
vijay wrote:
Actually I am trying to publish an event on a single context that is the intended reciever of the event. For that I had to make some changes in the ManagerUtil, ManagerImpl & DistributedMethodCallManagerImpl classes.
Are there any works going on this particular context?
How it is different from the functionality that Terracotta for Spring already provides? http://terracotta.org/confluence/display/docs1/Spring+Quick+Start#SpringQuickStart-Events
|
|
|
05/07/2007 23:53:35
|
vijay
journeyman
Joined: 03/02/2007 06:07:24
Messages: 22
Offline
|
Hi,
Currently Terracotta publishes a particular event to all clients within a logical context. But we had a requirement of publishing that event to one of the clients within that logical context and the other clients' invoker thread won't even be notified for that event. This change was specific to our requirement.
|
|
|
05/08/2007 07:33:01
|
ekulesho
master
Joined: 12/04/2006 08:49:08
Messages: 57
Offline
|
vijay wrote:
Currently Terracotta publishes a particular event to all clients within a logical context. But we had a requirement of publishing that event to one of the clients within that logical context and the other clients' invoker thread won't even be notified for that event. This change was specific to our requirement.
That is correct and it is done because it is hard for us to declaratively specify which clients need to receive what events. Actually, it is possible do something like that if you'll directly use DMI, then events will be distributed to the clients who hold the instance on which distributed method is invoked.
To make it more flexible for the client code, you actually don't have to use DMI, and instead can create LinkedBlockingQueue per event consumer and hook a thread or the thread pool that would pickup messages from the queue. Then you can register those queues in the event creator, so it would just add each event to all registered queues. Then in order to handle situation when client went down, event producer should also subscribe to cluster notification and unregister queues from clients that went down.
|
|
|
|