Examples of availableChannel()


Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

      if (channel.isOpen()) {
        beforeOpenChannels.addObject(channel);
      }
    }
    try {
      EODatabaseChannel databaseChannel = databaseContext.availableChannel();
      EOAdaptorChannel adaptorChannel = databaseChannel.adaptorChannel();
      boolean channelOpen = adaptorChannel.isOpen();
      if (!channelOpen) {
        adaptorChannel.openChannel();
      }
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

      if (channel.isOpen()) {
        beforeOpenChannels.addObject(channel);
      }
    }
    try {
      EODatabaseChannel databaseChannel = databaseContext.availableChannel();
      EOAdaptorChannel adaptorChannel = databaseChannel.adaptorChannel();
      boolean channelOpen = adaptorChannel.isOpen();
      if (!channelOpen) {
        adaptorChannel.openChannel();
      }
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

    for (Enumeration e = EOModelGroup.defaultGroup().models().objectEnumerator(); e.hasMoreElements();) {
      final EOModel eomodel = (EOModel) e.nextElement();
      EODatabaseContext dbc = EOUtilities.databaseContextForModelNamed(ec, eomodel.name());
      dbc.lock();
      try {
        EOAdaptorChannel channel = dbc.availableChannel().adaptorChannel();
        if (eomodel.adaptorName().contains("JDBC")) {
          EOSynchronizationFactory syncFactory = (EOSynchronizationFactory) channel.adaptorContext().adaptor().synchronizationFactory();
          ERXSQLHelper helper = ERXSQLHelper.newSQLHelper(channel);
          NSDictionary options = helper.defaultOptionDictionary(true, dropTables);
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

    public NSArray newPrimaryKeys(EOEditingContext ec, int i) {
        EOEntity entity = entity(ec);
        EODatabaseContext dbc = EODatabaseContext.registeredDatabaseContextForModel(entity.model(), ec);
        dbc.lock();
        try {
          return dbc.availableChannel().adaptorChannel().primaryKeysForNewRowsWithEntity(i, entity);
        } finally {
          dbc.unlock();
        }
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

            dbContext.lock();
           
            boolean willRetryAfterHandlingDroppedConnection = true;
            while (willRetryAfterHandlingDroppedConnection) {
              try {
                EOAdaptorChannel adaptorChannel = dbContext.availableChannel().adaptorChannel();
                if (!adaptorChannel.isOpen()) {
                    adaptorChannel.openChannel();
                }
                NSArray<NSDictionary<String, Object>> arr = adaptorChannel.primaryKeysForNewRowsWithEntity(1, entity);
                if (arr != null) {
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

            ERXAdaptorOperationWrapper op = (ERXAdaptorOperationWrapper) ops.lastObject();
            EODatabaseContext context = EOUtilities.databaseContextForModelNamed(ec, op.operation().entity().model().name());
            context.lock();
            adaptorOperationsLock.lock();
            try {
                EODatabaseChannel dchannel = context.availableChannel();
                EOAdaptorChannel achannel = dchannel.adaptorChannel();
                achannel.adaptorContext().beginTransaction();
                boolean wasOpen = achannel.isOpen();
                if (!wasOpen) {
                    achannel.openChannel();
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

            ec.lock();
            try {
                EODatabaseContext dbc = EOUtilities.databaseContextForModelNamed(ec, modelName);
                dbc.lock();
                try {
                    channel = dbc.availableChannel().adaptorChannel();
                    wasOpen = channel.isOpen();
                    if(!wasOpen) {
                        channel.openChannel();
                    }
                    channel.adaptorContext().beginTransaction();
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

    // sql in a non-blocking fashion.
    public static void evaluateSQLWithEntity(EOEditingContext ec, EOEntity entity, String exp) {
        EODatabaseContext dbContext = EODatabaseContext.registeredDatabaseContextForModel(entity.model(), ec);
        dbContext.lock();
        try {
          EOAdaptorChannel adaptorChannel = dbContext.availableChannel().adaptorChannel();
          if (!adaptorChannel.isOpen()) {
            adaptorChannel.openChannel();
          }
          EOSQLExpressionFactory factory = adaptorChannel.adaptorContext().adaptor().expressionFactory();
      if (ERXEOAccessUtilities.log.isInfoEnabled()) {
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

      EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
      EODatabaseContext dbContext = EODatabaseContext.registeredDatabaseContextForModel(entity.model(), ec);
      NSDictionary primaryKey = null;
      dbContext.lock();
      try {
        EOAdaptorChannel adaptorChannel = dbContext.availableChannel().adaptorChannel();
        if (!adaptorChannel.isOpen()) {
          adaptorChannel.openChannel();
        }
        NSArray arr = adaptorChannel.primaryKeysForNewRowsWithEntity(1, entity);
        if (arr != null) {
View Full Code Here

Examples of com.webobjects.eoaccess.EODatabaseContext.availableChannel()

                   EOQualifier gidQualifier = entity.qualifierForPrimaryKey(entity.primaryKeyForGlobalID(gid));
                   EOFetchSpecification gidFetchSpec = new EOFetchSpecification(entityName, gidQualifier, null);

                   NSMutableDictionary databaseSnapshotClone;
                   NSMutableDictionary memorySnapshotClone = snapshot.mutableClone();
                   EOAdaptorChannel channel = databaseContext.availableChannel().adaptorChannel();
                   channel.openChannel();
                   channel.selectAttributes(entity.attributesToFetch(), gidFetchSpec, false, entity);
                   try {
                     databaseSnapshotClone = channel.fetchRow().mutableClone();
                   }
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.