Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The number-of-backups property is relevant only for statefull PU - a PU that have a space bean with an embedded URL (e.g "/./mySpace").

If you deploy a war file that connects to a remote space - URL is in the format :

jini://*/*/mySpace

This is considered a stateless PU. In this case the number-of-backups property is irrelevant and ignored.

You can have a bean that is injected with an embedded GigaSpace that is activated only with a primary space partition that can write objects into the space once fully deployed and started.

Deployed PU is first provisioned into am empty GSC. If you want to control to which GSCs a deployed PU will be provisioned you should use zones. See: http://wiki.gigaspaces.com/wiki/display/XAP96/Configuring+the+Processing+Unit+SLA#ConfiguringtheProcessingUnitSLA-DeploymentRequirementsHosts%2CZonesandMachineUtilization

class MyBean {
    // invoked after a space becomes primary; doesn't get any parameter. 
    @PostPrimary
    public void myAfterPrimaryMethod() {
        // Do something
    }    
}

make sure you pu.xml have this:

<os-core:annotation-support />

See more: http://wiki.gigaspaces.com/wiki/display/XAP96/The+Space+Component#TheSpaceComponent-PrimaryBackupNotifications

Shay

The number-of-backups property is relevant only for statefull PU - a PU that have a space bean with an embedded URL (e.g "/./mySpace").

If you deploy a war file that connects to a remote space - URL is in the format :

jini://*/*/mySpace

This is considered a stateless PU. In this case the number-of-backups property is irrelevant and ignored.

You can have a bean that is injected with an embedded GigaSpace that is activated only with a primary space partition that can write objects into the space once fully deployed and started.

Deployed PU is first provisioned into am an empty GSC. If you want to control to which GSCs a deployed PU will be provisioned you should use zones. See: http://wiki.gigaspaces.com/wiki/display/XAP96/Configuring+the+Processing+Unit+SLA#ConfiguringtheProcessingUnitSLA-DeploymentRequirementsHosts%2CZonesandMachineUtilization

class MyBean {
    // invoked after a space becomes primary; doesn't get any parameter. 
    @PostPrimary
    public void myAfterPrimaryMethod() {
        // Do something
    }    
}

make sure you pu.xml have this:

<os-core:annotation-support />

See more: http://wiki.gigaspaces.com/wiki/display/XAP96/The+Space+Component#TheSpaceComponent-PrimaryBackupNotifications

Shay