Examples of closeConnection()


Examples of net.sf.hibernate.connection.ConnectionProvider.closeConnection()

            try {
                if (statement != null) statement.close();
                if (connection != null) {
                    JDBCExceptionReporter.logWarnings(connection.getWarnings());
                    connection.clearWarnings();
                    connectionProvider.closeConnection(connection);
                    connectionProvider.close();
                }
            } catch (Exception e) {
                log.error("Could not close connection", e);
            }
View Full Code Here

Examples of npanday.dao.ProjectDao.closeConnection()

                    IOUtil.close( fileWriter );
                }
            }
            artifact.setArtifactHandler( handler );
        }
        dao.closeConnection();
    }

    public void convertRepositoryFormatFor( Artifact artifact, ApplicationConfig applicationConfig,
                                            Repository repository, File mavenRepository )
            throws IOException, NPandayRepositoryException
View Full Code Here

Examples of nz.co.abrahams.asithappens.cartgraph.DataGraphDAO.closeConnection()

            graphDAO = DAOFactory.getDataGraphDAO();
            graphID = graphDAO.retrieveGraphIDForSession(sessionID);

            graphFrame = graphDAO.retrieveGraph(graphID, dataSets);

            graphDAO.closeConnection();
            graphFrame.getContext().setAggregation(aggregation);
            graphFrame.getContext().setInterpolation(interpolation);
            graphFrame.getContext().setXAxisScaling(TimeSeriesContext.XAxisScaling.AbsoluteBoundaries);
        } catch (Exception e) {
            ErrorHandler.modalError(parent, e.toString(),
View Full Code Here

Examples of nz.co.abrahams.asithappens.cartgraph.DataGraphDAO.closeConnection()

       
        graphDAO = DAOFactory.getDataGraphDAO(connection);
        for ( int graph = 0 ; graph < graphIDs.length ; graph++ ) {
            graphDAO.retrieveGraph(graphIDs[graph], null);
        }
        graphDAO.closeConnection();
       
    }
   
    public static synchronized String[] getLayoutsList() throws DBException {
        LayoutDAO layoutDAO;
View Full Code Here

Examples of nz.co.abrahams.asithappens.collectors.DataCollectorDAO.closeConnection()

            statement.close();

            // TODO - store collector here
            collectorDAO = DAOFactory.getDataCollectorDAO(connection, dataSets.getCollector());
            collectorDAO.create(sessionID, dataSets.getCollector());
            collectorDAO.closeConnection();
            //dataSets.getCollector().store(sessionID);

            logger.debug("Adding new session with ID " + sessionID);
            return sessionID;
        } catch (SQLException e) {
View Full Code Here

Examples of nz.co.abrahams.asithappens.storage.DataSetsDAO.closeConnection()

                // Store graph context as part of a layout
                if ( layoutName != null ) {
                    //sessionID = context.getData().storeTemplate();
                    dataSetsDAO = DAOFactory.getDataSetsDAO();
                    sessionID = dataSetsDAO.createTemplate(context.getData());
                    dataSetsDAO.closeConnection();
                // All stored collector sessions get their graph context stored
                } else
                    sessionID = context.getData().getSessionID();
                    //collectorID = context.getData().getCollector().store();
            } else {
View Full Code Here

Examples of nz.co.abrahams.asithappens.storage.DataSetsDAO.closeConnection()

            fromDateField.setText(dateFormat.format(startCalendar.getTime()));
            fromTimeField.setText(timeFormat.format(startCalendar.getTime()));
            toDateField.setText(dateFormat.format(finishCalendar.getTime()));
            if ( ! toTimeField.isFocusOwner() )
                toTimeField.setText(timeFormat.format(finishCalendar.getTime()));
            dataSetsDAO.closeConnection();
        } catch (DBException e) {
            ErrorHandler.modalError(this, "Cannot retrieve data from database", "Update of session title in database unsuccessful", e);
        }
    }
   
View Full Code Here

Examples of nz.co.abrahams.asithappens.storage.DeviceDAO.closeConnection()

        deviceDAO = DAOFactory.getDeviceDAO();
        if ( retrieveRWCommunity )
            deviceDAO.updateDevice(snmp.getDevice().getName(), null, snmp.getDevice().getCommunityWrite(), null, null);
        else
            deviceDAO.updateDevice(snmp.getDevice().getName(), snmp.getDevice().getCommunityRead(), null, null, null);
        deviceDAO.closeConnection();
       
    }
   
    public String retrieveCommunity(String deviceName) throws DBException {
        Device temporaryDevice;
View Full Code Here

Examples of nz.co.abrahams.asithappens.storage.DeviceDAO.closeConnection()

        long pollInterval;
       
        name = (String)(DBUtil.retrieveSingleAttributeWithPK(connection, RETRIEVE_DEVICE, sessionID));
        deviceDAO = DAOFactory.getDeviceDAO();
        device = deviceDAO.retrieveDevice(name, false);
        deviceDAO.closeConnection();
        pollInterval = ((Long)(DBUtil.retrieveSingleAttributeWithPK(connection, RETRIEVE_POLLINTERVAL, sessionID))).longValue();
        return new ResponseCollector(device, pollInterval);
    }
   
    /**
 
View Full Code Here

Examples of nz.co.abrahams.asithappens.storage.DeviceDAO.closeConnection()

        FlowOptions options;
       
        name = (String)(DBUtil.retrieveSingleAttributeWithPK(connection, RETRIEVE_DEVICE, sessionID));
        deviceDAO = DAOFactory.getDeviceDAO();
        device = deviceDAO.retrieveDevice(name, true);
        deviceDAO.closeConnection();
        pollInterval = ((Long)(DBUtil.retrieveSingleAttributeWithPK(connection, RETRIEVE_POLLINTERVAL, sessionID))).longValue();
        ifDescr = (String)(DBUtil.retrieveSingleAttributeWithPK(connection, RETRIEVE_IFDESCR, sessionID));
        direction = ((Integer)(DBUtil.retrieveSingleAttributeWithPK(connection, RETRIEVE_DIRECTION, sessionID))).intValue();
        tableSize = ((Integer)(DBUtil.retrieveSingleAttributeWithPK(connection, RETRIEVE_TABLESIZE, sessionID))).intValue();
        portsSNMP = new PortsSelectorSNMP(device);
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.