This content has been marked as final.
Show 3 replies
-
1. Re: regardig jboss-beans.xml
jc7442 Aug 13, 2007 9:56 AM (in response to mnrz)I do that kind of things for JBoss configuration. I use the SystemProperty service.
In your -service.xml file you can use variable. For example:<mbean code="org.jboss.naming.NamingService" name="jboss:service=Naming" xmbean-dd="resource:xmdesc/NamingService-xmbean.xml"> ... <attribute name="Port">${port.jnp}</attribute> . .. <attribute name="BindAddress">${jboss.bind.address}</attribute> ... <attribute name="RmiPort">${port.rmi}</attribute>
Here I have three variables.
I configure the SystemPropertyService to read system property from a property file. This service will replace in xml files, variable with property from property file:<mbean code="org.jboss.varia.property.SystemPropertiesService" name="jboss:type=Service,name=SystemProperties"> <!-- | Load properties from each of the given comma seperated URLs--> <attribute name="URLList">c:\jboss\server\configuration\ports.properties </attribute> <!-- | Set raw properties file style properties. <attribute name="Properties"> my.project.property=This is the value of my property my.project.anotherProperty=This is the value of my other property </attribute> --> </mbean>
I use that for all the ports used by my JBoss. -
2. Re: regardig jboss-beans.xml
alrubinger Aug 13, 2007 2:08 PM (in response to mnrz)I use an alternative approach, using the Service Binding Manager...
In $JBOSS_HOME/server/[serverName]/conf I have service-bindings.xml (obtained from $JBOSS_HOME/docs/examples/binding-manager/sample-bindings.xml in a new installation), and this is sufficient for 4 configurations of servers. Then, I deploy the Service Binding Manager in an MBean (new binding_manager-service.xml file):<mbean code="org.jboss.services.binding.ServiceBindingManager" name="jboss.system:service=ServiceBindingManager"> <attribute name="ServerName">ports-default</attribute> <attribute name="StoreURL">file:../server/port-bindings.xml</attribute> <attribute name="StoreFactoryClassName"> org.jboss.services.binding.XMLServicesStoreFactory </attribute> </mbean>
...where I can pass in the ServerName specific to each instance I'd like to use.
S,
ALR -
3. Re: regardig jboss-beans.xml
mnrz Aug 14, 2007 1:04 AM (in response to mnrz)thank you all
but what if I use embedable EJB with Tomcat 5.5 ?
do you have any solution for that?
thanks again