db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Russell <Craig.Russ...@Sun.COM>
Subject Re: Task list for Michael Watzek
Date Fri, 01 Jul 2005 21:37:11 GMT
Hi Michael,

Please use the jdo-dev alias for these communications.

On Jul 1, 2005, at 6:35 AM, Michael Watzek wrote:

> Hi Craig,
>
> comments inline:
>
>
>> 4. Update existing tests or write new tests for JDO 2 JDOHelper 8.6:
>> A8.6-13 [public static
>>     PersistenceManagerFactory getPersistenceManagerFactory
>>         (File file);]
>> A8.6-14 [public static
>>     PersistenceManagerFactory getPersistenceManagerFactory
>>         (File file, ClassLoader loader);]
>> A8.6-15 [public static
>>     PersistenceManagerFactory getPersistenceManagerFactory
>>         (String resourceName);]
>> A8.6-16 [public static
>>     PersistenceManagerFactory getPersistenceManagerFactory
>>         (String resourceName, ClassLoader loader);]
>> A8.6-17 [public static
>>     PersistenceManagerFactory getPersistenceManagerFactory
>>         (InputStream stream);]
>> A8.6-18 [public static
>>     PersistenceManagerFactory getPersistenceManagerFactory
>>         (InputStream stream, ClassLoader loader);] These methods  
>> use the parameter(s) passed as arguments to construct a Properties  
>> instance, and then delegate to the static method  
>> getPersistenceManagerFactory in the class named in the property  
>> javax.jdo.PersistenceManagerFactoryClass. If there are any  
>> exceptions while trying to construct the Properties instance or to  
>> call the static method, then either A8.6-4 [JDOFatalUserException]  
>> or A8.6-5 [JDOFatalInternalException is thrown], depending on  
>> whether the exception is due to the user or the implementation.  
>> The nested exception indicates the cause of the exception.
>> api.persistencemanagerfactory.GetPMFByFile
>> api.persistencemanagerfactory.GetPMFByFileAndClassLoader
>> api.persistencemanagerfactory.GetPMFByResource
>> api.persistencemanagerfactory.GetPMFByResourceAndClassLoader
>> api.persistencemanagerfactory.GetPMFByStream
>> api.persistencemanagerfactory.GetPMFByStreamAndClassLoader
>>
> The current JDOHelper class under api20 does not match the spec wrt  
> getPersistenceManagerFactory methods:
>
> Spec:
>
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(Map props, ClassLoader cl);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(Map props);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(File file);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(File file, ClassLoader loader);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(String resourceName);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(String resourceName, ClassLoader loader);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(InputStream stream);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(InputStream stream, ClassLoader loader);
>
> JDOHelper.java:
>
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory (Properties props);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(Properties props, ClassLoader cl);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(File propsFile);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(File propsFile, ClassLoader loader);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(String propsResource);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(String propsResource, ClassLoader  
> loader);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(String jndiLocation, Context context);
> - public static PersistenceManagerFactory  
> getPersistenceManagerFactory(String jndiLocation, Context context,  
> ClassLoader loader);
>
> Summerizing:
>
> - Methods having arguments of type Properties have been replaced by  
> methods having arguments of type Map.
> - Methods having arguments of type InputStream are missing.
> - Methods having arguments of type Context are not part of the spec.
> - Parameter names do not match.
>
> Shall I update the JDOHelper accordingly?

Here's the spec as of right now.
<spec>
A8.6-1 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (Map props, ClassLoader loader);]
A8.6-2 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (Map props);]
These methods return a PersistenceManagerFactory based on properties  
contained in the Map parameter. A8.6-3 [In the method without a class  
loader parameter, the calling thread’s current contextClassLoader is  
used to resolve the class name.]
A8.6-13 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (File propsFile);]
A8.6-14 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (File propsFile, ClassLoader loader);]
A8.6-15 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (String propsResourceName);]
A8.6-16 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (String propsResourceName, ClassLoader loader);]
A8.6-17 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (InputStream stream);]
A8.6-18 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (InputStream stream, ClassLoader loader);]
A8.6-19 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (String jndiLocation, Context context);]
A8.6-20 [public static
     PersistenceManagerFactory getPersistenceManagerFactory
         (String jndiLocation, Context context, ClassLoader loader);]
</spec>

Please update the implementation to match.

Thanks,

Craig
>
> Regards,
> Michael
> -- 
> -------------------------------------------------------------------
> Michael Watzek                  Tech@Spree Engineering GmbH
> mailto:mwa.tech@spree.de        Buelowstr. 66
> Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
> Fax.:  ++49/30/217 520 12       http://www.spree.de/
> -------------------------------------------------------------------
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message