Search in sources :

Example 1 with PropertyPlaceholderDelegateRegistry

use of org.apache.camel.impl.PropertyPlaceholderDelegateRegistry in project camel by apache.

the class RefComponentTest method testRef.

public void testRef() throws Exception {
    MockEndpoint mock = getMockEndpoint("mock:result");
    mock.expectedBodiesReceived("Hello World");
    PropertyPlaceholderDelegateRegistry delegate = (PropertyPlaceholderDelegateRegistry) context.getRegistry();
    JndiRegistry jndi = (JndiRegistry) delegate.getRegistry();
    bindToRegistry(jndi);
    template.sendBody("ref:foo", "Hello World");
    assertMockEndpointsSatisfied();
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) MockEndpoint(org.apache.camel.component.mock.MockEndpoint) PropertyPlaceholderDelegateRegistry(org.apache.camel.impl.PropertyPlaceholderDelegateRegistry)

Example 2 with PropertyPlaceholderDelegateRegistry

use of org.apache.camel.impl.PropertyPlaceholderDelegateRegistry in project camel by apache.

the class BindyCarQuoteAndCommaDelimiterTest method setup.

@Before
public void setup() {
    PropertyPlaceholderDelegateRegistry registry = (PropertyPlaceholderDelegateRegistry) context.getRegistry();
    JndiRegistry reg = (JndiRegistry) registry.getRegistry();
    reg.bind("defaultFactoryRegistry", new DefaultFactoryRegistry());
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) DefaultFactoryRegistry(org.apache.camel.dataformat.bindy.format.factories.DefaultFactoryRegistry) PropertyPlaceholderDelegateRegistry(org.apache.camel.impl.PropertyPlaceholderDelegateRegistry) Before(org.junit.Before)

Example 3 with PropertyPlaceholderDelegateRegistry

use of org.apache.camel.impl.PropertyPlaceholderDelegateRegistry in project camel by apache.

the class RegistryInjectionTest method testInjectedStrategy.

public void testInjectedStrategy() throws Exception {
    CamelContext context = createCamelContext();
    PropertyPlaceholderDelegateRegistry delegate = (PropertyPlaceholderDelegateRegistry) context.getRegistry();
    assertTrue(delegate.getRegistry() instanceof JndiRegistry);
}
Also used : CamelContext(org.apache.camel.CamelContext) JndiRegistry(org.apache.camel.impl.JndiRegistry) PropertyPlaceholderDelegateRegistry(org.apache.camel.impl.PropertyPlaceholderDelegateRegistry)

Aggregations

JndiRegistry (org.apache.camel.impl.JndiRegistry)3 PropertyPlaceholderDelegateRegistry (org.apache.camel.impl.PropertyPlaceholderDelegateRegistry)3 CamelContext (org.apache.camel.CamelContext)1 MockEndpoint (org.apache.camel.component.mock.MockEndpoint)1 DefaultFactoryRegistry (org.apache.camel.dataformat.bindy.format.factories.DefaultFactoryRegistry)1 Before (org.junit.Before)1