Plugin development

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Plugin development

Mirko Sertic
The author has deleted this message.
Reply | Threaded
Open this post in threaded view

Re: Plugin development

Gerd Wagner-3
Hi Mirko,

sorry for my late response and thanks for your work on the Mogwai plugin.

Mirko Sertic wrote:
> How do i use hibernate in a plugin? There is a set of mapped classes and
> hibernate mapping
> files, but where to i have to place them? I tried to put them into the
> plugin.jar, but
> hibernate cannot load the mapped classes!
Do I understand it right, you use Hibernate from with in your Plugin in such way
that your Plugin includes Hibernate mapped classes that need top be loaded by a
Hibernate Session?
If so where are the database tables for your mapped classes?

To make Hibernate find your Hibernate configuration files (Mapping xmls,
hibernat.cfg.xml, etc.) the files usually must must be placed directly in the
root of one of your Plugins lib jars not in any subdirectory like etc/ or so.

> I think this is related to classloader stuff, but how can this problem
> be solved?
All of this sounds like you'd need to include Hibernate's library jars in your
Plugins lib directory. I'm a bit afraid of that because SQuirreL's core already
uses Hibernate jars and has them in its global lib dir
(<installation path>/lib/).

As you can see to me it feels like some trouble may arise when you directly use
Hibernate form within a Plugin. (Note: Our Hibernate Plugin uses completely
different mechanisms to access Hibernate. You won't find any Hibernate class in
the Plugin's lib dir.)

Nonetheless if you can get it to work it would be great. I hope I could at least
help you a bit.


This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Squirrel-sql-develop mailing list
[hidden email]