Bug 1058875 - Expose plain query in "query-name" attribute of "query-cache" nodes
Summary: Expose plain query in "query-name" attribute of "query-cache" nodes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JPA
Version: 6.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: EAP 6.3.0
Assignee: Scott Marlow
QA Contact: Zbyněk Roubalík
Russell Dickenson
URL:
Whiteboard:
Depends On: 1040733
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-28 16:53 UTC by Thomas Segismont
Modified: 2014-06-29 22:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-29 14:47:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Thomas Segismont 2014-01-28 16:53:44 UTC
Description of problem:
"query-name" attribute of "query-cache" nodes exposes an "encoded" query string

Version-Release number of selected component (if applicable):
All released versions of EAP6

How reproducible:
Always

Steps to Reproduce:
1.Deploy an application based on JPA/Hibernate
2.Inspect deployment/subsystem/jpa/hibernate-persistence-unit/query-cache nodes

Actual results:
"query-name" has an encoded value, like:
SELECT_space_m_space_FROM_space_Message_space_m

Expected results:
"query-name" shows the plain query:
SELECT m FROM Message m 

Additional info:
This is a request to backport JIPI-29 fix into EAP6.3
See https://issues.jboss.org/browse/JIPI-29

Comment 1 Scott Marlow 2014-01-28 19:38:30 UTC
I just built the EAP 6.2.x branch locally and can see that we already have the desired query-name attribute.  In WildFly 8, query-name was set incorrectly but that is now fixed as part of JIPI-29.:

{quote}
pwd 

/deployment=jmxp.ear.ear/subdeployment=jmxp.ejb.jar/subsystem=jpa/hibernate-persistence-unit=jmxp.ear.ear/jmxp.ejb.jar#fraudPU/query-cache=SELECT_space_m_space_FROM_space_Message_space_m

ls
query-cache-hit-count=0             query-cache-put-count=0             query-execution-count=2             query-execution-min-time=2          query-name=SELECT m FROM Message m  
query-cache-miss-count=0            query-execution-average-time=6      query-execution-max-time=10         query-execution-row-count=0     
{quote}

Also:

{quote}
pwd 

/deployment=jmxp.ear.ear/subdeployment=jmxp.ejb.jar/subsystem=jpa/hibernate-persistence-unit=jmxp.ear.ear/jmxp.ejb.jar#fraudPU/query-cache=SELECT_space_m_space_FROM_space_Message_space_m_space_where_space_m.reliable_space__equal__space__quote_y_quote_

ls

 ls
query-cache-hit-count=0                                    query-execution-average-time=1                             query-execution-min-time=1                                 
query-cache-miss-count=0                                   query-execution-count=2                                    query-execution-row-count=0                                
query-cache-put-count=0                                    query-execution-max-time=1                                 query-name=SELECT m FROM Message m where m.reliable = 'y'  

{quote}

Comment 2 Scott Marlow 2014-01-29 14:02:39 UTC
How do you mark this bugzilla as already fixed by bz-1040733?

Comment 3 Thomas Segismont 2014-01-29 14:47:10 UTC
I'll close it as not a bug because:
* the purpose of this bug was to get the fix for JIPI-29 backported into EAP6.3
* it appeared since that only Wildfly was broken and EAP6 shows the plain query in the "query-name" attribute


Note You need to log in before you can comment on or make changes to this bug.