Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » bundles on first startup are always started automatically!?
bundles on first startup are always started automatically!? [message #105879] Wed, 05 March 2008 13:08 Go to next message
Sasa Teofanovic is currently offline Sasa TeofanovicFriend
Messages: 12
Registered: July 2009
Junior Member
Hi Simon,

first, thanks for your last reply! Now, I have another question about the
deployment procedure in a server side environment! As I found out, the
first time I start my web container (Tomcat), the complete 'eclipse'-dir
is copied into my configured 'work'-dir, wherefrom my bundles are
installed/loaded by the framework - however, all bundles are started
automatically although they're not configured (in config.ini) to be
started by the launcher!? But, if I restart the server - now, the
'work'-dir is not empty anymore - the corresponding bundles are in the
correct state ("resolved" or "<lazy>")! So, could these different deploy
or launch scenarios have an impact on the framework launch mechanism??
Moreover, I figured out, that chached bundles (in my 'work'-dir) are not
updated automatically on startup, if dependencies between bundles are
changed - just new bundles are copied!? So, in this case, I have to use a
self-written script to clean up all cached bundles before startup. Now,
the second question would be - is there an opportunity provided by the
framework, to configure the startup behaviour, perhaps with a property in
the launch.ini, so that every time I restart my Tomcat, the cached bundles
are refreshed (delete + copy) completely?

thanks,
-teos
Re: bundles on first startup are always started automatically!? [message #105893 is a reply to message #105879] Wed, 05 March 2008 15:26 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
re: automatically starting bundles.
Bizarre, I've never seen that before. No idea what's going on.
update.configurator should just install and resolve the bundles. Unless
you're using something else to alter startlevels and the peristent start
state the only bundles that should get started are those in your config.ini.

re: auto cleaning
There is a way to overide and extend the FrameworkLauncher (take a look in
the web.xml as there is a comment there that should help).
What you want to do is re-deploy every time you start. With that said I
think your script approach is just fine.

Longer term the WAR file should be fixed and all deployment activities
should occur at the OSGi level through something like p2.

-Simon

"teos" <sasa.teofanovic@gmx.at> wrote in message
news:fd041dfb538d2bc9e34816d7fc86a24e$1@www.eclipse.org...
> Hi Simon,
> first, thanks for your last reply! Now, I have another question about the
> deployment procedure in a server side environment! As I found out, the
> first time I start my web container (Tomcat), the complete 'eclipse'-dir
> is copied into my configured 'work'-dir, wherefrom my bundles are
> installed/loaded by the framework - however, all bundles are started
> automatically although they're not configured (in config.ini) to be
> started by the launcher!? But, if I restart the server - now, the
> 'work'-dir is not empty anymore - the corresponding bundles are in the
> correct state ("resolved" or "<lazy>")! So, could these different deploy
> or launch scenarios have an impact on the framework launch mechanism??
> Moreover, I figured out, that chached bundles (in my 'work'-dir) are not
> updated automatically on startup, if dependencies between bundles are
> changed - just new bundles are copied!? So, in this case, I have to use a
> self-written script to clean up all cached bundles before startup. Now,
> the second question would be - is there an opportunity provided by the
> framework, to configure the startup behaviour, perhaps with a property in
> the launch.ini, so that every time I restart my Tomcat, the cached bundles
> are refreshed (delete + copy) completely?
>
> thanks,
> -teos
>
Re: bundles on first startup are always started automatically!? [message #105907 is a reply to message #105893] Wed, 05 March 2008 16:16 Go to previous message
Sasa Teofanovic is currently offline Sasa TeofanovicFriend
Messages: 12
Registered: July 2009
Junior Member
-> "automatically starting bundles":

It's strange, 'cause it seems, that just all as 'lazy' declared bundles
are started immediately by the framework, if the caching 'eclipse'-dir is
empty (first deployment)!? However, just the following bundles ("tsp" is
my own) are defined in my 'config.ini' to be started:

#Eclipse Runtime Configuration File
osgi.bundles=org.eclipse.equinox.common@2:start,\
org.eclipse.update.configurator@start,\
org.eclipse.equinox.http.servletbridge@start,\
org.eclipse.equinox.http.registry@start,\
tsp@start
osgi.bundles.defaultStartLevel=4

All other bundles should be in "resolved" state (or "lazy"), as it's the
case when I restart the server. Now, i changed the launch configuration
(launch.ini) by just adding/setting the property
'osgi.compatibility.eagerStart.LazyActivation' to "false" and it worked -
but I really don't know why!?? I guess, that's just a workaround!?

-> auto cleaning: all right!

thanks,
-teos
Previous Topic:reuse of pre-compiled jsp's
Next Topic:OSGi ManagedServiceFactory understanding
Goto Forum:
  


Current Time: Sat Nov 27 18:36:28 GMT 2021

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

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

Back to the top