users@glassfish.java.net

Re: how to populate table during ejb-module startup ?

From: <glassfish_at_javadesktop.org>
Date: Mon, 29 Dec 2008 20:29:08 PST

You could do this using the self management framework during the appserver startup if the ear is already deployed. A lifecycle type of event with "ready" as the name will invoke a CustomAction mbean provided by you. Again, this will be executed during the lifecycle of the appserver and not the ejb-module startup.

Another possible solution is to use the trace type of event with "ejb_component_method_entry", which will execute a CustomAction during [b]every[/b] ejb business method invocation.

Details about self management could be found at : https://glassfish.dev.java.net/javaee5/selfmanagement/selfmanagementhome.html
http://blogs.sun.com/technical/entry/self_management_rules
[Message sent by forum member 'sm157516' (sm157516)]

http://forums.java.net/jive/thread.jspa?messageID=323568