7 Replies Latest reply on Mar 23, 2007 5:23 PM by Carlo de Wolf

    JBossDDObjectFactory use of SystemPropertiesService

    Brian Stansberry Master

      JBossDDObjectFactory.getValue is attempting to invoke on the SystemPropertiesService in order to do system property substitution. This is failing in Branch_4_2:

      2007-03-22 16:42:15,859 WARN [org.jboss.ejb3.metamodel.JBossDDObjectFactory] Unable to look up property service for jboss.xml element partition-name with value ${jboss.partition.name:DefaultPartition}. Caused by class javax.management.InstanceNotFoundException jboss:type=Service,name=SystemProperties is not registered.
      


      This particular example works out OK, because later code meant to handle ${jboss.partition.name:DefaultPartition} as the value for @Clustered(partitionName=...) performs the substitution using org.jboss.util.StringPropertyReplacer. But other property substitutions will fail.

      So,

      1) Any reason JBossDDObjectFactory doesn't just use org.jboss.util.StringPropertyReplacer? It's not clear to me what the benefit of calling on the SystemPropertiesService is.

      2) If there's a reason to call the SystemPropertiesService I suppose we should get it to work in Branch_4_2 for 4.2.0.GA.