Search in sources :

Example 16 with ConfiguredBeanLocator

use of org.apache.cxf.configuration.ConfiguredBeanLocator in project cxf by apache.

the class PolicyInterceptorProviderRegistryImpl method loadDynamic.

protected synchronized void loadDynamic() {
    if (!dynamicLoaded && bus != null) {
        dynamicLoaded = true;
        ConfiguredBeanLocator c = bus.getExtension(ConfiguredBeanLocator.class);
        if (c != null) {
            c.getBeansOfType(PolicyInterceptorProviderLoader.class);
            for (PolicyInterceptorProvider b : c.getBeansOfType(PolicyInterceptorProvider.class)) {
                register(b);
            }
        }
    }
}
Also used : ConfiguredBeanLocator(org.apache.cxf.configuration.ConfiguredBeanLocator)

Example 17 with ConfiguredBeanLocator

use of org.apache.cxf.configuration.ConfiguredBeanLocator in project cxf by apache.

the class JMSTransactionTest method registerTransactionManager.

/**
 * For real world scenarios create a bean for the transaction manager in blueprint or spring
 */
private static void registerTransactionManager() {
    ConfiguredBeanLocator cbl = bus.getExtension(ConfiguredBeanLocator.class);
    MyBeanLocator mybl = new MyBeanLocator(cbl);
    mybl.register("tm", transactionManager);
    bus.setExtension(mybl, ConfiguredBeanLocator.class);
}
Also used : ConfiguredBeanLocator(org.apache.cxf.configuration.ConfiguredBeanLocator)

Aggregations

ConfiguredBeanLocator (org.apache.cxf.configuration.ConfiguredBeanLocator)17 TransactionManager (javax.transaction.TransactionManager)4 Resource (javax.annotation.Resource)3 ConnectionFactory (javax.jms.ConnectionFactory)1 JMException (javax.management.JMException)1 SystemException (javax.transaction.SystemException)1 QName (javax.xml.namespace.QName)1 Bus (org.apache.cxf.Bus)1 BusException (org.apache.cxf.BusException)1 AbstractBindingFactory (org.apache.cxf.binding.AbstractBindingFactory)1 BindingFactory (org.apache.cxf.binding.BindingFactory)1 BusLifeCycleManager (org.apache.cxf.buslifecycle.BusLifeCycleManager)1 ConfigurerImpl (org.apache.cxf.configuration.spring.ConfigurerImpl)1 InstrumentationManager (org.apache.cxf.management.InstrumentationManager)1 ResourceManager (org.apache.cxf.resource.ResourceManager)1 JMSEndpoint (org.apache.cxf.transport.jms.uri.JMSEndpoint)1 MyBeanLocator (org.apache.cxf.transport.jms.uri.MyBeanLocator)1 JMSDestinationResolver (org.apache.cxf.transport.jms.util.JMSDestinationResolver)1 JndiHelper (org.apache.cxf.transport.jms.util.JndiHelper)1 AutomaticWorkQueue (org.apache.cxf.workqueue.AutomaticWorkQueue)1