There are many abstract/helper deployers.
You just need to choose the right one, the rest is then easy + just your own custom logic.
So, I recommend you check the existing ones + those from TorqueBox (as recommended by beve),
and I'm sure you'll be able to find useful info.
But if you still have issues/problems, simply post more info here, and we'll see what we can do. ;-)
Thanks a lot for answers, I have just read the aforementioned link. Actually I want to do is that whenever I add jar file with ending ".msar" to the JBoss deploy directory, my deployer will take the responsibility.
So I write a structure deployer that extends AbstractVFSStructureDeployer. In its determineStructure(...) method, I am looking for the correct suffix. If it is ".msar", creating context info with createContext() method and returning true. I am also adding attachment object MSarMetaData to the context.
For deployer, I extends the class AbstractOptionalRealDeployer. Then package the full project into JBoss deployers sub-folder with name "msar.deployer". After adding a application jar with ending ".msar" into the JBoss "deploy", structure class is called and returns true(actually it is called at bootstrap), but deployer has never been called.
I am so new to the MC framework. Absolutely catching something :)
Thanks for help;
You don't need a new structure deployer to be able to handle .msar.
All you need to do is update suffixes in JarUtils, so JarStructureDeployer recognizes your .msar as a jar.
And then have a real deployer (not structure) to add your MSarMetaData based on .msar suffix.
What is your deployer (the one that's not picked up) supposed to do?
But if there is no structure class, how do I create a meta data attachment?
After the structure "determineStructure" returns true, how MC decides to call which deployer is responsible for? Does it look for the attached meta data class that is set on the Deployer constructor using setInput(clazz).
Deployer will read the service list from the "META-INF" folder of the "msar" and and do some JMX related stuff whenever a user put "msar" archives to deploy directory.
Ok. I got it.
I add ".msar" suffix to JARStructure, then implement ParseDeployer and RealDeployer. Now everything works fine :)