-
1. Re: addNotificationListener on Tomcat final start?
raja05 Mar 16, 2005 4:23 AM (in response to jivkoto)Why dont you make your mbean depend on the Tomcat MBean. That way, your mbean will not be invoked till tomcat is started.. the tomcat mbean is
jboss.web:service=WebServer -
2. Re: addNotificationListener on Tomcat final start?
jivkoto Mar 23, 2005 8:33 AM (in response to jivkoto)Hi,
the situation is little bit complicated. I actually have MBean that have to make connection to servlet ... never mind what. But Tomcat connectors are started after jboss is started. My MBean waits for this too to make the connection. So if i try to :
URL url = new URL(urlString);
url.openStream();
after i get "org.jboss.system.server.started" notification then i will wait for stream, tomcat will wait for notification and deadlock occurs. Thats why i need notification on Tomcat. -
3. Re: addNotificationListener on Tomcat final start?
dimitris Mar 24, 2005 4:46 AM (in response to jivkoto)So you mean, depending on the order you receive "org.jboss.system.server.started" (i.e. if you receive this first from the tomcat connector) you are in a dealock?
-
4. Re: addNotificationListener on Tomcat final start?
jivkoto Apr 8, 2005 10:54 AM (in response to jivkoto)Yes, deadlock occurs. And I am looking for an elegant resolve for this problem.
-
5. Re: addNotificationListener on Tomcat final start?
dimitris Apr 25, 2005 2:17 PM (in response to jivkoto)This has been solved in the next releases (3.2.8/4.0.2) with the introduction of a new notification "jboss.tomcat.connectors.started":
http://jira.jboss.com/jira/browse/JBAS-1741
To get the event, ala NotificationListenerSupport you can use:... <attribute name="SubscriptionList"> <subscription-list> <mbean name="jboss.web:service=WebServer"> <filter factory="NotificationFilterSupportFactory"> <enable type="jboss.tomcat.connectors.started"/> </filter> </mbean> </subscription-list> </attribute> ...
-
6. Re: addNotificationListener on Tomcat final start?
dimitris May 4, 2005 6:28 PM (in response to jivkoto)Apparently, an elegant solution for this exist now in 4.0.2:
http://wiki.jboss.org/wiki/Wiki.jsp?page=BarrierController