Package org.springframework.mock.jndi

Examples of org.springframework.mock.jndi.SimpleNamingContextBuilder.activate()


    // Set up JNDI context to test the JndiResourceLocator
    final SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder();
    Properties deDict = new Properties();
    deDict.setProperty("Hans", "proper noun");
    builder.bind("dictionaries/german", deDict);
    builder.activate();
  }

  @Test
  public void testScanBind() throws Exception {
    // Create analysis enginge description
View Full Code Here


    // Set up JNDI context to test the JndiResourceLocator
    final SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder();
    Properties deDict = new Properties();
    deDict.setProperty("Hans", "proper noun");
    builder.bind("dictionaries/german", deDict);
    builder.activate();
  }

  @Test
  public void testScanBind() throws Exception {
    // Create analysis enginge description
View Full Code Here

public class CdiObjectFactoryTest {

    @Before
    public void setUp() throws Exception {
        SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder();
        builder.activate();

        StartMain sm = new StartMain(new String[0]);
        WeldContainer weldContainer = sm.go();
        builder.bind(CdiObjectFactory.CDI_JNDIKEY_BEANMANAGER_COMP, weldContainer.getBeanManager());
    }
View Full Code Here

            LOGGER.info("Setting up new Context");
            SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder();

            ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(getTestContext());
            builder.bind("java:comp/env/jdbc/ptcollectDS", context.getBean("ptcollectDS"));
            builder.activate();
        }
    }

    /**
     * Returns the name of the tesst context file.
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.