Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 585042 Details for
Bug 822240
Embedded container loses transaction when using JDBC connection with CMTs
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Test that reproduces the issue
MetricsTest.java (text/x-java), 2.02 KB, created by
John Sanda
on 2012-05-16 19:24:59 UTC
(
hide
)
Description:
Test that reproduces the issue
Filename:
MIME Type:
Creator:
John Sanda
Created:
2012-05-16 19:24:59 UTC
Size:
2.02 KB
patch
obsolete
>/* > * > * * RHQ Management Platform > * * Copyright (C) 2005-2012 Red Hat, Inc. > * * All rights reserved. > * * > * * This program is free software; you can redistribute it and/or modify > * * it under the terms of the GNU General Public License as published by > * * the Free Software Foundation version 2 of the License. > * * > * * This program is distributed in the hope that it will be useful, > * * but WITHOUT ANY WARRANTY; without even the implied warranty of > * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * * GNU General Public License for more details. > * * > * * You should have received a copy of the GNU General Public License > * * along with this program; if not, write to the Free Software > * * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. > * > */ > >package org.rhq.enterprise.server.measurement.test; > >import org.testng.annotations.Test; > >import org.rhq.core.domain.measurement.MeasurementDataNumeric; >import org.rhq.core.domain.measurement.MeasurementReport; >import org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal; >import org.rhq.enterprise.server.test.AbstractEJB3Test; >import org.rhq.enterprise.server.util.LookupUtil; > >/** > * @author John Sanda > */ >public class MetricsTest extends AbstractEJB3Test { > > private final long SECOND = 1000; > > private final long MINUTE = 60 * SECOND; > > @Test > public void insertNumericData() throws Exception { > final long now = System.currentTimeMillis(); > final long oneMinuteAgo = now - MINUTE; > final long twoMinutesAgo = now - (MINUTE * 2); > final long threeMinutesAgo = now - (MINUTE * 3); > final long fiveMinutesAgo = now - (MINUTE * 5); > > int scheduleId = 1001; > > final MeasurementReport report = new MeasurementReport(); > report.addData(new MeasurementDataNumeric(threeMinutesAgo, scheduleId, 4.44)); > report.setCollectionTime(now); > > MeasurementDataManagerLocal dataMgr = LookupUtil.getMeasurementDataManager(); > dataMgr.mergeMeasurementReport(report); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 822240
: 585042