Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Cache Problem when using Xulrunner in Eclipse RCP?
Cache Problem when using Xulrunner in Eclipse RCP? [message #479270] Mon, 10 August 2009 13:51 Go to next message
Martin Burchard is currently offline Martin BurchardFriend
Messages: 6
Registered: July 2009
Junior Member
Hello,

in my RCP I explicitly use the Mozilla Engine (Xulrunner).

browser = new Browser(parent, SWT.MOZILLA);

Currently I work under Windows.

When doing so, a new Mozilla profile named eclipse is created and
automatically chosen when starting my application.
This seems to be a default.
Within this eclipse profile the Cache folder is filled when browsing around.

Now I start a second RCP application, that also uses the Gecko engine.
This other application also uses the eclipse profile folder and the
Cache folder.

If now I reload my page in the first application, loading does not
finish. No images are shown (they should come from cache)...

Can somebody else confirm this behaviour? Is there a solution?

Regards
Martin
Re: Cache Problem when using Xulrunner in Eclipse RCP? [message #480683 is a reply to message #479270] Tue, 18 August 2009 08:25 Go to previous messageGo to next message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

Yeah that problem killed me couple of times.

use it:
nsICacheService cacheService = (nsICacheService)
Mozilla.getInstance().getServiceManager().getServiceByContra ctID(
"@mozilla.org/network/cache-service;1",
nsICacheService.NS_ICACHESERVICE_IID);

cacheService.evictEntries(1);
cacheService.evictEntries(2);


And you should ask this problem Mozilla news group.


PS. You can override default GRE choosing by setting system property:
"org.eclipse.swt.browser.XULRunnerPath"

System.getProperties().put(
"org.eclipse.swt.browser.XULRunnerPath",
"YOUR XUL RUNNER PATH");

SWT loads Mozilla browser with that. (XUL Runner must be uncompressed.)

Martin Burchard wrote:
> Hello,
>
> in my RCP I explicitly use the Mozilla Engine (Xulrunner).
>
> browser = new Browser(parent, SWT.MOZILLA);
>
> Currently I work under Windows.
>
> When doing so, a new Mozilla profile named eclipse is created and
> automatically chosen when starting my application.
> This seems to be a default.
> Within this eclipse profile the Cache folder is filled when browsing around.
>
> Now I start a second RCP application, that also uses the Gecko engine.
> This other application also uses the eclipse profile folder and the
> Cache folder.
>
> If now I reload my page in the first application, loading does not
> finish. No images are shown (they should come from cache)...
>
> Can somebody else confirm this behaviour? Is there a solution?
>
> Regards
> Martin
Re: Cache Problem when using Xulrunner in Eclipse RCP? [message #480818 is a reply to message #480683] Tue, 18 August 2009 14:58 Go to previous messageGo to next message
Martin Burchard is currently offline Martin BurchardFriend
Messages: 6
Registered: July 2009
Junior Member
Thank you...

Am 18.08.2009 10:25, schrieb Jiyul:
> Yeah that problem killed me couple of times.
>
> use it:
> nsICacheService cacheService = (nsICacheService)
> Mozilla.getInstance().getServiceManager().getServiceByContra ctID(
> "@mozilla.org/network/cache-service;1",
> nsICacheService.NS_ICACHESERVICE_IID);
>
> cacheService.evictEntries(1);
> cacheService.evictEntries(2);

What will these two lines do exactly?

>
>
> And you should ask this problem Mozilla news group.
>
>
> PS. You can override default GRE choosing by setting system property:
> "org.eclipse.swt.browser.XULRunnerPath"

I do not use default GRE choosing. I use an adapted Version of
*org.eclipse.atf.mozilla.swt.browser* together with two plugins, that I
packed with *Xulrunner 1.9.1.3*. This works pretty cool

>
> System.getProperties().put(
> "org.eclipse.swt.browser.XULRunnerPath",
> "YOUR XUL RUNNER PATH");
>
> SWT loads Mozilla browser with that. (XUL Runner must be uncompressed.)

I know ;)

>
> Martin Burchard wrote:
>> Hello,
>>
>> in my RCP I explicitly use the Mozilla Engine (Xulrunner).
>>
>> browser = new Browser(parent, SWT.MOZILLA);
>>
>> Currently I work under Windows.
>>
>> When doing so, a new Mozilla profile named eclipse is created and
>> automatically chosen when starting my application.
>> This seems to be a default.
>> Within this eclipse profile the Cache folder is filled when browsing
>> around.
>>
>> Now I start a second RCP application, that also uses the Gecko engine.
>> This other application also uses the eclipse profile folder and the
>> Cache folder.
>>
>> If now I reload my page in the first application, loading does not
>> finish. No images are shown (they should come from cache)...
>>
>> Can somebody else confirm this behaviour? Is there a solution?
>>
>> Regards
>> Martin
>
Re: Cache Problem when using Xulrunner in Eclipse RCP? [message #480936 is a reply to message #480818] Wed, 19 August 2009 01:45 Go to previous messageGo to next message
Jeeeyul Lee is currently offline Jeeeyul LeeFriend
Messages: 117
Registered: July 2009
Location: Seoul
Senior Member

Martin Burchard wrote:
>> use it:
>> nsICacheService cacheService = (nsICacheService)
>> Mozilla.getInstance().getServiceManager().getServiceByContra ctID(
>> "@mozilla.org/network/cache-service;1",
>> nsICacheService.NS_ICACHESERVICE_IID);
>>
>> cacheService.evictEntries(1);
>> cacheService.evictEntries(2);
>
> What will these two lines do exactly?

I can't sure, there is too few documents.
see https://developer.mozilla.org/en/nsICacheService#evictEntrie s.28.29

I just guess like as:
1 : memory
2 : disk
Re: Cache Problem when using Xulrunner in Eclipse RCP? [message #480963 is a reply to message #480936] Wed, 19 August 2009 08:04 Go to previous messageGo to next message
Martin Burchard is currently offline Martin BurchardFriend
Messages: 6
Registered: July 2009
Junior Member
Am 19.08.2009 03:45, schrieb Jiyul:
> Martin Burchard wrote:
>>> use it:
>>> nsICacheService cacheService = (nsICacheService)
>>> Mozilla.getInstance().getServiceManager().getServiceByContra ctID(
>>> "@mozilla.org/network/cache-service;1",
>>> nsICacheService.NS_ICACHESERVICE_IID);
>>>
>>> cacheService.evictEntries(1);
>>> cacheService.evictEntries(2);
>>
>> What will these two lines do exactly?
>
> I can't sure, there is too few documents.
> see https://developer.mozilla.org/en/nsICacheService#evictEntrie s.28.29
>
> I just guess like as:
> 1 : memory
> 2 : disk

hmm... this doesn't help me. Sorry. I have looked into
https://developer.mozilla.org/en/nsICacheService and found the
description of the function, but this doesn't help in the described
scenario.
My first Java application is running. I open a second Java application.
If then all entries are evicted by the second Java application, what
will happen, if I work in parallel in both applications?

Would be createSession() a solution? And what needs to be done with the
created nsICacheSession? Do I need to tell the Browser Instance to use
this nsICacheSession?
Re: Cache Problem when using Xulrunner in Eclipse RCP? [message #638174 is a reply to message #479270] Wed, 10 November 2010 10:51 Go to previous messageGo to next message
swgupta  is currently offline swgupta Friend
Messages: 3
Registered: November 2010
Junior Member
Hi.. I have been trying to do a similar thing.
I am not being able to run the browser in MOZILLA on Windows even after installing the XULRunner.
Could you please help me with this?
Re: Cache Problem when using Xulrunner in Eclipse RCP? [message #638175 is a reply to message #479270] Wed, 10 November 2010 10:52 Go to previous messageGo to next message
swgupta  is currently offline swgupta Friend
Messages: 3
Registered: November 2010
Junior Member
Hi.. I have been trying to do a similar thing.
I am not being able to run the browser in MOZILLA on Windows even after installing the XULRunner.
Could you please help me with this?
Re: Cache Problem when using Xulrunner in Eclipse RCP? [message #768731 is a reply to message #479270] Tue, 20 December 2011 17:11 Go to previous message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 1007
Registered: July 2009
Senior Member
You may be interested in following [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=367216 ]] which is related to this issue.
Previous Topic:Do we have a limited number of decorations per page?
Next Topic:RCP started from IDE much faster than the exported version
Goto Forum:
  


Current Time: Tue Mar 19 03:56:06 GMT 2024

Powered by FUDForum. Page generated in 0.02167 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top