NetBeans Modules application lifecycle events

View: New views
2 Messages — Rating Filter:   Alert me  

NetBeans Modules application lifecycle events

by Jim Merrell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

If this has been asked before, I do apologize.  I looked through some of
the archives and didn't find an answer.  I am hoping someone can help.

With the Swing App Framework (JSR296) - or when using NetBeans' "Java
Desktop Appliction"  - we have access to several application lifecycle
methods such as initialize(), startup(), exit(), and shutdown().

Do these or similar methods exist when building a desktop application
using the NetBeans Modules?  How, for example, can I hook into the
application exit/quit action so that my application code can persist any
changes, properly close DB connections, etc.?  When using the Java
Desktop Application, this is done by overriding the "shutdown()" method,
for example.  The swing app framework seem pretty straight forward in
this respect, but I can't tell how this is handled if using the NB
modules.  Is there a tutorial that explains this?

Any help would be much appreciated!

Thanks,
Jim

Re: NetBeans Modules application lifecycle events

by Jesse Glick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jim Merrell wrote:
> With the Swing App Framework (JSR296) - or when using NetBeans' "Java
>  Desktop Appliction"  - we have access to several application
> lifecycle methods such as initialize(), startup(), exit(), and
> shutdown().
>
> Do these or similar methods exist when building a desktop application
>  using the NetBeans Modules?

Look up docs for ModuleInstall. There is even a wizard for you to create
an instance.