Package org.springframework.jndi

Examples of org.springframework.jndi.JndiTemplate


        endpoint.setJndiInitialContextFactory("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
        endpoint.setJndiURL(broker.getBrokerURL());
        endpoint.setJndiConnectionFactoryName("ConnectionFactory");

        final JMSConfiguration jmsConfig = new JMSConfiguration();       
        JndiTemplate jt = new JndiTemplate();
       
        jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
       
        JNDIConfiguration jndiConfig = new JNDIConfiguration();
        jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());
        jmsConfig.setJndiTemplate(jt);
        jmsConfig.setJndiConfig(jndiConfig);
View Full Code Here


            int priority = endpoint.getPriority();
            jmsConfig.setPriority(priority);
        }

        if (jmsConfig.isUsingEndpointInfo()) {
            JndiTemplate jt = new JndiTemplate();
            jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
            boolean pubSubDomain = endpoint.getJmsVariant().contains(JMSURIConstants.TOPIC);
            JNDIConfiguration jndiConfig = new JNDIConfiguration();
            jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());
            jmsConfig.setJndiTemplate(jt);
View Full Code Here

        if (jmsConfig == null) {
            jmsConfig = new JMSConfiguration();
        }

        if (jmsConfig.isUsingEndpointInfo()) {
            JndiTemplate jt = new JndiTemplate();
            jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(address));
            boolean pubSubDomain = false;
            if (address.isSetDestinationStyle()) {
                pubSubDomain = DestinationStyleType.TOPIC == address.getDestinationStyle();
            }
            JNDIConfiguration jndiConfig = new JNDIConfiguration();
View Full Code Here

        if (jmsConfig == null) {
            jmsConfig = new JMSConfiguration();
        }

        if (jmsConfig.isUsingEndpointInfo()) {
            JndiTemplate jt = new JndiTemplate();
            jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(address));
            boolean pubSubDomain = false;
            if (address.isSetDestinationStyle()) {
                pubSubDomain = DestinationStyleType.TOPIC == address.getDestinationStyle();
            }
            JNDIConfiguration jndiConfig = new JNDIConfiguration();
View Full Code Here

        endpoint.setJndiInitialContextFactory("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
        endpoint.setJndiURL(broker.getBrokerURL());
        endpoint.setJndiConnectionFactoryName("ConnectionFactory");

        final JMSConfiguration jmsConfig = new JMSConfiguration();       
        JndiTemplate jt = new JndiTemplate();
       
        jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
       
        JNDIConfiguration jndiConfig = new JNDIConfiguration();
        jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());
        jmsConfig.setJndiTemplate(jt);
        jmsConfig.setJndiConfig(jndiConfig);
View Full Code Here

    public boolean init() {
        boolean result = initialized.compareAndSet(false, true);
        if (result) {
            if (jndiLocalTemplate == null) {
                jndiLocalTemplate = new JndiTemplate();
            }
            if (jndiOutboundTemplate == null) {
                jndiOutboundTemplate = new JndiTemplate();
            }
            if (inboundMessageConvertor == null) {
                inboundMessageConvertor = new SimpleJmsMessageConvertor();
            }
            if (outboundMessageConvertor == null) {
View Full Code Here

  private SimpleRemoteSlsbInvokerInterceptor configuredInterceptor(
      final Context mockCtx, String jndiName) throws Exception {

    SimpleRemoteSlsbInvokerInterceptor si = createInterceptor();
    si.setJndiTemplate(new JndiTemplate() {
      @Override
      protected Context createInitialContext() {
        return mockCtx;
      }
    });
View Full Code Here

  @Test
  public void testLookupFailure() throws Exception {
    final NamingException nex = new NamingException();
    final String jndiName = "foobar";
    JndiTemplate jt = new JndiTemplate() {
      @Override
      public Object lookup(String name) throws NamingException {
        assertTrue(jndiName.equals(name));
        throw nex;
      }
View Full Code Here

  @Test
  public void testLookupFailure() throws Exception {
    final NamingException nex = new NamingException();
    final String jndiName= "foobar";
    JndiTemplate jt = new JndiTemplate() {
      @Override
      public Object lookup(String name) throws NamingException {
        assertTrue(jndiName.equals(name));
        throw nex;
      }
View Full Code Here

  protected LocalSlsbInvokerInterceptor configuredInterceptor(final Context mockCtx, final String jndiName)
      throws Exception {

    LocalSlsbInvokerInterceptor si = new LocalSlsbInvokerInterceptor();
    si.setJndiTemplate(new JndiTemplate() {
      @Override
      protected Context createInitialContext() throws NamingException {
        return mockCtx;
      }
    });
View Full Code Here

TOP

Related Classes of org.springframework.jndi.JndiTemplate

Copyright © 2018 www.massapicom. 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.