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

Ask Your Question
0

IntegratedProcessingUnitContainer and Pojos Routing

Hello,

I'm using XAP 7.1.4 and running a PU through an IntegratedProcessingUnitContainer in Eclipse Indigo with these arguments : -cluster schema=partitioned-sync2backup total_members=3,1.
I have a simple Feeder which writes two kind of Pojos (PojoA, PojoB) to this cluster. A routing field ( Integer class ) is already defined in these pojos ( with @SpaceRouting annotation on the field getter, "1" for Pojo A and "2" for Pojo B).
That should have the effect of writing PojoA to a primary and PojoB to a different one.

However when I checked the GS UI, I found that all pojos (of the two classes) had been routed/written to all primaries of the cluster...
This doesn't happen if I create the cluster with the previous topology in GS' UI and then run the Feeder. Each Pojo is routed/written to a different primary in this case.

Any suggestion will be welcomed and thanks in advance.
Nouh

Attachments

  1. pu.xml

This thread was imported from the previous forum.
For your reference, the original is available here

asked 2012-06-04 06:05:37 -0500

nouh gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

would: {code} -cluster schema=partitioned-sync2backup total_members=2,0 {code}

works correctly?

Shay h4. Attachments

[pu.xml|/upfiles/13759702845597378.xml]

answered 2012-06-04 06:15:08 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Actually, this didn't work.

For information the classes have these annotations too : @SpaceClass(persist=true, replicate=true, fifoSupport=FifoSupport.ALL)

Nouh. h4. Attachments

[pu.xml|/upfiles/1375970285805860.xml]

nouh gravatar imagenouh ( 2012-06-04 06:28:05 -0500 )edit

as part of your pu,xml have your space url added a locators: {code} /./space?locators=<your machine="" ip=""> {code}

The eclipse project running the PU should have the following system property: java.rmi.server.hostname=<client ip="">

The remote client should have the following system property: java.rmi.server.hostname=<client ip="">

Lets see if this will help. Shay h4. Attachments

[pu.xml|/upfiles/13759702859787618.xml]

shay hassidim gravatar imageshay hassidim ( 2012-06-04 07:04:58 -0500 )edit

Here's the entire PU.xml.

Thanks for your help. I'm new to XAP, some maybe I'm mistaken something...somewhere...

Nouh.

Edited by: Noe Noe on Jun 4, 2012 9:22 AM h4. Attachments

[pu.xml|/upfiles/1375970285464037.xml]

nouh gravatar imagenouh ( 2012-06-04 08:19:16 -0500 )edit

Your feeder bean is defined in the same context as space. Each partition runs in a separate JVM and instantiated entire context (including the feeder bean). This makes feeder load into individual partitions and explains why you are seeing all objects in all partitions.

I think, if you review the helloworld or data example included in <gigaspacesroot>/examples/ folder, you will understand how this should be structured. Feeder should be a separate client application.

HTH Sean

seankumar gravatar imageseankumar ( 2012-06-04 10:42:18 -0500 )edit

{quote:title=seankumar wrote:}{quote} Your feeder bean is defined in the same context as space. Each partition runs in a separate JVM and instantiated entire context (including the feeder bean). This makes feeder load into individual partitions and explains why you are seeing all objects in all partitions.

I think, if you review the helloworld or data example included in <gigaspacesroot>/examples/ folder, you will understand how this should be structured. Feeder should be a separate client application.

HTH Sean

Thanks for your reply, the problem is solved. That was quite simple... Nouh.

Edited by: Noe Noe on Jun 22, 2012 5:36 AM

nouh gravatar imagenouh ( 2012-06-05 03:02:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-06-04 06:05:37 -0500

Seen: 301 times

Last updated: Jun 04 '12