SystemPropertiesService and DefaultPartition
nicmarti Mar 2, 2005 10:53 AMHi
JBoss 4.0 has a nice feature that allows a Property Service to load and set an env property. I am trying to define the JBoss Partition name in the property service so that I can change later the partition name from "DefaultPartition" to "TestPartition".
I am using the "all" configuration with JBoss 4.0.1 SP1 under linux and windows with JDK 1.4.2
Here is what I did
1/ I edited server/all/properties-services.xml and defined a property to override
the partition name to Nicolas instead of DefaultPartition:
<mbean code="org.jboss.varia.property.SystemPropertiesService" name="jboss:type=Service,name=SystemProperties"> <!-- | Set raw properties file style properties. --> <attribute name="Properties">jboss.partition.name=Nicolas</attribute> </mbean>
2/ When I start jboss with run.sh -c all I get the following error:
16:43:55,310 ERROR [URLDeploymentScanner] Incomplete Deployment listing: MBeans waiting for other MBeans: ObjectName: jboss:partition=Nicolas,service=FarmMember state: CONFIGURED I Depend On: jboss:service=Nicolas jboss.web:service=WebServer jboss.system:service=MainDeployer Depends On Me: MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM: ObjectName: jboss:service=Nicolas state: NOTYETINSTALLED I Depend On: Depends On Me: jboss:partition=Nicolas,service=FarmMember
3/ So what I did is I renamed properties-services.xml to aaaproperties-services.xml so that
this file is read first by the Deployer when JBoss starts.
I tried to start JBoss and had more success.
I can see the partition and clustering:
16:50:15,038 INFO [Nicolas] Initializing 16:50:15,281 INFO [STDOUT] ------------------------------------------------------- GMS: address is localhost:33106 (additional data: 14 bytes) ------------------------------------------------------- 16:50:17,321 INFO [Nicolas] Number of cluster members: 1 16:50:17,322 INFO [Nicolas] Other members: 0 16:50:17,322 INFO [Nicolas] Fetching state (will wait for 30000 milliseconds): 16:50:17,381 INFO [Nicolas] New cluster view for partition Nicolas (id: 0, delta: 0) : [127.0.0.1:1199] 16:50:17,387 INFO [Nicolas] I am (127.0.0.1:1199) received membershipChanged event: 16:50:17,388 INFO [Nicolas] Dead members: 0 ([]) 16:50:17,388 INFO [Nicolas] New Members : 0 ([]) 16:50:17,388 INFO [Nicolas] All Members : 1 ([127.0.0.1:1199]) 16:50:17,484 INFO [HANamingService] Listening on /127.0.0.1:1200 16:50:17,526 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /127.0.0.1:1102, group=230.0.0.4, HA-JNDI address=127.0.0.1:12
However it doesn't work for the HTTPSession Clustering service.
I got the following error
16:50:42,356 ERROR [URLDeploymentScanner] Incomplete Deployment listing: MBeans waiting for other MBeans: ObjectName: jboss.j2ee:jndiName=clustering/HTTPSession,service=EJB state: NOTYETINSTALLED I Depend On: jboss:service=DefaultPartition jboss:service=invoker,type=jrmp Depends On Me: jboss:service=ClusteredHttpSession ObjectName: jboss:service=ClusteredHttpSession state: CONFIGURED I Depend On: jboss.j2ee:jndiName=clustering/HTTPSession,service=EJB Depends On Me: MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM: ObjectName: jboss:service=DefaultPartition state: NOTYETINSTALLED I Depend On: Depends On Me: jboss.j2ee:jndiName=clustering/HTTPSession,service=EJB
I found that the problem is from the file:
jboss-4.0.1sp1/server/all/deploy/jbossha-httpsession.sar/ClusteredHttpSessionEB.jar/META-INF/jboss.xml
It contains a DefaultPartition defined as:
<cluster-config> <partition-name>${jboss.partition.name:DefaultPartition}</partition-name> </cluster-config> <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends> <depends>jboss:service=invoker,type=jrmp</depends> </container-configuration> </container-configurations>
It seems to me that the ClusteredHttpSessionEB doesn't read the value from
the environment and always tries to use DefaultPartition
What should I do ? report a bug ?
Thanks for your help