Package org.globus.workspace.async

Examples of org.globus.workspace.async.AsyncRequest


        PreparedStatement pstmt = null;
        PreparedStatement[] pstmts = null;
        try {
            c = getConnection();

            AsyncRequest oldAsyncRequest = getAsyncRequest(asyncRequest.getId());


            if (oldAsyncRequest != null) {
                logger.debug("Updating old request " + oldAsyncRequest.getId());
                // We will later need to persist modified versions of our persisted VMs,
                // so we need to remove all of our earlier copies
                pstmts = AsyncRequestMapPersistenceUtil.getRemoveAsyncBindings(oldAsyncRequest, c);
                for (PreparedStatement p : pstmts) {
View Full Code Here


        if (id == null) {
            throw new IllegalArgumentException("id may not be null");
        }

        AsyncRequest asyncRequest = null;

        Connection c = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        try {
            c = getConnection();
            pstmt = AsyncRequestMapPersistenceUtil.getAsyncRequest(id, c);
            rs = pstmt.executeQuery();

            if (rs == null || !rs.next()) {
                logger.debug("No Asyncrequest with ID " + id);
                return null;
            }

            asyncRequest = AsyncRequestMapPersistenceUtil.rsToAsyncRequest(rs, this.repr, c);
            VirtualMachine[] bindings = AsyncRequestMapPersistenceUtil.getAsyncVMs(asyncRequest.getId(), c);
            asyncRequest.setBindings(bindings);
            AsyncRequestMapPersistenceUtil.addAllocatedVMs(asyncRequest, c);
            AsyncRequestMapPersistenceUtil.addFinishedVMs(asyncRequest, c);
            AsyncRequestMapPersistenceUtil.addToBePreempted(asyncRequest, c);

        } catch (SQLException e) {
View Full Code Here

                return asyncRequests;
            }

            do {
                String id = rs.getString("id");
                AsyncRequest asyncRequest = this.getAsyncRequest(id);
                asyncRequests.add(asyncRequest);
            } while(rs.next());
        } catch (SQLException e) {
            logger.error("",e);
            throw new WorkspaceDatabaseException(e);
View Full Code Here

TOP

Related Classes of org.globus.workspace.async.AsyncRequest

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.