Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Is earlyStartup == lateStartup

Well, the ideal solution is to have the startup() method called outside the
critical region.  Then, as you suggested, IStartup and the extra method
wouldn't be needed at all.  Unfortunately, we haven't found a way to do
that safely yet (hence the two existing bug reports in platform core).  In
the early startup case, it is possible to call this extra method outside
the classloader, because the plugin is being loaded explicitely by the
workbench.  In the general case, the plugin is loaded implicitely as a
side-effect of loading a class in that plugin, so all plug initialization
has to occur within the classloader.  It's unfortunate that API had to be
created to work around this limitation, but I guess that's what happened in
this case.




                                                                                                                     
                      "Dirk Baeumer"                                                                                 
                      <Dirk_Baeumer@xxxxxxx>         To:      platform-ui-dev@xxxxxxxxxxx                            
                      Sent by:                       cc:                                                             
                      platform-ui-dev-admin@         Subject: Re: [platform-ui-dev] Is earlyStartup == lateStartup   
                      eclipse.org                                                                                    
                                                                                                                     
                                                                                                                     
                      07/10/2002 11:27 AM                                                                            
                      Please respond to                                                                              
                      platform-ui-dev                                                                                
                                                                                                                     
                                                                                                                     




This make sense, but the name earlyStartup indicates something different.
And this method is only called
for plugins that are marked as "to be loaded on startup."

Since the deadlock problem also exists for normal plugins wouldn't it make
sense to have two hooks in
general. One startup hook and one postStartup() called outside the
synchronized classloader code.

Dirk



|---------+--------------------------------->
|         |           "Nick Edgar"          |
|         |           <Nick_Edgar@xxxxxxx>  |
|         |           Sent by:              |
|         |           platform-ui-dev-admin@|
|         |           eclipse.org           |
|         |                                 |
|         |                                 |
|         |           07/10/2002 04:31 PM   |
|         |           Please respond to     |
|         |           platform-ui-dev       |
|         |                                 |
|---------+--------------------------------->
  >
------------------------------------------------------------------------------------------------------------|

  |
|
  |        To:      platform-ui-dev@xxxxxxxxxxx
|
  |        cc:
|
  |        Subject: Re: [platform-ui-dev] Is earlyStartup == lateStartup
|
  >
------------------------------------------------------------------------------------------------------------|




Yes, that was the reasoning for having IStartup.
Thanks for clarifying, John.





"John Arthorne" <John_Arthorne@xxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
10/07/2002 10:05 AM
Please respond to platform-ui-dev


        To:     platform-ui-dev@xxxxxxxxxxx
        cc:
        Subject:        Re: [platform-ui-dev] Is earlyStartup ==
lateStartup



One concern with this is related to how startup() is called.  The
startup()
method is called from within synchronized classloader code, which makes it
vulnerable to deadlock.  For this reason there are restrictions on what
can
be done in the startup() method.  See the various notes in the javadoc for
Plugin.startup() for more details (also bugs 5875, 12827).  The short
summary is that startup() shouldn't do anything fancy.  There are no such
restrictions for the earlyStartup() method.  I don't know if this was the
reasoning behind having the extra method, but it's something to keep in
mind.





                      "Dirk Baeumer"
                      <Dirk_Baeumer@xxxxxxx>         To:
platform-ui-dev@xxxxxxxxxxx
                      Sent by:                       cc:
                      platform-ui-dev-admin@         Subject:
[platform-ui-dev] Is earlyStartup == lateStartup
                      eclipse.org


                      07/10/2002 05:58 AM
                      Please respond to
                      platform-ui-dev





I am currently experimenting with adding another webapp to eclipse. Since
I
must ensure that the webapp is running
right from the beginning my plugin implements IStartup and defines the
corresponding extension point. While testing
the plugin I found out that both first startup and then earlyStartup is
called on the plugin and both method calls occur
in the same separate thread.

What is the rational behind having earlyStartup? Would it be enough to
only
call startup() ? Then we could remove
IStartup and only need the extension point which would make it easier to
understand.

Dirk

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev




_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev



_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev




_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev






Back to the top