We could prevent glassfish from stopping server.
I reported the issue to glassfishplugins site
https://glassfishplugins.dev.java.net/issues/show_bug.cgi?id=255.
Anyway if they do not do this for us, we can solve:
1. we should avoid wiring glassfishplugin dependency in main plugin. This
is why we should create an extension point. The extension point could have
the name "serverAdapter". It should have one attribute:
- action - string, in the above example "preventServerStop"
The extension point interface should be IHeadlessServerAdapter with one
method like this: Object doAction(IServer server, String action)
2. create a plugin (com.ind.eclipse.headlesseclipse.glassfish) which
extends the extension point above. This plugin should depend on glassfish
plugin (com.sun.enterprise.jst.server.sunappsrv). The class that extends
the extension point, must open
com.sun.enterprise.jst.server.sunappsrv.SunAppSrvPlugin class, and set
commandsToExecuteAtExit field (a hashset) accessible, if the action string
is "preventServerStop". Then it should clear it.
3.In com.ind.eclipse.headlessworkspace.HeadLessAdvisor.preShutdown() we
should look for extension point implementors, and we should call them with
"preventServerStop" action.
Original issue reported on code.google.com by gabor.li...@gmail.com on 13 Nov 2009 at 9:47
Original issue reported on code.google.com by
gabor.li...@gmail.com
on 13 Nov 2009 at 9:47