Apologies,
    Please ignore my last message, I did not read the last reply from Scott.
That solved my problem.

Thank you!

Simone
----- Original Message ----- 
From: "Simone Milani" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 24, 2003 6:12 PM
Subject: Re: [JBoss-user] JMX notifications


> Hi Adrian,
>
>     The  RMINotificationListener is on package org.jboss.jmx.adaptor.rmi
and
> indeed is serializing the object to the server (anyway good to know that
can
> be used :) ).  I was actually
> I just wonder now what would should go in the placeholder of the following
> code so that the notification gets back to the client.
>
>    RMIAdaptor server = (RMIAdaptor)
>     ctx.lookup("jmx/rmi/RMIAdaptor");
>    ObjectName myObjectName = new
> ObjectName("mercury.farming:service=FarmHandPoolService");
>    server.addNotificationListener (myObjectName,
>            ????
>            null,
>            ????);
> I could not figure it out from that example.
> Thank you!!!
>
> Simone
> ----- Original Message ----- 
> From: "Adrian Brock" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 24, 2003 1:19 PM
> Subject: RE: [JBoss-user] JMX notifications
>
>
> > What is RMINotificationListener?
> >
> > It looks like you've just serialized your notification listener
> > and therefore it is running on the server.
> >
> > JBoss includes a connector and some support mbeans that
> > allow notifications to be returned to the client
> > using RMI or JMS or polling.
> > You register your listener with the connector which
> > will proxy requests to the remote mbeanserver.
> >
> > Some of this is documented in the (out-of-date) link I posted before
> > http://jboss.sourceforge.net/doc-24/ch11s39.html
> >
> > Regards,
> > Adrian
> >
> > xxxxxxxxxxxxxxxxxxxxxxxx
> > Adrian Brock
> > Director of Support
> > Back Office
> > JBoss Group, LLC
> > xxxxxxxxxxxxxxxxxxxxxxxx
> >
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of
> > > Simone Milani
> > > Sent: 24 June 2003 12:07
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [JBoss-user] JMX notifications
> > >
> > >
> > > Hi Adrian,
> > >
> > >     Thank you.  I got to the point where my notification are
> > > all handled on
> > > the server not on the client.
> > > Here is what I have done:
> > >
> > > public class JMXClient
> > >  implements RMINotificationListener, Serializable
> > > {
> > >  .....
> > >
> > >  public static void main(String[] args)
> > >  {
> > >
> > >   try
> > >   {
> > >
> > >
> > >    RMIAdaptor server = (RMIAdaptor)
> > >     ctx.lookup("jmx/rmi/RMIAdaptor");
> > >
> > > //Server will print "handling here", why?
> > > ObjectName myObjectName = new
> > > ObjectName("mercury.farming:service=FarmHandPoolService");
> > >    server.addNotificationListener (myObjectName,
> > >            new JMXClient(),
> > >            null,
> > >            null);
> > >
> > >    Object[] params = new Object[] {};
> > >
> > >    String[] signature = {};
> > >
> > >    Thread.currentThread().sleep(5 * 1000);
> > >
> > > //This causes one notification to be sent and server prints
> > > "Handling here"
> > >    Object result =  server.invoke(myObjectName, "testNotification",
> > >     params, signature);
> > >    System.out.println("Result: " + result);
> > >
> > >    Thread.currentThread().sleep(30 * 1000);
> > >   }
> > >   catch (Exception e)
> > >   {
> > >    e.printStackTrace();
> > >   }
> > >  }
> > >
> > >  public void handleNotification(Notification notification,
> > > Object handback)
> > >  {
> > >   System.out.println("Handling here");
> > >  }
> > > }
> > >
> > > Thanks!
> > >
> > > Simone
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: INetU
> > Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to