openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick" <michael.d.d...@gmail.com>
Subject Re: svn commit: r713374 - /openjpa/sandboxes/osgi/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
Date Wed, 12 Nov 2008 16:07:57 GMT
Will the change below result in a security exception? We might want to use
AccessController.doPrivileged(J2DoPrivHelper.getClassLoaderAction(PersistenceProviderImpl.class)));
instead.

I'm not sure it's really required but it caught my eye.

-mike

On Wed, Nov 12, 2008 at 8:09 AM, <kwsutter@apache.org> wrote:

> Author: kwsutter
> Date: Wed Nov 12 06:09:29 2008
> New Revision: 713374
>
> URL: http://svn.apache.org/viewvc?rev=713374&view=rev
> Log:
> OPENJPA-767.  Change which classloader gets used for loading the OpenJPA
> runtime classes in a container environment.  Previous to this change, we
> were using the classloader provided to us via the PersistenceUnitInfo.  But,
> this wasn't sufficient in an OSGi-container environment.  Initial tests show
> that using the classloader of the PersistenceProviderImpl is working
> better...  More testing and experimentation required...
>
> Modified:
>
>  openjpa/sandboxes/osgi/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
>
> Modified:
> openjpa/sandboxes/osgi/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
> URL:
> http://svn.apache.org/viewvc/openjpa/sandboxes/osgi/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java?rev=713374&r1=713373&r2=713374&view=diff
>
> ==============================================================================
> ---
> openjpa/sandboxes/osgi/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
> (original)
> +++
> openjpa/sandboxes/osgi/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
> Wed Nov 12 06:09:29 2008
> @@ -140,7 +140,7 @@
>             }
>
>             BrokerFactory factory = getBrokerFactory(cp, poolValue,
> -                pui.getClassLoader());
> +                    PersistenceProviderImpl.class.getClassLoader());
>             if (transformerException != null) {
>                 Log log = factory.getConfiguration().getLog(
>                     OpenJPAConfiguration.LOG_RUNTIME);
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message