Issue Details (XML | Word | Printable)

Key: JDO-348
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Martin Zaun
Reporter: Craig Russell
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Fostore20 doesn't compile with latest changes to api20

Created: 24/Mar/06 12:35 AM   Updated: 24/Mar/06 10:37 PM
Return to search
Component/s: runtime2
Affects Version/s: JDO 2 rc1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works FOStorePM.newMakeTransient.patch 2006-03-24 05:53 AM Martin Zaun 2 kB

Resolution Date: 24/Mar/06 10:37 PM


 Description  « Hide
java:compile:
    [echo] Compiling to g:\olsen\jdo\apache_clean\jdo\trunk\fostore20/target/cla
sses
    [javac] Compiling 100 source files to G:\olsen\jdo\apache_clean\jdo\trunk\fo
store20\target\classes
G:\olsen\jdo\apache_clean\jdo\trunk\fostore20\src\java\org\apache\jdo\impl\fosto
re\FOStorePM.java:35: org.apache.jdo.impl.fostore.FOStorePM is not abstract and
does not override abstract method makeTransientAll(java.util.Collection,boolean)
 in javax.jdo.PersistenceManager
public class FOStorePM extends PersistenceManagerImpl
       ^
Note: G:\olsen\jdo\apache_clean\jdo\trunk\fostore20\src\java\org\apache\jdo\impl
\fostore\FOStoreInput.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
BUILD FAILED


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Zaun made changes - 24/Mar/06 05:34 AM
Field Original Value New Value
Assignee Martin Zaun [ mzaun ]
Martin Zaun added a comment - 24/Mar/06 05:53 AM
Looking for a quick fix for this compilation issue, I've attached a patch.

My thoughts:
- The implementation of the new methods
    public void makeTransient(Object pc, boolean useFetchPlan)
    public void makeTransientAll(Object[] pcs, boolean useFetchPlan)
    public void makeTransientAll(Collection pcs, boolean useFetchPlan)
  needs to go into either of
    org.apache.jdo.impl.pm.PersistenceManagerImpl
    org.apache.jdo.impl.fostore.FOStorePM.
  Since PersistenceManagerImpl cannot implement this method generically, I felt that the implementation
  should be in the backend-specific classes, i.e., FOStorePM.

- Because FOStorePM doesn't support the concept of a fetch plan, the methods could either throw an
  UnsupportedOperationException or ignore the 'useFetchPlan' argument. Not throwing an exception
  seems best to be, since the API/spec doesn't indicate those methods as being optional and the
  semantics of ignoring the 'useFetchPlan' argument seems consistent to me if there's no fetch plan.

Martin Zaun made changes - 24/Mar/06 05:53 AM
Attachment FOStorePM.newMakeTransient.patch [ 12324529 ]
Craig Russell added a comment - 24/Mar/06 10:08 AM
My preference is to put these methods into the runtime implementation of PersistenceManagerImpl. I don't feel strongly but I'm expecting that we will add the FetchPlan implementation into runtime20 and put at least a skeleton of the makeTransient methods into runtime20 as well. The structure of runtime20, core20, and fostore20 will need to be laid out in more detail when we get to the detail design phase.

Repository Revision Date User Message
ASF #388538 Fri Mar 24 14:34:31 UTC 2006 mzaun JDO-348 - fix for fostore20 compilation issue due to latest api20 changes
Files Changed
MODIFY /db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java

Martin Zaun added a comment - 24/Mar/06 10:37 PM
Followed Craig's suggestion and added the missing makeTransient(*,boolean)
methods to PersistenceManagerImpl, so that derived FOStorePM compiles now.

Sending runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
Transmitting file data .
Committed revision 388538.

Martin Zaun made changes - 24/Mar/06 10:37 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]