on 06-14-2007 2:59 AM
Hi,
I have a question , when should we call disconnectIfAlive() ?? , if we dont call the method when will the
connection be freed??.
I have a application in that i will be calling "Execute()" method on the BAPI Model when ever user selects
a item in the dropdownlist ( the selected value will be passed as a parameter to the BAPI), user can select the list multiple times .. so i might be calling the same models "Execute()" many times in the application .
So is it good to call disconnectIfAlive() after execute every time [ Will the performance be slow as it has to get new connection when we call execute], or should i just leave it for th DynPro run time to take care abt freeing the connection.
I am considering about the performance if we call disconnectIfAlive after execute , please advice.
Regards,
Ravi.
Hi Ravi,
you have to use the "disconnectIfAlive() " when you will perform "UPDATE" operation using "BAPI".If you don't disconnect the model instance other user will not be able to update the record. Its lock the record until and unless you disconnect the model instance.
finally
{
SaveModel svModel = (SaveModel)WDModelFactory.getModelInstance(SaveModel.class);
svModel.disconnectIfAlive();
}
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.