ODMdev: ActiveODMA Development Framework

devNote d061101
 info.odma.odmjni100 Java-OdmNative Bridge
Diary & Job Jar

ODMdev>devNotes>
2006>11>

d061101a>
0.01 2008-04-23 21:12 -0700

Status

Date

Description

in progress 2007-09-24
ODMdev> repaving> 2007-07-24 announcement>


ODMdev Is Being Repaved.

Migration to a new server introduced a number of problems that require repairs.  In addition to those defects, some older pages also need to be modified and reorganized for consistency across all of ODMdev.  While the site is being repaved to accomplish both kinds of improvements, you may notice discrepancies and problems with links to site content.

Check the Site Repaving Project pages for additional details on the known defects and the approach to correction and upgrade.  Contact the ODMA Technical Coordinator with questions and to report any defects that you notice.

 

 
in progress 2007-09-24 Correct the Hard Hat image on each folio page to ensure that it links to the construction structure page: d061101, d061101a, d061101c, d061101d, d061101e, d061101f, d061101m, d061101n, d061101o.
  2007-09-24 Achieve consistency of case-sensitive spellings between the development system, the source-control system, the hosted-site image, and the hosted site.
in progress
2007-09-25
2007-09-24 Introduce font consistency for all uses of monospace in URLs, in mentions of file names, and in programming-language elements and specimens: d061101, d061101c, d061101d, d061101e, d061101f, d061101m, d061101n, d061101o.
  2007-09-24 Achieve consistency of case-sensitive labels for URLs: d061101, d061101a, d061101c, d061101d, d061101e, d061101f, d061101m, d061101n, d061101o.
