Package com.sun.appserv.management.base

Examples of com.sun.appserv.management.base.NotificationServiceMgr


  }

    public NotificationService
  create()
  {
    final NotificationServiceMgr  proxy  = getNotificationServiceMgr();
   
    return( proxy.createNotificationService( "test", 512 ) );
  }
View Full Code Here


  testProxyDetectsMBeanRemoved()
    throws InstanceNotFoundException
  {
    // use the NotificationServiceMgr as a convenient way of making
    // an MBean (a NotificationService) come and go.
    final NotificationServiceMgr  mgr  = getDomainRoot().getNotificationServiceMgr();
   
    final NotificationService  ns  = mgr.createNotificationService( "UserData", 10 );
    assert( ns.getUserData().equals( "UserData" ) );
    final ObjectName  nsObjectName  = Util.getObjectName( ns );
   
    mgr.removeNotificationService( ns.getName() );
    try
    {
      // all calls should fail
      Util.getObjectName( ns );
      ns.getName();
View Full Code Here

  testProxyFactoryDetectsMBeanRemoved()
    throws InstanceNotFoundException
  {
    // use the NotificationServiceMgr as a convenient way of making
    // an MBean (a NotificationService) come and go.
    final NotificationServiceMgr  mgr  = getDomainRoot().getNotificationServiceMgr();
    final NotificationService  ns  = mgr.createNotificationService( "UserData", 10 );
    final ObjectName  nsObjectName  = Util.getObjectName( ns );
    assert( ns.getUserData().equals( "UserData" ) );
   
    final ProxyFactory  factory  = getProxyFactory();
    final NotificationService  proxy  =
      factory.getProxy( nsObjectName, NotificationService.class, false );
    assert( proxy == ns ) : "proxies differ: " + ns + "\n" + proxy;
   
    mgr.removeNotificationService( ns.getName() );

    int  iterations  = 0;
    long  sleepMillis  = 10;
    while( factory.getProxy( nsObjectName, NotificationService.class, false ) != null )
    {
View Full Code Here

    public void
  testCreateRemove()
    throws Exception
  {
    final NotificationServiceMgr  proxy  = getNotificationServiceMgr();
   
    final NotificationService  service  = proxy.createNotificationService( "test1", 512 );
   
    final ObjectName  objectName  = Util.getObjectName( service );
   
    proxy.removeNotificationService( service.getName() );
    assert( ! getConnection().isRegistered( objectName ) );
  }
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.base.NotificationServiceMgr

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.