[Management, JMX/JBoss] - Description / Parameter names etc in jmx-console
by bdamato
I'm messing around with jboss-5.1.0 and I have created an annotated ejb3 bean as described here:
http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/j...
It works as advertised (although I had to monkey with it to work with 5.1.0).
Ideally I'd like to add some friendly operation descriptions to replace the default "Operation exposed for management" that shows up in the jmx-console.
Is it possible to do this through annotations, or am I stuck having to create service xml files for these?
| package bob;
|
| public interface ServiceOneManagement {
|
| public void doATaskForMe(String input);
|
| public void setTheValue(int theValue);
|
| public int getTheValue();
|
| void create() throws Exception;
|
| void start() throws Exception;
|
| void stop();
|
| void destroy();
|
| }
|
| package bob;
|
| import org.jboss.ejb3.annotation.Management;
| import org.jboss.ejb3.annotation.Service;
|
| @Service(objectName = "bob.mbeans:serviceName=ServiceOne")
| @Management(ServiceOneManagement.class)
| public class ServiceOne implements ServiceOneManagement {
| private int theValue;
|
| public int getTheValue() {
| return theValue;
| }
|
| public void setTheValue(int theValue) {
| this.theValue = theValue;
| }
|
| public void doATaskForMe(String input) {
| System.out.println("Called do a task for me");
| }
|
| public void create() throws Exception {
| System.out.println("ServiceOne - Creating");
| }
|
| public void start() throws Exception {
| System.out.println("ServiceOne - Starting");
| }
|
| public void stop() {
| System.out.println("ServiceOne - Stopping");
| }
|
| public void destroy() {
| System.out.println("ServiceOne - Destroying");
| }
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237361#4237361
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237361
16 years, 10 months
[JBoss jBPM] - jBPM4 configuration problem
by dharraj
Hello,
I am using the default configuration that came with jBPM4 examples. I am getting the following exception when calling Configuration.setXmlString.
log4jfile=/project/rt/dev/rrp/pgs/jpl/mipl/pgs4/config/log4j.cfg.xml
log4j:WARN No appenders could be found for logger (org.jbpm.pvm.internal.xml.Parser).
log4j:WARN Please initialize the log4j system properly.
Huaaaaaa
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jbpm.pvm.internal.env.JbpmConfigurationParser.(JbpmConfigurationParser.java:47)
at org.jbpm.pvm.internal.env.JbpmConfigurationParser.(JbpmConfigurationParser.java:50)
at org.jbpm.pvm.internal.cfg.JbpmConfiguration.parse(JbpmConfiguration.java:165)
at org.jbpm.pvm.internal.cfg.JbpmConfiguration.setXmlString(JbpmConfiguration.java:152)
at org.jbpm.api.Configuration.setXmlString(Configuration.java:94)
at jpl.mipl.pgs4.Environment.(Environment.java:64)
at jpl.mipl.pgs4.EnvironmentFactory.createEnvironment(EnvironmentFactory.java:45)
at jpl.mipl.pgs4.EnvironmentFactory.main(EnvironmentFactory.java:75)
Caused by: org.jbpm.api.JbpmException:
error: couldn't parse xml document : org.apache.crimson.tree.DomEx: NAMESPACE_ERR: Attempt to create or change an object in a way which is incorrect with regard to namespaces.
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:169)
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:142)
at org.jbpm.pvm.internal.xml.Parse.checkErrors(Parse.java:189)
at org.jbpm.pvm.internal.wire.xml.WireParser.(WireParser.java:274)
... 8 more
Caused by: org.jbpm.api.JbpmException
at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:165)
... 11 more
Caused by: org.apache.crimson.tree.DomEx: NAMESPACE_ERR: Attempt to create or change an object in a way which is incorrect with regard to namespaces.
at org.apache.crimson.tree.ElementNode2.checkArguments(ElementNode2.java:182)
at org.apache.crimson.tree.XmlDocument.createElementNS(XmlDocument.java:844)
at org.apache.crimson.tree.DOMImplementationImpl.createDocument(DOMImplementationImpl.java:142)
at org.jbpm.pvm.internal.xml.Parser.buildDom(Parser.java:441)
at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:387)
at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:157)
... 9 more
Please help ASAP.
Thanks
Raj
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237341#4237341
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237341
16 years, 10 months