on 09-29-2008 9:28 PM
Hi all,
I'm a J2EE developer who is a newbie Web Dynpro Java developer fixing some apps done by outside. I am confused by all the static variables. Static variables only have one instance for a JVM. Is there a new JVM for every user's Dynpro app that is started on the portal? Yikes. Otherwise, one user's values would overwrite another user's.
Please set me straight on how static variables work in the Dynpro controller, view, etc.
Thanks,
--Amy Smith
--Haworth
Where exactly did you find these static variables? I would guess almost all of them (except static final one's) are just plain wrong
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In both cases they are in the "others" section and used throughout the code. One in the controller, the other in a view.
What I am hearing is that no way will these work in production when multiple people are using them!
So, the Dynpro code is executed in a new instance of "the object" that is created by the Web AS portal servlet. So the class variables (member variables,...) will work?
Here is a sample:
//@@begin others
//Variables used in the program
String strPortalUser = "";
static ConnectionAccessor connection_acc = null;
static RepositorySchema repository_schema = null;
static String User_Session = null;
static FieldProperties[] VT_NumberRange_FieldProperties;
static TableId VT_NumberRange_TableId;
static FieldId[] Number_Range_Type_FID = new FieldId[4];
static RecordId[] VT_NUmber_Protected_By_The_Session = null;
static String Log_File_Name = "";
static RecordId Status_Successful_RId = null;
static RecordId Status_Exhausted_RId = null;
static RecordId Status_Error_RId = null;
static TableId MainTable_ID = null;
static ResultDefinition MainTable_Resultdfn = null;
static FieldId[] MDM_MainTable_Filter_FId = new FieldId[7];
static TableId VT_Vendors_TID = null;
static FieldId VT_Vendors_Name_FId = null;
static String mdmServerName;
static String dbmsName;
static String strDBMSType;
static String vendorRepositoryName;
static String customerRepositoryName;
static String repositoryUserName;
static String generalRepositoryPassword;
static String logFileName = "/usr/sap/SEP/JC01/j2ee/cluster/server0/log/MDMlogs";
I should have known when I saw the capitalized variable and method names.
Thanks,
--Amy Smith
--Haworth
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.