_conf.getBrokerFactoryEventManager().fireEvent( new BrokerFactoryEvent(this, BrokerFactoryEvent.BROKER_FACTORY_CREATED));
@Override public boolean beforeConfigurationLoad(Configuration config) { if (!(config instanceof OpenJPAConfiguration)) { return false; } final OpenJPAConfigurationImpl openJpaConfig = (OpenJPAConfigurationImpl) config; // Compass can make use of changed object IDs when receiving remote // commit events; reset the default setting to true. openJpaConfig.remoteProviderPlugin.setTransmitPersistedObjectIds(true); // In 0.x releases of OpenJPA, the BrokerFactoryEventManager does not exist. // This check will prevent us from triggering a NoSuchMethodError. if (!isReleasedVersion()) { openJpaConfig.getLog(OpenJPAConfiguration.LOG_RUNTIME).warn( "Compass cannot automatically install itself into pre-1.0 versions of OpenJPA. To complete " + "Compass installation, you must invoke CompassProductDerivation.installCompass()."); derivations.put(openJpaConfig, this); return false; } openJpaConfig.getBrokerFactoryEventManager().addListener(new BrokerFactoryListener() { public void afterBrokerFactoryCreate(BrokerFactoryEvent event) { installIntoFactory(event.getBrokerFactory()); } public void eventFired(BrokerFactoryEvent event) { if (event.getEventType() == BrokerFactoryEvent.BROKER_FACTORY_CREATED) afterBrokerFactoryCreate(event); } }); return false; }
_conf.getBrokerFactoryEventManager().fireEvent( new BrokerFactoryEvent(this, BrokerFactoryEvent.BROKER_FACTORY_CREATED));
_conf.getBrokerFactoryEventManager().fireEvent( new BrokerFactoryEvent(this, BrokerFactoryEvent.BROKER_FACTORY_CREATED));
_conf.getBrokerFactoryEventManager().fireEvent( new BrokerFactoryEvent(this, BrokerFactoryEvent.BROKER_FACTORY_CREATED));
_conf.getBrokerFactoryEventManager().fireEvent( new BrokerFactoryEvent(this, BrokerFactoryEvent.BROKER_FACTORY_CREATED));