Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOEditingContext.unlock()


              proxyAsAttachment = attachmentProcessor.proxyAsAttachment(attachment);
            }
            InputStream rawAttachmentInputStream = attachmentProcessor.attachmentInputStream(attachment);
            attachmentInputStream = new BufferedInputStream(rawAttachmentInputStream, bufferSize);
          } finally {
            editingContext.unlock();
          }
         
          response.setHeader(mimeType, "Content-Type");
          response.setHeader(String.valueOf(length), "Content-Length");
View Full Code Here


            EOGlobalID attachmentID = editingContext.globalIDForObject(attachment);
            ERAttachmentQueueEntry<T> entry = new ERAttachmentQueueEntry<T>(attachment._pendingUploadFile(), attachmentID);

            enqueue(entry);
        } finally {
            editingContext.unlock();
        }
    }

    @Override
    public void process(ERAttachmentQueueEntry<T> entry) {
View Full Code Here

                try {
                    attachment.setAvailable(Boolean.TRUE);

                    editingContext.saveChanges();
                } finally {
                    editingContext.unlock();
                }

                if (_processor.delegate() != null) {
                    _processor.delegate().attachmentAvailable(_processor, attachment);
                }
View Full Code Here

           EditPageInterface page = D2W.factory().editPageForEntityNamed(ERCHelpText.ENTITY, session());
           page.setObject(text);
           page.setNextPage(context().page());
           return (WOComponent)page;
         } finally {
           ec.unlock();
         }
    }
   
    public NSArray keys() {
    return ERCDisplayHelpText.textsOnPage();
View Full Code Here

        iterator.setEditingContext(ec);
        ec.lock();
        try {
            iterator.batchCount();
        } finally {
            ec.unlock();
        }
        ec.dispose();
        while (iterator.hasNextBatch()) {
            EOEditingContext temp = ERXEC.newEditingContext();
            temp.lock();
View Full Code Here

            temp.lock();
            try {
                iterator.setEditingContext(temp);
                sendMailMessages(iterator.nextBatch());
            } finally {
                temp.unlock();
            }
            temp.dispose();
        }
        if (log.isDebugEnabled())
            log.debug("Done outgoing mail processing.");
View Full Code Here

                } catch(RuntimeException ex) {
                  log.error("Error while setting getting actor's preferences: " + ex, ex);
              }
            actor = localActor;
            } finally {
                actorEc.unlock();               
            }
        }
        return actor;
    }
View Full Code Here

                                                                      + ": " + exceptionForTitle.getMessage(),
                                                                      standardExceptionPage.generateResponse().contentString(),
                                                                      ec);
                        ec.saveChanges();
                    } finally {
                        ec.unlock();
                    }
                    ec.dispose();
                }
            }
        } catch (Throwable u) {
View Full Code Here

        try {
            Person p = Person.createPerson(editingContext, "Mike");
            assertEquals("{\"type\":\"Person\",\"age\":null,\"name\":\"Mike\",\"salary\":null}\n", ERXRestFormat.json().toString(p, ERXKeyFilter.filterWithAttributes()));
        }
        finally {
            editingContext.unlock();
            editingContext.dispose();
        }
    }

    public void testPluralNamesFormat() {
View Full Code Here

            Person p = Person.createPerson(editingContext, "Mike");
            assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<person type=\"person\">\n" + "  <age nil=\"true\"/>\n" + "  <name>Mike</name>\n" + "  <salary nil=\"true\"/>\n" + "</person>\n", format.toString(p, ERXKeyFilter.filterWithAttributes(), new ERXRestContext(editingContext)));
        }
        finally {
            editingContext.unlock();
            editingContext.dispose();
        }
    }

    public void testCustomIdKeyFormat() {
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.