Gunnar Wagenknecht | 1 Oct 09:45
Favicon
Gravatar

Re: Extension registry evolution

Oleg Besedin schrieb:
> Thank you for the comments, lots of good points.

One point that I forgot to mention is something like "scopes" or
"views". This comes from a multi-tenant requirement in CloudFree. I'd
like to be able to scope the visibility of extension to a tenant, i.e.
tenant A is allowed to see a different set of extensions than tenant B.

I don't know if its better implemented as general filtering or using
security/trust. Could be a mixture of both, though. In any case the
transformations don't work because the filtering happens at runtime.

Currently, when a request is received, the tenant context will be
identified and then the available extensions will be filtered based on
that context. I've implemented that on top of the extension registry.
But this requires that I need to use other mechanisms in a hosted
environment to prevent direct registry access from third party tenant
bundles.

-Gunnar

--

-- 
Gunnar Wagenknecht
gunnar@...
http://wagenknecht.org/

Pei Ming Hu | 1 Oct 10:24
Picon
Favicon

Pei Ming Hu is out of the office.

I will be out of the office starting 29/09/2008 and will not return until 05/10/2008.

I will be out of the office starting 09/27/2008 and will not return until 10/05/2008. I will check email occassionally during my holiday.

George Goebel | 1 Oct 18:24
Favicon

Submissions

Many thanks

 

Regards

 

George

 

Cell: 082 493 0934

Fax: 088 011 913-0317

 

george.goebel-LzPWRcFV0Gjk1uMJSBkQmQ@public.gmane.org

 

PO Box 26134                                  

East Rand

1462       

              

 

Jens Dietrich | 1 Oct 22:53
Picon
Picon
Favicon

problems with registry change events

Hi,

I am working on a program that performs some additional integrity checks 
between bundles collaborating through extension points and extensions. I 
want to trigger verification whenever new extensions or extension points 
are registered. I have done a little spike: I wrote a plugin that starts 
early (by adding it to config.ini), and added the following code to the 
start method in the Activator class (the Activator also implements 
IRegistryChangeListener):

