protected void doSetUp() throws Exception { // By default the JmsTestUtils use the openjms config, though you can // pass // in other configs using the property below // Make sure we are running synchronously MuleManager.getConfiguration().setSynchronous(true); MuleManager.getConfiguration() .getPoolingProfile() .setInitialisationPolicy(PoolingProfile.POOL_INITIALISE_ONE_COMPONENT); MuleManager.getInstance().setModel(new SedaModel()); callbackCalled = false; MuleManager.getInstance().registerConnector(createConnector()); currentMsg = null; eventLatch1 = new Latch(); eventLatch2 = new Latch(); QuickConfigurationBuilder builder = new QuickConfigurationBuilder(); builder.registerComponent( FunctionalTestComponent.class.getName(), "testJmsReconnection", getReceiverEndpoint("jms://reconnect.queue"), null, null); }
public void testSpecificContainerAddressingForComponents() throws Exception { QuickConfigurationBuilder builder = new QuickConfigurationBuilder(); UMODescriptor d = builder.createDescriptor("Orange", "myOrange", "test://foo", null, null); d.setContainer("spring2"); builder.registerComponent(d); UMOComponent c = builder.getManager().getModel().getComponent("myOrange"); assertNotNull(c); Object o = c.getInstance(); assertTrue(o instanceof Orange); Orange orange = (Orange) o; assertEquals(10, orange.getSegments().intValue()); d = builder.createDescriptor("Orange", "myOrange2", "test://bar", null, null); d.setContainer("spring1"); builder.registerComponent(d); c = builder.getManager().getModel().getComponent("myOrange2"); assertNotNull(c); o = c.getInstance(); assertTrue(o instanceof Orange); orange = (Orange) o; assertEquals(8, orange.getSegments().intValue()); }