in progress 2007-09-24 Achieve consistency of case-sensitive nomenclature in text files and archive content: d061101c...zip, d061101d....zip, d061101e....zip, d061101m.txt, d061101m...zip, d061101n.txt, d061101n...zip, ODMJNI100-0.58beta.txt, ODMJNI100-0.58beta.zip
done
2007-10-13
2007-10-04 Eliminate the use of <code> elements in the anchor blocks, relying on <font face="monospace"> in harmony with all other uses of monospace: d061101, d061101a, d061101c, d061101d, d061101e, d061101f, d061101m, d061101n, d061101o.
     
     
     
  2008-03-17 d061101o: Make this folio the latest and update d061101 and d000001 to reflect the new version now being current.
  2008-03-17 d061101o: Mark 4.7 as complete when the deployment package has been created.
  2007-09-25 d061101: Create a diagram on how lifecycle is coordinated or refer to a description elsewhere.  [dh:2007-10-04 I don't know if this is about the development lifecycle or the lifecycle of odmjni100 object instances and the connection with OdmNative100 COM interfaced-instances.]
  2007-09-25 d061101: Add attribution entry on the folio cover
  2007-09-25 d061101: The dependence on finalization in the application is important to note here in a developer note somewhere.  [dh:2007-10-04 This needs to be a big caveat on d061101o, in release notes, and in trouble-shooting materials.]
  2007-09-25 d061101n: Fact check the overview and get it right about deployment and such.  This will be addressed again in d070901c as well.
  2007-09-25 d061101n: Change the developer notes to progress in blog sequence using definition-list indentations.
  2007-09-24 Do what is necessary to get repaving done to this level.  The index.htm is set with regard to construction structure but content hasn't been reviewed.  I need the repaver here.  I should check up the tree to see if this has been identified anywhere else.  This should be embraced under the ready-for-0.59beta/0.60 conditions.  Check and see.
  2007-04-10 d061101a1: Split the completed items onto an archive backup from this page.
  2007-04-10 Review the work items here for ones completed prior to 0.58beta completion
  2007-04-10 Create anticipatory pages and materials for 0.59beta, 0.60beta, and the further beta stages as part of reviewing my notebooks.
  2007-04-10 Add diary notes for other stages as part of the notebook reviews
  2007-04-10 d061101n: Compile the additional diary notes by reviewing my notebooks
  2007-03-18 d061101n: Find out more about java.library.path and path.separator and the java.lang.System methods.
  2007-03-18 d061101n: Start a release note or do it in the diary there.
  2007-02-24 d061101f: Link to the d061001f 0.30alpha practical 100 and the 0.25alpha deployment.  Cross-link them back to here too.
  2006-12-18 d061101e: Stitch into revision progression and hook into the folio cover
  2006-12-18 d061101e: Review the diary items below here for ones that were resolved as part of the 0.20alpha development.  Check in notebooks and in the source code for when certain features were achieved.
  2006-12-12 Include getting a Java Open Review project and rating for ODMJNI 1.0: http://opensource.fortifysoftware.com/welcome.html
  2006-11-18 Setup02: Go through all of the Setup04 paces.  [dh:2006-11-26 This sets us up for 0.20alpha integration.]
  2006-11-15 0.30-0.40alpha notes start on #55.110
  2006-11-14 Setup02: The info.odma.odmjni100.OdmJniBind.application(appid) returns an OdmConnection interface.  See #55.107-110.  [dh:2006-11-26 This is what we get going end-to-end for the 0.20 alpha integration.]
  2006-11-14 Setup01: If necessary, I could do a lifecycle check in Setup01 by working the call and release methods (which don't take much).   [dh:2006-11-26 I really think this is a stage of Setup02, but we'll see.]
  2006-11-14 Setup02: I need to know what to do about the libpath and can I really keep the DLL alongside the class files in the package on Win32 (or is that only for default packages?).
  2006-11-13 Setup01, Setup02, and on-going: Capture the exceptions that Java can throw from JNI Interface and native method behaviors.  Document these in the declarations of the relevant native methods.  [dh:2006-11-26 This is especially important for the definition of the static methods on the Bind or other classes.]
  2006-11-13 Native Windows console operations and allocation of consoles seems to be the way to function for logging inside of odmjni100 and OdmNative operations. 
  2006-11-13 odmjni100.dll It looks like allocating memory in the DLL and freeing it in the DLL will be fine, because the same memory-allocation library is used.  (This applies specifically to the creation and destruction of class instances in the OdmNative100 library code.)
  2006-11-12 Setup00: The remarks in BuildDLL00.bat are off at the bottom.
  2006-11-12 Setup00: there's a typo in BuildDLL00.bat Fail0: "ensurere"
  2006-11-12 JNI.h includes <stdio.h> and <stdarg.h>.  This seems a little excessive if it is just to get NULL defined.
  2006-11-12 JNI.h is 1.56 dated 2003-12-19.
  2006-11-11 The Java 2 JDK 1.5 on-line documentation for JNI is at <http://java.sun.com/j2se/1.5.0/docs/guide/jni/>.  The JNI 5.0 Specification is at <http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html>.  This document does reveal some differences about versions of JNI (and the JDK where that version was introduced).  The document shows the last version as 1.4.  Although the Copyright notice has not been modified since 2003, the 1.5.0 document does have changes since the 1.4 version.
  2006-11-11 The Java 2 SDK 1.2 FAQ on JNI, <http://java.sun.com/products/jdk/faq/jni-j2sdk-faq.html>, indicates that there is no reliable way to find the Windows handle for a Java application's AWT window.  It would appear that, because native threads are used, there are Windows API calls that might do the trick.    This FAQ is also dated 1999-03-23, suggesting that not much has happened to JNI since 1999 and JDK 1.2.
  2006-11-10 It may be necessary to keep track of threads in OdmNative to determine whether or not it is safe to perform a given operation or not.  There are calls that are inadvisable from different threads and that might not even work.  (The allocation of C++ objects is an example.)  We can take steps in OdmNative to have releases at least fail gracefully, but it is difficult to know how the Connection Manager and the DMS Integrations will handle their resource releases, dialog creation, etc., in a way that works on different threads (although they will all be thread safe, as far as we know).
  2006-11-10 It is going to be necessary to figure out the document case real soon now.  [dh:2006-11-11 This means knowing what parameters are needed for chooseDocument and other methods.   We will also need to commit to what methods are needed on the info.odma.practical100.OdmPendingDocument and info.odma.practical100.OdmWorkingDocument interfaces that are important to handle.  The biggest concern has to do with choice of document type.  I propose to have a fixed type for the duration of a document and that there is no SaveAs ... that changes the type understood by the application. So acceptNewDocument() needs to specify what matters.]
  2006-11-10 On ODMA functions that return strings and something else, we will need to provide the something else in places where it is retrievable from the IodmNative interface by additional calls.   This includes things like the latest ODMSTATUS,
  2006-11-10 We will use little private static methods to help us handle the disguised interface pointers and pull out the error code, if there is one.  (Note that a null return does not signify success in this case, and it may be an undifferentiated problem.)
  2006-11-10 On returns of new interfaces, we use small numbers for failure result codes.  These make it possible to know that no instance was created and that different behavior is called for by the caller for a new interface.  This should allow alternative actions to take place, fitting into the practical100 model.  [dh:2006-11-11 We will allow for 0-31 values just to make sure that we can accomodate the full ODMSTATUS set, even though that many will not be required for our use.  OdmNative may define a more-compressed set of status values.  We'll have to see.
  2006-11-09 In the Guide, add a comment on the importance of release() from the UI thread whenever possible.  Otherwise many resources may be held until the JVM process shuts down.  We may also need to issue a warning that cleanup of DLLs might not happen on the thread on which the operations occurred.   Check Don Box on this.
  2006-11-09 finalize() can be called using any thread.  This means that release of the ODMA Connection Manager and of the DMS Integration DLLs may happen on different threads than the one on which those loads were created.  We need to see what happens and if necessary we may have to not attempt to release resources during finalize if that appears to create a problem.  Closing of the application should free up resources anyhow.   This is something tricky we have to watch out for.
  2006-11-09 d061101: A diagram of the interactions and lifecycle between odmjni objects and OdmNative interfaces needs to be provided as part of the overview or at the beginning of the approach statement.
  2006-11-09 3. The native method freeOdmNative(long) will, if the long is not < 16, release the IodmInterface that is provided as the parameter.  The caller should then clear the long-disguised pointer to avoid duplicate free operations. 
  2006-11-09 2. The native method long newOdmNative(String) creates an OdmNative (C++) object that corresponds to an ODMA Connection and returns an IodmNative interface pointer disguised as a Java long.  This method should always succeed, although it can return an error code.  There might be other problems later, but if this fails, it means we are basically DOA.  If the method fails, it will return a small (<16) unsigned numeric value.  A value of zero simply means there is no interface and that will cause any helper method it is passed to to fail gracefully wherever possible.  (We do not throw exceptions from native methods.) [dh:2006-11-27 The names will be IodmApplication100 and newOdmApplication100(String).]
  2006-11-09 1. We want a static method that is used to initiate ODMJNI operation.  It is passed an Application ID and that is used to implement and return an appropriate info.odma.practical100.Connection interface.  It will throw an unchecked exception if something is out of order.  [dh:2006-11-11 This is the info.odma.odmjni.Bind method application(AppId).]
  2006-11-09 Resources used here need to be added to the Approach and the Guide and Usage Scenarios documents.
  2006-11-05 I need some piece of code that returns a long and that will instantiate an OdmNative object that can be reference-counted and released.  [dh:2006-11-11 This will be what appears to be the constructor.  We'll knit this together after the basic setup tests.]
  2006-11-05 I need to build a simple odmjni100 class that inherits from practical100 classes.  The connection class is a good start.  [dh:2006-11-11 This will happen with private package classes.  The key public package class will be info.odma.odmjni100.Bind which provides the public long application(AppId) for returning the interface that is called for.  This will return an info.odma.practical100.OdmConnection interface, and everything then takes off from there.]
done 0.14
2008-03-30
2008-03-17 d061101o: Mark section 4.6 as completed and set 4.7 as pendng. 
done 0.14
2008-03-30
2008-03-17 d061101o: Complete the archiving of the complete source code
done 0.14
2008-03-30
2008-03-17 d061101o: Complete the Manifest
done 0.13
2008-03-27
2008-03-24 d061101o: Add caveats on format filtering and the turn-around issues.  This might be review of an existing one.
done 0.13
2008-03-27
2008-03-22 d061101o: Add caveat about not having a fixed window handle for modal dialogs
done 0.13
2008-03-26
2008-03-22 d061101o: Add caveat about code-page agreement
done 0.13
2008-03-25
2008-03-19 d061101o: Add caveat about multiple instances of sessions
done 0.13
2008-03-23
2008-03-19 d061101o: Add caveat about multi-threading
done 0.13
2008-03-22
2008-03-19 d061101o: Add caveat about GUI blocking
done 0.12
2008-03-20
2008-03-19 d061101o: Add a license file
done 0.12 2008-03-20 d061101o: Add caveat about needing to release all interfaces before exiting an application
done 0.05
2008-03-19
2008-03-17 d061101o: Complete the Release Notes
done 0.11
2008-03-19
2008-03-17 d061101o: Complete the Bugs and Caveats section
done 0.06
2007-12-01
2007-10-31 d061101/o: Link to the new folio on Confirmation Testing
done 2007-10-31 d061101o: Repeat the regression check with the final version of the format-exception source-code changes
done
2007-10-31
2007-10-23 d061101o: Include the summary of actual changes and bring the Release Notes draft current
done 2007-10-17 d061101o: Account for the first round of changes with respect to OdmError and format checking.
done 2007-10-17 d061101o-ReleaseNotes.txt: Start a Release Note to track the changes and other aspects.
done 0.04 2007-10-10 d061101o: Incorporate adjustments for the zigzagging of regression development along with the priming of the 0.59/0.60 regression set.
done 0.02
2007-10-04
2007-09-25 d061101o: Incorporate the development progression for 0.59beta and link to the overall development page and also the dependency on practical100 and on packaging.
done 0.02 2007-10-04 d061101o: Use d061001h as boilerplate and customize it for this folio.
done 0.02 2007-10-04 d061101o: Correct the name of the Zip archive for packaging of odmjni100 0.59beta.
done 0.01 2007-09-25 d061101o: Borrow the outline structure from d070701d (or d061001h)
done 0.05
2007-09-25
2007-09-24 d061101: Include revised status in the catalog
done 0.05
2007-09-25
2007-09-24 d061101: Include d061101o in the available materials
done 0.05 2007-09-25 d061101n: Update to link to the ODMJNI 1.0 Package for continuation of that aspect.
done 0.05 2007-09-25 d061101n: Update to reflect addition in the version progression
done 2007-09-24 d061101n: Include d061101o in the version progression
done 2007-09-24 d061101o: Share with the hosted-site image
done 2007-09-24 d061101o: Add as placeholder for the 0.59beta work.  [See 2007-04-10 note on anticipatory pages.]
done
2007-09-24
2007-04-10 d061101n: Make 0.58beta the latest
done 2007-08-01 d061101: Correct the link for d061101n to have the proper title
done 2007-08-01 Review for "Java-ODMA Integration Kit" consistency.  This seems good enough for now.
done 2007-04-10 update d061201h to reflect completion of 0.58beta.
done 0.04 2007-04-10 d061101n: Get the full updates to the source-tree for download as well, with its narrative manifest.
done 0.03 2007-04-10 d061101n: Update the version, the catalog, and the web site.
done 0.03 2007-04-10 d061101n: Add the runtime library and its narrative manifest to the download section of the page.
done 0.02 2007-03-18 d061101n: Review the correspondence with Sergei and capture what needs to be done.
done 0.04 2007-03-18 d061101m: Change how d061101n is referred to.
done 0.02 2007-03-18 d061101n: Customize as the new 0.58beta Runtime Packaging
done 0.06
2007-03-06
2007-03-05 d061001g: Revoke the 0.56beta drop and make an additional drop that has the modified wfDocId and safeDocId functions, until they can be replaced by the full exception case using native methods.
done 2007-03-05 d061201h: Update the progression when this part is solid.  Maybe add a diary to the 0.60beta page too.  [dh:2007-03-18-21:06 It is better to have the diaries with the progressions that they apply to.  It might work for some overall things to have them on deployment pages, but for now it seems to work better here.]
done 0.01 2007-03-05 d061101n: Change to title-tbd Full Exceptions for 0.58beta after 0.57beta.  I think we should fix the filters and exceptions.  Mention that in the 0.57beta diary.  Also, the implementation in Native100 can come later.
done 0.02 2007-03-05 d061101m: Organize the same as d061001g for 0.56beta and begin to fill the steps and other details.
done 0.04 2007-03-05 d061101: Update the provisional list of releases to reflect the changes for 0.57beta
done 0.01 2007-03-05 d061101m: Pre-empt for the newly-introduced 0.57beta
done 0.03 2007-02-24 d061101: Update the embargo catalog to reflect the changes made today
done 0.00 2007-02-24 d061101n: This will be the update that has full implementation of format checking and an implementation of openKnownDocument.  There will be corresponding OdmNative100 updates.  Start this placeholder.
done 0.00 2007-02-24 d061101m: (no L-version) create to keep track of the regressions done as part of the 0.56beta regressions with the new practical100 additions.  Start this placeholder.
done 0.03 2007-02-24 d061101: There has been no update or capture here since d061101e as part of 0.20alpha.  Update the list of available materials to include placeholders all the way through 0.58beta. 
done 2007-02-24 d061101f: Reset to be tied to 0.25alpha because there were changes to make the half-step along with practical100 changes.
done 0.00 2006-12-20 Start OdmJniView as provisional source of OdmWorking document to be initiated from OdmJniApp.
done 0.02 2006-12-20 d061101: Link in d061101f and reflect in the catalog
done 0.00
2006-12-20
2006-12-18 d061101f: Scrub the boilerplate and make fully customized for Check03 0.25alpha preservation.  0.30alpha integration.  [dh:2006-12-20 I did 0.26alpha over under OdmNative as well as an 0.25alpha under deployment.  We don't need any more of those.]
done 2006-12-18 Check03: Rebuild with the revised OdmJniApp and see how we do.
done 2006-12-18 OdmJniApp: Review for those places where null-document implementations are returned and change to use the nullDocument cache held in OdmNullDocument.
done 2006-12-18 Check03: Get successful regression match of Setup02 results with Check03 and 0.25alpha stage of odmjni100.
done 2006-12-18 Check03: Get clean build
done 2006-12-18 Check03: Customize Check03.java for the 0.25 regression operation
done 2006-12-18 Check03: Customize RunCheck03.bat for initial Check03 Build
done 2006-12-18 Check03: Customize BuildCheck03.bat for initial Check03.Build
done 2006-12-18 odmjni100: Get clean compile of the classes
done 2006-12-18 OdmJniApp: Review and update for working with 0.30alpha practical100 as part of the 0.25alpha regression check.
done 2006-12-18 OdmJniBind.java: review for 0.25alpha adaptation to the 0.30alpha practical100
done 2006-12-18 BuildClasses: Review for 0.25alpha [dh:2006-12-18 There is no change required - everything builds off of OdmJniBind.
done 2006-12-18 d061101f: Create to use with the 0.25alpha confirmation build at least.  I will start with no changes to the native code, then consider whether or not to change some things.
done
2006-12-18
2006-12-12 Sequester the 0.20alpha archive even if I am not going to document it at this time.  Do this before I make any modifications for the 0.25alpha regression.
done 2006-12-18 d061101e: Sequester the original code for Setup02 and the odmjni100 used in the 0.20alpha release.  This is for completeness.
done
2006-11-27
2006-11-14 Setup01: Do the C++ version of the DLL and use it interchangeably in the regression code.  [dh:2006-11-26 I am nervous enough about all that happens in Setup02 that I do want to get this out of the way separately.  Setup 02 will pretty much do everything through OdmNative100.]
done
2006-11-27
2006-11-14 Setup01: The basic odmjni100.c[pp] code is all pure C/C++ because it does all of its magic through interfaces.  The interface header (for JNI.h) should just work.  We verify that by making a .c and a .cpp implementation.  [dh:2006-11-26 From then on, we work in C++ because OdmNative requires it.]
done
2006-11-27
2006-11-11 I need to see how C++ works differently than C for native methods.  [dh:2006-11-25 based on experience in building OdmNative100 0.20alpha, I will be using C++ exclusively in the odmjni100.dll implementation.  I need a confirmation of how that all works.]
done 2006-11-26 d061101e: Create placeholder for Setup02 material and notes, with downloads and manifest to be provided later.
done 2006-11-26 d061101d: Create placeholder for Setup01 material and notes, with downloads and manifest to be provided later.
done
2006-11-13
2006-11-11 In setup code, confirm the latest version by performing an int JNIEnv.GetVersion() to see what there is to know.  [dh:2006-11-13 done in Setup01 with native jniVersion implementation.]
done
2006-11-12
2006-11-09 d061101c: I don't know whether it is pIodmNative or ppIodmNative.  I think it is the first.  Check that with Don Box too.  [dh:2006-11-26 It is pIodmNative in the case that IodmNative is defined as a C++ class with virtual methods.  This is sorted out in #55.98-100.  Dale Rogerson's Inside COM is more helpful here, as is the Platform SDK COM Tutorial.].
done
2006-11-12
2006-11-09 We want to do static native methods.  I need to make sure that is possible. [dh:2006-11-12 This is confirmed in the book and also by demonstration with Setup00.java 0.01.
done
2006-11-11
2006-11-09 d061101c: This package needs an OdmJava as well as OdmVC++ and OdmPSDK although I'm not sure if the DLL actually needs to make Windows calls directly.  I suspect that one of the C files may depend on Windows.h.  There is also some question about OdmClass and OdmJNI batch files for some of the arrangements.
done 2006-11-09 d061101: Needs references to JNI books and other materials that are relied on for this development.
done 2006-11-11 Check http://java.sun.com/docs/books/jni/ to see if there are any updates to the Sheng Liang book and examples.
done 2006-11-10 d061101: Explain how the tracks are drawn together here.
done 2006-11-09 Create minimal placeholder pages for d061101, d061101b, and d061101c.
done 2006-11-09 Create this folio placeholder under embargo.  The evolutionary prototyping of info.odma.odmjni100 will be defined and  tracked here.
Revision History:
0.01 2007-04-10-17:09 Bring current with posting of 0.58beta runtime to the hosted site
0.00 2006-11-09-17:39 Create Initial Placeholder
This diary and job jar is created to provide immediate capture of job-jar items for this folio.

Construction Structure (Hard Hat Area)
Creative Commons License You are navigating ODMdev.
This work is licensed under a
Creative Commons Attribution 2.5 License.

created 2006-11-09-17:39 -0800 (pst) by orcmid
$$Author: Orcmid $
$$Date: 08-04-23 21:12 $
$$Revision: 83 $