Ittay,

Implement a javax.servlet.ServletContextListener, add it to your web.xml of your
war (if you have one, otherwise make one), and then you can put stuff in the
contextInitialized(ServletContextEvent) and
contextDestroyed(ServletContextEvent) methods.  It's a good appserver agnostic
startup/shutdown hook mechanism.

David


Mensaje citado por Ittay Dror <[EMAIL PROTECTED]>:

> Hello,
> 
> I want to be able to run some code that calls EJBs at the end of my ear
> deployment. I've tried to do this by creating an MBean, and putting the
> code in its start() method. My problem is that the MBean starts before
> the EJBs are deployed. I've tried putting a <depends> on the object
> names JBoss gives to these beans (in domain jboss.j2ee), but then the
> code is called before JBoss is able to create the beans. There is
> another way, which is to <depends> the MBean on the EJBModule. However,
> JBoss recognizes this by the full path of the jars, which may change in
> different computers.
> 
> Any help is appreciated,
> Thank you,
> Ittay


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to