baanow
15th July 2010, 08:10
Have a question regarding how shared memory works with DALs.
We have a customization to one of the DALs. The DAL invokes a DLL to insert records into a new custom table.
We would like to promote the DAL without affecting any users actively working in the system.
Question 1 : If a user is already logged into the session I'm assuming the old object of the DAL will be used and then the new code will not be effective until the user logs out and in again
Question 2 : Since we have a new table created and the DAL inserts records into this table if the user does not log out and login again will this cause any issues
We are on Baan 5c on Solaris
Thanks and Appreciate any help and pointers
JaapJD
15th July 2010, 08:47
Here are the answers:
Q1. If the user leaves all sessions that use the DAL, the object is removed from core. So the next time the DAL is needed, the new object will be retrieved from disk.
Q2. This depends. If it is only a new table, just converted to runtime, the user will be able to insert records in that table without re-login (if he gets the new DAL, see Q1). However, if the table has fields with a new domain linked to it, the user has to re-login.
baanow
15th July 2010, 14:46
Thanks JaapJD. Clarifying little bit more.
The re login will be required because the objects are brought to the memory differently.
1. Table definitions are put in the shared memory only once during login
2. Objects like DLL, DAL, Forms ...etc are put in memory the first time the user accesses the object and kept in memory until the object is required. Once the referring sessions are closed the object is removed from the memory. The objects are brought back when the user accesses the session again.
Because of the difference between table definition and DAL memory cache behavior we might have a problem if a user logins in and without logging out if he opens the session then the new DAL object will be used but it will not be able to insert records because the table definition is not there.
Is my understanding right.
Is there any documentation that explains how and when objects are put in memory and cleaned.
Thanks and Appreciate your help
JaapJD
15th July 2010, 14:56
To be more specific:
1. No, as soon they are needed
2. Yes (except for "until", that should be "as long as").
I'm not aware of documentation explaining this. But updating your tables and/or objects when users are working in the system is always risky. I wouldn't take the risk...
baanow
15th July 2010, 15:14
Ok got it.
1. If the table definitions are loaded only when they are needed. Since we are creating new tables they will be loaded first time the user uses the new changed DAL.
Looking at your answers
Scenario 1 : User opened a session and continue to using it
In this case the old DAL object will be used and the table definition will not be required
Scenario 2 : User closes the session (terminating all links to the object) and without logging out reopens the session
In this case the new DAL will be used and since this will be first time the table is used the table definitions will be loaded in memory
Scenario 3: User logs out and logs in again
New DAL and the table definition will be used
Based on the current understanding theoretically there should not be any problem with all the above scenarios. If we had modified any existing table then we might have had issues.Since in our case the tables are new all scenarios will work without any noticeable issues.
But practically it is better to do the table changes during off works hours
Thanks JaapJD
JaapJD
15th July 2010, 15:17
Scenario 2 will fail if you have a new domain in your new table.
baanow
15th July 2010, 15:41
Ok are the domains loaded only during user logs into Baan
JaapJD
15th July 2010, 15:42
It is per package. The first time a domain of a package is needed (because it is used in a table or an object) the domains of that package are loaded.
baanow
15th July 2010, 15:57
Thanks Jaap now I have a very good idea. Thanks for your time and reply