A possible solution: your MBean can listen for notification event of type 
EJBDeployer.START_NOTIFICATION.
1) implement NotificationFilter, NotificationListener
public boolean isNotificationEnabled(Notification n) {
  return EJBDeployer.START_NOTIFICATION_TYPE.equals(n.getType());
}
public void handleNotification(Notification n, Object handback) {
  DeploymentInfo di = (DeploymentInfo) n.getUserObject();
  if (di.shortName.equals("yourbean.ear")) {
    //now start the scheduler
  }
}

2) in create() method of your bean:
ObjectName name = new ObjectName("jboss.ejb:service=EJBDeployer");
getServer().addNotificationListener(name, this, this, "someName");

See javax.management.*

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839837#3839837

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839837


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to