tag:blogger.com,1999:blog-34692233.post7003140961686063653..comments2007-06-22T09:45:57.432+01:00Comments on Mind the gap: Comparison of JSR 277 and JSR 291 featuresGlynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-34692233.post-66770811591287561852007-06-22T09:45:00.000+01:002007-06-22T09:45:00.000+01:00I checked and found JSR 291 also provides a compre...I checked and found JSR 291 also provides a comprehensive reflective API in the form of the <A HREF="http://www2.osgi.org/javadoc/r4/org/osgi/service/packageadmin/PackageAdmin.html" REL="nofollow">PackageAdmin</A> service in addition to the <A HREF="http://www2.osgi.org/javadoc/r4/org/osgi/framework/Bundle.html" REL="nofollow">Bundle</A> interface mentioned above.<BR/><BR/>In particular, PackageAdmin lets you query package and module dependencies, their names and versions, as well as whether these dependencies are 'pending removal', which means whether they are satisfied by a module which has been updated or uninstalled.<BR/><BR/>So I've added reflective API to the list of equivalent features (omitting the adjective 'comprehensive' to avoid marketing overtones).Glynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-30431240594338994382007-06-21T20:54:00.000+01:002007-06-21T20:54:00.000+01:00Fair point about integration with vs agnosticism t...Fair point about integration with vs agnosticism towards JSR 294. I'll probably write this up rather than try to cram it in a couple of bullets. Meanwhile your comment is here for the record.<BR/><BR/>I need to check the precise reflective capabilities of JSR 291 to compare it accurately against the JSR 277 reflective API.<BR/><BR/>The provider SPIs in the EDR are really nothing more than placeholders. IIRC they aren't referred to in the rest of the spec.Glynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-55122371404107550842007-06-21T20:15:00.000+01:002007-06-21T20:15:00.000+01:00Glyn,see comments below.>. integration with modula...Glyn,<BR/><BR/>see comments below.<BR/><BR/><EM><BR/>>. integration with modularity at<BR/>> the Java language and VM level<BR/>> (through JSR 294)<BR/><BR/>Wouldn't JSR 291 benefit equally from JSR 294's language and VM support for modules? A JSR 291 module would simply have to wrap its classes in one (or more) superpackages.<BR/></EM><BR/><BR/>JSR 291 will be able to utilize superpackages. However, the information in the superpackage (name, members, exports, metadata) has no meaning to JSR 291 as it stands today and needs to be duplicated in the OSGi manifest.<BR/>In other words, JSR 291 is agnostic of superpackages and not integrated with them, similar to other existing deployment mechanisms such as a JAR + URLClassLoader.<BR/><BR/><EM><BR/>>. comprehensive reflective APIs<BR/><BR/>This seems more like a common feature. JSR 291's Bundle interface enables a module's metadata, state, and other properties to be accessed reflectively.<BR/></EM><BR/><BR/>JSR 291 has a runtime API, but as far as I am aware it does not reflect all OSGi concepts. For example dependencies: which actual bundles/package was my bundle wired up with at runtime? Having a comprehensive reflective API for all features is important to enable innovation in higher level libraries as well as for diagnostics.<BR/><BR/><EM><BR/>>. module system framework that allows<BR/>> other module system implementations<BR/>> to be plugged in<BR/><BR/>The EDR doesn't actually allow this, although this is listed as an Expert Group work item in section C.7.<BR/></EM><BR/><BR/>The EDR is also pluggable, it just uses a delegation model instead of direct subclassing. See ModuleProvider and ModuleDefinitionProvider in the spi package.<BR/><BR/>Andreas.Andreashttp://www.blogger.com/profile/04321524203996818364noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-64304532348037924832007-06-21T13:45:00.000+01:002007-06-21T13:45:00.000+01:00Thanks Andreas.>. integration with modularity at> ...Thanks Andreas.<BR/><BR/>>. integration with modularity at<BR/>> the Java language and VM level<BR/>> (through JSR 294)<BR/><BR/>Wouldn't JSR 291 benefit equally from JSR 294's language and VM support for modules? A JSR 291 module would simply have to wrap its classes in one (or more) superpackages.<BR/><BR/>Or was your point simply that JSR 277 attaches its metadata to superpackages?<BR/><BR/>>. comprehensive reflective APIs<BR/><BR/>This seems more like a common feature. JSR 291's <A HREF="http://www2.osgi.org/javadoc/r4/org/osgi/framework/Bundle.html" REL="nofollow">Bundle </A> interface enables a module's metadata, state, and other properties to be accessed reflectively.<BR/><BR/>>. hierarchical repository structure<BR/>> with delegation<BR/>><BR/>>. multiple standard repository<BR/>> implementations, suitable for both<BR/>> local and networked deployment<BR/>> (Local and URL repository)<BR/>><BR/>>. extensible architecture allowing<BR/>> for pluggable 3rd party repository<BR/>> implementations<BR/><BR/>These are sub-features of the repository feature which was already listed as unique to JSR 277, but I've added them as sub-bullets for clarity.<BR/><BR/>>. module system framework that allows<BR/>> other module system implementations<BR/>> to be plugged in<BR/><BR/>The EDR doesn't actually allow this, although this is listed as an Expert Group work item in section C.7.<BR/><BR/>In particular, the EDR declares Module and ModuleDefinition as 'final' classes so there's no way to subclass them.Glynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-46148598264867921102007-06-21T03:39:00.000+01:002007-06-21T03:39:00.000+01:00Glyn,I believe you are missing a few items in the ...Glyn,<BR/><BR/>I believe you are missing a few items in the "Unique to JSR 277" section:<BR/><BR/> . integration with modularity at the Java language and VM level (through JSR 294)<BR/><BR/> . comprehensive reflective APIs<BR/><BR/> . hierarchical repository structure with delegation<BR/><BR/> . multiple standard repository implementations, suitable for both local and networked deployment (Local and URL repository)<BR/><BR/> . extensible architecture allowing for pluggable 3rd party repository implementations<BR/><BR/> . module system framework that allows other module system implementations to be plugged in<BR/><BR/>That list is based on the EDR. More recent discussion in the JSR 277 EG is also yielding other features such as integration with java.util.ResourceBundle and java.util.ServiceLoader, among other things.<BR/><BR/>Andreas.Andreashttp://www.blogger.com/profile/04321524203996818364noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-71483464854208221982007-06-20T16:34:00.000+01:002007-06-20T16:34:00.000+01:00Don't mind me. I'm just arson about.Don't mind me. I'm just arson about.AlBluehttp://www.blogger.com/profile/06362201865553416948noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-90570122209902526832007-06-20T13:59:00.000+01:002007-06-20T13:59:00.000+01:00No, it really is "class vs package", but I can see...No, it really is "class vs package", but I can see why this might be confusing, so I wrote a <A HREF="http://underlap.blogspot.com/2007/06/default-export-granularity.html" REL="nofollow">clarification</A>.Glynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-76166328804829654962007-06-20T11:20:00.000+01:002007-06-20T11:20:00.000+01:00"Default export granularity: class vs package"shou..."Default export granularity: class vs package"<BR/><BR/>should that be "module vs package"?mccullshttp://www.blogger.com/profile/04261077211575061061noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-57490334397152023702007-06-19T07:02:00.000+01:002007-06-19T07:02:00.000+01:00There's enough arson about already.There's enough arson about already.Glynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-70877221445768987982007-06-18T22:55:00.000+01:002007-06-18T22:55:00.000+01:00Build a man a fire and he'll be warm for a day. Se...Build a man a fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life -- Terry Pratchett :-)AlBluehttp://www.blogger.com/profile/06362201865553416948noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-89744036698714320742007-06-18T16:47:00.000+01:002007-06-18T16:47:00.000+01:00Hi Alex. I was trying to create light rather than ...Hi Alex. I was trying to create light rather than heat.Glynhttp://www.blogger.com/profile/08741529390385812080noreply@blogger.comtag:blogger.com,1999:blog-34692233.post-87502259660239137062007-06-18T13:01:00.000+01:002007-06-18T13:01:00.000+01:00You forgot:* Number of years design and deployment...You forgot:<BR/><BR/>* Number of years design and deployment: 0 vs 7<BR/>* Number of companies using the technology: 0 vs many<BR/>* Number of companies wishing to NIH: 1 vs 0<BR/><BR/>:-9<BR/><BR/>AlexAlBluehttp://www.blogger.com/profile/06362201865553416948noreply@blogger.com