This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25056

Summary: Add JAR meta-inf/services support for default lookup to MDR
Product: java Reporter: _ briansmith <briansmith>
Component: UnsupportedAssignee: Martin Matula <mmatula>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: All   
OS: Windows ME/2000   
Issue Type: TASK Exception Reporter:
Attachments: Patch to build.xml
JAR of the new files
standalone program that produces the report in my initial comment

Description _ briansmith 2002-06-23 03:52:29 UTC
The default standalone lookup in
openide-lookup.jar is implemented in terms of the
Java 1.3+ JAR meta-inf/services mechanism. This
patch adds the necessary meta-inf/services files
to the nbmdr.jar and jmiutils.jar to allow the use
of this default mechanism. This way, standalone
users of MDR do not have to create their own
lookup implementation.

I have created a simple "MDR lookup report"
testcase that lists the lookup results shown
below. I will attach that program to this issue as
well. I didn't create a JUnit/xtest testcase
because I'm not sure of the proper way to unit
test lookup.

Somebody should test this patch to make sure that
it doesn't have an adverse affects when using MDR
inside of NetBeans (i.e. to make sure the
meta-inf/services entries do not conflict with the
NetBeans lookup implementation).

When there is a DTDProducer implementation, a
meta-inf/services entry for jmiutils.jar should be
created for that as well.

Note that I provided entries for
javax.jmi.xmi.XmiReader and
javax.jmi.xmi.XmiWriter. I assume this is
appropriate since the implementations are designed
to work with any JMI-compatible repository. Also,
note that I made
org.netbeans.lib.jmi.mapping.JMIMapperImpl the
default JMIMapper implementation (instead of
JMIMapperCFImpl).

org.netbeans.api.mdr.XMIReader
    default: org.netbeans.lib.jmi.xmi.XMISaxReaderImpl
             org.netbeans.lib.jmi.xmi.XMISaxReaderImpl
org.netbeans.api.mdr.XMIWriter
    default: org.netbeans.lib.jmi.xmi.XMIWriterImpl
             org.netbeans.lib.jmi.xmi.XMIWriterImpl
org.netbeans.api.mdr.MDRManager
    default: org.netbeans.mdr.NBMDRManagerImpl
             org.netbeans.mdr.NBMDRManagerImpl
org.netbeans.api.mdr.JMIMapper
    default:
org.netbeans.lib.jmi.mapping.JMIMapperImpl
            
org.netbeans.lib.jmi.mapping.JMIMapperImpl
            
org.netbeans.lib.jmi.mapping.JMIMapperCFImpl
javax.jmi.xmi.XmiReader
    default: org.netbeans.lib.jmi.xmi.XMISaxReaderImpl
             org.netbeans.lib.jmi.xmi.XMISaxReaderImpl
javax.jmi.xmi.XmiWriter
    default: org.netbeans.lib.jmi.xmi.XMIWriterImpl
             org.netbeans.lib.jmi.xmi.XMIWriterImpl
Comment 1 _ briansmith 2002-06-23 03:53:39 UTC
Created attachment 6379 [details]
Patch to build.xml
Comment 2 _ briansmith 2002-06-23 04:03:32 UTC
Created attachment 6380 [details]
JAR of the new files
Comment 3 _ briansmith 2002-06-23 04:05:13 UTC
Created attachment 6381 [details]
standalone program that produces the report  in my initial comment
Comment 4 Martin Matula 2002-06-30 22:52:01 UTC
integrated