cancel
Showing results for 
Search instead for 
Did you mean: 

Reading/writing properties from MobileEngine.config programmatically..

Former Member
0 Kudos

Hi guys,

I am modifying the MobileEngine.config programmatically via calls to

com.sap.ip.me.api.conf.Configuration.setDefaultProperty( key , value ), however the MI framework reads the changed values on startup, right? If this is true as it seems to be, then the device itself should be restarted ... Hmm, this does not seems to be quite a solution anyway

Do you know if there is a way to change these three properties programmatically and without restarting the device:

MobileEngine.Packaging.Large

MobileEngine.Packaging.Activated

MobileEngine.Packaging.MaxPackageSize

Thanks in advance,

Lalo

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear Oliver,

I believe the things are not so easy and straightforward on our side.

Yes, I know that 1) I can use parameter sets assigned to the device configuration, 2) I can hardcode these settings in MobileEngine.config inside our custom made .cab or even 3) I can modify the defaults.properties inside MEg.jar(even the customers are not suggested to do so).

However, I wanted to have these settings run only in case the initial synchronisation for our application is running in order not to fall in OutOfMemory situation, afterwards I just wanted to use the normal container sizing - in order to have better performance. With all the headers, etc. a lot of additional information is coming when the sizing is small and I think it lowers down the performance as well, right?

Thanks,

Lalo

Former Member
0 Kudos

Dear Oliver,

Thanks for your answer. I'll not comment here decompilation of MEg.jar, because it is not allowed by SAP

However, on your question: by using the default settings sometime we got OutOfMemory problems on some of the devices with more data that have to be downloaded. You know that the whole container is downloaded and in our case it can be plenty of MBs and afterwards it is processed and put in DB, so a lot of free space is gained again.

But if we use some specific settings on these parameters (I believe it depends on the amount of memory every specific device have), then we are not running out of memory, since the packages donwloaded are small in size. You probably have this knowledge, but anyway - http://help.sap.com/saphelp_nw04s/helpdata/en/26/1f864007985537e10000000a1550b0/content.htm

is the link with detailed info for packaging.

Best Regards,

Lalo

Edited by: Lalo Ivanov on Feb 20, 2008 9:51 AM

Former Member
0 Kudos

Hi Lalo,

thanks for the answer.

Yes, the reason why there is the possibility to send the data in containers is clear to me - but what I do not understand is your need to change that at runtime. Well, I would set these devices always to one level and fine. but perhaps it is just a missunderstanding on my site from your initial posting.

Perhaps another thing could help here - with the first syncs - after a device setup - you can deploy some settings for the device configuration. Well, you can do that later as well, but it makes most sence at the beginning.

There are several ways possible. Have you ever seen the DB2e deployment - for example? This comes with a client installation - so it restarts MI automatically after it changed the settings in MOBILEENGINE.config. It is not necessary for you to restart the device. So with that way you could change the setting and make it active. All the user has to do is to logon again.

Hope it helps.

Regards,

Oliver

Former Member
0 Kudos

Hi Lalo,

well, why do you play around with the size of the containers? But anyway, I guess that is the wrong pproach. Unfortunately I can not give you the correct solution, hopefully the SAP internal people can do that, but:

You change the setting programmatically and write the change to the config file. Unfortunately this setting is only read at startup - as you correctly already mentioned. So changing the setting in the config file does not help you in that session- only after reboot. Well, you can simply decompile the MEg.jar file and check which class is changed at startup with this setting - and then do that change programmatically. I guess it is a public method available to do that change - but unfortunatley I do not know it. And there I come back to my introduction: hopefully the SAP internal people can provie this information to you.

But there I would esarch: first change the status in the config file (so it is still there after reboot) and then change it directly with the API - but still my question: why do you want to do that?

Regards,

Oliver

chintan_virani
Active Contributor
0 Kudos

Lalo,

Any changes in mobileengine.config will require a device restart as far as I know.

Check if this helps : [Configuration of Devices Using Device Configurations|http://help.sap.com/saphelp_nw04/helpdata/en/43/251047b6140b25e10000000a1553f6/content.htm]

Chintan