• 1 reply
  • Latest Post - ‏2013-07-19T21:23:48Z by MikeZilbergleyt
18 Posts

Pinned topic Session Pool in Object Grid ?

‏2013-07-10T13:56:16Z |


I am trying to use Spring 3.0.5 along with WXS version 8.6.

I have downloaded trial version of wxs server (version 8.6) and using it locally. 

I have written a Spring sample program to connect to this server. For this i am using objectgrid.jar and ogspring.jar.

My intention is just to make CRUD operations on wxs server. using POJO. No JPA No Entities etc

Below is the summary of my program

1. I have created a spring config file .. in that file i have created below 3 object

a. Getting ObjectGridManager

b. ClientClusterContext

c. ObjectGrid instance

Now this object Grid instance in injected in Spring Bean 

@Component(value = "a")

public class A{



ObjectGrid grid;

public void insert(String key, String value, String mapName){


Session session = grid.getSession();

ObjectMap map = session.getMap(mapName);








* I start my catalog server and container through some bat files which came along the trial copy of server. Server starts at 2809 port and has one BackingMap defined.

Question 1 - 

Now lets say 10000 uers log into my application and try to access above code, in that case same ObjectGrid instance will be used but it will return different session to each thread.So do ObjectGrid has any concept of Session Pool similar like connection Pooling in jdbc ? If yes where?

Question 2 -

Where can in configure Eviction policies?

Question 3 -

Do i need to close Session everytime?

Question 4 

Do i need to say Session.begin and Session.commit()







  • MikeZilbergleyt
    4 Posts

    Re: Session Pool in Object Grid ?



    I don't know the answer to question 1.  I do know what Session object is used for transaction management, so it is not the same as connection in JDBC.

    2.  Yes, you want to close the session.

    3.  if you don't use Session.begin/commit an "auto commit" is turned on.  Note, you can not span regular "transaction" between operations on different partitions.  If you need to do that, you need to declare 2 phase commit transaction.  For example, session.setTxCommitProtocol(Session.TxCommitProtocol.TWOPHASE);