4 Replies Latest reply on Aug 26, 2009 7:16 AM by Radu Cirstoiu

    Problem with deployment listener when moving from JBoss 4 to

    Vít Jonáš Newbie

      Hi there,
      I have working EJB deployment listener under JBoss 4.2. I took inspiration from: http://www.jboss.org/community/wiki/ExampleMinimalNotificationListener.

      But when moved to JBoss 5.1.0 it seems like Ejb3Deployer is no longer notification broadcaster.

      I'm not sure what is the best way to check/listen EJBs deployment under JBoss 5. Could somebody give me some info or clue how to solve this under JBoss 5?

      Thanks

        • 1. Re: Problem with deployment listener when moving from JBoss
          jaikiran pai Master

          I don't see anything specific to EJB MBeans in that wiki. Which exact notifications were you receiving earlier? And can you please post your configuration(s)?

          While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

          • 2. Re: Problem with deployment listener when moving from JBoss
            Vít Jonáš Newbie

            I used following MBean listening on EJB3 deployments in JBoss 4.2 (jboss-service.xml):

            <server>
             <!-- EJB notification listener -->
             <mbean code="my.project.mbeans.EJBDeployNotificationListener" name="my.project.mbeans:service=EJBDeployNotificationListener">
             <attribute name="SubscriptionList">
             <subscription-list>
             <mbean name="jboss.ejb3:service=EJB3Deployer" handback="ejb3Deployer"/>
             <notification type="START_NOTIFICATION" />
             <notification type="STOP_NOTIFICATION" />
             </subscription-list>
             </attribute>
             </mbean>
            </server>
            


            my.project.mbeans.EJBDeployNotificationListener implements ListenerServiceMBeanSupport. In Jboss 4.2 I'm able to look to all deployed artifacts and do what I need with it. In this case for parsing specific proprietary annotations for our customer EJB3 classes.

            There isn't any service jboss.ejb3:service=EJB3Deployer in JBoss 5.1.0 all configuration (clean installation). I tried to explore jboss.deployment:id="Ejb3Deployer",type=Component but it seems to not provide any notification support. I guess it is because in JBoss 5 this should be handled in a different way.

            Can you give me some advise how to solve this task?

            • 3. Re: Problem with deployment listener when moving from JBoss
              jaikiran pai Master

              Because of the changes in the deployers in AS5, this feature is no longer available in EJB3Deployer (and i guess in most of the other refactored deployers). Please create a JIRA if you want this to be available.

              • 4. Re: Problem with deployment listener when moving from JBoss
                Radu Cirstoiu Newbie

                I'm having the same problem, is there any other way to be notified when an application is deployed/undeployed ?