geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Geronimo Wiki] Update of "GBeans" by manucet
Date Wed, 16 Nov 2005 11:20:12 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Geronimo Wiki" for change notification.

The following page has been changed by manucet:
http://wiki.apache.org/geronimo/GBeans

------------------------------------------------------------------------------
  
  Having said that, if you do not want to write code, you can also use a JMX console supporting
JSR 160.
  
+ == How do I call methods on a GBean deployed in the server from a J2EE App? ==
+ 
+ First get a handle to the kernel by calling KernelRegistry.getSingleKernel() and then use
the invoke methods in the Kernel interface.
+ eg:
+ {{{
+         ObjectName obj = new ObjectName("geronimo.example:name=EchoServer");
+         Kernel kernel = KernelRegistry.getSingleKernel();
+         String outputs=(String)kernel.invoke(obj,"hello");
+ }}}
+ where hello() is a method on the GBean
  
  = Article about GBeans =
  

Mime
View raw message