This content has been marked as final.
Show 5 replies
-
1. Re: @Resource and systemproperties-service.xml
jaikiran Sep 28, 2009 2:32 PM (in response to jprio)<env-entry-value>${serverName}</env-entry-value>
Try<env-entry-value>${jboss.server.name}</env-entry-value>
-
2. Re: @Resource and systemproperties-service.xml
jprio Sep 29, 2009 3:02 AM (in response to jprio)It's ok, it works fine, but I want to be able to use the values défined in the systemproperties-service.xml also !
-
3. Re: @Resource and systemproperties-service.xml
jaikiran Sep 29, 2009 8:55 AM (in response to jprio)"jprio" wrote:
but I want to be able to use the values défined in the systemproperties-service.xml also !
That's a bit tricky actually. Because of the way the deployers work in AS-5, the dependency jboss:type=Service,name=SystemProperties should actually be added on the deployer which parses the ejb-jar.xml into metadata, which from what i see is not straightforward.
-
4. Re: @Resource and systemproperties-service.xml
jaikiran Oct 2, 2009 5:33 AM (in response to jprio)I think there's a way out. Instead of specifying the properties in the deploy/systemproperties-service.xml file, you can instead have a MBean as follows in the JBOSS_HOME/server/< servername>/conf/jboss-service.xml:
<!-- Jaikiran: Copied this SystemPropertiesService MBean from deploy folder --> <mbean code="org.jboss.varia.property.SystemPropertiesService" name="jboss:type=Service,name=MySystemProperties"> <attribute name="Properties"> serverName=blahblah </attribute> </mbean>
That way, you don't have to worry about the deployment ordering and dependencies, since the conf/jboss-service.xml is always loaded during bootstrap of the server, before it picks up the deployments. -
5. Re: @Resource and systemproperties-service.xml
jprio Oct 2, 2009 12:49 PM (in response to jprio)Thanx for the answer. Looks like it works !
The only remaining little problem is that we used to have a per-webapp systemproperties-service, which seems not to be possible anymore.