Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 27
Registered: ‎08-20-2008
My Device: 8350i Curve

Lotus Notes and Java Cache Tip

[ Edited ]

I checked to see if anyone had already posted this, but didn't see any so thought I would list it in hopes of saving someone else a little pain.


I wasn't aware, but apparently the Lotus Notes client caches java code and doesn't change the code if a program is loaded later with the same name.  Here's how I found this out:


I used the demo ECL Notes database to create a company phone directory.  It worked great so I decided to use the newly created nsf file to create another similar database.  The second app on the handheld would be loaded along with the original phone directory so I had to change the port that the app was listening.  No problem, that worked okay.


A couple of hours later someone called to have the phone directory loaded on their new Blackberry.  But when I pushed the data to the app from my Notes database, it failed.  The BES logs all showed the packet being delivered, but the user said they had no data in their phone directory.


The next day I tried it again only to find that the user got the data okay.  This went on for about a week where one day one data push would work while the other would not.  After a little trial and error I discovered that which ever database I opened first would load the java code with it's particular port listing and would work.  The one I opened second would not.  I had simply gone in and changed the hard coded reference in the java agent that pushed the data to the phone without changing the name of the java program.


The first one opened was cached for the day until I closed my Lotus Notes Client and cleared the cache.  So the moral to the story is a.) don't hard code your references or b.) make your jave program names unique.  Again, my apologies if this is a redundant post, but after running around in circles for a couple of days I thought I might keep someone else from having the same problem.