This content has been marked as final.
Show 3 replies
-
1. Re: Interacting with class properties rather than instances?
alesj Oct 12, 2006 3:33 PM (in response to starksm64)Not that I know of.
Even that static="true" is currently unsupported.<xsd:complexType name="beanType"> ... </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="optional"/> <xsd:attribute name="class" type="xsd:token" use="optional"/> <xsd:attribute name="mode" type="controllerModeType" use="optional"/> </xsd:complexType>
Maybe we could rewrite JarUtils to be used as singleton:public class JarUtils { /** The jar suffixes */ private Set<String> jarSuffixes = new CopyOnWriteArraySet<String>(); private static JarUtils instance = new JarUtils(); public static JarUtils getInstance() { return instance; } /** * Sets the jar suffixes * * @param suffix the suffix * @return true when added * @throws IllegalArgumentException for a null suffix */ public void setJarSuffixes(Set<String> suffixes) { if (suffixes == null) throw new IllegalArgumentException("Null suffix"); jarSuffixes = suffixes; } /** * Add a jar suffix * * @param suffix the suffix * @return true when added * @throws IllegalArgumentException for a null suffix */ public static boolean addJarSuffix(String suffix) { if (suffix == null) throw new IllegalArgumentException("Null suffix"); return instance.jarSuffixes.add(suffix); } /** * Remove a jar suffix * * @param suffix the suffix * @return true when removed * @throws IllegalArgumentException for a null suffix */ public static boolean removeJarSuffix(String suffix) { if (suffix == null) throw new IllegalArgumentException("Null suffix"); return instance.jarSuffixes.remove(suffix); } ... <bean name="jarUtils" class="org.jboss.virtual.plugins.context.jar.JarUtils"> <constructor factoryClass="org.jboss.virtual.plugins.context.jar.JarUtils" factoryMethod="getInstance" /> <property name="jarSuffixes"> <set elementClass="java.lang.String"> <value>.zip</value> <value>.ear</value> <value>.jar</value> <value>.rar</value> <value>.war</value> <value>.sar</value> <value>.har</value> <value>.aop</value> <value>.deployer</value> </set> </property> </bean>
Or simply use it as a bean defined in some top level deployment - and simply injected into dependent beans. -
2. Re: Interacting with class properties rather than instances?
starksm64 Oct 12, 2006 11:27 PM (in response to starksm64)There already is a bean that can be used for this in jboss5 (JARStructure deployer) so I don't have an immeadiate issue to resolve. This was more of a question on whether the mc supported class properties.
-
3. Re: Interacting with class properties rather than instances?
adrian.brock Oct 13, 2006 8:51 AM (in response to starksm64)"Do we have a notion of being able to configure class properties rather than instance properties?"
No, because I don't want the JBossMC metadata turning into
scripting language. :-)