[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Adding some member to an instrumented class  XML
Forum Index -> Terracotta for Spring
Author Message
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?

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?
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.
Tim Eck

journeyman
[Avatar]
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.
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!
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?
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
[WWW]
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.

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.
[WWW]
 
Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team