Package javax.naming

Examples of javax.naming.StringRefAddr


            {
                String key = (String) i.next();
                if (p.get(key) instanceof String)
                {
                    String value = (String) p.get(key);
                    rc.add(new StringRefAddr(key, value));
                    if (JPOXLogger.NAMING.isDebugEnabled())
                    {
                        JPOXLogger.NAMING.debug(LOCALISER_JDO.msg("012009", key, value));
                    }
                }
                else if (p.get(key) instanceof Long)
                {
                    String value = "" + p.get(key);
                    rc.add(new StringRefAddr(key, value));
                    if (JPOXLogger.NAMING.isDebugEnabled())
                    {
                        JPOXLogger.NAMING.debug(LOCALISER_JDO.msg("012009", key, value));
                    }
                }
                else if (p.get(key) instanceof Integer)
                {
                    String value = "" + p.get(key);
                    rc.add(new StringRefAddr(key, value));
                    if (JPOXLogger.NAMING.isDebugEnabled())
                    {
                        JPOXLogger.NAMING.debug(LOCALISER_JDO.msg("012009", key, value));
                    }
                }
                else if (p.get(key) instanceof Boolean)
                {
                    String value = (((Boolean)p.get(key)).booleanValue() ? "true" : "false");
                    rc.add(new StringRefAddr(key, value));
                    if (JPOXLogger.NAMING.isDebugEnabled())
                    {
                        JPOXLogger.NAMING.debug(LOCALISER_JDO.msg("012009", key, value));
                    }
                }
View Full Code Here


    public Reference getReference() throws NamingException {

        String    cname = "org.hsqldb.jdbc.JDBCDataSourceFactory";
        Reference ref   = new Reference(getClass().getName(), cname, null);

        ref.add(new StringRefAddr("database", getDatabase()));
        ref.add(new StringRefAddr("user", getUser()));
        ref.add(new StringRefAddr("password", password));

        return ref;
    }
View Full Code Here

     * @since 1.2.2
     */
    public Reference getReference() throws NamingException {
        Reference ref = new Reference(getClass().getName(),
                PerUserPoolDataSourceFactory.class.getName(), null);
        ref.add(new StringRefAddr("instanceKey", instanceKey));
        return ref;
    }
View Full Code Here

     * @since 1.2.2
     */
    public Reference getReference() throws NamingException {
        Reference ref = new Reference(getClass().getName(),
            SharedPoolDataSourceFactory.class.getName(), null);
        ref.add(new StringRefAddr("instanceKey", instanceKey));
        return ref;
    }
View Full Code Here

        // this class implements its own factory
        String factory = getClass().getName();
       
        Reference ref = new Reference(getClass().getName(), factory, null);

        ref.add(new StringRefAddr("description", getDescription()));
        ref.add(new StringRefAddr("driver", getDriver()));
        ref.add(new StringRefAddr("loginTimeout",
                                  String.valueOf(getLoginTimeout())));
        ref.add(new StringRefAddr("password", getPassword()));
        ref.add(new StringRefAddr("user", getUser()));
        ref.add(new StringRefAddr("url", getUrl()));

        ref.add(new StringRefAddr("poolPreparedStatements",
                                  String.valueOf(isPoolPreparedStatements())));
        ref.add(new StringRefAddr("maxActive",
                                  String.valueOf(getMaxActive())));
        ref.add(new StringRefAddr("maxIdle",
                                  String.valueOf(getMaxIdle())));
        ref.add(new StringRefAddr("timeBetweenEvictionRunsMillis",
            String.valueOf(getTimeBetweenEvictionRunsMillis())));
        ref.add(new StringRefAddr("numTestsPerEvictionRun",
            String.valueOf(getNumTestsPerEvictionRun())));
        ref.add(new StringRefAddr("minEvictableIdleTimeMillis",
            String.valueOf(getMinEvictableIdleTimeMillis())));
        ref.add(new StringRefAddr("maxPreparedStatements",
            String.valueOf(getMaxPreparedStatements())));

        return ref;
    }
View Full Code Here

   
    public Reference getReference() throws NamingException {
        final String className = getClass().getName();
        final String factoryName = className + "Factory"; // XXX: not robust
        Reference ref = new Reference(className, factoryName, null);
        ref.add(new StringRefAddr("instanceKey", instanceKey));
        return ref;
    }
View Full Code Here

                        methodName.substring(4));

                try {
                    Object ov = m.invoke(this, null);
                    String value = ov == null ? null : ov.toString();
                    ref.add(new StringRefAddr(propertyName, value));
                } catch (IllegalAccessException iae) {
                } catch (InvocationTargetException ite) {
                }

            }
View Full Code Here

        return _connectionURL.toString();
    }

    public Reference getReference() throws NamingException
    {
        return new Reference(AMQConnection.class.getName(), new StringRefAddr(AMQConnection.class.getName(), toURL()),
                             AMQConnectionFactory.class.getName(), null); // factory location
    }
View Full Code Here

                if (transaction != null) {
                    Iterator<String> params = transaction.listProperties();
                    while (params.hasNext()) {
                        String paramName = params.next();
                        String paramValue = (String) transaction.getProperty(paramName);
                        StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
                        ref.add(refAddr);
                    }
                }
            } catch (NameAlreadyBoundException e) {
                // Ignore because UserTransaction was obviously
View Full Code Here

        // Adding the additional parameters, if any
        Iterator<String> params = ejb.listProperties();
        while (params.hasNext()) {
            String paramName = params.next();
            String paramValue = (String) ejb.getProperty(paramName);
            StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
            ref.add(refAddr);
        }
        try {
            createSubcontexts(envCtx, ejb.getName());
            envCtx.bind(ejb.getName(), 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.