OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sdo message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [sdo] Groups - HelperContext Creation - Version 8 (HelperContextCreation-v8.zip) uploaded


Hi Blaise,

Ah, the light finally went on re the conditions. It's saying that it always returns the same instance.

Maybe it would be good to also say that in the JavaDoc. E.g.:

This method always returns the same instance of HelperContextFactory, i.e.
<pre>SDO.getHelperContextFactory() == SDO.getHelperContextFactory();</pre>

Then again, maybe it's just me :-)

Thanks,
Frank.

Inactive hide details for Blaise Doughan <blaise.doughan@oracle.com>Blaise Doughan <blaise.doughan@oracle.com>


          Blaise Doughan <blaise.doughan@oracle.com>

          05/21/2009 10:32 AM


To

Frank Budinsky/Toronto/IBM@IBMCA

cc

sdo@lists.oasis-open.org

Subject

Re: [sdo] Groups - HelperContext Creation - Version 8 (HelperContextCreation-v8.zip) uploaded

Hi Frank,

1. SDO JavaDoc

In version 8 I believe the conditions in the SDO getHelperContext Javadoc are correct:

    • getHelperContextFactory() has the condition <pre>SDO.getHelperContextFactory() == SDO.getHelperContextFactory();</pre>
    • getHelperContextFactory(String implName) has the condition <pre>SDO.getHelperContextFactory() == SDO.getHelperContextFactory();</pre>
In version 9 I have reworked some of the Javadocs in both SDO and Environment and have now added a JavaDoc comment for SDO.getDefaultHelperContext().

2. Environment.getInstance() has a bug.

Good catch, I have fixed this in version 9.

3. Environment.getHelperContextFactory()

As per your suggestion I have made this method abstract and moved the implementation to a method called createHelperContextFactory.

These changes have been reflected in version 9 of the API:

http://www.oasis-open.org/apps/org/workgroup/sdo/download.php/32616/HelperContextCreation-v9.zip

-Blaise

Frank Budinsky wrote:
      Hi Blaise,

      There are a couple of problems with the latest drop.

      1, The SDO JavaDoc is still not quite right. Specifically, this appears in both the SDO.getHelperContextFactory() methods:

      *
      <pre>
      *
      SDO.getHelperContextFactory() == SDO.getHelperContextFactory();
      *
      </pre>

      Also, the getDefaultHelperContext() methods has no JavaDoc.

      2. Environment.getInstance() has a bug. This part:

      try
      {
      return
      (Environment) classLoader.loadClass(impl).newInstance();
      }
      catch(Exception e) {
      throw
      new RuntimeException(e);
      }


      should be changed to this:

      try
      {
      INSTANCE
      = (Environment) classLoader.loadClass(impl).newInstance();
      }
      catch(Exception e) {
      throw
      new RuntimeException(e);
      }


      3. The Environment.getHelperContextFactory() method is called by SDO.getHelperContextFactory(), which is expecting the default HelperContextFactory to be returned, but Environement.getHelperContextFactory() is just returning a new instance. It can be overridden in a subclass to cache the first one that super returns, but that seems kind of confusing. I'd suggest making Environement.getHelperContextFactory() abstract, and renaming the two existing Environment.getHelperContextFactory() methods to createHelperContextFactory() instead.

      Thanks,
      Frank.

      Inactive hide details for blaise.doughan@oracle.comblaise.doughan@oracle.com

      To

      sdo@lists.oasis-open.org
      cc
      Subject

      [sdo] Groups - HelperContext Creation - Version 8 (HelperContextCreation-v8.zip) uploaded

      Hello All,

      This revision reflects the results of today's conference call (May 19th).
      One new item of note is that some work needs to be done improving the
      exceptions that are thrown, feedback welcome.

      -Blaise

      -- Mr. Blaise Doughan

      The document revision named HelperContext Creation - Version 8
      (HelperContextCreation-v8.zip) has been submitted by Mr. Blaise Doughan to
      the OASIS Service Data Objects (SDO) TC document repository.  This document
      is revision #7 of HelperContextCreation.zip.

      Document Description:
      As discussed in todays meeting:
      - Change the Map properties on HelperContextFactory to be Map&lt;String,
      Object&gt; instead of Map&lt;Object, Object&gt;.
      - Fixed the null checking on a couple of methods in Environment.
      - Fixed some java doc comments in the SDO class.

      Recap of all changes:
      - New Classes:
      - commonj.sdo.helper.SDO
      - commonj.sdo.helper.HelperContextFactory
      - commonj.sdo.impl.Resolvable
      - commonj.sdo.impl.Environment
      - New API:
      - HelperContext.getIdentifier():  String
      - Type.getHelperContext():  HelperContext
      - Deprecation:
      - commonj.sdo.impl.HelperProvider
      - commonj.sdo.impl.ExternalizableDelegator

      Outstanding items:
      - OSGi: Do we need a setInstance method on Environment.
      - Thrown Exceptions:  Currently the proposed code makes some use of
      RuntimeException with either a simple nested exception or a
      non-internationalized string.  This needs to be fixed, any ideas?

      View Document Details:

      http://www.oasis-open.org/committees/document.php?document_id=32593

      Download Document:  

      http://www.oasis-open.org/committees/download.php/32593/HelperContextCreation-v8.zip

      Revision:
      This document is revision #7 of HelperContextCreation.zip.  The document
      details page referenced above will show the complete revision history.


      PLEASE NOTE:  If the above links do not work for you, your email application
      may be breaking the link into two pieces.  You may be able to copy and paste
      the entire link address into the address field of your web browser.

      -OASIS Open Administration


GIF image



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]