Results 1 to 4 of 4

Thread: Managing custom properties using JMX.

  1. #1

    Smile Managing custom properties using JMX.

    Hi..

    We are new to JMX technology , however we tired to use JMX for as a POC for a sample web application . we have a web based application which has a lot or properties defined to make the application more configurable.however changing these properties makes us to bring down the server (each time) change the *.properties files and reload the process. We have tried to expose these properties using JMX, more specifially using dymanic mbeans in the Jboss Mean Server.

    However when we change the properties using console of Jboss, the changed properties does not seem to reflect in our code. We can see that the properties are getting changed thru the Mbean server in the JVM.

    Is there any where that we are failing to look up these properties. Or is our concept wrong.

    Tx
    Allwyn

  2. #2

    Default

    I got the same situation. I use Spring 2.5 and Tomcat as web server.

    Does any one know about this ?
    Session Factory
    Code:
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" singleton="true">	
    		<property name="dataSource">
    			<ref bean="dataSource"/>
    		</property>
    		
    		<property name="hibernateProperties">
    			<ref bean="hibernateConf"/> 
    		</property>
    		
    		<property name="annotatedClasses">
    			<list>
    				<value>au.com.auscript.template.domain.Message</value>
    			</list>
    		</property>
    	</bean>
    hibernateConf
    Code:
    public class HibernateConfig extends Properties implements HibernateConfigMBean{
    
    	private static final String SHOW_SQL = "hibernate.show_sql";
    	
    	public HibernateConfig() {
    		setProperty(SHOW_SQL, "true");
    	}
    	
    	
    	
    	
    	
    	public void noshowSQL() {
    		
    		setProperty(SHOW_SQL, "false");
    		System.out.println(this.getProperty(SHOW_SQL));
    	}
    
    	public void showSQL() {
    		
    		setProperty(SHOW_SQL, "true"); 
    		System.out.println(this.getProperty(SHOW_SQL));
    	}
    
    
    }




    Thanks
    Tony

  3. #3

    Default

    Did u get the answer for the your question?

    Please post it and help me out am facing same sort of problem now

  4. #4

    Default

    yes we managed it. We however could not get and handle to the properties loaded in the JVM however we could get get the name of the properties file that was loaded in the JVM. This enabled us to reload the properties in the JVM once again.

    We tried this as the Reloading of propeties would generally be done only by the administartor in the production env ( probably when there is no one using the system)


    Regards
    Glen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •