Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 305407 - Need a separate plugin for non-AutoStart extensions
Summary: Need a separate plugin for non-AutoStart extensions
Status: RESOLVED WONTFIX
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M7   Edit
Assignee: Ian Trimble CLA
QA Contact:
URL:
Whiteboard: packaging
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-10 16:15 EST by Cameron Bateman CLA
Modified: 2010-04-22 13:58 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Bateman CLA 2010-03-10 16:15:22 EST
There are a number extensions that are recommended for use only in plugins that don't use AutoStart.  This is because otherwise, the act of discovering and initializing all the extensions will pre-maturely active bundles that aren't yet needed and may never be need in most contexts.

One such extension that applies to us is the one for registering content types.  See 295514.
Comment 1 Ian Trimble CLA 2010-04-21 18:57:21 EDT
Fix submitted at: 2010/04/21 03:56PM PDT
Comment 2 David Williams CLA 2010-04-22 00:08:16 EDT
I don't understand the need to have a separate plugin. 

For example, for some content types, we simply exclude the package that contains the content type code: 

Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.wst.xml.core.internal.contenttype"

It is exactly the right goal to avoid pre-mature start-up ... but I'd appreciate better understanding for the need for a separate plugin.
Comment 3 Cameron Bateman CLA 2010-04-22 12:25:18 EDT
We were under the impression that a separate plugin to segregate these things was the best way to minimize unnecessary bundle activation.  The intention was to use it for all current and future extensions that have similar behavior to content type.

I was not aware of this exclude option.  If it accomplishes the same effect then we can certainly eliminate the extra plugin.

Yury: since you represent the other major party interested in this, could you chime if either alternative is or isn't workable for you?

Ian: could you try out David's suggestion with the content type describer in jst.jsf.core and add this exclude option to bundle manifest?
Comment 4 Yury Kats CLA 2010-04-22 13:45:24 EDT
I think had already described this approach in the original content-type bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=295514#c1

It does not matter to me really how this is implemented as long as the content-type contribution does not result in loading of all the jsf bundles.
I have personally never used the "exclude" syntax in Bundle-ActivationPolicy, so I have no experience with how it works. I do trust David's opinion though.
Comment 5 Ian Trimble CLA 2010-04-22 13:58:47 EDT
There was a simple misunderstanding of what was required. We don't need a new plug-in, and bug 295514 is not blocked by this bug.

I have tested the exclude parameter of the Bundle-ActivationPolicy property and it works as advertised - a class loaded from any excluded package (assuming the policy is "lazy") will not cause a change in bundle state.

New content types will be added to excluded packages of existing JSF plug-ins (for facelets, they will be added to the JSF core plug-in).