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

Ask Your Question

testy's profile - activity

2019-09-11 21:31:18 -0500 received badge  Popular Question (source)
2019-09-11 21:31:18 -0500 received badge  Famous Question (source)
2019-09-11 21:31:18 -0500 received badge  Notable Question (source)
2017-05-19 01:39:46 -0500 received badge  Popular Question (source)
2015-10-01 03:01:50 -0500 received badge  Famous Question (source)
2015-10-01 03:01:50 -0500 received badge  Notable Question (source)
2015-10-01 03:01:50 -0500 received badge  Popular Question (source)
2015-01-08 01:57:04 -0500 received badge  Popular Question (source)
2015-01-08 01:57:04 -0500 received badge  Notable Question (source)
2014-11-20 07:39:27 -0500 received badge  Notable Question (source)
2014-11-20 07:39:27 -0500 received badge  Popular Question (source)
2013-08-08 09:40:02 -0500 marked best answer com/gigaspaces/logger/GSLogConfigLoader

I got the following exception when I tried to upgrade to GigaSpaces 6.0 from 5.2.2.

nested exception is java.lang.NoClassDefFoundError: com/gigaspaces/logger/GSLogConfigLoader

How can I resolve this problem?

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2096]{quote}

2013-08-08 09:40:01 -0500 marked best answer Space Thread Synchronization

When I tried to use Gigaspaces as a caching solution, I found that it's a bit difficult to ensure that only one thread is retrieving data to fill cache at any point in time. It seems that when I use template to retrieve the data and the data is not in the cache, the second thread that tries to retrieve the data will not be blocked either even it's in the transaction. Therefore, both threads will try to update cache at the same time. Do you have any ways we can simulate a fine grain semaphore/mutex with Gigaspaces? Some other cache providers such as EHCache and Tangosol provide API to lock/unlock any given key in the same cache group to tackle this problem.

Thanks,

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2132]{quote}

2013-08-08 09:39:58 -0500 marked best answer Embedded GigaSpaces

When starting GigaSpaces to run in embedded mode, it seems that it uses up a lot of threads probably 100+ threads. Is there a way to reduce the usage of threads without sacrificing much? In addition to that, it seems that when I redeployed the app, I still saw some old threads living around. Is there a way to clean it up correctly when redeploying? Please note that I deploy JSpaces.jar as a part of the application.

The examples are: multicast discovery announcement listener multicast announcement timer Cache PersistentGC Statistics-Task RecentsFifoThread Pending Answers-pool-XX-thread-XX Processor-pool-XX-thread-XX Notifier-pool-XX-thread-XX LRMI Selector Thread-XX LRMI Connection--pool-XX-thread-XX

for each space, there are Local Transaction Reaper Lease Manager Reaper Lease Manager Reaper

Thanks a lot

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2128]{quote}

2013-08-08 09:39:41 -0500 marked best answer 30-day trial License?

When I downloaded Gigaspaces 6.0 Community Edition, why the license I got was a 30-day trial license key instead of perpetual license?

Thanks!

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2098]{quote}

2013-08-08 09:39:39 -0500 marked best answer Memory Leak?

I left an application with embedded Gigaspaces 5.2.2 running for a couple days and found that the memory keep increasing. So I dumped the memory heap and found that CacheEntryCell seems to hold references to all my keys and subsequently my values. Is it a known problem?

     Mem     Count         Class
0.4% 636k    16303   +636k com/j_spaces/map/eviction/Chain$CacheEntryCell
0.3% 429k    13758   +429k com/j_spaces/core/client/version/map/MapEntryInfoKey

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

2013-08-08 09:39:34 -0500 marked best answer Too many opened files

I recently changed not to cache IMap instances returned by CacheFinder.find calls. So that I can use transactions on it later.

However, when trying to introduce a lot of loads, I got "Too many opened files" exception from Cache API. I took a lot at netstat and found that it opens roughtly 80 listening connections on port 4160 as well as many ports on available port number on 60000++ ranges. Is it an expected behavior? If not, how can I resolve it?

