[infinispan-dev] Defining new commands in modules

Manik Surtani manik at jboss.org
Mon Oct 25 07:36:12 EDT 2010


On 11 Oct 2010, at 10:54, Galder Zamarreño wrote:

> 
> On Oct 7, 2010, at 10:23 PM, Israel Lacerra wrote:
> 
>> I think I really need initialize the command on CommandsFactoryImpl.initializeReplicableCommand. In RemoteCommandsFactory we only initialize the parameters that have been serialized.... right? 
> 
> Well, not only, see StateTransferControlCommand:
> 
>         case StateTransferControlCommand.COMMAND_ID:
>            command = new StateTransferControlCommand();
>            ((StateTransferControlCommand) command).init(transport);
>            break;
> 
> However, it feels to me that any initialization happening in RemoteCommandsFactory.fromStream() is for global, or cache manager level, components. On the other hand, CommandsFactoryImpl.initializeReplicableCommand initializes commands based on the specific target cache that the command interacts against.

Correct.
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list