[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBM 2 Management Interfaces
by mazz@jboss.com
anonymous wrote : There won't be a jboss instance to run it in!
I may have misunderstood you here. So, I want to be clear - your plugins run in the RHQ Agent. The RHQ Agent is NOT a JBoss instance, its a standalone, separate J2SE VM.
If your remoting stuff is running in some standalone VM itself, the plugin would just need to remotely connect to your VM (remember, the agent VM is running on the same box as the products its managing (i.e. your remoting VM is on the same box as the agent VM) so it can connect over 127.0.0.1, in case there are networking issues that you want to avoid). Using the JMX plugin, you can connect to remote JMX MBeanServer's because it uses the EMS library which can connect to any number of remote MBeanServer implementations (the standard JRE5 platform mbeanserver can be remoted, for example, using the "normal remote JMX way" - the EMS library handles this for us.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130778#4130778
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130778
18 years, 1 month
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBM 2 Management Interfaces
by mazz@jboss.com
anonymous wrote : For standalone though, we probably won't be able to use this. There won't be a jboss instance to run it in!
Depends on how you are exposing your remote management interface. If its just JMX, you can piggy back on our JMX plugin and have your plugin connect to your remoting services using direct JMX.
You can extend existing plugins to reuse existing plugin capabilities. This is how we wrote several of our plugins. For example, the JBossAS4 plugin as well as the Hibernate plugin use the JMX plugin to connect to the JMX MBeanServer hosting the services we want to manage. Under the covers it uses MC4J's EMS library so it supports all different kinds of JMX MBeanServers (standalone JDK5 platform MBS, JBossAS MBeanServer, BEA WebLogic, etc. etc.).
See:
http://svn.rhq-project.org/repos/rhq/trunk/etc/custom-jmx-plugin/src/main...
In that case, there is no Java code to write. You just write your plugin's XML descriptor and tell it which JMX operations/attributes your services support, and we utilize the JMX plugin to do the dirty work of calling the appropriate JMX APIs. So, for example, write simple JMX MBeans that manage your remoting services and just write the XML descriptor that describe your management MBean interfaces and the JMX plugin takes care of the actual connection to and calling the MBeans.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130775#4130775
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130775
18 years, 1 month
[Design the new POJO MicroContainer] - Re: Handling contexts in error
by adrian@jboss.org
"adrian(a)jboss.org" wrote : There's no notion of holding onto a broken bean
| (except for error reporting - see above).
|
Maybe we could add a notion of errorCallback?
i.e. if a bean errors during the startup process then we would invoke this callback,
something like:
| public class Container
| {
| @Install
| public void addContained(Contained contained} { // trivial }
| @Uninstall
| public void removeContained(Contained contained} { // trivial }
| @Error
| public void addError(Contained container) {}
| @Removed
| public void removeError(Contained container) {}
| }
|
The @Removed is because the only time it will go out of the error state
is when it is removed altogether from the controller during the redeploy.
But this seems a bit hacky to me? It's looking less like a POJO
and more like what the class says it is a "Container" ;-)
Perhaps a better approach would be for you to register for events
on your "contained" contexts, so you would actually receive:
Pseudo code
| // Your api
| removeContained(contained);
| // Out-of-band notifications from the MC
| errorOccurred(contained, throwable);
| uninstalled(contained);
| // Re-installed
| addContained(contained);
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130766#4130766
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130766
18 years, 1 month
[Javassist development Forum] - Re: Byte code limits?
by mburger
Hello!
I have similar problems, while instrumenting classes I get various exceptions:
Caused by: java.lang.NullPointerException
| at javassist.bytecode.ConstPool.getInterfaceMethodrefClassName(ConstPool.java:413)
| at javassist.expr.MethodCall.getClassName(MethodCall.java:91)
| at javassist.expr.MethodCall.getCtClass(MethodCall.java:75)
| at javassist.expr.MethodCall.getMethod(MethodCall.java:114)
And:
Caused by: java.lang.ClassCastException: javassist.bytecode.ClassInfo
| at javassist.bytecode.ConstPool.getFieldrefClassName(ConstPool.java:254)
| at javassist.expr.FieldAccess.getClassName(FieldAccess.java:97)
| at javassist.expr.FieldAccess.getCtClass(FieldAccess.java:89)
| at javassist.expr.FieldAccess.getField(FieldAccess.java:112)
Any idea what causes these failures?
Regards
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130760#4130760
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130760
18 years, 1 month