on 05-03-2012 8:44 AM
Hi experts,
There are a lot of axamples about how to create a connection to the MDM using MDM Java API, but I found a serious issue leading to the high memory consumtion if we try to save a session (UserSessionContext) and use it in the future.
I use this code to create a connection:
UserSessionContext userSessionContext = new UserSessionContext(serverName, repositoryName, (String)null, userName);
userSessionContext.setRegionLocale(locale);
userSessionContext.setConnectionType(ConnectionTypes.LOCAL_POOL_CONNECTION);
userSessionContext.setTrustedConnection(isTrustedConnection);
String userSessionId = getSessionManager().createSession(userSessionContext, SessionTypes.USER_SESSION_TYPE, userPassword);
When the connection is created it is saved in the static variables. When we need to use it again we do the following:
String userSessionId = getSessionManager().getSession(userSessionContext, SessionTypes.USER_SESSION_TYPE);
The problem is that when the portal has several instances and several nodes per instance we have the number of the connections equal to the total number of the nodes.
For example, if the portal has 5 instances with 3 nodes per instance we have 15 connections per user.
Is there any way to use some standard functionality to save the only one connection? We thought about a statefull session bean, but we hope to found some standard way.
Timur Semenchuk wrote:
The problem is that when the portal has several instances and several nodes per instance we have the number of the connections equal to the total number of the nodes.
For example, if the portal has 5 instances with 3 nodes per instance we have 15 connections per user.
are you sure? how you get this conclusion?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I am sure.
We wrote special code writing logs when we try to initialise a connection. The developer traces allow to show the columns containing information about the instance where the code is being run and the node number. We noticed that the connection is being created every time when the code is being processed on a different node (if the code is being processed twice and more on the same node - the connection already exists and everything is ok).
Best regards,
Timur Semenchuk.
We have web dispatcher that redirects the user to some instance (it is not neccessary the same instance). So, we already have multiplier that equals to the quantity of the instances. Do you know some SAP Note saying that the user must be bounded to the same node? Where have you read it? How to configure this feature?
can't catch you.
why ws is related here?
ws configuration is here http://help.sap.com/saphelp_nw72/helpdata/en/44/4d2bb1c6b00597e10000000a155369/frameset.htm
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.