Examples of EventListeners


Examples of org.eclipse.osgi.framework.eventmgr.EventListeners

    ServiceListener filteredListener = new FilteredServiceListener(filter, listener, this);

    synchronized (framework.serviceEvent) {
      if (serviceEvent == null) {
        serviceEvent = new EventListeners();
        framework.serviceEvent.addListener(this, this);
      }

      serviceEvent.addListener(listener, filteredListener);
    }
View Full Code Here

Examples of org.eclipse.osgi.framework.eventmgr.EventListeners

    if (listener instanceof SynchronousBundleListener) {
      framework.checkAdminPermission(getBundle(), AdminPermission.LISTENER);
      synchronized (framework.bundleEventSync) {
        if (bundleEventSync == null) {
          bundleEventSync = new EventListeners();
          framework.bundleEventSync.addListener(this, this);
        }

        bundleEventSync.addListener(listener, listener);
      }
    } else {
      synchronized (framework.bundleEvent) {
        if (bundleEvent == null) {
          bundleEvent = new EventListeners();
          framework.bundleEvent.addListener(this, this);
        }

        bundleEvent.addListener(listener, listener);
      }
View Full Code Here

Examples of org.eclipse.osgi.framework.eventmgr.EventListeners

      Debug.println("addFrameworkListener[" + bundle + "](" + listenerName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }

    synchronized (framework.frameworkEvent) {
      if (frameworkEvent == null) {
        frameworkEvent = new EventListeners();
        framework.frameworkEvent.addListener(this, this);
      }

      frameworkEvent.addListener(listener, listener);
    }
View Full Code Here

Examples of org.hibernate.event.EventListeners

    propertyReferences = new ArrayList();
    secondPasses = new ArrayList();
    interceptor = EmptyInterceptor.INSTANCE;
    properties = Environment.getProperties();
    entityResolver = XMLHelper.DEFAULT_DTD_RESOLVER;
    eventListeners = new EventListeners();
    filterDefinitions = new HashMap();
//    extendsQueue = new ArrayList();
    extendsQueue = new HashMap();
    auxiliaryDatabaseObjects = new ArrayList();
    tableNameBinding = new HashMap();
View Full Code Here

Examples of org.hibernate.event.EventListeners

        sessionFactoryObserver
      );
  }

  private EventListeners getInitializedEventListeners() {
    EventListeners result = (EventListeners) eventListeners.shallowCopy();
    result.initializeListeners( this );
    return result;
  }
View Full Code Here

Examples of org.hibernate.event.EventListeners

    namingStrategy = DefaultNamingStrategy.INSTANCE;
    xmlHelper = new XMLHelper();
    interceptor = EmptyInterceptor.INSTANCE;
    properties = Environment.getProperties();
    entityResolver = XMLHelper.DEFAULT_DTD_RESOLVER;
    eventListeners = new EventListeners();

    sqlFunctions = new HashMap();

    entityTuplizerFactory = new EntityTuplizerFactory();
//    componentTuplizerFactory = new ComponentTuplizerFactory();
View Full Code Here

Examples of org.hibernate.event.EventListeners

        sessionFactoryObserver
      );
  }

  private EventListeners getInitializedEventListeners() {
    EventListeners result = (EventListeners) eventListeners.shallowCopy();
    result.initializeListeners( this );
    return result;
  }
View Full Code Here

Examples of org.hibernate.event.EventListeners

* @author Emmanuel Bernard
*/
public class EventOverridingTest extends TestCase {

  public void testEventOverriding() throws Exception {
    EventListeners eventListeners = configuration.getEventListeners();
    assertEquals( 2, eventListeners.getPreInsertEventListeners().length );
    eventListeners.setPreInsertEventListeners( new PreInsertEventListener[]{} );
    Cat cat = new Cat();
    cat.setLength( 3 );
    cat.setAge( 34 );
    cat.setName( "Did" ); //should raise a validation exception
    EntityManager em = configuration.createEntityManagerFactory().createEntityManager();
View Full Code Here

Examples of org.hibernate.event.EventListeners

    xmlHelper = new XMLHelper();
    interceptor = EmptyInterceptor.INSTANCE;
    properties = Environment.getProperties();
    entityResolver = XMLHelper.DEFAULT_DTD_RESOLVER;
    eventListeners = new EventListeners();

    sqlFunctions = new HashMap<String, SQLFunction>();

    entityTuplizerFactory = new EntityTuplizerFactory();
//    componentTuplizerFactory = new ComponentTuplizerFactory();
View Full Code Here

Examples of org.hibernate.event.EventListeners

      log.debug( "Unable to execute {}, ignoring event listener registration.", SEARCH_STARTUP_METHOD );
    }
  }

  private EventListeners getInitializedEventListeners() {
    EventListeners result = (EventListeners) eventListeners.shallowCopy();
    result.initializeListeners( this );
    return result;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.