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

Ask Your Question

Recommended way to make a non transactional read/write when having a transactional GigaSpace instance

When I have a transactional GigaSpace instance (from a transactional polling container let's say) and I want non transactional operations I used to do gs.getSpace().read/write(...) with null transaction. But those are deprecated. What's the proper way to do it in this case? Is that getSpace().etc still recommended as it appears in docs for GS 9.X and 10.X even if you end up to deprecated methods? Thanks

asked 2015-12-14 03:48:08 -0500

lukeh gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

One way to handle this is to define another space proxy that does not have transactions configured in your pu.xml.

answered 2015-12-14 09:37:08 -0500

Dixson Huie gravatar image
edit flag offensive delete link more


Right, that's something I also did at some point just that in some places the code gets ugly when I have to pass even two instance of GS. Also getting the IJSpace and wrap it in another GigaSpace with no transaction manager gets rid of the deprecated calls. Yet at this point I'm also interested in optimal, less overhead (which to me seem to be the call to deprecated methods), best practice.

lukeh gravatar imagelukeh ( 2015-12-15 03:14:21 -0500 )edit

If you haven't found a better way, I have always used Spring's TransactionTemplate to do what you are looking to do. You can use it to suspend, start, or even nest transactions.



answered 2016-01-11 07:46:17 -0500

rich gravatar image
edit flag offensive delete link more

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


Asked: 2015-12-14 03:48:08 -0500

Seen: 2,295 times

Last updated: Jan 11 '16