1 Reply Latest reply on May 20, 2011 12:35 PM by alesj

    How to implement a Translator for JBoss AS 6?

    ctron

      Hi,

       

      I am trying to implement a class file translator for JBoss AS 6. I stumbled over the description of severa jboss configuration files ( http://community.jboss.org/wiki/JBoss5CustomMetadataFiles ) and tried to make a simple example. But jboss just seems to ignore everything. I am trying to have a simple EJB inside an EAR file that adds a class file translator only for the scope of the EAR.

       

      Now I got some questions in order to find the problem:

      a) where must the jboss-translator.xml be located. Inside the EAR? Inside the EJB? Somewhere else?

      b) Is any specific configuration in some other JBoss configuration necessary in order to activate the feature

      c) is there, somewhere, a working sample (which has not the be compiled first) which I can use for testing

       

      Thanks for helping!

       

      PS: I someone has AspectJ working inside EARs of JBoss AS 6, I would prefer that answer

        • 1. Re: How to implement a Translator for JBoss AS 6?
          alesj

          You're too early on the jboss-translator.xml usage. :-)

          I've just added this to MC's Classloading and Deployers project,

          and as such has not been part of any AS6 yet -- not even trunk.

           

          I'll try to put this into AS6 trunk asap -- need to do proper releases of both sub-projects,

          but meanwhile you can (easily) replace jboss-classloading* and jboss-deployers* jars in AS6 with the matching trunk's.

           

          Once this is in, one can easily declare jboss-translator.xml as part of deployment; in its META-INF dir.

          But the actual translator class has to be part of global lib,

          since it needs to be available before we actually create the classloader.

          (otherwise it would be a chicken-n-egg problem ;-))