[GeoNetwork-devel] Tweaks to handling of thumbnails

I have added a couple of adjustments to the DataManager and Thumbnail
service to better handle the addition of thumbnails, in particular the
creation of thumbnails when harvesting them. This came about because
we were working on the ability to harvest thumbnails from ArcSDE,
since the binary data for the thumbnails is being sent in the metadata
stream.

One of the issues we encountered recently (after having had it up and
running fine) was that the database was being locked once a thumbnail
was added. I believe the changes I have made fix this issue, since a
database connection was being opened by manageThumbnail in the middle
of harvesting. That database connection is now being passed in, rather
than being opened. This means that if we are harvesting we use the
open connection, if not we open a new connection. A timeout still
occasionally occurs, but at least it now adds thumbnails correctly. If
we change the database from the default h2 database and use Oracle
instead this problem seems to go away, although the changes made do
allow us to harvest thumbnails correctly now.

I was wondering what is the best way to go about adding this to the main code?

I have forked the main geonetwork git repository. Should I make a
pull-request with just these changes? Also, would it be worthwhile
adding the code for collecting a thumbnail from ArcSDE to the main
code as well?

Thanks,

Elgar Storm

I would recommend a pull request. As for the ArcSDE codeā€¦ I think it sounds like a good addition, but I think 2 pull request is probably best so we can review each carefully.

On Thu, Oct 18, 2012 at 6:03 AM, Elgar Storm <elgarstorm@anonymised.com> wrote:

I have added a couple of adjustments to the DataManager and Thumbnail
service to better handle the addition of thumbnails, in particular the
creation of thumbnails when harvesting them. This came about because
we were working on the ability to harvest thumbnails from ArcSDE,
since the binary data for the thumbnails is being sent in the metadata
stream.

One of the issues we encountered recently (after having had it up and
running fine) was that the database was being locked once a thumbnail
was added. I believe the changes I have made fix this issue, since a
database connection was being opened by manageThumbnail in the middle
of harvesting. That database connection is now being passed in, rather
than being opened. This means that if we are harvesting we use the
open connection, if not we open a new connection. A timeout still
occasionally occurs, but at least it now adds thumbnails correctly. If
we change the database from the default h2 database and use Oracle
instead this problem seems to go away, although the changes made do
allow us to harvest thumbnails correctly now.

I was wondering what is the best way to go about adding this to the main code?

I have forked the main geonetwork git repository. Should I make a
pull-request with just these changes? Also, would it be worthwhile
adding the code for collecting a thumbnail from ArcSDE to the main
code as well?

Thanks,

Elgar Storm


Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork