[wildfly-dev] Decoding query name attribute in deployment/subsystem/jpa/hibernate-persistence-unit/query-cache nodes
Scott Marlow
smarlow at redhat.com
Mon Jan 27 11:57:57 EST 2014
Thomas,
In WildFly 8, the code moved to the Jipijapa project.
For Hibernate 4.3.x, the (private api) QueryName class transforms the
query via
https://github.com/jipijapa/jipijapa/blob/master/hibernate4_3/src/main/java/org/jboss/as/jpa/hibernate4/management/QueryName.java
There is also a Hibernate 4.1.x/4.2.x implementation here
https://github.com/jipijapa/jipijapa/blob/master/hibernate4_1/src/main/java/org/jboss/as/jpa/hibernate4/management/QueryName.java
The *why* is to turn the query name into a legal name (e.g. that can be
displayed by the jboss-cli tool).
Why are you trying to decode the query back into its original (internal
Hibernate) form? Which project are you trying to do this for?
Scott
On 01/27/2014 11:22 AM, Tomaž Cerar wrote:
> It was removed as part of this commit
> https://github.com/wildfly/wildfly/commit/ac3bee2#diff-d3c9757d55cdb99a978579547b2f5cc6R105
>
> why, that would be question for Scott.
>
> --
> tomaz
>
>
> On Mon, Jan 27, 2014 at 5:02 PM, Thomas Segismont <tsegismo at redhat.com
> <mailto:tsegismo at redhat.com>> wrote:
>
> Hi,
>
> deployment/subsystem/jpa/hibernate-persistence-unit/query-cache nodes
> expose an "encoded" query name attribute. Here's an example:
>
> "rhq.ear/rhq-core-domain-ejb3.jar#rhqpu.rhq.ear_divide_rhq_minus_core_minus_domain_minus_ejb3.jar#rhqpu.rhq.ear_divide_rhq_minus_core_minus_domain_minus_ejb3.jar#rhqpu.SELECT_space_subject_newline_FROM_space_Subject_space_subject_newline_WHERE_space__left_paren__space_LOWER_left_paren__space_subject.name_space__right_paren__space_like_space__colon_name_space_ESCAPE_space__quote_\\_quote__space__space__right_paren__newline_ORDER_space_BY_space_subject.id_space_ASC_newline_"
>
> I could write something to decode every occurrence of "_minus_",
> "_space_" and so on, provided I can get the list of all the keywords in
> use. But I wonder if there's already a library in the Hibernate
> subsystem which does that.
>
> By the way, these nodes exist in AS7 and EAP6, but I found no equivalent
> in Wildfly management model. Did I miss the definition on the Wildscribe
> site?
>
> http://wildscribe.github.io/JBoss%20AS7/7.1.1/deployment/subsystem/jpa/hibernate-persistence-unit/query-cache/index.html
>
> Thanks,
> Thomas
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org <mailto:wildfly-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
>
>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>
More information about the wildfly-dev
mailing list