[jboss-user] [Microcontainer] - Alternative JAR extensions

bob.mcwhirter do-not-reply at jboss.com
Sat Nov 29 16:17:26 EST 2008


I've started working on my RailsStructure structure deployer again.

I'm hoping to deploy "myapp.rails" which is just a JAR archive with a magical extension of ".rails".

I've found that if I modify conf/deployers.xml and add 

<value>.rails</value>

to the JARStructure, then my .rails archives are recognized as vfszip files, correctly.

If my RailsStructure calls the underlying JarUtils.addJarSuffix( ".rails" ) in its own constructor, though, it fails to recognize my .rails file as a Jar, and ends up with a FileHandler handling it, instead of a JarHandler.

public RailsStructure() {
  |   setRelativeOrder( -10000 );
  |   JarUtils.addJarSuffix( ".rails" );
  | }

I've also attempted to do the install callback against JARStructure, with my RailsStructure implementing JarExtensionProvider.

public String getJarExtension() {
  |   return ".rails";
  | }

<install bean="JARStructure" method="addJarExtension">
  |   <parameter>
  |     <this/>
  |   </parameter>
  | </install>
  | <uninstall bean="JARStructure" method="removeJarExtension">
  |   <parameter>
  |     <this/>
  |   </parameter>
  | </uninstall>

This also results in failure.  

I'd like to not have to have edits to deployers.xml, as that breaks the self-contained-ness of my deployer.  But I seem otherwise unable to get ".rails" added as a vfszip-handleable type.

Any pointers would be appreciated.

Thanks!

-Bob

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193196#4193196

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193196



More information about the jboss-user mailing list