Thanks!

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2086]{quote}

2013-08-08 09:39:34 -0500 marked best answer Transaction with Map API

I guess today is my play day with GigaSpaces. So let me run into another small problem. I tried to use pessimistic locking for transaction synchronization. However, the behavior wasn't as I expected. I thought if another process is working on an entry, the other thread should wait until it's timed out. However, it seems to throw CacheTimeoutException right away. This is the test code. If you notice from the code, after the another transaction is in process, it seems to fail fast instead of waiting until time out. Did I do something wrong?

import com.j_spaces.core.client.CacheTimeoutException;
import com.j_spaces.core.client.LocalTransactionManager;
import com.j_spaces.map.CacheFinder;
import com.j_spaces.map.IMap;
import net.jini.core.transaction.Transaction;
import net.jini.core.transaction.TransactionFactory;
import net.jini.core.transaction.server.TransactionManager;
....
    public void testCache() throws Exception
    {
        final IMap map = (IMap) CacheFinder.find("/./testCache?schema=mycache&versioned=false&create=true&noCache=false");
        Thread thread1 = new Thread()
        {
            public void run()
            {
                try
                {
                    TransactionManager trManager = LocalTransactionManager.getInstance(map);
                    Transaction.Created created = TransactionFactory.create(trManager, 60000);
                    Transaction transaction = created.transaction;
                    System.out.println("Thread-1: Start" + System.currentTimeMillis());
                    try
                    {
                        map.put("Test", "Test", transaction, 60000);
                    } catch (CacheTimeoutException ex)
                    {
                        System.out.println("Thread-1: Timeout" + System.currentTimeMillis());
                    }
                    System.out.println("Thread-1: After lock" + System.currentTimeMillis());
                    Thread.sleep(500);
                    System.out.println("Thread-1: End" + System.currentTimeMillis());
                    transaction.commit();
                } catch (Exception ex)
                {
                }
            }
        };
        thread1.start();
        Thread thread = new Thread()
        {
            public void run()
            {
                try
                {
                    TransactionManager trManager = LocalTransactionManager.getInstance(map);
                    Transaction.Created created = TransactionFactory.create(trManager, 60000);
                    Transaction transaction = created.transaction;
                    System.out.println("Thread-2: Start" + System.currentTimeMillis());
                    try
                    {
                        map.put("Test", "Test", transaction, 60000);
                    } catch (CacheTimeoutException ex)
                    {
                        System.out.println("Thread-2: Timeout" + System.currentTimeMillis());
                    }
                    System.out.println("Thread-2: After lock" + System.currentTimeMillis());
                    Thread.sleep(500);
                    System.out.println("Thread-2: End" + System.currentTimeMillis());
                    transaction.commit();
                } catch (Exception ex)
                {
                }
            }
        };
        thread.start();
        thread1.join();
        thread.join();
    }

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

2013-08-08 09:39:33 -0500 marked best answer Space and container

I'm not sure but I seem to read from somewhere that I should not put more than one space in a container. Is that true? If not, is there any limitation or anything I should know about?

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

2007-11-12 13:18:01 -0500 commented answer Thread group

Yep. You're dead on. I'm running it in embedded space mode.

2007-11-12 12:34:01 -0500 asked a question Thread group

Is it possible to set a thread group on all the threads that Gigaspaces uses? It will make the debugging much easier since now I have 200+ threads from Gigaspaces running in my application and it's hard to find the thread I would like to diagnose.

Thanks!

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

2007-10-23 21:59:00 -0500 commented answer LockManager

Great. It makes more sense then.

2007-10-22 22:17:02 -0500 asked a question LockManager

I saw a new class called LockManager, so I gave it a try

        final IMap map = (IMap) CacheFinder.find("/./testCache?schema=mycache&versioned=false&create=true&noCache=false");
        LockManager manager = new LockManager(map);
        manager.lock("test", 1000, 1000);

