Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » Possible JpoxHelper bug; Custom PMFCreator not honoured
|
Re: Possible JpoxHelper bug; Custom PMFCreator not honoured [message #112693 is a reply to message #112615] |
Wed, 20 February 2008 15:44 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Florian,
This indeed seems like a bug, can you enter a bugzilla for this?
For now you can extend the jpoxdatastore and override the createschema method.
gr. Martin
DI Florian Hackenberger wrote:
> Hi!
>
> I'm trying to use Teneo with the standard JPOX plugin (copied to
> eclipse/plugins) within an RCP application. According to [1] I need to
> create the PersistenceManagerFactory like this:
>
> //set classloader for driver (using classloader from the "rcp.jars" bundle)
> ClassLoader clrDriver =
> Platform.getBundle("rcp.jars").loadClass("org.h2.Driver").getClassLoader();
> map.put("org.jpox.primaryClassLoader", clrDriver);
>
> //set classloader for JPOX (using classloader from the "org.jpox" bundle)
> ClassLoader clrJPOX =
> Platform.getBundle("org.jpox").loadClass("org.jpox.PersistenceManagerFactoryImpl ").getClassLoader()
>
> PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(map,
> clrJPOX);
>
> Otherwise, the database driver cannot be loaded. With Teneo this procedure
> should involve creating a custom PMFCreator and setting it via:
> JpoxHelper.INSTANCE.setPMFCreator(pmfCreator);
> This pmfCreator would then create the persistence manager factory in it's
> method
> getPersistenceManagerFactory()
> like the code above. There is one problem however. JpoxDataStore on line 526
> in createSchema(), doesn't use JpoxHelper to get a persistence manager
> factory, but instead uses JDOHelper. Is that a bug? I'd say yes, because it
> uses JpoxHelper in it's initialize() method. Is there a workaround
> available? Placing the jpox plugin jar file within another plugin doesn't
> work in my case, because I need the extension points which are registered
> by the jpox plugin.
>
> Cheers,
> Florian
>
> [1] http://www.jpox.org/servlet/wiki/pages/viewpage.action?pageI d=1179712
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| |
Re: Possible JpoxHelper bug; Custom PMFCreator not honoured [message #113196 is a reply to message #113152] |
Mon, 25 February 2008 17:37 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Florian,
Thanks for reporting several things, I have seen your bugzillas. I will solve them in the next build
(few weeks, before eclipsecon).
gr. martin
DI Florian Hackenberger wrote:
> Martin Taal wrote:
>
>> Hi Florian,
>> This indeed seems like a bug, can you enter a bugzilla for this?
>>
>> For now you can extend the jpoxdatastore and override the createschema
>> method.
> It's the following buzilla entry:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=220145
>
> BTW: Another workaround is to install the JPOX plugin in eclipse (in order
> to make eclipse find the extension points) and just use the standard
> approach of putting all jars (jpox, jdo, jdbc driver) into one plugin on
> which your teneo enabled project depends. It seems like the extension
> points are actually enabled once the jar within the plugin is loaded, but
> eclipse does not 'see' them during development.
>
> Cheers,
> Florian
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Possible JpoxHelper bug; Custom PMFCreator not honoured [message #615519 is a reply to message #112615] |
Wed, 20 February 2008 15:44 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Florian,
This indeed seems like a bug, can you enter a bugzilla for this?
For now you can extend the jpoxdatastore and override the createschema method.
gr. Martin
DI Florian Hackenberger wrote:
> Hi!
>
> I'm trying to use Teneo with the standard JPOX plugin (copied to
> eclipse/plugins) within an RCP application. According to [1] I need to
> create the PersistenceManagerFactory like this:
>
> //set classloader for driver (using classloader from the "rcp.jars" bundle)
> ClassLoader clrDriver =
> Platform.getBundle("rcp.jars").loadClass("org.h2.Driver").getClassLoader();
> map.put("org.jpox.primaryClassLoader", clrDriver);
>
> //set classloader for JPOX (using classloader from the "org.jpox" bundle)
> ClassLoader clrJPOX =
> Platform.getBundle("org.jpox").loadClass("org.jpox.PersistenceManagerFactoryImpl ").getClassLoader()
>
> PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(map,
> clrJPOX);
>
> Otherwise, the database driver cannot be loaded. With Teneo this procedure
> should involve creating a custom PMFCreator and setting it via:
> JpoxHelper.INSTANCE.setPMFCreator(pmfCreator);
> This pmfCreator would then create the persistence manager factory in it's
> method
> getPersistenceManagerFactory()
> like the code above. There is one problem however. JpoxDataStore on line 526
> in createSchema(), doesn't use JpoxHelper to get a persistence manager
> factory, but instead uses JDOHelper. Is that a bug? I'd say yes, because it
> uses JpoxHelper in it's initialize() method. Is there a workaround
> available? Placing the jpox plugin jar file within another plugin doesn't
> work in my case, because I need the extension points which are registered
> by the jpox plugin.
>
> Cheers,
> Florian
>
> [1] http://www.jpox.org/servlet/wiki/pages/viewpage.action?pageI d=1179712
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
| |
Re: Possible JpoxHelper bug; Custom PMFCreator not honoured [message #615557 is a reply to message #113152] |
Mon, 25 February 2008 17:37 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Florian,
Thanks for reporting several things, I have seen your bugzillas. I will solve them in the next build
(few weeks, before eclipsecon).
gr. martin
DI Florian Hackenberger wrote:
> Martin Taal wrote:
>
>> Hi Florian,
>> This indeed seems like a bug, can you enter a bugzilla for this?
>>
>> For now you can extend the jpoxdatastore and override the createschema
>> method.
> It's the following buzilla entry:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=220145
>
> BTW: Another workaround is to install the JPOX plugin in eclipse (in order
> to make eclipse find the extension points) and just use the standard
> approach of putting all jars (jpox, jdo, jdbc driver) into one plugin on
> which your teneo enabled project depends. It seems like the extension
> points are actually enabled once the jar within the plugin is loaded, but
> eclipse does not 'see' them during development.
>
> Cheers,
> Florian
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Goto Forum:
Current Time: Wed Sep 25 01:06:29 GMT 2024
Powered by FUDForum. Page generated in 0.03349 seconds
|