[Management, JMX/JBoss] - Spring JMX beans not showing up in Jboss page
by luvfort
Hello team,
I'm new to Jboss-Spring-JMX. Any help will be appreciated immensely.
Thanks,
Maddy
I'm using Spring 2.5.x and Java 1.6 and JBoss 4.x
public interface EnrollmentGroupLogic {
| Long getRANK_EXPIRY_TIME();
| void setRANK_EXPIRY_TIME(Long RANK_EXPIRY_TIME);
| }
The code of the implementing class is
| @Service
| @ManagedResource(objectName = "spring:name=enrollmentGroup", description = "Enrollment Group")
| public class EnrollmentGroupLogicImpl implements EnrollmentGroupLogic{
|
| public Long RANK_EXPIRY_TIME = 60000L;
|
| @ManagedAttribute
| public Long getRANK_EXPIRY_TIME() {
| return RANK_EXPIRY_TIME;
| }
|
| @ManagedAttribute
| public void setRANK_EXPIRY_TIME(Long RANK_EXPIRY_TIME) {
| this.RANK_EXPIRY_TIME = RANK_EXPIRY_TIME;
| }
| }
My applicationcontext-xml file contains
| <bean
| id="mbeanServer"
| class="org.springframework.jmx.support.MBeanServerFactoryBean">
| <property
| name="locateExistingServerIfPossible"
| value="true"/>
| </bean>
|
|
| <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
| <property name="assembler" ref="assembler"/>
| <property name="autodetect" value="true"/>
| <property name="namingStrategy" ref="jmxnamingstrategy"/>
| <property name="server" ref="mbeanServer"/>
| </bean>
| <bean id="jmxnamingstrategy"
| class="org.springframework.jmx.export.naming.MetadataNamingStrategy">
| <property name="attributeSource" ref="attributeSource"/>
| </bean>
| <bean id="attributeSource"
| class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/>
|
| <bean id="assembler" class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
| <property name="attributeSource" ref="attributeSource"/>
| </bean>
I've also added the following in my run.bat
set JAVA_OPTS=%JAVA_OPTS% -Djavax.management.builder.initial=org.jboss.system .server.jmx.MBeanServerBuilderImpl
set JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote
I'm seeing the following in the system console
11:13:28,835 INFO [MBeanExporter] Registering beans for JMX exposure on startup
| 11:13:28,865 INFO [ContextLoader] Root WebApplicationContext: initialization completed in 41371 ms
I'm seeing the following in log file
2009-02-11 11:45:38,568 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Creating shared instance of singleton bean 'jmxnamingstrategy'
| 2009-02-11 11:45:38,568 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Creating instance of bean 'jmxnamingstrategy'
| 2009-02-11 11:45:38,568 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0'
| 2009-02-11 11:45:38,568 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1'
| 2009-02-11 11:45:38,568 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2'
| 2009-02-11 11:45:38,568 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#3'
| 2009-02-11 11:45:38,568 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#4'
| 2009-02-11 11:45:38,568 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#5'
| 2009-02-11 11:45:38,578 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Eagerly caching bean 'jmxnamingstrategy' to allow for resolving potential circular references
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'attributeSource'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Invoking afterPropertiesSet() on bean with name 'jmxnamingstrategy'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#3'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#4'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#5'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#3'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#4'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#5'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Finished creating instance of bean 'jmxnamingstrategy'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'mbeanServer'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#3'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#4'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#5'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#2'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#3'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#4'
| 2009-02-11 11:45:38,588 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#5'
| 2009-02-11 11:45:38,648 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Invoking afterPropertiesSet() on bean with name 'exporter'
| 2009-02-11 11:45:38,648 INFO [org.springframework.jmx.export.MBeanExporter] Registering beans for JMX exposure on startup
| 2009-02-11 11:45:38,648 DEBUG [org.springframework.jmx.export.MBeanExporter] Autodetecting user-defined JMX MBeans
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209235#4209235
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209235
17 years, 5 months
[Microcontainer] - Deployment contextual information
by david.lloyd@jboss.com
Do deployments have a notion of contextual information? Like, deployment X is associated with context classloader Y or security context Z?
I'm struggling with this idea in the Threads module. The case I'm thinking of is that say you have two deployments, X and Y. They both use the same thread pool. But they need to have different contextual information - context classloader is just one example; logging context might be another, or security context or even something trivial like a temporary name attached to the thread name or something like that. When each deployment runs a task, that task should be run with the proper contextual information set.
Is there any provision for accessing deployment contextual information at a MC level?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209230#4209230
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209230
17 years, 5 months
[Persistence, JBoss/CMP, Hibernate, Database] - Create table warning... Need help!
by ablegreen27
Everyone:
I recently moved JBoss AS 5.0.0.GA from Hypersonic to MySQL.
I believe I have resolved all resulting issues, except for this
rather irritating CREATE TABLE warning related to the
QuartzTimerServiceFactory (which occurs when starting
the server), shown below:
14:27:24,500 WARN [QuartzTimerServiceFactory] sql failed: CREATE TABLE QRTZ_JOB_DETAILS ( JOB_NAME VARCHAR (80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, JOB_DATA BLOB NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP) )
In my own efforts, I have thus far determined that:
1. The QRTZ_JOB_DETAILS table is properly created on the
first bootup of JBoss AS. Once created, future startups
present the above warning.
2. It has been suggested in other blogs/forums that a possible
resolution is to set CREATE_DB_ON_STARTUP = FALSE within
the server/xxx/deploy/ejb3-timer-service.xml file, but this
does not appear to have any effect.
My own educated guess is that some JBoss AS code attempts
to create the appropriate tables based upon the specs found
in the ejb3-timer-service.xml file on each startup of the server,
where the first startup creates the tables, and all future
startup attempts fail (obviously) since the tables already
exist (hence the warning). It would seem to me, however,
that the server code would check to see if the tables
already exist before attempting to create them, thereby
avoiding unnecessary warnings. This leaves me with that
aching feeling that I have not resolved an existing problem.
After an exhausting search on the web, I am frustratingly
out of ideas for the moment. Any help would be greatly
appreciated!!!!
Thanks in advance.
...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209227#4209227
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209227
17 years, 5 months