persistence@glassfish.java.net

Re: Dynamically creating named queries

From: Absynt Technologies <hale_india_at_yahoo.com>
Date: Mon, 18 Jun 2007 07:50:06 -0700 (PDT)

Hello Faruck

May be can you do this using javascript or any script language.
For my applications I have created some plugin management using java 6 scripting extensions.
I could contribute this code if you are interested or you can do it direct from java 6.
Then you can have dynamic javascript code creation and then run this script. You can call java classes from javascript so you should be able to do what you are looking for.

Regards

Andre

----- Original Message ----
From: Farrukh S. Najmi <farrukh_at_wellfleetsoftware.com>
To: persistence_at_glassfish.dev.java.net
Sent: Monday, June 18, 2007 5:33:56 PM
Subject: Dynamically creating named queries


Hello,

In my application I need to dynamically create named queries based on
configuration data for my application.
I cannot statically define NamedQuery annotation in my code but instead
need to create a NamedQuery through code.

I assume this is possible? Is so, can someone please suggest how to do
this. Thanks you for your help.

-- 
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com