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

Multiple SyncProxy Instances

Hello,

I am using m8.

I am confused about how to deal with more than one os-remoting:sync-proxy in a Spring application context file when using <os-remoting:annotation-support/> and @SyncProxy.

The exception I am encountering is:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'No GigaSpaces name given and factory contains several' is defined

The documentation says:

If there are more than one GigaSpace beans defined within the application context, the ID of the giga-space bean needs to be defined on the annotations.

This sounds odd, as you would expect the conflict to occur if there was more than one SyncProxy, not more than one GigaSpace. Logically it seems that @SyncProxy should support a

@SyncProxy(name="<name of="" your="" proxy="" bean="">")

attribute that would take the name of the SyncProxy bean as its value, but it has no such attribute.

Nevertheless, I have tried setting the GigaSpace value:

@SyncProxy(gigaSpace="localSpaceTwoWrite")

but that just changes the exception to:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spaceTwoWriteBean' defined in file [/home/dan/workspace/TwoPUsClient/TwoPUsClient.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'No GigaSpaces found for name [localSpaceTwoWrite]' is defined

I have worked around this by using setters in my code and reference assignments in my application context file, but I would like to know how to make this work with @SyncProxy.

I am uploading my code, but even a minimal case contains many files, and adjustments have to be made in both the application context file and the bean source code to illustrate the various behaviors. I think it would make sense to begin by understanding whether:

  1. The documentation is correct whent it says to provide a GigaSpace name to @SyncProxy.

  2. This feature (ability to user more than one os-remoting:sync-proxy with <os-remoting:annotation-support/>) has been tested and shown to work with m8.

If you do choose to run the example, note that it takes about 10 seconds to complete because there are configurable sleeps in the two writers that are currently set to 5 seconds each.

Many thanks.

-Dan

Multiple SyncProxy Instances

Hello,

I am using m8.

I am confused about how to deal with more than one os-remoting:sync-proxy in a Spring application context file when using <os-remoting:annotation-support/> and @SyncProxy.

The exception I am encountering is:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'No GigaSpaces name given and factory contains several' is defined

The documentation says:

If there are more than one GigaSpace beans defined within the application context, the ID of the giga-space bean needs to be defined on the annotations.

This sounds odd, as you would expect the conflict to occur if there was more than one SyncProxy, not more than one GigaSpace. Logically it seems that @SyncProxy should support a

@SyncProxy(name="<name of="" your="" proxy="" bean="">")

attribute that would take the name of the SyncProxy bean as its value, but it has no such attribute.

Nevertheless, I have tried setting the GigaSpace value:

@SyncProxy(gigaSpace="localSpaceTwoWrite")

but that just changes the exception to:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spaceTwoWriteBean' defined in file [/home/dan/workspace/TwoPUsClient/TwoPUsClient.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'No GigaSpaces found for name [localSpaceTwoWrite]' is defined

I have worked around this by using setters in my code and reference assignments in my application context file, but I would like to know how to make this work with @SyncProxy.

I am uploading my code, but even a minimal case contains many files, and adjustments have to be made in both the application context file and the bean source code to illustrate the various behaviors. I think it would make sense to begin by understanding whether:

  1. The documentation is correct whent it says to provide a GigaSpace name to @SyncProxy.

  2. This feature (ability to user more than one os-remoting:sync-proxy with <os-remoting:annotation-support/>) has been tested and shown to work with m8.

If you do choose to run the example, note that it takes about 10 seconds to complete because there are configurable sleeps in the two writers that are currently set to 5 seconds each.

Many thanks.

-Dan