Hi Marina,
Is there an easy way to get the persistence project? Eg. as a NetBeans
project?
Kind regards,
Manfred Riem
mriem_at_manorrock.org
http://www.manorrock.org/
Founding Java Champion
-----Original Message-----
From: Marina.Vatkina_at_Sun.COM [mailto:Marina.Vatkina_at_Sun.COM]
Sent: Wednesday, November 08, 2006 11:20 AM
To: persistence_at_glassfish.dev.java.net
Subject: Re: Problem between MacOSX and Windows (followup)
Hi Manfred,
It can as well be a class loader issue. Can it be that a no-op constructor
called via 'loader.loadClass(s).newInstance()' throws an exception (for
whatever
reason) on MacOSX? Can you try?
You can also change the Persistence code and call findAllProviders() in the
static{} block instead to see if this is indeed a threading issue.
thanks,
-marina
Manfred Riem wrote:
> Hi there,
>
> I have done some more digging and it appears that the current
> implementation has a problem on MacOSX. I implemented my own
> Persistence Provider and if I do the following in its constructor it
successfully finds it.
>
> public MyPersistenceProvider() {
> System.out.println("Whatever");
> }
>
> If I comment out the System.out.println statement it cannot find this
> Persistence Provider. Looking at the code of the Persistence class I
> think it has to do with a threading issue. Can someone confirm this?
>
> Note my JUnit tests call Persistence.createEntityManagerFactory(String
> persistenceUnitName, Map properties)
>
> (see
> http://fisheye5.cenqua.com/browse/glassfish/persistence-api/src/java/j
> avax/persistence/Persistence.java?r=1.6#l48)
>
> Kind regards,
> Manfred Riem
> mriem_at_manorrock.org
> http://www.manorrock.org/
> Founding Java Champion