2 Replies Latest reply on Dec 3, 2014 2:12 AM by Philippe Marschall

    Migration of jboss-4.2.3.GA MBean wrapping Dumpster SMTP service to wildfly-8.1, Best Practices / Tips

    Juergen H Newbie

      Hi, I'm currently in the process of migrating a simple web-application from jboss-4.2.3.GA to wildfly-8.1 (basically used as a servlet container)

       

      I have a production and test environments.

       

      I'm using Dumpster SMTP http://quintanasoft.com/dumbster/ to catch emails sent in test environments

       

      To this end, I created a DumpsterSimpleSmtpServerService extends ServiceMBeanSupport in jboss-4.2.3.GA. The class is available via <jboss-4.2.3.GA>/server/<config>/lib/MyDumpsterService.jar

      I also deploy - in test environments only - a <jboss-4.2.3.GA>/server/<config>/deploy/com.dumbster.smtp-service.xml:

       

      <server>
          <mbean
              name="dumpster:service=SmtpServer"
              code=DumpsterSimpleSmtpServerService"
              xmbean-dd="xmdesc/DumpsterSimpleSmtpServerService-xmbean.xml"
              >
              <attribute name="port">8625</attribute>
              <depends optional-attribute-name="threadPoolMBean" proxy-type="attribute">jboss.system:service=ThreadPool</depends>
          </mbean>
      </server>
      
      
      

      It's basically a service start / stop with a port number and a Thread resource.

       

      Now my question is how to best mirgrate this setup to wildfly-8.1?

       

      I read that jboss-service deployments still work:

      https://docs.jboss.org/author/display/WFLY8/How+do+I+migrate+my+application+from+AS5+or+AS6+to+WildFly#HowdoImigratemyapplicationfromAS5orAS6toWildFly-UpdateApplicationsThatUseServicestyleDeployments

      So I could put my jar and service.xml into a .sar and deploy it in test environments. Seems the easiest thing to do with least changes needed.

      But I'd like to get rid of legacy stuff if possible. Also I don't know where to get a "jboss.system:service=ThreadPool" from. I don't want to simply do "new Thead" but use some server managed factory instead.

       

      I thought about extending wildfly-8.1 subsystems with my own custom dumpster-smtp subsystem

      https://docs.jboss.org/author/display/WFLY8/Extending+WildFly+8

      Though on first read this seems to involve lots of stuff to do for a simply thing as my service.

       

      I also thought to create a dumpster-smtp server application ear, using JAVAEE concurrency support to have it run in background listening to it's socket.

      But again, seems a bit of overkill creating a fully blown app.

       

      Any recommendations for migrating my jboss-4.2.3.GA single class MBean service + deployment descriptor service.xml to wildfly-8.1 ?