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 644969 Details for
Bug 861237
ResourceManager.getLiveResourceAvailability fails due to PersistentObjectException: detached entity passed to persist: org.rhq.core.domain.configuration.definition.ConfigurationDefinition
[?]
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.
[patch]
Proposed patch
Proposed_patch.patch (text/plain), 5.80 KB, created by
Heiko W. Rupp
on 2012-11-14 15:46:06 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Heiko W. Rupp
Created:
2012-11-14 15:46:06 UTC
Size:
5.80 KB
patch
obsolete
>Index: modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java >IDEA additional info: >Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP ><+>ISO-8859-1 >=================================================================== >--- modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java (revision 9e0684aff08061f47f8dedfb7ee5fb542b9f1f62) >+++ modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java (revision ) >@@ -276,7 +276,7 @@ > // make sure the user is authorized to delete this resource (which implies you can delete all its children) > // TODO: There is a pretty good argument for this being replaced with MANAGE_INVENTORY. It takes an > // inventory manager to import resources, so why not to remove them? But, since no one has complained >- // we're timid about making a change that may hamstring existing setups. >+ // we're timid about making a change that may hamstring existing setups. > if (!authorizationManager.hasResourcePermission(user, Permission.DELETE_RESOURCE, resourceId)) { > throw new PermissionException("You do not have permission to uninventory resource [" + resourceId + "]"); > } >@@ -371,8 +371,8 @@ > } > } > >- // now remove the dommed agent. Call flush() to force out any problems with agent removal >+ // now remove the doomed agent. Call flush() to force out any problems with agent removal >- // so that we can catch them and report a better exception. >+ // so that we can catch them and report a better exception. > if (doomedAgent != null) { > agentManager.deleteAgent(doomedAgent); > entityManager.flush(); >@@ -517,7 +517,7 @@ > PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_2, // then delete the config objects > PluginConfigurationUpdate.QUERY_DELETE_BY_RESOURCES_3, // then the history objects wrapping those configs > AlertConditionLog.QUERY_DELETE_BY_RESOURCES, // Don't >- AlertConditionLog.QUERY_DELETE_BY_RESOURCES_BULK_DELETE, // alter >+ AlertConditionLog.QUERY_DELETE_BY_RESOURCES_BULK_DELETE, // alter > AlertNotificationLog.QUERY_DELETE_BY_RESOURCES, // the > Alert.QUERY_DELETE_BY_RESOURCES, // order > AlertCondition.QUERY_DELETE_BY_RESOURCES, // of >@@ -885,7 +885,7 @@ > /** > * Get the complete set of resource type Ids in the ancestries provided. This is useful for > * being able to load all the types in advance of generating decoded values. >- * >+ * > * @return > */ > private HashSet<Integer> getAncestryTypeIds(Collection<String> ancestries) { >@@ -2353,6 +2353,7 @@ > if (avail != null) { > results.setAvailabilityType(avail.getAvailabilityType()); > } >+ entityManager.flush(); > } > } catch (Throwable ignore) { > } >@@ -2637,7 +2638,7 @@ > > // make sure the user is authorized to disable this resource (which implies you can disable all its children) > // TODO: this may require its own permission, but until someone needs it we'll piggyback on DELETE, at least >- // that gives a resource-level permission option. >+ // that gives a resource-level permission option. > if (!authorizationManager.hasResourcePermission(subject, Permission.DELETE_RESOURCE, resourceId)) { > throw new PermissionException("You do not have permission to disable resource [" + resourceId + "]"); > } >@@ -2680,7 +2681,7 @@ > // Set the resources disabled via the standard mergeInventoryReport mechanism, from the server service > // level. We do this for a few reasons: > // - The server service uses locking to ensure we don't conflict with an actual report from the agent >- // - It ensure all necessary db modications take place, like avail history and current avail >+ // - It ensure all necessary db modifications take place, like avail history and current avail > // - It ensures that all ancillary avail change logic, like alerting, still happens. > DiscoveryServerServiceImpl service = new DiscoveryServerServiceImpl(); > for (AvailabilityReport report : reports.values()) { >@@ -2715,7 +2716,7 @@ > > // make sure the user is authorized to enable this resource (which implies you can enable all its children) > // TODO: this may require its own permission, but until someone needs it we'll piggyback on DELETE, at least >- // that gives a resource-level permission option. >+ // that gives a resource-level permission option. > if (!authorizationManager.hasResourcePermission(subject, Permission.DELETE_RESOURCE, resourceId)) { > throw new PermissionException("You do not have permission to enable resource [" + resourceId + "]"); > } >@@ -2757,7 +2758,7 @@ > // Set the resources disabled via the standard mergeInventoryReport mechanism, from the server service > // level. We do this for a few reasons: > // - The server service uses locking to ensure we don't conflict with an actual report from the agent >- // - It ensure all necessary db modications take place, like avail history and current avail >+ // - It ensure all necessary db modifications take place, like avail history and current avail > // - It ensures that all ancillary avail change logic, like alerting, still happens. > DiscoveryServerServiceImpl service = new DiscoveryServerServiceImpl(); > for (AvailabilityReport report : reports.values()) {
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 861237
: 644969