private boolean initialized = false;
public void registryChanged(IRegistryChangeEvent e) {
    System.out.println("registry changed");
}
public void start(final BundleContext context) throws Exception {
    super.start(context);
    System.out.println("activating");
    plugin = this;
    BundleListener l = new BundleListener() {
        public void bundleChanged(BundleEvent e) {
            System.out.println("bundle changed: 
"+e.getBundle().getSymbolicName());
            if (!initialized && Platform.getExtensionRegistry()!=null) {

Platform.getExtensionRegistry().addRegistryChangeListener(Activator.this);
                System.out.println("registry loaded");
                initialized = true;
            }
        }
    };
    context.addBundleListener(l);
}

The idea is to wait for the extension registry, and once it becomes 
available to start listening for registry change events. The output on 
the console is the following:

activating
bundle changed: nz.ac.massey.treaty.spikes.events.main
registry loaded
bundle changed: org.eclipse.jface
bundle changed: org.eclipse.ui

... (more bundle changed: .. - )

It seems that registryChanged is never invoked. Even if I install a 
plugin later (once the eclipse instance is running) from a local update 
site, the method is never called (no print out, I have tried to debug as 
well). Why is this?

Any help is appreciated!

Jens

Oleg Besedin | 2 Oct 19:30
Picon
Gravatar

Re: problems with registry change events


Hi Jens,
It does work for me. Using your code:

1 Create a new bundle that contributes to the registry - say, using "Hello world" template for the new plug-in project wizard
2 Add "-console" argument to the Eclipse launch configuration that you are using
3 Start it
4 Use "ss" command in the console to make sure your tracking bundle is started and to find out the ID of the bundle from the step 1
5. Type "refresh <bundle_id_from_step_1> in the console - you'll see the events.

Thanks,
Oleg




Jens Dietrich <j.b.dietrich-GuuZuZYZZ9vScTE++YW6Eg@public.gmane.org>
Sent by: equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

10/01/2008 04:53 PM

Please respond to
Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>

To
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
cc
Subject
[equinox-dev] problems with registry change events





Hi,

I am working on a program that performs some additional integrity checks
between bundles collaborating through extension points and extensions. I
want to trigger verification whenever new extensions or extension points
are registered. I have done a little spike: I wrote a plugin that starts
early (by adding it to config.ini), and added the following code to the
start method in the Activator class (the Activator also implements
IRegistryChangeListener):

private boolean initialized = false;
public void registryChanged(IRegistryChangeEvent e) {
   System.out.println("registry changed");
}
public void start(final BundleContext context) throws Exception {
   super.start(context);
   System.out.println("activating");
   plugin = this;
   BundleListener l = new BundleListener() {
       public void bundleChanged(BundleEvent e) {
           System.out.println("bundle changed:
"+e.getBundle().getSymbolicName());
           if (!initialized && Platform.getExtensionRegistry()!=null) {
               
Platform.getExtensionRegistry().addRegistryChangeListener(Activator.this);
               System.out.println("registry loaded");
               initialized = true;
           }
       }
   };
   context.addBundleListener(l);
}


The idea is to wait for the extension registry, and once it becomes
available to start listening for registry change events. The output on
the console is the following:

activating
bundle changed: nz.ac.massey.treaty.spikes.events.main
registry loaded
bundle changed: org.eclipse.jface
bundle changed: org.eclipse.ui

... (more bundle changed: .. - )


It seems that registryChanged is never invoked. Even if I install a
plugin later (once the eclipse instance is running) from a local update
site, the method is never called (no print out, I have tried to debug as
well). Why is this?

Any help is appreciated!

Jens

_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Jens Dietrich | 3 Oct 01:06
Picon
Picon
Favicon

Re: problems with registry change events

Hi Oleg,

Thanks for your reply. I have tried this and this works for me as  
well. But I had also expected registry events being fired when eclipse  
starts up and the extension registry is populated. BTW, I start  
eclipse with the -clean option to prevent caching.
At which point is the event delivery mechanism switched on? And is  
there a life cycle event signaling when this happens?

Thanks, Jens

Quoting Oleg Besedin <obesedin@...>:

> Hi Jens,
> It does work for me. Using your code:
>
> 1 Create a new bundle that contributes to the registry - say, using "Hello
> world" template for the new plug-in project wizard
> 2 Add "-console" argument to the Eclipse launch configuration that you are
> using
> 3 Start it
> 4 Use "ss" command in the console to make sure your tracking bundle is
> started and to find out the ID of the bundle from the step 1
> 5. Type "refresh <bundle_id_from_step_1> in the console - you'll see the
> events.
>
> Thanks,
> Oleg
>
>
>
>
>
> Jens Dietrich <j.b.dietrich@...>
> Sent by: equinox-dev-bounces@...
> 10/01/2008 04:53 PM
> Please respond to
> Equinox development mailing list <equinox-dev@...>
>
>
> To
> equinox-dev@...
> cc
>
> Subject
> [equinox-dev] problems with registry change events
>
>
>
>
>
>
> Hi,
>
> I am working on a program that performs some additional integrity checks
> between bundles collaborating through extension points and extensions. I
> want to trigger verification whenever new extensions or extension points
> are registered. I have done a little spike: I wrote a plugin that starts
> early (by adding it to config.ini), and added the following code to the
> start method in the Activator class (the Activator also implements
> IRegistryChangeListener):
>
> private boolean initialized = false;
> public void registryChanged(IRegistryChangeEvent e) {
>     System.out.println("registry changed");
> }
> public void start(final BundleContext context) throws Exception {
>     super.start(context);
>     System.out.println("activating");
>     plugin = this;
>     BundleListener l = new BundleListener() {
>         public void bundleChanged(BundleEvent e) {
>             System.out.println("bundle changed:
> "+e.getBundle().getSymbolicName());
>             if (!initialized && Platform.getExtensionRegistry()!=null) {
>
> Platform.getExtensionRegistry().addRegistryChangeListener(Activator.this);
>                 System.out.println("registry loaded");
>                 initialized = true;
>             }
>         }
>     };
>     context.addBundleListener(l);
> }
>
>
> The idea is to wait for the extension registry, and once it becomes
> available to start listening for registry change events. The output on
> the console is the following:
>
> activating
> bundle changed: nz.ac.massey.treaty.spikes.events.main
> registry loaded
> bundle changed: org.eclipse.jface
> bundle changed: org.eclipse.ui
>
> ... (more bundle changed: .. - )
>
>
> It seems that registryChanged is never invoked. Even if I install a
> plugin later (once the eclipse instance is running) from a local update
> site, the method is never called (no print out, I have tried to debug as
> well). Why is this?
>
> Any help is appreciated!
>
> Jens
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@...
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>

Oleg Besedin | 3 Oct 17:48
Picon
Gravatar

Re: problems with registry change events


Usually, extension registry starts early in the application life, before "regular" bundles. During the startup registry processes entries from all resolved bundles (or gets the same information from cache). When "regular" bundles start they get complete information from the registry - no registry events happen.

Usually registry events get generated when bundles are added or removed - such as during the P2 update operations that use "apply changes" rather then restart.

Hope this helps.

Thanks,
Oleg





Jens Dietrich <J.B.Dietrich-GuuZuZYZZ9vScTE++YW6Eg@public.gmane.org>
Sent by: equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

10/02/2008 07:06 PM

Please respond to
Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>

To
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
cc
Subject
Re: [equinox-dev] problems with registry change events





Hi Oleg,

Thanks for your reply. I have tried this and this works for me as  
well. But I had also expected registry events being fired when eclipse  
starts up and the extension registry is populated. BTW, I start  
eclipse with the -clean option to prevent caching.
At which point is the event delivery mechanism switched on? And is  
there a life cycle event signaling when this happens?

Thanks, Jens


Quoting Oleg Besedin <obesedin-G1DYhSM1WHTQT0dZR+AlfA@public.gmane.org>:

> Hi Jens,
> It does work for me. Using your code:
>
> 1 Create a new bundle that contributes to the registry - say, using "Hello
> world" template for the new plug-in project wizard
> 2 Add "-console" argument to the Eclipse launch configuration that you are
> using
> 3 Start it
> 4 Use "ss" command in the console to make sure your tracking bundle is
> started and to find out the ID of the bundle from the step 1
> 5. Type "refresh <bundle_id_from_step_1> in the console - you'll see the
> events.
>
> Thanks,
> Oleg
>
>
>
>
>
> Jens Dietrich <j.b.dietrich-GuuZuZYZZ9vScTE++YW6Eg@public.gmane.org>
> Sent by: equinox-dev-bounces-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
> 10/01/2008 04:53 PM
> Please respond to
> Equinox development mailing list <equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org>
>
>
> To
> equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
> cc
>
> Subject
> [equinox-dev] problems with registry change events
>
>
>
>
>
>
> Hi,
>
> I am working on a program that performs some additional integrity checks
> between bundles collaborating through extension points and extensions. I
> want to trigger verification whenever new extensions or extension points
> are registered. I have done a little spike: I wrote a plugin that starts
> early (by adding it to config.ini), and added the following code to the
> start method in the Activator class (the Activator also implements
> IRegistryChangeListener):
>
> private boolean initialized = false;
> public void registryChanged(IRegistryChangeEvent e) {
>     System.out.println("registry changed");
> }
> public void start(final BundleContext context) throws Exception {
>     super.start(context);
>     System.out.println("activating");
>     plugin = this;
>     BundleListener l = new BundleListener() {
>         public void bundleChanged(BundleEvent e) {
>             System.out.println("bundle changed:
> "+e.getBundle().getSymbolicName());
>             if (!initialized && Platform.getExtensionRegistry()!=null) {
>
> Platform.getExtensionRegistry().addRegistryChangeListener(Activator.this);
>                 System.out.println("registry loaded");
>                 initialized = true;
>             }
>         }
>     };
>     context.addBundleListener(l);
> }
>
>
> The idea is to wait for the extension registry, and once it becomes
> available to start listening for registry change events. The output on
> the console is the following:
>
> activating
> bundle changed: nz.ac.massey.treaty.spikes.events.main
> registry loaded
> bundle changed: org.eclipse.jface
> bundle changed: org.eclipse.ui
>
> ... (more bundle changed: .. - )
>
>
> It seems that registryChanged is never invoked. Even if I install a
> plugin later (once the eclipse instance is running) from a local update
> site, the method is never called (no print out, I have tried to debug as
> well). Why is this?
>
> Any help is appreciated!
>
> Jens
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>


_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Janet Dmitrovich | 3 Oct 22:25
Picon
Favicon

is there an option (per jar ) that can be used to skip normalize

On this jarprocessor options page, http://wiki.eclipse.org/JarProcessor_Options

It mentions that you can add an option per jar to not sign or not pack
But is there an option to not normalize?

So we are normalizing and signing a full update site but there is one jar we do not want to normalize before packing.



Janet Dmitrovich
WPLC Expeditor Software Development
jdmitrov-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
512-838-4912 T/L:678-4912 FAX:512-838-3703
11501 Burnet Road, Austin TX 78758 (Internal ZIP: 9372)

Jens Dietrich | 6 Oct 01:40
Picon
Picon
Favicon

Re: problems with registry change events

Oleg,

Ok, this explains it. Is this startup procedure documented somewhere? 
Also, I think it would be a good idea to fire a FrameWorkEvent once the 
"regular" bundles have been started and the registry events are being 
switched on.
BTW, if someone is interested why I ask those questions - I try to 
trigger contract verification when the registry changes, this is part of 
an open source research project: http://code.google.com/p/treaty/ .

Cheers, Jens

Oleg Besedin wrote:
>
> Usually, extension registry starts early in the application life, 
> before "regular" bundles. During the startup registry processes 
> entries from all resolved bundles (or gets the same information from 
> cache). When "regular" bundles start they get complete information 
> from the registry - no registry events happen.
>
> Usually registry events get generated when bundles are added or 
> removed - such as during the P2 update operations that use "apply 
> changes" rather then restart.
>
> Hope this helps.
>
> Thanks,
> Oleg
>
>
>
>
>
> *Jens Dietrich <J.B.Dietrich@...>*
> Sent by: equinox-dev-bounces@...
>
> 10/02/2008 07:06 PM
> Please respond to
> Equinox development mailing list <equinox-dev@...>
>
>
> 	
> To
> 	equinox-dev@...
> cc
> 	
> Subject
> 	Re: [equinox-dev] problems with registry change events
>
>
>
> 	
>
>
>
>
>
> Hi Oleg,
>
> Thanks for your reply. I have tried this and this works for me as  
> well. But I had also expected registry events being fired when eclipse  
> starts up and the extension registry is populated. BTW, I start  
> eclipse with the -clean option to prevent caching.
> At which point is the event delivery mechanism switched on? And is  
> there a life cycle event signaling when this happens?
>
> Thanks, Jens
>
>
> Quoting Oleg Besedin <obesedin@...>:
>
> > Hi Jens,
> > It does work for me. Using your code:
> >
> > 1 Create a new bundle that contributes to the registry - say, using 
> "Hello
> > world" template for the new plug-in project wizard
> > 2 Add "-console" argument to the Eclipse launch configuration that 
> you are
> > using
> > 3 Start it
> > 4 Use "ss" command in the console to make sure your tracking bundle is
> > started and to find out the ID of the bundle from the step 1
> > 5. Type "refresh <bundle_id_from_step_1> in the console - you'll see the
> > events.
> >
> > Thanks,
> > Oleg
> >
> >
> >
> >
> >
> > Jens Dietrich <j.b.dietrich@...>
> > Sent by: equinox-dev-bounces@...
> > 10/01/2008 04:53 PM
> > Please respond to
> > Equinox development mailing list <equinox-dev@...>
> >
> >
> > To
> > equinox-dev@...
> > cc
> >
> > Subject
> > [equinox-dev] problems with registry change events
> >
> >
> >
> >
> >
> >
> > Hi,
> >
> > I am working on a program that performs some additional integrity checks
> > between bundles collaborating through extension points and extensions. I
> > want to trigger verification whenever new extensions or extension points
> > are registered. I have done a little spike: I wrote a plugin that starts
> > early (by adding it to config.ini), and added the following code to the
> > start method in the Activator class (the Activator also implements
> > IRegistryChangeListener):
> >
> > private boolean initialized = false;
> > public void registryChanged(IRegistryChangeEvent e) {
> >     System.out.println("registry changed");
> > }
> > public void start(final BundleContext context) throws Exception {
> >     super.start(context);
> >     System.out.println("activating");
> >     plugin = this;
> >     BundleListener l = new BundleListener() {
> >         public void bundleChanged(BundleEvent e) {
> >             System.out.println("bundle changed:
> > "+e.getBundle().getSymbolicName());
> >             if (!initialized && Platform.getExtensionRegistry()!=null) {
> >
> > 
> Platform.getExtensionRegistry().addRegistryChangeListener(Activator.this);
> >                 System.out.println("registry loaded");
> >                 initialized = true;
> >             }
> >         }
> >     };
> >     context.addBundleListener(l);
> > }
> >
> >
> > The idea is to wait for the extension registry, and once it becomes
> > available to start listening for registry change events. The output on
> > the console is the following:
> >
> > activating
> > bundle changed: nz.ac.massey.treaty.spikes.events.main
> > registry loaded
> > bundle changed: org.eclipse.jface
> > bundle changed: org.eclipse.ui
> >
> > ... (more bundle changed: .. - )
> >
> >
> > It seems that registryChanged is never invoked. Even if I install a
> > plugin later (once the eclipse instance is running) from a local update
> > site, the method is never called (no print out, I have tried to debug as
> > well). Why is this?
> >
> > Any help is appreciated!
> >
> > Jens
> >
> > _______________________________________________
> > equinox-dev mailing list
> > equinox-dev@...
> > https://dev.eclipse.org/mailman/listinfo/equinox-dev
> >
> >
>
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@...
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@...
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>   

Janet Dmitrovich | 6 Oct 05:00
Picon
Favicon

Problem with adding -repack to normalize

For our product ( Eclipse 3.4 based ) we have been successfully signing the jars, and the install of our product was successful.
Also installing any optional jars via the App Mgr was successful.

When we added -repack to the process ( to normalize the jars before signing ) the result was that ( almost all ) of the jars would not install via App Mgr
The error was invalid or corrupted signature.

Any ideas on why this could occur?

thanks, Janet

Janet Dmitrovich
WPLC Expeditor Software Development
jdmitrov-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
512-838-4912 T/L:678-4912 FAX:512-838-3703
11501 Burnet Road, Austin TX 78758 (Internal ZIP: 9372)


Gmane