Examples of ConnectionFactory


Examples of br.com.humberto.jdbc.ConnectionFactory

public class ContatoDao {
  private Connection connection;

  public ContatoDao() {
    this.connection = new ConnectionFactory().getConnection();
  }
View Full Code Here

Examples of br.inatel.ec.ac308.agenda.dao.ConnectionFactory

public class PessoaJuridicaDAO {

    private final Connection connection;

    public PessoaJuridicaDAO() {
        this.connection = new ConnectionFactory().getConnection();
    }
View Full Code Here

Examples of ch.marcsladek.jrtnp.connection.ConnectionFactory

   *           when error with socket and stream
   */
  public Client(String host, int port,
      Class<? extends ConnectionFactory> connectionFactoryClass)
      throws ReflectiveOperationException, IOException {
    ConnectionFactory factory = connectionFactoryClass.getConstructor().newInstance();
    server = factory.newInstance(new Socket(host, port));
  }
View Full Code Here

Examples of ch.rakudave.jnetmap.model.factories.ConnectionFactory

      @Override
      public void mapChanged(MapEvent e) {
        vv.repaint();
      }
    });
    MapGraphMouse egm = new MapGraphMouse(owner, vv.getRenderContext(), new DeviceFactory(), new ConnectionFactory());
      egm.setMode(ModalGraphMouse.Mode.PICKING);
    vv.setGraphMouse(egm);
    vv.setBackground(Color.white);
    vv.addGraphMouseListener(this);
    vv.getRenderer().getVertexLabelRenderer().setPosition(edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position.S);
View Full Code Here

Examples of com.atomikos.datasource.pool.ConnectionFactory

    if (getUniqueResourceName() == null)
      throwAtomikosJMSException("Property 'uniqueResourceName' of class AtomikosConnectionFactoryBean cannot be null.");
   
    try {
      getReference();
      ConnectionFactory cf = doInit();
      connectionPool = new ConnectionPool(cf, this);
     
    } catch ( AtomikosJMSException e ) {
      //don't log: AtomikosJMSException is logged on creation by the factory methods
      throw e;
View Full Code Here

Examples of com.github.kevinsawicki.http.HttpRequest.ConnectionFactory

      public void handle(Request request, HttpServletResponse response) {
        response.setStatus(HTTP_OK);
      }
    };

    ConnectionFactory factory = new ConnectionFactory() {

      public HttpURLConnection create(URL otherUrl) throws IOException {
        return (HttpURLConnection) new URL(url).openConnection();
      }
View Full Code Here

Examples of com.github.neuralnetworks.architecture.ConnectionFactory

    @Test
    public void testParallelNetworks() {
  Environment.getInstance().setExecutionMode(EXECUTION_MODE.SEQ);

  Environment.getInstance().setUseWeightsSharedMemory(true);
  ConnectionFactory cf = new ConnectionFactory();
  NeuralNetworkImpl mlp = new NeuralNetworkImpl();
  Layer input = new Layer();
  Layer leaf1 = new Layer();
  Layer leaf2 = new Layer();
  Layer output = new Layer();

  mlp.addLayer(input);

  FullyConnected fc1 = cf.fullyConnected(input, leaf1, 2, 3);
  fc1.getWeights().forEach(i -> fc1.getWeights().getElements()[i] = 0.1f);
  mlp.addConnections(fc1);

  FullyConnected fc2 = cf.fullyConnected(input, leaf2, 2, 3);
  fc2.getWeights().forEach(i -> fc2.getWeights().getElements()[i] = 0.2f);
  mlp.addConnections(fc2);

  FullyConnected fc3 = cf.fullyConnected(leaf1, output, 3, 1);
  fc3.getWeights().forEach(i -> fc3.getWeights().getElements()[i] = 0.3f);
  mlp.addConnections(fc3);
  FullyConnected fc4 = cf.fullyConnected(leaf2, output, 3, 1);
  fc4.getWeights().forEach(i -> fc4.getWeights().getElements()[i] = 0.4f);
  mlp.addConnections(fc4);

  mlp.setLayerCalculator(NNFactory.lcWeightedSum(mlp, null));
View Full Code Here

Examples of com.netflix.staash.connection.ConnectionFactory

    MetaDao provideCqlMetaDaoNew(@Named("astmetaks") Keyspace keyspace) {
        return new AstyanaxMetaDaoImpl(keyspace);
    }
    @Provides
    MetaService providePaasMetaService(@Named("newmetadao") MetaDao metad, CacheService cache) {
      ConnectionFactory fac = new PaasConnectionFactory("astyanax", null);
        PaasMetaService metasvc = new PaasMetaService(metad, fac, cache);
        return metasvc;
    }
View Full Code Here

Examples of com.rabbitmq.client.ConnectionFactory

      delegate = callWithRetries(new Callable<Connection>() {
        @Override
        public Connection call() throws IOException {
          log.info("{} connection {} to {}", recovery ? "Recovering" : "Creating", connectionName,
              options.getAddresses());
          ConnectionFactory cxnFactory = options.getConnectionFactory();
          Connection connection =
              cxnFactory.newConnection(consumerThreadPool, options.getAddresses());
          final String amqpAddress =
              String.format("%s://%s:%s/%s", cxnFactory.isSSL() ? "amqps" : "amqp",
                  connection.getAddress().getHostAddress(), connection.getPort(),
                  "/".equals(cxnFactory.getVirtualHost()) ? "" : cxnFactory.getVirtualHost());
          log.info("{} connection {} to {}", recovery ? "Recovered" : "Created", connectionName,
              amqpAddress);
          return connection;
        }
      }, recurringPolicy, recurringStats, recurringExceptions, true, false);
View Full Code Here

Examples of com.sun.messaging.ConnectionFactory

            String host = null;
            String subnet = null;
            String ackTimeout = null;
            Reference ref = (Reference)obj;
            String refClassName = ref.getClassName();
            ConnectionFactory cf;
            if (refClassName.equals(com.sun.messaging.QueueConnectionFactory.class.getName())) {
                cf = new QueueConnectionFactory();
            } else {
                if (refClassName.equals(com.sun.messaging.TopicConnectionFactory.class.getName())) {
                    cf = new TopicConnectionFactory();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.