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

Ask Your Question
0

Read object Localview under Transaction

Hi all,

The Gigaspaces' LocalView documentation ( http://docs.gigaspaces.com/xap110net/... ) says:

Local View Features
The Local View is a Read-Only data structure. The following operations are not supported when using local view, and should be performed using a regular space proxy:

Any operation that creates or changes data (Write, WriteMultiple, Execute).

Any operation that removes data: (Clean, Clear, Take, TakeById, TakeMultiple, AsyncTake, etc.).

Any operation under a transaction.

For instance, we have the following configuration:

  • One space with 2 objects: Account and Balance
  • One remote client application
  • The remote client application has a localView with only Account Objects

And the next method:

@Transactional
public void exampleMethod(String country){
    Account account = localViewSpaceDao.findAccountByCountry(country);
    Balance balance = remoteSpaceDao.findBalanceById(account.getId());
    if(account.getCountry == 'CO'){
        balance.setBalance(100);
    } else {
        balance.setBalance(200);
    }
    remoteSpaceDao.updateBalance(balance)
}
  • Does the remote client use the localview?
  • The "exampleMethod" is a transactional method.

Thaks in advice.

asked 2016-09-24 12:24:48 -0500

guedim gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

Read under transaction from local view is not supported, saw I guess your localViewSpaceDao goes directly to the remote space to do the read.

answered 2016-09-25 04:13:49 -0500

Ester gravatar image
edit flag offensive delete link more
0

Hi Ester,

Thanks in advice.

We have a lot of tasks (transactional methods) using LocalView just for read operations. I would like to know, if Is there a tool/jar/console/panel/etc for monitoring the LocalView activity?

Kind Regards.

answered 2016-09-26 10:27:02 -0500

guedim gravatar image
edit flag offensive delete link more

Comments

See:

http://docs.gigaspaces.com/xap120/mon...

From:forum@ask.gigaspaces.org [mailto:forum@ask.gigaspaces.org]

shay hassidim gravatar imageshay hassidim ( 2016-09-26 17:01:17 -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: 2016-09-24 12:24:48 -0500

Seen: 870 times

Last updated: Sep 26 '16