Examples of InstrumentationService


Examples of org.apache.oozie.service.InstrumentationService

    /**
     * The created datasource instruments the active DB connections.
     */
    public InstrumentedBasicDataSource() {
        InstrumentationService instrumentationService = Services.get().get(InstrumentationService.class);
        if (instrumentationService != null) {
            Instrumentation instr = instrumentationService.get();
            instr.addSampler(INSTR_GROUP, INSTR_NAME, 60, 1, new Instrumentation.Variable<Long>() {
                public Long getValue() {
                    return (long) getNumActive();
                }
            });
View Full Code Here

Examples of org.apache.oozie.service.InstrumentationService

    /**
     * The created datasource instruments the active DB connections.
     */
    public InstrumentedBasicDataSource() {
        InstrumentationService instrumentationService = Services.get().get(InstrumentationService.class);
        if (instrumentationService != null) {
            Instrumentation instr = instrumentationService.get();
            instr.addSampler(INSTR_GROUP, INSTR_NAME, 60, 1, new Instrumentation.Variable<Long>() {
                public Long getValue() {
                    return (long) getNumActive();
                }
            });
View Full Code Here

Examples of org.hibernate.service.instrumentation.spi.InstrumentationService

//    }
//  }

  public void afterReassociate(Object entity, SessionImplementor session) {
    //if ( hasLazyProperties() ) {
    InstrumentationService instrumentationService = session.getFactory()
        .getServiceRegistry()
        .getService( InstrumentationService.class );
    if ( instrumentationService.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );
      if ( interceptor != null ) {
        interceptor.setSession( session );
      }
      else {
View Full Code Here

Examples of org.hibernate.service.instrumentation.spi.InstrumentationService

      dirtyCheck(event);
      if ( isUpdateNecessary(event) ) {
        return true;
      }
      else {
        InstrumentationService instrumentationService = event.getSession()
            .getFactory()
            .getServiceRegistry()
            .getService( InstrumentationService.class );
        if ( instrumentationService.isInstrumented( event.getEntity() ) ) {
          FieldInterceptionHelper.clearDirty( event.getEntity() );
        }
        return false;
      }
    }
View Full Code Here

Examples of org.hibernate.service.instrumentation.spi.InstrumentationService

            sessionFactory.getIdentifierGenerator( rootName )
      );

    versioned = persistentClass.isVersioned();

    InstrumentationService instrumentationService = sessionFactory.getServiceRegistry().getService( InstrumentationService.class );
    lazyAvailable = persistentClass.hasPojoRepresentation() &&
                            instrumentationService.isInstrumented( persistentClass.getMappedClass() );
    boolean hasLazy = false;

    propertySpan = persistentClass.getPropertyClosureSpan();
    properties = new StandardProperty[propertySpan];
    List naturalIdNumbers = new ArrayList();
View Full Code Here

Examples of org.hibernate.service.instrumentation.spi.InstrumentationService

    lazyAvailable = false;
    if ( entityBinding.getEntity().getClassReferenceUnresolved() != null ) {
      hasPojoRepresentation = true;
      mappedClass = entityBinding.getEntity().getClassReference();
      proxyInterfaceClass = entityBinding.getProxyInterfaceType().getValue();
      InstrumentationService instrumentationService = sessionFactory.getServiceRegistry()
          .getService( InstrumentationService.class );
      lazyAvailable = instrumentationService.isInstrumented( mappedClass );
    }

    boolean hasLazy = false;

    // TODO: Fix after HHH-6337 is fixed; for now assume entityBinding is the root binding
View Full Code Here

Examples of org.hibernate.service.instrumentation.spi.InstrumentationService

    }

  }

  private void markInterceptorDirty(final Object entity, final Object target, SessionFactoryImplementor factory) {
    InstrumentationService instrumentationService = factory
        .getServiceRegistry()
        .getService( InstrumentationService.class );
    if ( instrumentationService.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( target );
      if ( interceptor != null ) {
        interceptor.dirty();
      }
    }
View Full Code Here

Examples of org.hibernate.service.instrumentation.spi.InstrumentationService

    return id;
  }

  private void markInterceptorDirty(Object entity, EntityPersister persister, EventSource source) {
    InstrumentationService instrumentationService = persister.getFactory()
        .getServiceRegistry()
        .getService( InstrumentationService.class );
    if ( instrumentationService.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.injectFieldInterceptor(
          entity,
          persister.getEntityName(),
          null,
          source
View Full Code Here

Examples of org.hibernate.service.instrumentation.spi.InstrumentationService

    return id;
  }

  private void markInterceptorDirty(Object entity, EntityPersister persister, EventSource source) {
    InstrumentationService instrumentationService = persister.getFactory()
        .getServiceRegistry()
        .getService( InstrumentationService.class );
    if ( instrumentationService.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.injectFieldInterceptor(
          entity,
          persister.getEntityName(),
          null,
          source
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.