Package javax.naming

Examples of javax.naming.StringRefAddr


        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


  // from javax.naming.Referenceable
  public Reference getReference() throws NamingException {
    log.debug("Returning a Reference to the SessionFactory");
    return new Reference(
      SessionFactoryImpl.class.getName(),
        new StringRefAddr("uuid", uuid),
        SessionFactoryObjectFactory.class.getName(),
        null
    );
  }
View Full Code Here

  // from javax.naming.Referenceable
  public Reference getReference() throws NamingException {
    log.debug("Returning a Reference to the SessionFactory");
    return new Reference(
      SessionFactoryImpl.class.getName(),
        new StringRefAddr("uuid", uuid),
        SessionFactoryObjectFactory.class.getName(),
        null
    );
  }
View Full Code Here

        String className = getClass().getName();
        String factoryClassName = this.getClass().getName();
        Reference ref = new Reference(className, factoryClassName, null);

        if (getRepositoryName() != null) {
            ref.add(new StringRefAddr(REPOSITORY_NAME, getRepositoryName()));
        }
        if (getName() != null) {
            ref.add(new StringRefAddr(SOURCE_NAME, getName()));
        }
        if (getUsername() != null) {
            ref.add(new StringRefAddr(USERNAME, getUsername()));
        }
        if (getPassword() != null) {
            ref.add(new StringRefAddr(PASSWORD, getPassword()));
        }
        if (getConfigurationSourceName() != null) {
            ref.add(new StringRefAddr(CONFIGURATION_SOURCE_NAME, getConfigurationSourceName()));
        }
        if (getConfigurationSourcePath() != null) {
            ref.add(new StringRefAddr(CONFIGURATION_SOURCE_PATH, getConfigurationSourcePath()));
        }
        if (getSecurityDomain() != null) {
            ref.add(new StringRefAddr(SECURITY_DOMAIN, getSecurityDomain()));
        }
        ref.add(new StringRefAddr(RETRY_LIMIT, Integer.toString(getRetryLimit())));
        return ref;
    }
View Full Code Here

        String className = getClass().getName();
        String factoryClassName = this.getClass().getName();
        Reference ref = new Reference(className, factoryClassName, null);

        if (getName() != null) {
            ref.add(new StringRefAddr(SOURCE_NAME, getName()));
        }
        if (getRepositoryRootURL() != null) {
            ref.add(new StringRefAddr(SVN_REPOSITORY_ROOT_URL, getRepositoryRootURL()));
        }
        if (getUsername() != null) {
            ref.add(new StringRefAddr(SVN_USERNAME, getUsername()));
        }
        if (getPassword() != null) {
            ref.add(new StringRefAddr(SVN_PASSWORD, getPassword()));
        }
        ref.add(new StringRefAddr(CACHE_TIME_TO_LIVE_IN_MILLISECONDS, Integer.toString(getCacheTimeToLiveInMilliseconds())));
        ref.add(new StringRefAddr(RETRY_LIMIT, Integer.toString(getRetryLimit())));
        ref.add(new StringRefAddr(DEFAULT_WORKSPACE, getDirectoryForDefaultWorkspace()));
        ref.add(new StringRefAddr(ALLOW_CREATING_WORKSPACES, Boolean.toString(isCreatingWorkspacesAllowed())));
        String[] workspaceNames = getPredefinedWorkspaceNames();
        if (workspaceNames != null && workspaceNames.length != 0) {
            ref.add(new StringRefAddr(PREDEFINED_WORKSPACE_NAMES, StringUtil.combineLines(workspaceNames)));
        }
        return ref;

    }
View Full Code Here

      }

      // The helper class NonSerializableFactory uses address type nns, we go on to
      // use the helper class to bind the service object in JNDI
      //
      StringRefAddr addr = new StringRefAddr("nns", jndiName);
      Reference ref = new Reference(classType.getName (), addr, NonSerializableFactory.class.getName (), null);
      ctx.rebind (n.get (0), ref);
   }
View Full Code Here

      }

      // The helper class NonSerializableFactory uses address type nns, we go on to
      // use the helper class to bind the service object in JNDI
      //
      StringRefAddr addr = new StringRefAddr("nns", jndiName);
      Reference ref = new Reference(classType.getName (), addr, NonSerializableFactory.class.getName (), null);
      ctx.rebind (n.get (0), ref);
   }
View Full Code Here

  public Reference getReference() {
    // from javax.naming.Referenceable
        LOG.debug( "Returning a Reference to the SessionFactory" );
    return new Reference(
        SessionFactoryImpl.class.getName(),
        new StringRefAddr("uuid", uuid),
        SessionFactoryRegistry.ObjectFactoryImpl.class.getName(),
        null
    );
  }
View Full Code Here

        String className = getClass().getName();
        String factoryClassName = this.getClass().getName();
        Reference ref = new Reference(className, factoryClassName, null);

        if (getName() != null) {
            ref.add(new StringRefAddr(SOURCE_NAME, getName()));
        }
       
        if (getRootNodeUuid() != null) {
            ref.add(new StringRefAddr(ROOT_NODE_UUID, getRootNodeUuid()));
        }
        if (getDataSourceName() != null) {
            ref.add(new StringRefAddr(DATA_SOURCE_JNDI_NAME, getDataSourceName()));
        }
       
        if (getUserName() != null) {
            ref.add(new StringRefAddr(USERNAME, getUserName()));
        }
       
        if (getPassword() != null) {
            ref.add(new StringRefAddr(PASSWORD, getPassword()));
        }
       
        if (getDatabaseUrl() != null) {
            ref.add(new StringRefAddr(URL, getDatabaseUrl()));
        }
        if (getDriverClassName() != null) {
            ref.add(new StringRefAddr(DRIVER_CLASS_NAME, getDriverClassName()));
        }
       
        if (getDefaultCachePolicy() != null) {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            CachePolicy policy = getDefaultCachePolicy();
            try {
                ObjectOutputStream oos = new ObjectOutputStream(baos);
                oos.writeObject(policy);
                ref.add(new BinaryRefAddr(DEFAULT_CACHE_POLICY, baos.toByteArray()));
            } catch (IOException e) {
                I18n msg = JdbcMetadataI18n.errorSerializingCachePolicyInSource;
                throw new RepositorySourceException(getName(), msg.text(policy.getClass().getName(), getName()), e);
            }
        }
        ref.add(new StringRefAddr(RETRY_LIMIT, Integer.toString(getRetryLimit())));
        // return it
        return ref;
    }
View Full Code Here

  // from javax.naming.Referenceable
  public Reference getReference() throws NamingException {
    log.debug("Returning a Reference to the SessionFactory");
    return new Reference(
      SessionFactoryImpl.class.getName(),
        new StringRefAddr("uuid", uuid),
        SessionFactoryObjectFactory.class.getName(),
        null
    );
  }
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.