then I got this exception:

org.openspaces.core.SpaceTimeoutException: Failed waiting for lock on key test
at org.openspaces.core.map.LockManager.lock(LockManager.java:111)

Any idea why it happened? I thought once I called .lock, I would be able to process the next method. However, it timed out and threw the exception.

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

2007-10-08 20:58:05 -0500 commented answer Space Thread Synchronization

Did I make use of LockManager correctly?

2007-10-05 05:01:02 -0500 commented answer Space Thread Synchronization

Let me know how I can work with it.
Thanks!

2007-10-04 05:40:03 -0500 commented answer Space Thread Synchronization

kimchy,

BTW, To minimize my change, I decided to stick with IMap interface for now so I tried LockManager class with IMap interface and it seems not to work as I expected:

        final IMap map = (IMap) CacheFinder.find("/./testCache?schema=mycache&versioned=false&create=true&noCache=false");
        LockManager manager = new LockManager(map);
        manager.lock("test", 1000, 1000);

then I got this exception:

org.openspaces.core.SpaceTimeoutException: Failed waiting for lock on key test
at org.openspaces.core.map.LockManager.lock(LockManager.java:111)

2007-10-04 05:03:04 -0500 commented answer Space Thread Synchronization

What is the reason behind why there are GigaMap and IMap interfaces? They looks really similar. I saw some answers [url=http://www.gigaspaces.com/wiki/display/GS6/Open+Spaces+Core+Component+-+GigaMap]here[/url]. Does it mean we should avoid using IMap and move to use OpenSpaces model instead?

Thanks!

2007-09-10 19:14:03 -0500 commented answer Space and container

I think I will still use Map API since the Map API seems more natural to cache the result from function calls.

2007-08-24 10:56:02 -0500 commented answer Space and container

Take a look at GSCacheFactory... Basically, different cache group should use different IJSpace.

2007-08-24 10:44:04 -0500 commented answer Embedded GigaSpaces

I understand it. I just demonstrated that there are remaining threads after the space/container shutdown. I need to shutdown all container/space when application ear is undeployed. However, I discovered that it still has threads and memory hanging around.

For GS-441, at first I thought it was fixed in 6.0 as per http://gigaspaces.com/wiki/display/RN... but it didn't go into GA release?

2007-08-24 10:42:05 -0500 commented answer Space and container

I want to make sure that the key will not be collided with each other in different cache groups.

2007-08-24 09:58:01 -0500 commented answer Space and container

After searching around, I seem to find the document: http://gigaspaces.com/wiki/display/GS6/StartingMultipleSpacesinOneContainer-6.0

Basically, I'm creating a small caching solution using JavaSpaces. So I have one space for each cache container. It works great but it consumes a number of threads so I try to reduce the number of containers by consolidation all spaces in one container but it seems to be an obsoleted feature.

2007-08-24 09:46:00 -0500 commented answer Embedded GigaSpaces

Shay,

I tried 6.0 and it seemed that the dangling threads are fewer after the shutdown. The remaining threads are:

RMI ConnectionExpiration RMI LeaseChecker RMI RenewClean RMI TCP Accept RMI TCP Connection

{code} for (int i = 0; i < 80; i++) { IMap map = (IMap) CacheFinder.find("/./testCache?schema=mycache&versioned=false&create=true&noCache=false", props); IRemoteJSpaceAdmin jSpaceAdmin = (IRemoteJSpaceAdmin) map.getMasterSpace().getAdmin(); jSpaceAdmin.stop(); map.getMasterSpace().getContainer().shutdown(); } {code}

2007-08-24 09:36:03 -0500 commented answer Space and container

Sorry, I mean in the url

Should I do this?
rmi://hostname/container/space1
rmi://hostname/container/space2
rmi://hostname/container/space3
rmi://hostname/container/space4

or this?

rmi://hostname/./space1
rmi://hostname/./space2
rmi://hostname/./space3
rmi://hostname/./space4