Package javax.naming

Examples of javax.naming.StringRefAddr


    Reference ref =
      new Reference(factory.getClass().getName(),
                    "org.objectweb.joram.client.connector.ObjectFactoryImpl",
                    null);
    ref.add(new StringRefAddr("hostName", hostName));
    ref.add(new StringRefAddr("serverPort", "" + serverPort));
    ref.add(new StringRefAddr("userName", userName));
    ref.add(new StringRefAddr("password", password));
    ref.add(new StringRefAddr("identityClass", identityClass));

    factory.setReference(ref);
    return factory;
  }
View Full Code Here


    return  reply.getStats();
  }

  /** Sets the naming reference of a connection factory. */
  public void toReference(Reference ref) throws NamingException {
    ref.add(new StringRefAddr("dest.agentId", agentId));
    ref.add(new StringRefAddr("dest.adminName", adminName));
  }
View Full Code Here

    StringBuffer strbuf = new StringBuffer(20);

    for (int i=0; i<entries.length; i++) {
      strbuf.setLength(0);
      strbuf.append("cluster#").append(i).append(".key");
      ref.add(new StringRefAddr(strbuf.toString(),
                                (String) entries[i].getKey()));
      Destination dest = (Destination) entries[i].getValue();

      strbuf.setLength(0);
      strbuf.append("cluster#").append(i).append(".destName");
      ref.add(new StringRefAddr(strbuf.toString(), dest.getName()));
    }
  }
View Full Code Here

    Reference ref =
      new Reference(factory.getClass().getName(),
                    "org.objectweb.joram.client.connector.ObjectFactoryImpl",
                    null);
    ref.add(new StringRefAddr("hostName", hostName));
    ref.add(new StringRefAddr("serverPort", "" + serverPort));
    ref.add(new StringRefAddr("userName", userName));
    ref.add(new StringRefAddr("password", password));
    ref.add(new StringRefAddr("identityClass", identityClass));

    factory.setReference(ref);
    return factory;
  }
View Full Code Here

  /** Sets the clustered naming reference of a connection factory. */
  public void toReference(Reference ref, String prefix) {
    if (prefix == null) prefix = "cf";

    params.toReference(ref, prefix);
    ref.add(new StringRefAddr(prefix + ".reliableClass", reliableClass));
    ref.add(new StringRefAddr(prefix + ".identityClassName", identityClassName));
  }
View Full Code Here

    return proxyId;
  }

  /** Sets the naming reference of a connection factory. */
  public void toReference(Reference ref) throws NamingException {
    ref.add(new StringRefAddr("user.name", name));
    ref.add(new StringRefAddr("user.id", proxyId));
  }
View Full Code Here

   
    Reference ref =
      new Reference(factory.getClass().getName(),
                    "org.objectweb.joram.client.connector.ObjectFactoryImpl",
                    null);
    ref.add(new StringRefAddr("hostName", hostName));
    ref.add(new StringRefAddr("serverPort", "" + serverPort));
    ref.add(new StringRefAddr("userName", userName));
    ref.add(new StringRefAddr("password", password));
    ref.add(new StringRefAddr("identityClass", identityClass));

    factory.setReference(ref);
    return factory;
  }
View Full Code Here

    StringBuffer strbuf = new StringBuffer(15);
    for (int i=0; i<entries.length; i++) {
      strbuf.setLength(0);
      strbuf.append("CF#").append(i).append(".key");
      ref.add(new StringRefAddr(strbuf.toString(),
                                (String) entries[i].getKey()));
      ConnectionFactory cf = (ConnectionFactory) entries[i].getValue();

      strbuf.setLength(0);
      strbuf.append("CF#").append(i).append(".class");
      ref.add(new StringRefAddr(strbuf.toString(), cf.getClass().getName()));

      strbuf.setLength(0);
      strbuf.append("CF#").append(i);
      cf.toReference(ref, strbuf.toString());
    }
View Full Code Here

        ObjectFactory factory = new JdbcDataSourceFactory();
        assertTrue(null == factory.getObjectInstance("test", null, null, null));
        Reference ref = new Reference("java.lang.String");
        assertTrue(null == factory.getObjectInstance(ref, null, null, null));
        ref = new Reference(JdbcDataSource.class.getName());
        ref.add(new StringRefAddr("url", "jdbc:h2:mem:"));
        ref.add(new StringRefAddr("user", "u"));
        ref.add(new StringRefAddr("password", "p"));
        ref.add(new StringRefAddr("loginTimeout", "1"));
        ref.add(new StringRefAddr("description", "test"));
        JdbcDataSource ds = (JdbcDataSource) factory.getObjectInstance(ref, null, null, null);
        assertEquals(1, ds.getLoginTimeout());
        assertEquals("test", ds.getDescription());
        assertEquals("jdbc:h2:mem:", ds.getURL());
        assertEquals("u", ds.getUser());
View Full Code Here

     */
    public Reference getReference() {
        debugCodeCall("getReference");
        String factoryClassName = JdbcDataSourceFactory.class.getName();
        Reference ref = new Reference(getClass().getName(), factoryClassName, null);
        ref.add(new StringRefAddr("url", url));
        ref.add(new StringRefAddr("user", userName));
        ref.add(new StringRefAddr("password", convertToString(passwordChars)));
        ref.add(new StringRefAddr("loginTimeout", String.valueOf(loginTimeout)));
        ref.add(new StringRefAddr("description", description));
        return ref;
    }
View Full Code Here

TOP

Related Classes of javax.naming.StringRefAddr

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.