[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-26 Thread PeterJ
You cannot get a reference. Instead, all operations on an mbean must be done through the MBeanServerConnection instance. Thus, to make the example method call, you would write: ObjectName name = new ObjectName(--name of your 'world' mbean--); | mconn.invoke(name, tell, null, null); See

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-24 Thread deus.machinarum
ok, I get that now How would I be able to do something like: Beanname.methodxyz(); e.g.: world.tell(); i.e. How can I get a reference? Sorry if that is already explained and I'm just missing it. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3953169#3953169

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-23 Thread deus.machinarum
Hi, executing if (System.getSecurityManager() == null) { | System.setSecurityManager(new RMISecurityManager()); | } | Hashtable env = new Hashtable(); | String factory =

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-23 Thread PeterJ
Oops, my instructions were not completely correct. The correct data source name is DefaultDS, not ds/DefaultDS. The easiest way to find out the name of the mbean you are looking for it to use the jmx-console: http://localhost:8080/jmx-console. Then you simple replace the object name text

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-22 Thread deus.machinarum
Thank you so much for pointing that out. One more problem remains: How do i get my stub? Currently I'm using the following code: (World being the ManagementInterface of the Bean I want to use) if (System.getSecurityManager() == null) { | System.setSecurityManager(new

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-22 Thread PeterJ
See http://www.jboss.com/index.html?module=bbop=viewtopict=84303 for a complete program. The mbean name I used was based on my data source, but you could subsistutue DefaultDS for ProductDS and it should work. Or pick a name from the jmx-console. View the original post :

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-21 Thread deus.machinarum
@PeterJ: Executing your code leads to the following: anonymous wrote : javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.jmx.adaptor.rmi.RMIAdaptor (no security manager: RMI class loader disabled)] | at

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-21 Thread [EMAIL PROTECTED]
This is all described in the FAQ: http://www.jboss.org/wiki/Wiki.jsp?page=FAQJBossJMX View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3952294#3952294 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3952294

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-21 Thread PeterJ
The no security manager error sure looked familiar, but it took me some time to find it. I ran into the same error when I wrote mbean client code that I ran on my Linux box attempting to connect to JBoss running on my Windows box. Here is what I did. I added the following lines before the

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-21 Thread deus.machinarum
Here's my current code : try{ | | if (System.getSecurityManager() == null) { | System.setSecurityManager(new RMISecurityManager()); | } | Hashtable env = new Hashtable(); |

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-21 Thread PeterJ
The org.jboss.jmx.adaptor.rmi.RMIAdaptor class is in these jar files, all found in jboss_home/client: * jbossall-client.jar * jbossjmx-ant.jar * jmx-invoker-adaptor-client.jar Include one of these in your classpath (I use jbossall-client). View the original post :

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-20 Thread PeterJ
Are you trying to get the mbean server for JBoss? If so, I usually use the following code: Hashtable env = new Hashtable(); | String factory = org.jnp.interfaces.NamingContextFactory; | env.put(Context.INITIAL_CONTEXT_FACTORY, factory); | String url1 = jnp://localhost:1099; |

[JBoss-user] [Management, JMX/JBoss] - Re: Problem locating an MBeanServer

2006-06-20 Thread [EMAIL PROTECTED]
It seems he's trying to locate the local mbeanserver, which doesn't exist. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3952093#3952093 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3952093