Andrew Cadman wrote:

I'd like to return a complete record set of a given database table using an
array of Hashmaps from my java class  and convert that to an array of hashes
in perl.

Is this possible to acheive, and what are the performance implications, as I
need to use this on a fairly heavily used and complex system.

Andrew Cadman


Andrew,

lnline::Java doesn't convert HashMap objects to Perl hashes automatically. Basically what
you do is use the HashMap object through it's Java API.


One thing you must be aware of is that every access to a member of the hash will cause a
Perl -> Java -> Perl trip to be made. The same is true for arrays. Therefore this will become
expensive if you have a lot of rows in your dataset or are accessing the fields many times.


If you use JNI it will be a lot faster, but you will still have some overhead.

If I were you I would try to ditch Java altogether in this case and use DBI to access the
database (if possible).



Patrick

--
=====================
Patrick LeBoutillier
Laval, Quebec, Canada



Reply via email to