Package javax.naming

Examples of javax.naming.BinaryRefAddr


    }
  }

  public void testClear_Simple() {
    String type = "Binary";
    BinaryRefAddr refAddr = new BinaryRefAddr(type, buffer);
    int count = 10;
    for (int i = 0; i < count; i++) {
      ref.add(refAddr);
    }
    assertEquals(count, ref.size());
View Full Code Here


    String className = "java.lang.String";
    String classFactory = "class factory";
    String location = "/home/neuser";
    StringRefAddr addr = new StringRefAddr("String address",
        "this is a string");
    BinaryRefAddr addr1 = new BinaryRefAddr("Binary address", new byte[] {
        1, 2, 3, 4, 5 });
    Reference reference0 = new Reference(className, addr, classFactory,
        location);
    Reference reference1 = new Reference(className, addr1, classFactory,
        location);
View Full Code Here

      IOException {
    Reference reference = new Reference("dazzle.naming.Reference",
        "dazzle.naming.factory.RefFactory", "http://www.apache.org");
    StringRefAddr addr = new StringRefAddr("StringRefAddr",
        "This is a String RefAddr.");
    BinaryRefAddr addr2 = new BinaryRefAddr("BinaryRefAddr", new byte[] {
        'a', 'b', 'c' });
    reference.add(addr);
    reference.add(addr2);

    // write to byte array
View Full Code Here

    Reference reference = new Reference("dazzle.naming.Reference",
        "dazzle.naming.factory.RefFactory", "http://www.apache.org");
    StringRefAddr addr = new StringRefAddr("StringRefAddr",
        "This is a String RefAddr.");
    BinaryRefAddr addr2 = new BinaryRefAddr("BinaryRefAddr", new byte[] {
        'a', 'b', 'c' });
    reference.add(addr);
    reference.add(addr2);

    assertEquals(reference, reference2);
View Full Code Here

      if (_reference == null)
      {
         try
         {
            _reference = new Reference(this.getClass().getCanonicalName(),
                                      new BinaryRefAddr(ConnectionFactoryObjectFactory.QPID_CF,
                                                        Util.serialize(this)),
                                      ConnectionFactoryObjectFactory.class.getCanonicalName(),
                                      null);
         }
         catch (final IOException ioe)
View Full Code Here

        if ( jndiEnvironment != null )
        {
            try
            {
                ser = serialize(jndiEnvironment);
                ref.add(new BinaryRefAddr("jndiEnvironment", ser));
            }
            catch (IOException ioe)
            {
                throw new NamingException("An IOException prevented " +
                   "serializing the jndiEnvironment properties.");
            }
        }

        ref.add(new StringRefAddr("loginTimeout",
                                  String.valueOf(getLoginTimeout())));

        if ( perUserDefaultAutoCommit != null )
        {
            try
            {
                ser = serialize((Serializable)perUserDefaultAutoCommit);
                ref.add(new BinaryRefAddr("perUserDefaultAutoCommit", ser));
            }
            catch (IOException ioe)
            {
                throw new NamingException("An IOException prevented " +
                   "serializing the perUserDefaultAutoCommit properties.");
            }
        }

        if ( perUserMaxActive != null )
        {
            try
            {
                ser = serialize((Serializable)perUserMaxActive);
                ref.add(new BinaryRefAddr("perUserMaxActive", ser));
            }
            catch (IOException ioe)
            {
                throw new NamingException("An IOException prevented " +
                   "serializing the perUserMaxActive properties.");
            }
        }

        if ( perUserMaxIdle != null )
        {
            try
            {
                ser = serialize((Serializable)perUserMaxIdle);
                ref.add(new BinaryRefAddr("perUserMaxIdle", ser));
            }
            catch (IOException ioe)
            {
                throw new NamingException("An IOException prevented " +
                   "serializing the perUserMaxIdle properties.");
            }
        }

        if ( perUserMaxWait != null )
        {
            try
            {
                ser = serialize((Serializable)perUserMaxWait);
                ref.add(new BinaryRefAddr("perUserMaxWait", ser));
            }
            catch (IOException ioe)
            {
                throw new NamingException("An IOException prevented " +
                   "serializing the perUserMaxWait properties.");
            }
        }

        if ( perUserDefaultReadOnly != null )
        {
            try
            {
                ser = serialize((Serializable)perUserDefaultReadOnly);
                ref.add(new BinaryRefAddr("perUserDefaultReadOnly", ser));
            }
            catch (IOException ioe)
            {
                throw new NamingException("An IOException prevented " +
                   "serializing the perUserDefaultReadOnly properties.");
View Full Code Here

        byte[] serJndiEnv = null;
        // BinaryRefAddr does not allow null byte[].
        if (jndiEnvironment != null)
        {
            serJndiEnv = SerializationUtils.serialize(jndiEnvironment);
            ref.add(new BinaryRefAddr("jndiEnvironment", serJndiEnv));
        }

        byte[] serPUMC = null;
        // BinaryRefAddr does not allow null byte[].
        if (getPerUserMaxConnections() != null)
        {
            serPUMC = SerializationUtils.serialize(getPerUserMaxConnections());
            ref.add(new BinaryRefAddr("perUserMaxConnections", serPUMC));
        }

        return ref;
    }
View Full Code Here

    Reference reference = new Reference(this.getClass().getName(), CommonDataSourceFactory.class.getName(), null);
    reference.add(new StringRefAddr(CommonDataSourceFactory.CLUSTER, this.cluster));
    DatabaseClusterConfigurationFactory<Z, D> factory = this.getConfigurationFactory();
    if (factory != null)
    {
      reference.add(new BinaryRefAddr(CommonDataSourceFactory.CONFIG, Objects.serialize(factory)));
    }
    else
    {
      reference.add(new StringRefAddr(CommonDataSourceFactory.CONFIG, this.config));
    }
View Full Code Here

      throw namingException;
    }

    return new Reference(
        Ejb3Configuration.class.getName(),
        new BinaryRefAddr("object", serialized ),
        Ejb3ConfigurationObjectFactory.class.getName(),
        null
    );
  }
View Full Code Here

      throw namingException;
    }

    return new Reference(
        Ejb3Configuration.class.getName(),
        new BinaryRefAddr("object", serialized ),
        Ejb3ConfigurationObjectFactory.class.getName(),
        null
    );
  }
View Full Code Here

TOP

Related Classes of javax.naming.BinaryRefAddr

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.