you can indeed use java in flowscript. Specify you doc as follows:
importClass(Packages.java.util.Iterator);
then:
var myIt = new Iterator();
var someval = myIt.getMethod();
hope this helps.
Andrew
On 23 Oct 2004, at 14:51, Antonio Gallardo wrote:
Servus Martin!
Martin Rusnak dijo:
Dear All,
I am using CForms/flow-script. When the form is submited, I usually call
a methods in my database utility classes from flow-script to perform a
DB queries. For that I need to obtain a database connection from the
pool. I tried the method: Database.getConnection("connection-id"), but
it returns ScriptableConnection class. Is it possible to get reference
to java.sql.Connection in flow-script?
I never used directly java.sql.* in JSFlow, but I think it should work.
What is the preferred way to
handle database calls in flow-script?
Well, I think the "prefered" way depends of how much you will use
databases. There are diferent approach:
The olders are:
1-ESQL tranformer
2-ESQL logicsheet in XSP
3-Modular DB Actions - http://wiki.apache.org/cocoon/ReinhardHorn
The "newer" approach is using a O/R mapping tool - i.e.:Apache OJB,
Hibernate, etc. This approach is particular powerful because allow you to
have better SoC + all the advantage that a O/R tool + better abstraction.
You can find more info in section 7. "Databases" at:
http://wiki.apache.org/cocoon/HowTos
Best Regards,
Antonio Gallardo.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<<inline: beya-email.gif>>
�+The home of urban music
+ http://www.beyarecords.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
