3 Replies Latest reply on May 30, 2017 11:10 AM by jbertram

    load class from activeMQ broker config file

    aragoubi

      This post was updated on May 30, 2017; 4:08pm.

      I have an activemq broker deployed inside my jboss server.
      I am following this link in order to limit the connectivity to the ActiveMQ server based on Token
      https://mariuszprzydatek.com/2014/01/04/token-based-authentication-plugin-for-activemq/.

       

      I created a project named "authentification" in eclipse containing the two classes "TokenAuthentificationPlugin" and "TokenAuthentificationBroker" and deployed it in my server as a war file.

       

      My question is how can I get reference to the tokenAuthenticationPlugin class from my broker config file.
      I tried this :
      <bean id="tokenAuthenticationPlugin" class="authentification.TokenAuthentificationPlugin" xmlns="http://www.springframework.org/schema/beans"> 

       

      But I am getting this error when activemq start to be deployed : Caused by: java.lang.ClassNotFoundException: authentification.TokenAuthentificationPlugin from [Module "deployment.activemq-rar-5.9.0.rar:main" from Service Module Loader].

       

      Could someone help me with this?

        • 1. Re: load class from activeMQ broker config file
          jbertram

          The classloader responsible for the ActiveMQ broker needs to be able to see the plugin class(es) as well.  Right now that's not happening.  I'm not sure how you've got your broker configured (e.g. as a module) so I can't advise further.

          • 2. Re: load class from activeMQ broker config file
            aragoubi

            I integrated activemq like this: I copied the activemq_rar.rar in my jboss standalone/deployement repository. I generated an ironjacamar.xml file and injected it in the activemq_rar meta_inf repository.
            I made some changes to the broker config file and the ra file in order to start my broker after deployement.

            • 3. Re: load class from activeMQ broker config file
              jbertram

              The order of deployment here doesn't really matter since the deployments have isolated classloaders.  If you want your broker to be able to see the plugin classes then you should package your plugin classes with the broker (i.e. in the broker's RAR).  Or you can deploy the broker as a module instead, create a module for your plugins, and then reference the plugin module from the broker module.